Plot Root Locus for PD-Controller

57 views (last 30 days)
Oskar Mevik Päts
Oskar Mevik Päts on 12 Oct 2020
Commented: Jon on 13 Oct 2020
Hi!
I'm looking to plot the Root Locus for my system.
With G =
G = tf([2],[1 2 1 0]);
G =
2
---------------
s^3 + 2 s^2 + s
Continuous-time transfer function.
I want to apply a D-regulator, i.e .
How do I use the rlocus plot to draw with respect to as my parameter and not a P-regulator which is standard?
Muchos gracias

Answers (1)

Jon
Jon on 12 Oct 2020
Edited: Jon on 12 Oct 2020
I don't think you can do it directly with the rlocus command which is just for a variable overall open loop gain.
One way to do it is to make your own loop something like this (here I just put in some numerical values to give you the idea you will have to adapt to the details of your situation)
% proportional gain
kp = 3
% derivative filter constant
tauf = 20
% desired range of derivative gain
kd = linspace(0,30,100); % put your range in here
% define plant transfer function
G = tf([2],[1 2 1 0])
% loop to find poles (root locus) as a function of derivative gain
numPoints = length(kd) % number of points to evaluate on root locus
for k = 1:numPoints
% form open loop transfer function for plant and controller
Gol = (kp + kd(k)*s/(tauf*s + 1))*G;
% find poles and zeros
p = pole(Gol);
z = zero(Gol);
% plot the root locus points, need to add appropriate labels etc
hold on
plot(real(z),imag(z),'o')
plot(real(p),imag(p),'*')
end
hold off
  4 Comments
Oskar Mevik Päts
Oskar Mevik Päts on 13 Oct 2020
Thanks for the answer.
I know how to do it the manual way, I was just wondering if there was any smart way to do it rlocus function.
Jon
Jon on 13 Oct 2020
From what I can determine from the documentation for rlocus can only be used when you can factor out the parameter of interest so that it can be applied as a multiplicative constant (overall loop gain). Otherwise you will have to make your own plot, for example as I show in my script above. It sounds like you already know how to do this though. If this answers your question please mark it as answered so others will know.

Sign in to comment.

Community Treasure Hunt

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

Start Hunting!