Find exact point on root locus?

Hi so I made a root locus and I'd like to find the point (real and imainary point) and gain at damping=0.456 but when i plot it (rlocus) and use the data tips button it skips between 0.453 and 0.479. how can I get the data tip to go on that exact point, damping=0.456? Thank You

Answers (3)

You can get the output of rlocus function in the numeric form too
s = tf(1, [1 2 3]);
[r, k] = rlocus(s);
r is the location of roots, and k is the corresponding gain. You can then interpolate the outputs to find the gain at a specific root location.
Helin Qais
Helin Qais on 4 May 2023
Edited: Walter Roberson on 2 Jun 2026 at 2:16
When using the data tip button in MATLAB or Octave to obtain the coordinates of a specific point on a root locus plot, it is sometimes difficult to select the exact point of interest due to the automatic snap-to-grid feature of the data tip. However, there are several ways to obtain the precise coordinates and gain value at a damping ratio of 0.456.
One way is to use the `rlocus` function in combination with the `sgrid` function to draw a grid that intersects with the desired point on the root locus. Here's an example code snippet that shows how to do this:
matlab
% Define the transfer function G(s)
G = tf([1 5], [1 0 0]);
% Plot the root locus of G(s)
rlocus(G);
% Draw a damping ratio grid that intersects with the point of interest
sgrid(0.456, [], 'r');
% Use the data cursor to obtain the precise coordinates and gain value
% of the intersection point
In this example, we first define the transfer function `G(s)` as `s + 5 / s^2`. Then we plot the root locus of `G(s)` using the `rlocus` function. Next, we draw a damping ratio grid using the `sgrid` function, specifying the desired damping ratio of 0.456 and leaving the natural frequency blank. The `sgrid` function will draw a red line on the root locus plot that intersects with the desired point. Finally, we can use the data cursor to obtain the precise coordinates and gain value of the intersection point.
Another way to obtain the precise coordinates and gain value is to use the `rltool` function. The `rltool` function provides a graphical user interface that allows you to interactively adjust the gain value and damping ratio while observing the resulting closed-loop system response. The gain and damping ratio values are displayed on the interface, so you can easily read off the values at the desired point. To use `rltool`, you can simply type `rltool(G)` in the MATLAB or Octave command window, where `G` is your transfer function.
I hope this helps!
Starting in R2025a, there have been enhancements to allow for interpolation between root locations, so the data tips should be finer than before.
rlocusplot ccan be helpful for plotting grid lines of constant damping ratio. You can do:
h = rlocusplot(sys);
h.AxesStyle.GridVisible = "on";
h.AxesStyle.GridDampingSpec = 0.456;
See here for more information on constant damping ratio and natural frequency plot lines.

2 Comments

Thank you, @Maithili.
We cannot demo the 'Run Code' feature here in the forum, but executing the snippet in MATLAB (Desktop or Online) produces a figure in which the desired damping-ratio reference line intersects the locus.
sys = tf([2 5 1],[1 2 3]);
h = rlocusplot(sys);
h.AxesStyle.GridVisible = "on";
h.AxesStyle.GridDampingSpec = 0.876;
Clicking the apparent intersection does not always snap to the exact intersection because the damping-ratio value shown in the tooltip can differ slightly from the target.
Nevertheless, this approach is a quick and generally good enough method for control students and engineers to estimate the gain corresponding to a desired damping ratio.
Technically, these damping ratio and natural frequency plot lines properties can be found in the AxesStyle object in the RLocusPlot Properties documentation.
Paul
Paul on 2 Jun 2026 at 11:27
"the data tips should be finer than before."
That does seem to be the case, but the precise mouse control needed to get to the third decimal place of damping ratio was too precise for me. And, as @Sam Chak showed, it might not be precise enough to get to the the third decimal place of damping ratio anyway (why such precision in damping ratio is needed is a separate question).
This answer showed some prototype code for solving the problem numerically by using allmargin with a "rotated" transfer function. I imagine other approaches would be feasible as well.

Sign in to comment.

Asked:

on 20 Apr 2020

Commented:

on 2 Jun 2026 at 11:27

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!