First of all, sorry for the late delay after promising for following parts of the practical PID controller. This is going to be a short post as few more parts are going to come up. And in the final post, I will upload the C file and H file for public use along with the documentation.
In this post, I will describe about the derivative part of the controller. From the formula in the first part, it is a derivative of the error that we wants. But in real life situation, usually the sensors data obtain usually are noisy. We can have a simple example here.
Take a function, x(t).
Therefore, to solve, I have used the approximation of the derivative component by attenuating the higher frequency components. If you have taken Signal classes, you will learn what is Bode plot (anyway, it is pronounced Bow-Dee). Derivative can be approximated with S and the plot for S is shown in the picture below as the dotted line.
To have the higher frequency attenuated, I have added a low pass filter to the Bode plot appears to be like the solid line in the picture above. The formula in frequency domain used is like the formula below.
All right. For now it is all talk and no action. Of course the action will have to wait. There are few more posts on this practical PID articles and finally I will share the code on how to implement it. Stay tuned.
Practical PID Controller Part I