MATLAB: Do I get different value for pole placement function

place

Folks,
I need to design a state variable feedback regulator for following discrete time closed-loop system with a pair of complex poles at 0.3+i0.4 and 0.3-j0.4 .
For which I am using Ackermann’s formula as below:
Since we know about the location of desired poles, hence:
And to implement above equation in Matlab, I use following:
p1=0.3 + 0.4*1i;
p2=0.3 - 0.4*1i;
P_z=(z-p1)*(z-p2);
P_phi=eval(subs(P_z,z,phi));
K1=[0 1]*([gamma,phi*gamma]\P_phi);
Result:
K1 =
-1463.39992735389 274.509346733496
But, if I use Matlab's place command instead, I get different result:
K2=place(phi,gamma,[p1 p2]);
Result:
K2 =
321.895478432477 -36.132432596429
Can someone please tell me why I get distinct values for K1 and K2 whereas I am expecting to get the same result for both

Best Answer

Your code is not correct
gamma=[0;0.9948*10^(-4)]
phi=[1 0.0001;-0.0503 0.9896]
e=[0 1]*inv([gamma fi*gamma])
p1=0.3 + 0.4*1i;
p2=0.3 - 0.4*1i;
alpha=fliplr(poly([p1,p2]))
k1=alpha(1)*e+alpha(2)*e*phi+e*phi^2
k2=place(phi,gamma,[p1 p2])
Related Question