Root locus imaginary axis intersection
45 views (last 30 days)
Show older comments
Ande Mandoyi
on 14 Jun 2021
Commented: Star Strider
on 15 Jun 2021
Other than using interactive data cursors, is there anyway of finding the point where the root locus intersects the imaginary axis?
0 Comments
Accepted Answer
Star Strider
on 14 Jun 2021
Try something like this —
sys = tf([3 1],[9 7 5 6]); % Example From The Documentation
[r,k] = rlocus(sys)
fre2 = isfinite(real(r(2,:)));
fim2 = isfinite(imag(r(2,:)));
fidx2 = fre2 & fim2;
fre3 = isfinite(real(r(3,:)));
fim3 = isfinite(imag(r(3,:)));
fidx3 = fre3 & fim3;
v2 = interp1(real(r(2,fidx2)), imag(r(2,fidx2)), 0, 'linear','extrap')
k2 = interp1(imag(r(2,fidx2)), k(fidx2), v2, 'linear','extrap')
v3 = interp1(real(r(3,fidx3)), imag(r(3,fidx3)), 0, 'linear','extrap')
k3 = interp1(imag(r(3,fidx3)), k(fidx3), v3, 'linear','extrap')
figure
plot(real(r(1,:)),imag(r(1,:)), '-g')
hold on
plot(real(r(2,:)),imag(r(2,:)), '-b')
plot(real(r(3,:)),imag(r(3,:)), '-r')
plot(0, v2, 'sr')
plot(0, v3, 'sb')
hold off
grid
ylim([-6 6])
.
2 Comments
Paul
on 15 Jun 2021
Will this solution work if a branch of the root locus crosses the imaginary axis twice? For example if
sys = tf([3 1],[9 7 5 6]) * tf(20,[1 20])
Can this solution be generalized to loop over all of the rows of r?
As I understand it, this solution assumes that the rows of r are, in some sense, smooth. I think that rlocus() tries to ensure this, but I'm not sure it's guaranteed.
Star Strider
on 15 Jun 2021
This is prototype code.
It simply shows the correct approach, and would likely have to be adapted to specific situations that did not follow the same sort of loci.
More Answers (0)
See Also
Categories
Find more on Classical Control Design in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!