Finding point of zeta line & rootlocus

24 views (last 30 days)
Shaukhin
Shaukhin on 18 Dec 2024 at 15:29
Answered: Star Strider on 18 Dec 2024 at 17:36
I have a transfer function, constant zeta, I need easy way to find the intersection point between root locus & zeta line. Now, after plotting root locus & zeta using sgrid function, I can find approximately correct intersection point by mouse draging. But I need exact point. You know, mouse draging is too difficult. Besides, zeta line is so narrow linewidth which is too hard to see in plot. Zeta line should increase default linewidth. Can anyone help?

Answers (1)

Star Strider
Star Strider on 18 Dec 2024 at 17:36
I am not certain what you are starting with, so I cannot provide an exact response. However one approach may simply be to use interp1 to interpolate the existing ‘r’ and ‘k’ values that correspond to the ζ value you want.
Using an example from the rlocus documentation —
H = tf([2 5 1],[1 2 3]);
[r,kout] = rlocus(H);
zetav = cos(angle(r(1,:)));
zetaq = [0.64 0.76 0.80 0.86 0.90 0.985]; % Desired ‘zeta’ Values
for k = 1:numel(zetaq)
zidx = find(diff(sign(zetav + zetaq(k))));
idxrng = max(1,zidx-1) : min(numel(zetav),zidx+1);
rq(k,:) = interp1(zetav(idxrng), r(1,idxrng), -zetaq(k));
kq(k,:) = interp1(zetav(idxrng), kout(idxrng), -zetaq(k));
end
Result = table(zetaq(:),rq,kq, VariableNames={'zeta','r','k'})
Result = 6x3 table
zeta r k _____ ________________ ________ 0.64 -1.0373+1.2454i 0.087697 0.76 -1.0931+0.93478i 0.29697 0.8 -1.1081+0.83101i 0.38138 0.86 -1.1279+0.66911i 0.52458 0.9 -1.1396+0.55131i 0.6333 0.985 -1.161+0.18852i 0.90624
figure
rlocus(H)
sgrid
hold on
plot(real(rq), imag(rq), 'sr') % Plot ‘zeta’ Value As Red Squares
hold off
[min_zeta,max_zeta] = bounds(zetav)
min_zeta = -1
max_zeta = -0.5774
% disp(zetav)
The values corresponding to the plotted ζ l;ines plot at their intersections with the root locus.
The ‘Result’ table shows only one value for ‘r’ for convenience. (It likely has a complex conjugate that you can easily calculate.)
.

Tags

Products


Release

R2024b

Community Treasure Hunt

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

Start Hunting!