Linear motor acceleration estimation method based on grating signals