# Root locus figure is bad plotted Classic List Threaded 4 messages Open this post in threaded view
|

## Root locus figure is bad plotted

 This post was updated on . Hi!, I would like to know how to solve an issue I have with the root locus plot. This is my code NUM{1,1}=[-15,-300]; DEN{1,1}=[1,0]; G_idref_vdcref = tf(NUM{1,1},DEN{1,1}); rlocus(G_idref_vdcref); hold on n_idref_vdcref=roots(NUM{1,1}) d_idref_vdcref=roots(DEN{1,1}) plot(real(n_idref_vdcref),imag(n_idref_vdcref),"co","markersize",15) plot(real(d_idref_vdcref),imag(d_idref_vdcref),"rx","markersize",15) And the resulting root locus plot is:   which is obviously incorrect, since in my transfer function there is a pole at s=0 and a zero at s=-20, and in the picture we see that the rlocus line goes to instability and other areas that it is not supposed to go. If I zoom the rlocus plot we see:   Where the zero and the pole are correctly located, however the connecting line between them is incorrect. Any suggestion to solve this error? Thanks.   -- Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html
Open this post in threaded view
|

## Re: Root locus figure is bad plotted

 On Thu, Apr 19, 2018 at 6:20 AM, Beginner1 wrote:Hi!, I would like to know how to solve an issue I have with the root locus plot. This is my code NUM{1,1}=[-15,-300]; DEN{1,1}=[1,0];  G_idref_vdcref = tf(NUM{1,1},DEN{1,1}); Try this:n=[15,300];d=[1,0];G_idref_vdcref = tf(n,d)the minus signs are the problem  rlocus(G_idref_vdcref); hold on n_idref_vdcref=roots(NUM{1,1}) d_idref_vdcref=roots(DEN{1,1}) plot(real(n_idref_vdcref),imag(n_idref_vdcref),"co","markersize",15) plot(real(d_idref_vdcref),imag(d_idref_vdcref),"rx","markersize",15) And the resulting root locus plot is: what is obvious, incorrect, since in my  transfer fuction there is a pole at s=0 and a zero at s=-20, and in the picture we see that the rlocus line goes to instability and other areas that it is not supposed to go. If I zoom the rlocus plot we see: Where the zero and the pole are correctly located, however the connecting line between them is uncorrect. Any suggestion to solve this error? Thanks.  -- Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html -- DAS 