0% found this document useful (0 votes)
21 views

Lab 3

This document describes a lab experiment to estimate gain, phase, and delay margins of a feedback control system. The lab has two parts: 1) calculating margins from a bode plot, and 2) verifying stability by varying gain K and time delay h in the step response. The estimations match the MATLAB calculations, and varying K and h shows the stability boundaries.

Uploaded by

Deniz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views

Lab 3

This document describes a lab experiment to estimate gain, phase, and delay margins of a feedback control system. The lab has two parts: 1) calculating margins from a bode plot, and 2) verifying stability by varying gain K and time delay h in the step response. The estimations match the MATLAB calculations, and varying K and h shows the stability boundaries.

Uploaded by

Deniz
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

EEE342 Feedback Control Systems Laboratory Work 3

Deniz Erkan
Department of Electrical and Electronics Engineering, Bilkent University, 06800 Ankara, Turkey

1. Introduction

The main goal of this lab is to estimate gain, phase and


delay margins with mathematical calculations. In the part
- 1 with using an open loop transfer function we found its
gain, phase and delay margins using the bode plot than
compare them with MATLAB calculations. In part – 2,
with applying a step input to the system then vary the K
and h values to see how the stability of the system
affected.

2. Laboratory Content
Figure 2: GM Calculation from Bode plot of G(s)
Part - 1: Margin Estimation
When Phase = 180°, w = 13 rad/sec. When w = 13 rad/sec,
1 𝐾𝑐 (𝑠 + 80)
𝐺𝑐 (𝑠) = ( ) Magnitude = -29.7.
(𝑠 + 𝜏𝐿𝑃𝐹 ) 𝑠 GM = | Magnitude | = 29.7
29.7 = 20 * log(Kf)
2 3
𝐾𝑐 = 𝐾 and 𝜏𝐿𝑃𝐹 = 𝜏 Kf = 30.55
𝑔 𝑝

To calculate the phase margin, we should find the w value


From previous lab τ = 0.137 s, Kg = 103.394
where magnitude of G(s) is equal to 0.
−0.005𝑠+1
Gpade = .
0.005𝑠+1

G(s) = Gc(s) * Gp(s) * Gpade(s)

1.

Figure 3: PM Calculation from Bode plot of G(s)

When Magnitude = 0, w = 0.997 rad/sec. When w = 0.996


rad/sec, Phase = 260°.

PM = 260 – 180 = 80°


Figure 1: Bode plot of G(s)
To find the delay margin of a system we need the
2. crossover frequency in magnitude plot which is equal to
20*log(G(jwc)) = 0 and wc = 0.997 rad/sec. Then we need
To calculate the gain margin, we should find the w value phase of G(jwc), call a, which is equal to 260°. Then using
where phase of G(s) is equal to pi. DM formula:
𝑝𝑖 + 𝑎 180 + 260
𝐷𝑀 = = = 1.23
360 ∗ 𝑤𝑐 360 ∗ 0.997

To check these margins, we can use allmargin function in


MATLAB.
For K = 25:

Figure 4: MATLAB result for stability

With fig.4, we can see that our plot calculation results are
similar to real values of margins.

Part - 2: Margin Verification


Figure 7: Step Response of the System when K = 25
2.
In fig.7 we see that the response does not converges to a
For K = 10: certain value, it increases. When a system does not
converge to a certain value, it indicates that system is
unstable. So, for K = 25 systems is unstable. Additionally,
in this figure we observe that the systems output signal is
limited when it exceeds the limits in order to not burn the
whole system.

The experimental Kf = 25, with the calculated Kf value the


error is approximately 18%. Which can be caused by the
previous hardware errors and this labs hardware errors and
since we use the gain margin an approximate value.

4.

Figure 5: Step Response of the System when K = 10 For time delay = 0.01s:

In fig.5 we see that the response converges to 40


approximately. When a system converges to a certain
value, it indicates that system is stable. So, for K = 10
systems is stable.

For K = 20:

Figure 8: Step Response of the System when delay is


0.01s

In fig.8 we see that the response of the system converges


Figure 6: Step Response of the System when K = 20 to a certain value. So, for time delay 0.01 s, system is
stable.
In fig.6 we see that the response neither converges nor
diverges. When a system response not increase or decrease
the system is marginally stable. So, for K = 20 system is
marginally stable.
For time delay = 0.7s: 1. The estimations of both gain and delay margin errors
are close to each other. Which can be caused by we
calculate them with bode plots approximately and any
hardware design will cause some errors.

APPENDIX
%Part-1
Kg = 103.394;
Kc = 2 / Kg;
tau = 0.137;
tlpf = 3 / tau;
G1 = tf(1,[1 tlpf]);
G2 = tf([Kc 80*Kc],[1 0]);
Gc = G1 * G2;
Gp = tf(Kg,[1 7.299]);
Gpade = tf([-0.005,1],[0.005,1]);
G = Gc * Gp * Gpade ;
bode(G);
allmargin(G);
Figure 9: Step Response of the System when delay is 0.7 s
%Part -2
In fig.9 we see that the response of the system neither
%2.1
converges nor diverges. So, for time delay 0.7 s, system is
plot(out.velocity);
marginally stable.
%2.2
plot(out.velocity);
For time delay = 1s:

Figure 10: Step Response of the System when delay is 1 s

In fig.10 we see that the response of the system is


increasing. So, for time delay 1 s, system is unstable.
The experimental hf = 1, with the calculated hf value the
error is approximately 18%. Which can be caused by the
previous hardware errors and this labs hardware errors and
since we use the delay margin an approximate value.
hf is approximately equal to 1 s.

3. Conclusion

In this lab work using the bode plot technique and


varying K and h values we estimate the gain, phase and
delay margins. In part – 1, with bode plots we calculate
the margins then in part – 2 we estimate their values via
varying the K and h values to compare them with part –

You might also like