I am new to robotics, however I am designing a PID to control the angular velocity (azimuth, elevation) of a couple of Faulhaber motors. The input to the PID control is the actual angular velocity, which is not observed though, since it is derived from the position of each motor at time $t$.

The PID sample period is aprox. 30 ms, whereas the input data rate from the joystick is aprox. 300 samples/s, corresponding to a sample period of 3.33 ms. The joystick input gets transformed into the desired angle speed, that the PID will control.

I was initially filtering position data using a normal 2D linear Kalman Filter, but the angular velocity is not linear (by formula), hence I switched to Extended Kalman filtering.

My questions are the following:

  1. Is this latter approach that makes use of EKF correct?
  2. Which are the parameters that I have to check in order to properly set the update rate of the PID loop?

Thx in advance!

  • 1
    $\begingroup$ Something doesn't make sense... Is your system nonlinear? If so, how could you possibly manage to exploit the standard KF? If not. Then would you expect EKF to give you anything different from KF? $\endgroup$
    – Paul
    May 3, 2015 at 2:54

1 Answer 1


Why did you switch to EKF? KF is standard for estimating the angular rate of a electrical motor, whose transfer function is linear indeed. You might want to consider exploring also the Savitzky-Golay filter as a valid alternative, which is not model based.

Concerning the sample period of the controller, it is normally a good rule to take a frequency separation of one decade, at least, between the rate of the system and the bandwidth of the input signal. Therefore, the actual sample rate of the joystick input is an overkill.

A sample period for the PID of 5-10 ms is usually fine, given the low mechanical cut-off frequency of the motor (higher rates are better, but not required). Then, acquire the joystick at >50 ms.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.