How can a 2 DOF System be unstable? ("Warning: The closed-loop system is unstable")
I am trying to find the Gain Margin so that to calculate Kp,Ki,Kd paramaters according to ZN method but I get this error "Warning: The closed-loop system is unstable".
I have double checked my equations of motion so to be sure that I didn't make any mistake when I converted to Transfer Function.
m1 = 2500;
m2 = 320;
k1 = 80000;
k2 = 500000;
b1 = 350;
b2 = 15020;
num = [(0) (-m1*b2) (-m1*k2) (0) (0)];
den = [(m1*m2) (m1*b1+m1*b2+m2*b1) (m1*k1+m1*k2+m2*k1+b1*b2) (b1*k2+k1*b2) (k1*k2)];
G = tf(num,den);
[Gm,Pm,Wgm,Wpm] = margin(G)
Warning: The closed-loop system is unstable.
> In ctrlMsgUtils.warning (line 25)
In DynamicSystem/margin (line 65)**