About Position I-PD Algorithm

in the manual refers “Then, the terms from the Proportional and Differential
gains are subtracted from the Integral Gain term. The resulting value (in percent) is multiplied by the maximum
output (typically 10V), to come up with the Control Output voltage for that loop time”

Proportional Gain
In this control mode, the Proportional Gain multiplied by the change in the Actual Position is subtracted
from the Control Output each control loop.
 Differential Gain
In this control mode, the Differential Gain multiplied by the change in the Actual Velocity is subtracted from
the Control Output each control loop.

I can’t good unstand the meaning 。 Can Give me an example?thank you。
In the I-PD,Proportional term is Proportional gain* actual positon change not Position Error. why? I can’t undstand.

Are you ready?

The normal form of the PID is usually done like this
COi(n)=CIO(n-1)+KiΔt(TarPos(n)-ActPos(n))
COp(n)=Kp*(TarPos(n)-ActPos(n))
COd(n)=Kd*(TarVel(n)-ActVel(n))
CO(n)=CIO(n)+COp(n)+COd(n)

The I-PD form ignores the TarPos and TarVel for the P and D terms and assumes they are 0 so the result is
COi(n)=COi(n-1)+KiΔt(TarPos(n)-ActPos(n))
COp(n)=Kp*(0-ActPos(n))
COd(n)=Kd*(0-ActVel(n))
CO(n)=COi(n)+COp(n)+COd(n)
or
COp(n)=-Kp*(ActPos(n))
COd(n)=-Kd*(ActVel(n))
CO(n)=COi(n)+COp(n)+COd(n)
now here is where things get tricky. Subtract the equations for COp and COd from themselves but delayed 1 time period,
COp(n)-COp(n-1)=-Kp*(ActPos(n))-(-Kp*(ActPos(n-1))
COd(n)-COd(n-1)=-Kd*(ActVel(n))-(-Kd*(ActVel(n-1))
now move the COp(n-1) and Cod(n-1) terms to the right side
COp(n)=COp(n-1)-Kp*(ActPos(n))-(-Kp*(ActPos(n-1))
COd(n)=COd(n-1)-Kd*(ActVel(n))-(-Kd*(ActVel(n-1))
Since
CO(n)=COi(n)+COp(n)+COd(n) and CO(n-1)=COi(n-1)+COp(n-1)+COd(n-1)
we can combine the I P and D terms.
CO(n)=CO(n-1)+KiΔt(TarPos(n)-ActPos(n))-Kp*(ActPos(n))-(-Kp*(ActPos(n-1))-Kd*(ActVel(n))-(-Kd*(ActVel(n-1))
Simplify
CO(n)=CO(n-1)+KiΔt(TarPos(n)-ActPos(n))-Kp*(ActPos(n))-(ActPos(n-1))-Kd*(ActVel(n))-ActVel(n-1))
Lets simplify
ΔActPos(n)=ActPos(n)-ActPos(n-1)
ΔActVel(n)=ActVel(n)-ActVel(n-1)
then
CO(n)=CO(n-1)+KiΔt(TarPos(n)-ActPos(n))-KpΔActPos(n)-KdΔActVel(n)
now you can see that the change in position time KP is subtracted from the output.
The same goes for the change in velocity.

thanks peter,that’s i want。

Another question,in i-pd mode, if there is only Integral Gain term,Is not better?

I cant udstand the effect of the Proportional and Differential gains in prevent overshoot?

The P and D gains are extremely important. There is also a need for a second derivative gain when the system is “springy”. A hydraulic system can be modeled as a mass between two springs. The mass between two springs has two complex poles which means it will oscillate. Integrating velocity to position adds another pole and the controller integrator adds one pole. If you want to avoid oscillation all the closed loop poles must be moved to the negative real axis is the s-plain. If all the closed loop poles are on the negative real axis the control is either critically or over damped. Since there are four poles there is a need for four gains to place each one. This means there is a need for a Ki, Kp, Kd and K2(second derivative) gains.

Here is a link to an example that I made for a PLC forum where people were doubting the need to use the derivative gain.
Duck, more heavy stuff coming your way.
deltamotion.com/peter/Mathcad/Ma … ng-PID.pdf
The goal is to “tune” the system. I used a PID with second derivative gain. You can see there is no over shoot. Pandiani took up the challenge of trying to tune the same system without the derivative gain. You can see the results are poor and there is a lot of over shoot. I then took up the challenge to try to tune the system without using the derivative gain. I used and optimizer routine that finds the gains that minimizes the error between the set point and the actual position. My optimizing method did better but it still wasn’t as good as using the PID with second derivative gain.

Now you know ONE reason why we have a second derivative gain. It is also why we have a jerk feed forward.
The other reason for having the second derivative gain is that the response can be tuned up to be MUCH better with a PID and second derivative gain. There are real limits on how fast you can get a PID or PI control to work and it is solely dependent on the mechanical/hydraulic design.