Find gain and poles for specific points of a root locus diagram.



[k, poles] = rlocfind(sys)

[k, poles] = rlocfind(sys, pe)


A linear time-invariant transfer function or state space system.
Type: class
A pole estimate from which to compute actual poles with the same gain magnitude.
Type: double | complex


The gain magnitude associated with pe.
Type: double
Dimension: scalar
The poles on the root locus with gain k.
Type: double | complex
Dimension: matrix


Find the poles on the root locus for the estimate, -1+3i.
s = tf('s');
GH = (s^2 + 2*s + 2) / (s * (s^4 + 9*s^3 + 33*s^2 + 51*s + 26));
[k, poles] = rlocfind(GH, -1+3i)
k = 45.1559797
p = [Matrix] 5 x 1
-5.60380 + 0.00000i
-0.91234 + 2.92420i
-0.91234 - 2.92420i
-0.78576 + 1.04887i
-0.78576 - 1.04887i

Use the interactive mode to find the poles for the selected point:

s = tf('s');
GH = (s^2 + 2*s + 2) / (s * (s^4 + 9*s^3 + 33*s^2 + 51*s + 26));
[k, poles] = rlocfind(GH)

Click on the plot to select a point. In this example, point -1+3i is selected and the calculated gain and poles are printed in the console:

Selected point =
-1.00136995 + 3.00236011i
K = 45.1862
poles = 
[Matrix] 5 x 1
-5.60471 + 0.00000i
-0.91172 + 2.92491i
-0.91172 - 2.92491i
-0.78593 + 1.04889i
-0.78593 - 1.04889i

The closed loop poles are plotted and the gain, damping and frequency values are displayed in a text box.

Figure 1. Interactive plot after point selection

You may click again on the plot to select another point, press 'c' to remove the closed loop poles from the plot or press 'q' to quit the interactive mode. The outputs of interactive rlocfind are the gain and poles of the last selected point


If pe is omitted, the function enters the interactive mode, which allows the user to select a pole estimate from an existing root locus plot using the mouse.