Re: PID Algorithm
Hi,
I suppose the overall concept is as follows and I am sure other members here will be able to clarify it further.
In a PID controller, the control voltage is calculated as a sum of Proportional, Integral and Differential of the error voltage. So, the control voltage Vc can be written as :
Vc = K1*Ve + K2*∫Vedt + K3* dVe/dt
In many feeback control systems, only the proportional term K1*Ve is used. So when a step input is applied, the initial correction takes place as decided by the magnitude of error voltage.
By adding to the control voltage a term proportional to the rate of change of error (differential term ), the initial correction time can be reduced and as the error gets reduced this term will also get reduced. Thus the addition of the differential term improves the initial speed of response of the control system. But if you add more of this term there could be overshoots and damped oscillations in the sytem depending on the phase and gain margins of the system.
The integral term on the other hand adds a time average of the error signal which also gets reduced as the magnitude of error reduces. The effect of integral is more to stabilise the system response and to improve the accuracy of control, since it integrates the error term and even a small error gets corrected in the process.
The PID algorithm should therefore be able to calculate the value of Vc dynamically for given values of k1,k2 and k3.
Regards,
Laktronics