As I started to talk about PID control basics let me introduce you the main idea of this type controller and how it can be used practically.
PID is the abbriviation which stands for Proportional - Integral - Derivative controller, means that the controller consists of this three instances. You must remember that the controller is loop feedback type. What does it mean?
It means that to control one of the signals or instances of the system, for example speed or direction angle or position we need to measure this instance and compare the current value with the one we want to reach. This is done by calculating of error value. So, like in life we have to know the error/ difference between what we want to reach and where we are now.
How it can be done? Here we will turn to mathematics, in reality it is not very complex and can be easily understood if it is proper way explained. I will try to do this.
So lets imagine the situation when we have a robot and we want to turn to the required direction. What parameters we have to control in this case? There are not to many parameters, exactly there are only two parameters to control:
- Rotation velocity(degree/second)
- Angle (degree)
Which parameter in this case would be changed and which parameter would be used to measure the success?
So in this case we are going to control and change rotation velocity and measure if the angle we want is reached or not? How can we do this?
Lets say we can rotate robot for some time and measure the angle it reached, in this case we would need to rotate it very slowly with constant speed so we would not miss the desired angle. This will work but it is not very effective, especially if we want to turn quickly and precisely.
In this case maths come to us as a helper. So we are going to measure angle - lets call this variable θ and we are going to control rotation velocity - lets call it ω.
From the course of mechanics we can get the link between angle and angle velocity - other words our rotation speed:
ω=θ/t , where t is time in seconds
To be continue…
