# More accurate alternative to rlocfind to analyze root locus in control systems engineering

108 visualizaciones (últimos 30 días)
Aleem Andrew el 16 de Mzo. de 2021
Respondida: Paul el 1 de Mayo de 2023
To find the gain at the point where the root locus intersects a line of constant damping ratio, the rlocfind function can be used, but the user has to manually select a point and Matlab finds the closest point on the root locus to the selection. Is there a way to find the exact point of intersection without having to make the selection manually?
h = tf([2 5 1],[1 2 3]);
rlocus(h) % Root locus
z = 0.707; sgrid(z,0)
k = rlocfind(h)
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

### Respuestas (2)

Arkadiy Turevskiy el 1 de Mayo de 2023
Hi,
Here is a way to do it (not the most efficient, but it works).
% Define the transfer function
h = tf([2 5 1], [1 2 3]);
% Define the desired damping ratio
zeta = 0.707;
% Get the poles and zeros of the transfer function
[num, den] = tfdata(h);
% Loop through different values of k to find the desired damping ratio
for k = 0:0.001:100
% Get the poles of the transfer function at gain k
p_k = roots(cell2mat(den) + k * cell2mat(num));
% Use the damp function to calculate the damping ratio of the poles
[wn, zeta_k] = damp(p_k);
% If the damping ratio is close to the desired value, print the gain and break out of the loop
if abs(zeta_k - zeta) < 0.001
fprintf('The gain k for a damping ratio of %f is %f\n', zeta, k);
break;
end
end
The gain k for a damping ratio of 0.707000 is 0.196000
HTH
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

Paul el 1 de Mayo de 2023
##### 0 comentariosMostrar -2 comentarios más antiguosOcultar -2 comentarios más antiguos

Iniciar sesión para comentar.

### Categorías

Más información sobre Classical Control Design en Help Center y File Exchange.

### Community Treasure Hunt

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

Start Hunting!

Translated by