Proportional-Integral-Derivative(PID) Controller
A proportional-integral-derivative controller (PID controller) is a control loop mechanism employing feedback taht is widely used in industrial control systems and a variety of other applications requiring continously modulated control.
Principle
A PID controller continuously calculates an error value as the difference between a desired setpoint (SP) and a measured process variable (PV) and applies a correction based on proportional, integral, and derivate terms (denoted P, I and D respectively),
hence the name.
Positional PID Controller
From the above image, we can get the equation of Postional PID controller:
In this equation, means the error between target output and current output; is the coefficient of the proportional process; is the coefficient of the integral process; is the coefficient of the derivative process.
However, in industrial control systems, the input and output values are discrete and we obtain them by sampling periodically by sensors. Therefore, the equation of PID controller should be transfromed into the discrete equation, in which is the sampling period.
Through the above equation, the control signal could be calculated by sampling the output of the discrete system each step. Therefore, such equation is named Positional PID Controller, since it calculates the input signals each step.
Unfortunately, Positional PID controller needs to save and compute all the errors between target output and actual output from the beginning till now, which cost numerous computing resources. Hence, Incremental PID Controller is introduced to resolve the problem.
Incremental PID Controller
A new equation of positional PID controller in the moment is introduced,
Use the equation (1) minus eqution (2), equation (3) could be obtained.
Through equation (3), we can calculate the increment of control signals only by saving past errors , .
Bonus
So, how to choose the optimal value of parameters , and ?
KP
The parameter has an impact on the proportional process of PID controller and decide the tracking speed. However, if the plant is affected by an external load, the pure P Controller cannot reach the target output, which introduces the steady-state error.
TI
In order to eliminate the steady-state error, integral process is introduced and this procedure depends on the parameter . Although the integral process is able to eliminate the steady-state error, it brings the problem of overshooting and oscillation.
TD
To resolve the problem of overshooting, derivative process use errors and to output the correction value.
Adjust Parameters
Hence, we can optimize the parameters of PID Controller through the following processes,
Common Method
- Set a small and an infinite with eqaulling to 0. Then gradually increase until getting an opportune tracking speed and a satisfactory quarter attenuation transition curve.
- If the steady-state error occurs, increase the effect of the integral process by decrease the parameter until we think the integral process is enough, meanwhile, should be set to .
- If the problem of overshooting and oscillation occurs, set and increase it, which can miligate the problem but it will slow down the tracking speed.
Critical Ratio Method
- Set a small and an infinite with eqaulling to 0. Then gradually increase until getting an equal amplitude oscillation, then record the critical coefficient and the critical period of ascillation .
- Calculate the coefficients of according to empirical formula.
- Set coefficients of PID controller to the computed parameter and optimize them if necessary.