evans code example not working

H=syslin('c',352*poly(-5,'s')/poly([0,0,2000,200,25,1],'s','c')); clf();evans(H,100); sgrid()

In the above code the zero is at -5, the poles are at -20, -2.5+ 9.68i, -2.5- 9.68i , 0, and 0. Note the 2 imaginary poles. Which means that I should see 1 zero and 5 poles in the evens plot. When I run the code I see 1 zero and 3 poles all on the real, not imaginary) axis. So something is screwed up here! When I run the code I do see an instant flicker of the real evens code, and then this screwed up display with no sgrid at all. All the other code that I have cut and pasted into Scilab (Routh table, Nyquist and Bode plots) all work with no problems. I did check the roots of poly(-5,'s') and poly([0,0,2000,200,25,1],'s','c') and they do show the above mentioned zeros and poles, so it seems that the display is very screwed up. When I run the code in the cloud I get a very nice root locus plot with the 2 complex poles and with the sgrid also plotted! If anyone can think of why Scilab will not run this code correctly, I will be very grateful.

Scilab 05-03-18, 2:29 a.m. maxcy

"When I run the code I see 1 zero and 3 poles all on the real, not imaginary) axis": This is not true when i execute your code on scilab. I do see a correct plot.

05-03-18, 3:04 p.m. rupakrokade

I should see a poles at -20, -2.5+9.68i, and -2.5-9.68i and a zero at -5 not all the poles  on the real axis.

06-03-18, 10:49 a.m. maxcy
If you run it without sgrid(), your imaginary axis scale might be too big to show you the poles on imaginary axis. Try zooming in using mouse scroll. Note that zooming will work only on local scilab and not on the cloud.

06-03-18, 12:30 p.m. rupakrokade

That still does not explain why it does not work with sgrid and why the whole thing works in the cloud. 

06-03-18, 8:55 p.m. maxcy
The plot comes after evans() which is the loci of the poles as the closed-loop gain K sweeps from 0 to 100. Ofcourse you will not see the poles in the same location as they are in the plant's transfer function. Run plzr() on your plant's transfer function and then see the result. There you may want to zoom in to see the location of poles on the imaginary axis as you are expecting.

Short answer: Your code works fine as it is on both the cloud as well as local scilab.

06-03-18, 9:52 p.m. rupakrokade
nonsense! I see the evans graph for a short moment of time, and the immediately afterwards  a plot of poles and tangent lines over riding the initial evans plot which completely disappears , and there is no zooming in on the remaining plot!

07-03-18, 5:22 a.m. maxcy

Login to add comment

Log-in to answer to this question.