Filter löschen
Filter löschen

Using rlocus I am confused

5 Ansichten (letzte 30 Tage)
Madyson Davis
Madyson Davis am 29 Mär. 2023
Beantwortet: Paul am 29 Mär. 2023
G = tf([1 1], conv([1 2 2], [1 2 5]));
rlocus(G, linspace(-8, 0, 1000), linspace(-10,10,1000))
Error using DynamicSystem/rlocus
Invalid syntax for time or frequency response command. See command help for more information.
title('Root Locus Diagram');
xlabel('Real Axis');
ylabel('Imaginary Axis');
Confused because it keeps giving me the same error and I am wondering if I need to format it differently or something

Akzeptierte Antwort

Star Strider
Star Strider am 29 Mär. 2023
You appear to be overthinking it.
Try this —
G = tf([1 1], conv([1 2 2], [1 2 5]));
figure
rlocusplot(G)
grid
% title('Root Locus Diagram');
% xlabel('Real Axis');
% ylabel('Imaginary Axis');
The rlocusplot function has more options than rlocus, although it does not return the feedback gains. Use whatever of these functions you find best for your application.
.

Weitere Antworten (1)

Paul
Paul am 29 Mär. 2023
Hi Madyson,
If you want to draw the root locus for a specific range of gains, then only specify a single range at a time
G = tf([1 1], conv([1 2 2], [1 2 5]));
figure
rlocus(G, linspace(-8, 0, 1000));
title('Root Locus Diagram');
xlabel('Real Axis');
ylabel('Imaginary Axis');
Or
G = tf([1 1], conv([1 2 2], [1 2 5]));
figure
rlocus(G, linspace(-10,10,1000));
title('Root Locus Diagram');
xlabel('Real Axis');
ylabel('Imaginary Axis');
Or, use rlocusplot, but as with rlocus only specify a single gain vector.

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by