Root locus figure is bad plotted

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Root locus figure is bad plotted

Beginner1
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:
<http://octave.1599824.n4.nabble.com/file/t372684/rlocusplot1.jpg

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:
<http://octave.1599824.n4.nabble.com/file/t372684/rlocusplot2.jpg

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


Reply | Threaded
Open this post in threaded view
|

Re: Root locus figure is bad plotted

Doug Stewart-4


On Thu, Apr 19, 2018 at 6:20 AM, Beginner1 <[hidden email]> 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:
<http://octave.1599824.n4.nabble.com/file/t372684/rlocusplot1.jpg>

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:
<http://octave.1599824.n4.nabble.com/file/t372684/rlocusplot2.jpg>

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





--
DASCertificate for 206392



Reply | Threaded
Open this post in threaded view
|

Re: Root locus figure is bad plotted

Beginner1
This post was updated on .
 
Hi Doug,

Thank you for the answer. However in that example I simplified a bit my code and NUM and DEN polynomials are generated via this command actually: [NUM,DEN]=ss2tf(sys.a,sys.b,sys.c,sys.d);

Therefore, NUM and DEN functions are calculated by Octave and Octave gives sometimes the negative representation (eg [-15,-300] instead of [15,300]). And this is an iterative process where at least 100 NUM and DEN polynomial functions are calculated in each iteration...

So do you know another way to make the rlocus plot work properly?

Thank you



--
Sent from: http://octave.1599824.n4.nabble.com/Octave-General-f1599825.html


Reply | Threaded
Open this post in threaded view
|

Re: Root locus figure is bad plotted

Torsten-3
On 19.04.2018 17:26, Beginner1 wrote:

>  
> Hi Doug,
>
> Thank you for the answer. However in that example I simplified a bit my code
> and actually the NUM and DEN polynomials are generated via this command:
> [NUM,DEN]=ss2tf(sys.a,sys.b,sys.c,sys.d);
>
> Therefore, there are NUM and DEN functions whose representation is
> calculated by Octave and Octave gives for example the negative [-15,-300]
> representation instead of [15,300]. And this is an iterative process where
> there are at least 100 NUM and DEN polynomial functions...
>
> So is there another way to make the rlocus plot work properly?
>
> Thank you
>

For your case, i.e. negative gain of the system, the shown root locus is
correct. The negative gain together with the negative feedback of the
closed loop results in a positive feedback.

Torsten