Why is the step response of the system is stable while one pole of the same system has positive real part?

536 Views Asked by At

I have the following closed-loop system: $$sys=\frac{0.009211 s^6 + 10.58 s^5 + 55.97 s^4 - 82.77 s^3 - 774.1 s^2 - 871.8 s}{7.656e-07 s^8 + 0.00175 s^7 + 1.009 s^6 + 10.53 s^5 + 28.37 s^4 - 82.44 s^3 - 583.6 s^2- 871.8 s}$$ analysis stability by positioning of poles with Matlab gives that one pole has positive real part:

in Matlab

pole(sys)

ans =

1.0e+03 *

0.0000 + 0.0000i

-1.1429 + 0.0000i

-1.1323 + 0.0000i

0.0037 + 0.0000i (unstable)

-0.0034 + 0.0023i

-0.0034 - 0.0023i

-0.0038 + 0.0000i

-0.0037 + 0.0000i

while the step response of the system is stable

step(sys) enter image description here

That system is a second order plant with PID controller; the plant is

a=[0 1;13.8 0];

b=[0;-2.568];

c=[1 0];

d=0;

[f,g]=ss2tf(a,b,c,d);

plant=tf(f,g);

The PID controller:

s=tf('s');

Kp=-21.8;

Ki=-24.6;

Kd=-4.08;

Tf=0.000875;

u=Kp+Ki*(1/s)+Kd*(s/(Tf*s+1));

The closed loop system;

sys=u * plant/(1+u*plant);

After that you can check poles and step response as above.

1

There are 1 best solutions below

1
On BEST ANSWER

There are two different problems here.

1.) If you don't pass a time vector to the step function, Matlab can't know how long it should simulate. So, it makes a guess, based on heuristics with the goal to simulate long enough to capture everything that is "interesting".

This guess can be wrong: Let's take the transfer function from your question:

num = [0 0 0.009210621525 10.575457566675 55.965845822955 -82.768514420115 -774.08274312 -871.78464 0];
den =  [7.65625e-07 0.00175 1.009189490275 10.527157566675 28.36599162858 -82.435244420115 -583.64274312 -871.78464 0];
G = tf(num, den);
step(G);

This code reproduces your problem. Now, instead of step(G); use:

t = linspace(0, 10, 10000);
step(t, G);

And you will see that the output diverges, i.e. the transfer function is not stable.

However, there are also numerical problems (especially when dealing with high order polynomials), which leads to your second problem.

2.) Numerical pole-zero cancellation. You know something is wrong here because closing the loop should not increase the system order. Your open loop transfer function is of order $4$, so should your closed loop transfer function. But it is actually of order $8$.

You can solve this numerically by using G = minreal(G);. This will reduce the order to $4$ and this transfer function will also be stable.

To ensure that with minreal no actual unstable poles are cancelled out, it is always good to use symbolic calculations as a double check (for example the symbolic toolbox, if you have access to it):

syms s complex;
plant = -2.568/(s^2 - 13.8);
controller = -21.8 + (-24.6)*(1/s) + (-4.08)*(s/(0.000875*s + 1));
Gs = controller*plant/(1 + controller*plant);
Gs = simplify(Gs);
pretty(Gs)

This will show

                      2
            52632123 s  + 280188381 s + 315864000
------------------------------------------------------------
      4            3             2
4375 s  + 5000000 s  + 52571748 s  + 211188381 s + 315864000

Check the roots:

>> roots([4375, 5000000, 52571748, 211188381, 315864000])

ans =

   1.0e+03 *

 -1.132282196310660 + 0.000000000000000i
 -0.003405221445958 + 0.002311356979519i
 -0.003405221445958 - 0.002311356979519i
 -0.003764503654566 + 0.000000000000000i

Stable.