# According to the Nyquist criterion this system is stable but when I apply an impulse I get an unstable response, why?

I have this open loop transfer function and I have to study the stability of the closed loop transfer function using the Nyquist criterion. What I got is that the characteristic equation 1+GH(s)=0 has two roots inside the Nyquist contour, the GH(s) transfer function has zero poles in the right hand plane and that the number of loops around -1 in the Nyquist Diagram is 2 so according to the Nyquist criterion, Z=N+P in which I get 2=2. So the system is stable, however the response I get to an impulse is this:   • The closed loop system is stable. But your plot is for open-loop, no? Dec 21, 2018 at 20:47
• To draw the nyquist plot I used the command nyquist(G) in matlab, where G is the open loop tf, but for the impulse I used the closed loop tf Dec 21, 2018 at 20:48
• Why do you say your time doman result indicates an unstable response? What happens if you extend the simulation to t > 25 s? Dec 21, 2018 at 20:52
• I tried it with t=50 s and it is still unstable Dec 21, 2018 at 20:55
• How did you build your closed loop function? Dec 21, 2018 at 21:03

The number of times the plot can loop around the critical point (-1 for open-loop plots, 0 for closed-loop) is equal to the number of unstable poles minus the number of unstable zeros. This is because you are counting the number of poles minus the number of zeros that are encircled by traveling up the $$\j\omega\$$ axis, then around the entire right-half plane.