Plot Root Locus for PD-Controller

조회 수: 123 (최근 30일)
Oskar Mevik Päts
Oskar Mevik Päts 2020년 10월 12일
댓글: Jon 2020년 10월 13일
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

답변 (1개)

Jon
Jon 2020년 10월 12일
편집: Jon 2020년 10월 12일
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
Oskar Mevik Päts
Oskar Mevik Päts 2020년 10월 13일
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 2020년 10월 13일
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.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Classical Control Design에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by