cnpcshangbo/FOPD-tuner

Arg equation doesn't match Bode plot?

cnpcshangbo opened this issue ยท 3 comments

From out derivation,

    APM1 = atan2(ki*w^lambda*sin(pi*lambda/2),(1+ki*w^lambda*cos(pi*lambda/2)))+atan2(1,T1*w).

It should have the same results as our Bode phase plot, however they don't match for the FOPD controller.

Finally, I figured out where the bug is.
It is because I used different FO controller models.
At the definition section, I used:

C_FO=Kp+Ki/s^lambda;

However, the latter derivation used:

C_FO=Kp+Ki*s^lambda;

Therefore, I need to redefine the C_FO using C_FO=Kp+Kd*s^lambda to avoid confusion.

image
image
I'll figure out why FOPD vibrates after I replace ki with kd.

Time-domain good now. Lamda in Simulink model should not have negative symbol.