0

I am graphing the step response of a closed loop system and I need to display the settling time on the graph for my assignment. Here is my code:

s = tf('s')
L = (20*(s+1))/(10*s*(s-1))
T = L/(1+L)
step(T)

Normally, I would just right click on the graph and in the characteristics hit the settling time option and it displays. It isn't displaying anything. I added this line:

stepinfo(T)

And it gives me the correct step response that is within the bounds of the graph.

Anyone know how to fix it so I can just right click and have it displayed?

Gamer
  • 45
  • 5

1 Answers1

1

The system is unstable, there is a pole in +1.

>> isstable(T)

ans =

  logical

   0

>> pole(T)

ans =

   0.0000 + 0.0000i
  -0.5000 + 1.3229i
  -0.5000 - 1.3229i
   1.0000 + 0.0000i

so according to this :

If sys is unstable, then all step-response characteristics are NaN, except for Peak and PeakTime, which are Inf.

It is weird that stepinfo(T) does output a setlling time though, as it shouldn't.

  • Shouldn't the closed loop system have a settling time though? L is the open loop and T is the closed – Gamer Mar 30 '23 at 18:59
  • 1
    The closed loop system is the unstable system. – MIKE PAPADAKIS Mar 30 '23 at 19:03
  • s = tf('s'); L = (20*(s+1))/(10*s*(s-1)); T = L/(1+L); [y, t] = step(T); s_info = stepinfo(T); figure; plot(t, y); hold on; line([s_info.SettlingTime s_info.SettlingTime], [0 1], 'Color', 'red', 'LineStyle', '--'); hold off; xlabel('Time (sec)'); ylabel('Output'); title('Step Response of Closed-loop System'); legend('Step Response', 'Settling Time'); – Gamer Mar 30 '23 at 19:04
  • if I have that it also displays a settling time but just by force – Gamer Mar 30 '23 at 19:04
  • try `step(T,50)`, and you will see that the system is unstable. So, the settle time has no physical meaning because `yfinal` is infinity. – MIKE PAPADAKIS Mar 30 '23 at 19:07