[Ece438] Re: Problem with function rlocfind
Geoffrey A. Williamson
williamson@iit.edu
Thu, 11 Mar 2004 10:19:19 -0600
--=====================_506605750==_.ALT
Content-Type: text/plain; charset="us-ascii"; format=flowed
Typing "help rlocfind" yields the following. Below this I give an example.
RLOCFIND Find root locus gains for a given set of roots.
[K,POLES] = RLOCFIND(SYS) is used for interactive gain
selection from the root locus plot of the SISO system SYS
generated by RLOCUS. RLOCFIND puts up a crosshair cursor
in the graphics window which is used to select a pole location
on an existing root locus. The root locus gain associated
with this point is returned in K and all the system poles for
this gain are returned in POLES.
[K,POLES] = RLOCFIND(SYS,P) takes a vector P of desired root
locations and computes a root locus gain for each of these
locations (i.e., a gain for which one of the closed-loop roots
is near the desired location). The j-th entry of the vector K
gives the computed gain for the location P(j), and the j-th
column of the matrix POLES lists the resulting closed-loop poles.
Example:
Consider the root locus for 1 + K (1/s) = 0. The root locus (for K>0)
starts at s=0, and goes left along the negative real axis to infinity. To
put the root at s=-a requires that K = a. Here are some matlab commands
(in bold, with what matlab displays also in bold), with some of my comments.
Use of rlocfind to find the value of gain K to put a closed loop pole at s=-10
>> G = tf(1,[1 0])
Transfer function:
1
-
s
>> [K,poles] = rlocfind(G,-10)
K =
10
poles =
-10
Note that matlab finds, as we expected, that K=10. If we want to try to
place the pole at s = -10 + j, we type
>> [K,poles] = rlocfind(G,-10+j)
K =
10.0499
poles =
-10.0499
Note that the closed loop pole doesn't come out at -10+j, because that is
impossible. Matlab decides that a pole location that is close, and is
possible, is s = -10.0499, and finds that K=10.0499 achieves that location.
Often we specify the desired pole location by selecting the point off a
plot of the root locus. One does this in matlab by first drawing the root
locus, then executing rlocfind without the second argument. Here's an
example where I selected the point -0.8 by clicking near that location on a
plot of the root locus.
>> rlocus(G)
>> [K,poles] = rlocfind(G)
Select a point in the graphics window
selected_point =
-0.8187 + 0.0714i
K =
0.8218
poles =
-0.8218
Notice that I tried to click on the real axis near s = -0.8, but I missed a
little bit. Matlab tells me where it is that I clicked, what the point on
the locus is that is closest to where I clicked, and what gain K it takes
to get the poles to the point that matlab chose.
At 02:56 AM 3/11/2004 -0600, you wrote:
>Hi professor, could you give an example of the use of rlocfind?
>I am not sure about the syntax of argument P in: RLOCFIND(SYS,P) is.I
>tried to write it this way: RLOCFIND(h1,[1-j]), but I'm not sure about it...
>Thank you
>Alexandre Duvert
--
Geoffrey A. Williamson, Ph.D.
Associate Professor
Department of Electrical and Computer Engineering
Illinois Institute of Technology
3301 S. Dearborn St.
Chicago, IL 60616
voice: +1-312-567-5960
fax: +1-312-567-8976
email: williamson@iit.edu
--=====================_506605750==_.ALT
Content-Type: text/html; charset="us-ascii"
<html>
Typing "help rlocfind" yields the following. Below this I
give an example.<br><br>
RLOCFIND Find root locus gains for a given set of
roots.<br>
<br>
[K,POLES] = RLOCFIND(SYS) is used for
interactive gain <br>
selection from the root locus plot of the SISO system
SYS <br>
generated by RLOCUS. RLOCFIND puts up a
crosshair cursor <br>
in the graphics window which is used to select a pole
location <br>
on an existing root locus. The root locus gain
associated <br>
with this point is returned in K and all the system
poles for <br>
this gain are returned in POLES. <br>
<br>
[K,POLES] = RLOCFIND(SYS,P) takes a vector P of
desired root <br>
locations and computes a root locus gain for each of
these <br>
locations (i.e., a gain for which one of the
closed-loop roots<br>
is near the desired location). The j-th entry of
the vector K<br>
gives the computed gain for the location P(j), and the
j-th <br>
column of the matrix POLES lists the resulting
closed-loop poles.<br><br>
Example:<br><br>
Consider the root locus for 1 + K (1/s) = 0. The
root locus (for K>0) starts at s=0, and goes left along the negative
real axis to infinity. To put the root at s=-a requires that K =
a. Here are some matlab commands (in bold, with what matlab
displays also in bold), with some of my comments.<br><br>
Use of rlocfind to find the value of gain K to put a closed loop pole at
s=-10<br>
<dl><b>
<dd>>> G = tf(1,[1 0])
<dd>
<dd>Transfer function:
<dd>1
<dd>-
<dd>s
<dd>
<dd>>> [K,poles] = rlocfind(G,-10)<br><br>
<dd>K =<br><br>
<dd> 10<br><br>
<br><br>
<dd>poles =<br><br>
<dd> -10<br><br>
</b>
</dl>Note that matlab finds, as we expected, that K=10. If we want
to try to place the pole at s = -10 + j, we type<br>
<dl><b>
<dd>>> [K,poles] = rlocfind(G,-10+j)<br><br>
<dd>K =<br><br>
<dd> 10.0499<br><br>
<br><br>
<dd>poles =<br><br>
<dd> -10.0499<br><br>
</b>
</dl>Note that the closed loop pole doesn't come out at -10+j, because
that is impossible. Matlab decides that a pole location that is
close, and is possible, is s = -10.0499, and finds that K=10.0499
achieves that location.<br><br>
Often we specify the desired pole location by selecting the point off a
plot of the root locus. One does this in matlab by first drawing
the root locus, then executing rlocfind without the second
argument. Here's an example where I selected the point -0.8 by
clicking near that location on a plot of the root locus.<br>
<dl><b>
<dd>>> rlocus(G)
<dd>>> [K,poles] = rlocfind(G)
<dd>Select a point in the graphics window<br><br>
<dd>selected_point =<br><br>
<dd> -0.8187 + 0.0714i<br><br>
<br><br>
<dd>K =<br><br>
<dd> 0.8218<br><br>
<br><br>
<dd>poles =<br><br>
<dd> -0.8218<br><br>
</b>
</dl>Notice that I tried to click on the real axis near s = -0.8, but I
missed a little bit. Matlab tells me where it is that I clicked,
what the point on the locus is that is closest to where I clicked, and
what gain K it takes to get the poles to the point that matlab
chose.<br><br>
<br>
At 02:56 AM 3/11/2004 -0600, you wrote:<br>
<blockquote type=cite class=cite cite>Hi professor, could you give an
example of the use of rlocfind? <br>
I am not sure about the syntax of argument P in: RLOCFIND(SYS,P) is.I
tried to write it this way: RLOCFIND(h1,[1-j]), but I'm not sure about
it...<br>
Thank you<br>
Alexandre Duvert</blockquote>
<x-sigsep><p></x-sigsep>
--<br>
Geoffrey A. Williamson, Ph.D.<br>
Associate Professor<br>
Department of Electrical and Computer Engineering<br>
Illinois Institute of Technology<br>
3301 S. Dearborn St.<br>
Chicago, IL 60616<br>
voice:<x-tab> </x-tab>+1-312-567-5960<br>
fax:<x-tab> </x-tab>+1-312-567-8976<br>
email:<x-tab> </x-tab>williamson@iit.edu<br>
</html>
--=====================_506605750==_.ALT--