i deleted original post. i did not carefully read your question.
the problem is in the sensor. i think you only need to add a compensator to correct phase shift. there should be a chapter on compensator design in control systems books.
another way is to mathematically apply filtering/...