cnpcshangbo/FOPD-tuner

Is APM method really better than traditional flat phase specification?

Opened this issue · 6 comments

Let's see this:
wc=2.51; phi_m=83.9;
Using APM:
lambda=0.9748, kd=0.5958, kp=2.7721;
FPS:
lambda=0.9694, kd=0.6192, kp=2.6992;
We need to do Bode plot comparison and step response comparison.

image
APM is slightly faster but has a slightly higher overshoot.

image
Bode plot is not better either. I need to tune the objective function now.

Then I tried an objective function like this:

w=wc;
APM1 = atan2(kd*w^lambda*sin(pi*lambda/2),(1+kd*w^lambda*cos(pi*lambda/2)))...
    +atan2(1,T1*w);
w=wc*1.5;
APM2 = atan2(kd*w^lambda*sin(pi*lambda/2),(1+kd*w^lambda*cos(pi*lambda/2)))...
    +atan2(1,T1*w);
w=wc*0.5;
APM3 = atan2(kd*w^lambda*sin(pi*lambda/2),(1+kd*w^lambda*cos(pi*lambda/2)))...
    +atan2(1,T1*w);

% APM = abs(phi_m-APM1/pi*180)+abs(phi_m-APM2/pi*180)+abs(phi_m-APM3/pi*180);
APM = abs(phi_m-APM1/pi*180)-APM2-APM3;

lambda=0.9694; kd=0.6192; kp=2.6991;
It is almost the same as FPS method. We need to try some other conditions especially when FPS method has no solution.

image
wc = 2.51; PM = 90; lambda = 1.0387; kd = 0.6192; kp = 2.7111;

K = 1.0263; %plant gain
T1 = 0.71; %plant time constant
wc = 2.51; %crossover frequency
phi = 83.9; %phase margin
image

FPS method has no solution

global K T1 wc phi %inputs
K = 1.0263; %plant gain
T1 = 0.71; %plant time constant
wc = 2; %crossover frequency
phi = 90; %phase margin

IOPID controller

Kp = 1.95, Ki = 0.369, Kd = 1.48
image

APM method has solution

image
image