# Why does my Transfer function overshoots

15 views (last 30 days)
Berker on 3 May 2024
Commented: Sam Chak on 4 May 2024
syms s real
zeros = roots([0.075, 1, 1]);
poles = roots([1, 3, 5, 0]);
Gs = zpk(zeros, poles,1);
rlocus(Gs)
As you can see, eventhough K=45.3 is on the root locus with damping coeff. 1 it still overshoots. What might cause this problem or am i doing something wrong ?
Onur Arda on 3 May 2024
damn

Paul on 3 May 2024
Edited: Paul on 3 May 2024
Define the plant
zeros = roots([0.075, 1, 1]);
poles = roots([1, 3, 5, 0]);
Gs = zpk(zeros, poles,1);
As was pointed out by @Sam Chak below, the plant model used in the root locus analysis is not the same as the plant model used in the Simulink model.
tf(Gs)
ans = s^2 + 13.33 s + 13.33 --------------------- s^3 + 3 s^2 + 5 s Continuous-time transfer function.
However, proceeding with this model is instructive, in my opinion.
Define the closed loop system check the poles
Gcl = feedback(45.3*Gs,1)
Gcl = 45.3 (s+12.24) (s+1.089) -------------------------------- (s+1.083) (s^2 + 47.22s + 557.9) Continuous-time zero/pole/gain model.
damp(Gcl)
Pole Damping Frequency Time Constant (rad/seconds) (seconds) -1.08e+00 1.00e+00 1.08e+00 9.24e-01 -2.36e+01 + 7.14e-01i 1.00e+00 2.36e+01 4.24e-02 -2.36e+01 - 7.14e-01i 1.00e+00 2.36e+01 4.24e-02
Keep in mind that the information in the rlocus data tip only applies to the selected pole or selected complex conjugate pair, so it's important to select the dominant pole(s), as has been done in this case becasue the pole at s = -1.083 is effectively cancelled by the zero at s = -1.089. Essentially, the closed loop system is well-approximated the pair of poles at s = -23 and the zero at s = -12.24.
Gclapproximate = tf(45.3*[1 12.24],[1 47.22 557.9]);
If we ignore the effect of the zero at s = -12.24 we'd have
Gclnozero = tf(45.3*12.24,[1 47.22 557.9]);
Compare all three
step(Gcl,Gclapproximate,Gclnozero);
legend('true','approx','nozero')
As expected, the no-zero case has no overhsoot because it's basically the response of two, identical, real poles. The effect of an additional, real zero in the left-half plane is to speed up the step response and potentially give rise to overshoot. Consult a good textbook to understand why that is the case.
To match the Simulink model (thanks @Sam Chak), we'd have
zeros = roots([0.075, 1, 1]);
poles = roots([1, 3, 5, 0]);
Gs = zpk(zeros, poles,0.075);
tf(Gs)
ans = 0.075 s^2 + s + 1 ----------------- s^3 + 3 s^2 + 5 s Continuous-time transfer function.
Or more simply
Gs = tf([0.075, 1, 1],[1, 3, 5, 0])
Gs = 0.075 s^2 + s + 1 ----------------- s^3 + 3 s^2 + 5 s Continuous-time transfer function.
figure
Gcl = feedback(45.3*Gs,1)
Gcl = 3.397 s^2 + 45.3 s + 45.3 ------------------------------- s^3 + 6.397 s^2 + 50.3 s + 45.3 Continuous-time transfer function.
step(Gcl)
This system has zeros and poles at
zpk(Gcl)
ans = 3.3975 (s+12.24) (s+1.089) ------------------------------- (s+1.01) (s^2 + 5.388s + 44.86) Continuous-time zero/pole/gain model.
damp(Gcl)
Pole Damping Frequency Time Constant (rad/seconds) (seconds) -1.01e+00 1.00e+00 1.01e+00 9.90e-01 -2.69e+00 + 6.13e+00i 4.02e-01 6.70e+00 3.71e-01 -2.69e+00 - 6.13e+00i 4.02e-01 6.70e+00 3.71e-01
The dominant poles are lightly damped, which one would see on the root locus for this plant, and then we'd have to account for the effect of the zero at s = -12.24 on the response.
##### 3 CommentsShow 1 older commentHide 1 older comment
Paul on 3 May 2024
You are correct. Thanks for pointing that out. I'll edit the Answer.
Berker on 4 May 2024
Thank you @Paul and @Sam Chak, you guys have been very helpful. Especially @Paul, I appreciate your detailed and indepth answer.

Sam Chak on 4 May 2024
I believe the design objective is to determine the gain from the root locus such that the response avoids exhibiting oscillatory behavior or maintains the percentage overshoot as low as possible without becoming overdamped. If the plant is given as follows,
then the design procedure can be referred to:
%% Plant
zeros = roots([0.075, 1, 1]);
poles = roots([1, 3, 5, 0]);
Gp = zpk(zeros, poles, 0.075)
Gp = 0.075 (s+12.24) (s+1.089) ------------------------- s (s^2 + 3s + 5) Continuous-time zero/pole/gain model.
% Gp = tf([0.075, 1, 1], [1, 3, 5, 0]) % directly models the Plant
%% Check if the Gain is as accurate as shown in the data tip (rlocus)
[r, k] = rlocus(Gp);
idx = find(abs(imag(r(1,:)) < eps));
rlGain = k(idx(1))
rlGain = 604.5981
%% True Control Gain
Gc = rlGain*(1/0.075);
%% Closed-loop system
Gcl = feedback(Gc*Gp, 1)
Gcl = 604.6 (s+12.24) (s+1.089) --------------------------- (s+594) (s+12.47) (s+1.088) Continuous-time zero/pole/gain model.
step(Gcl), grid on
Sam Chak on 4 May 2024
If following your original plant's zpk transfer function, you will still find the root locus gain to be around 45.3, and the same design procedure remains applicable.
%% Plant
zeros = roots([0.075, 1, 1]);
poles = roots([1, 3, 5, 0]);
Gp = zpk(zeros, poles, 1) % <-- k is 1
Gp = (s+12.24) (s+1.089) ------------------- s (s^2 + 3s + 5) Continuous-time zero/pole/gain model.
% Gp = tf([0.075, 1, 1], [1, 3, 5, 0]) % directly models the Plant
%% Check if the Gain is as accurate as shown in the data tip (rlocus)
[r, k] = rlocus(Gp);
idx = find(abs(imag(r(1,:)) < eps));
rlGain = k(idx(1))
rlGain = 45.3449
%% True Control Gain
Gc = rlGain*(1/0.075);
%% Closed-loop system
Gcl = feedback(Gc*Gp, 1)
Gcl = 604.6 (s+12.24) (s+1.089) --------------------------- (s+594) (s+12.47) (s+1.088) Continuous-time zero/pole/gain model.
step(Gcl), grid on

### Categories

Find more on Classical Control Design in Help Center and File Exchange

R2023b

### Community Treasure Hunt

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

Start Hunting!