Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
173 views

ME5012 - Electronic Systems, Control and Computing

This document provides instructions for a 3-session laboratory exercise on simulating linear dynamic systems in MATLAB. Session 1 involves investigating step responses of second-order systems with varying natural frequencies and damping ratios. Session 2 adds real poles and zeros to a standard second-order system to study their effects. Session 3 examines frequency responses using Bode plots. The goal is to better understand characteristics of linear dynamic systems through MATLAB simulations and analysis of results. Formal reports are not required - students should answer questions in their write-ups and include relevant results and plots without reproducing MATLAB code.

Uploaded by

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

ME5012 - Electronic Systems, Control and Computing

This document provides instructions for a 3-session laboratory exercise on simulating linear dynamic systems in MATLAB. Session 1 involves investigating step responses of second-order systems with varying natural frequencies and damping ratios. Session 2 adds real poles and zeros to a standard second-order system to study their effects. Session 3 examines frequency responses using Bode plots. The goal is to better understand characteristics of linear dynamic systems through MATLAB simulations and analysis of results. Formal reports are not required - students should answer questions in their write-ups and include relevant results and plots without reproducing MATLAB code.

Uploaded by

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

ME5012 — Electronic Systems, Control and Computing

Laboratory Exercise I (Three Sessions) —Simulation of Linear Dynamic Systems

Laboratory exercise I is composed of three sessions, and should be run in MATLAB 2017 or later versions. Use the
up arrow to repeat previous commands. Type the first letter of the command before using the arrow to repeat only
instances of commands beginning with that letter.
A full/formal report is NOT required, the questions in italics indicate the requirements for your write-up. Remember
to include your name and number on your front page.
Do not describe method or procedure. Do not reproduce or explain any MATLAB code in your write-up, but use
theory to support comments and explain results where appropriate. Keep your answers reasonably brief and succinct.
In your write-up, DO NOT REPRODUCE ANY MATLAB CODE. All questions carry equal marks.

Introduction
The objective of the laboratory exercise is to study the characteristics of linear dynamic systems. In control engineer-
ing, in order to analyze and design control systems, a mathematical model of the actual plant is required. This model
approximates the behavior of the plant to some extent. By engineering necessity, a number of assumptions have to
be made about the plant in order to obtain the model. The nature and validity of the assumptions must be borne in
mind when applying control theory to real engineering systems. Analysis and design taking into account the amount
of difference between the actual plant and model is a more advanced topic.
One of the most common assumptions is that the plant is linear. This is valid for most plants within a certain limited
operating range. The second assumption is that the plant dynamics are exactly known and are time invariant. Again,
this is valid to some extent, but the fact that the plant dynamics and system disturbances are not exactly known, and
their characteristics change over time is what motivates the use of feedback. Indeed, if the plant and disturbances
were exactly known, there would be no need for feedback control, all control could be open-loop. However, for the
sake of designing the feedback controller, this assumption is made.
Another common assumption is that the plant is second order. This assumption can be made for a great many simple
control systems (such as servo systems). This is because the higher order dynamics are generally of high frequency,
and are thus beyond the bandwidth of the system.
In the first part of the exercise, step response method can applied to the actuator input and observing the response
in which actual (stable) plants can be identified and modelled. In the second part of the exercise, some additional
characteristics of second and third order systems are investigated by studying the effects of adding real poles and
zeros to a second order system. In the third part of the exercise, frequency response method by means of applying
sine waves over a range of frequencies and observing the gain and phase change of the output is investigated.

Figure 1: Open loop linear system

1
Linear second-order dynamic system response
A standard form of a second-order dynamic system, G(s) is

ωn2
G(s) =
s2 + 2ζωn s + ωn2

where ωn is the natural frequency, and ζ is the damping ratio.


In this exercise, you will investigate the step and frequency responses of the above system in an open-loop configura-
tion for a variety of natural frequencies and damping ratios. The open loop configuration is shown in Figure 1. The
system input is r(t) and the output is y(t).
Thefrequency response is given as a Bode plot, that is a log-log plot of |G(jω)| against ω, and a simultaneous plot
of G(jω) against log(ω). You will cover the theory of Bode plots later in the course.

For a step input function 


0 for t<0
r(t) =
1 for t≥0
which in the Laplace domain is
1
R(s) = ,
s
the step response is Z t
y(t) = g(t) ? r(t) = g(t)dt
0

where g(t) is the impulse response, which in the Laplace domain is

G(s)
Y (s) = G(s)R(s) = .
s
The step response is shown as a plot of y(t) against t.

2
1 Step response - Session I
The laboratory exercise I makes use of the MATLAB Control Toolbox.

Create a folder located in your Desktop named CLA50121.

1.1 Step response with constant natural frequency

In this section, with a constant natural frequency, ωn , the effect of different damping ratios, ζ = 0.1, 0.3, 0.5,
0.707, 0.85, 1.0, 3.0, 6.0, on the step response is investigated.
Each student has a different value of the natural frequency ωn to be used in this section. Please ensure that you use
your given values which are available in Canvas under assignments>>Laboratory Exercise I II, and Practical Session
(ex11).
To save your session in a text file, type
diary filename.doc

Now enter into the workspace the first value of ζ by typing


Zt=0.1
Note that MATLAB is case sensitive. Type the command
who
to check which variables have been defined in the workspace.
Now define the system transfer function G(s) as the ratio of the numerator and denominator polynomials, ωn2 and
s2 + 2ζωn s + ωn2 respectively, by typing
G=tf(wnˆ2,[1, 2*Zt*wn, wnˆ2])
Note that in MATLAB, ˆ denotes “raise to the power of”. Also note that in MATLAB, the coefficients of a polynomial
in s are defined in a row vector of the coefficients of the polynomial in descending powers of s. Record the transfer
function.
You can check the natural frequency, damping ratio and system poles/eigenvalues by typing
damp(G)
Alternatively, you can obtain just the system poles/eigenvalues by typing
pole(G)
Record the values of the poles.
To get more information on these or any other MATLAB functions, just type
help damp
help pole

To plot the step response of G(s), type


step(G)
From the screen output, measure the overshoot Mp and the peak time tp . Do not worry if the values are not very
accurate. Record the values.
Now repeat the process for the next value of ζ; Type (or use the up arrow to recall the previous definition of Zt and
edit)
Zt=0.3
Now redefine the new system transfer function G(s) by
G=tf(wnˆ2,[1, 2*Zt*wn, wnˆ2])
using the up arrow. Obtain the system poles/eigenvalues by
pole(G)
Record the values of the poles. Now plot the step response on the same axes as the previous plot. To do this type
hold on
step(G)

3
Measure the overshoot Mp and the peak time tp . Record the values. Remember that tp cannot be measured if there is
no overshoot.
Repeat the process for all the values of ζ.
From the pull-down menu, save the files as an enhanced metafile (for Word) or encapsulated Postscript file (for
LATEX).

Question 1.1.1 Produce a table of the results including the transfer functions, poles, overshoots and peak times.
Comment on the responses and the results.

Plot Mp against ζ and tp against ζ. This can be done in MATLAB; type


help plot
to see how.

Question 1.1.2 Include the plots and explain the curves.

Question 1.1.3 What is the significance of the damping ratio ζ = 0.707?

Now clear the plot window by typing


hold off; close

1.2 Step response with constant damping ratio

In this section, with a constant damping ratio, ζ, the effect of different natural frequencies, ωn = 0.5, 1.0, 3.0, 5.0, on
the step response is investigated.
Each student has a different value of damping ratio ζ to be used in this section. Please ensure that you use your given
values which are available in Canvas under assignments>>Laboratory Exercise I II, and Practical Session (ex12).
Enter the first value of ωn by typing
wn=0.5
Define the system transfer function G(s) by
G=tf(wnˆ2,[1, 2*Zt*wn, wnˆ2])
Check the system poles/eigenvalues
pole(G)
Record the values of the poles. Plot the step response
step(G)
From the screen output, measure the overshoot Mp and the peak time tp . Record these values. Now repeat the process
for the other values of ωn , remembering to use the hold on command.

Question 1.2.1 Produce a table of the results including the transfer functions, poles, overshoots and peak times.
Comment on the responses and the results.

Question 1.2.2 Plot tp against ωn . Explain the curve.

To end recording, type


diary off

4
2 Extra poles and zeros - Session II
The laboratory exercise I makes use of the MATLAB Control Toolbox.

Create a folder located in your Desktop named CLA50122.

2.1 Standard second order system

In this section, we investigate the dynamic characteristics of a standard second order system, augmented by extra
poles and zeros.
The second-order dynamic system, G(s) is

ωn2
G(s) =
s2 + 2ζωn s + ωn2

connected in series with a transfer function G1 (s) as shown in Figure 2. In this exercise, the linear transfer function
G1 (s) will take three forms: a simple pole
p
G1 (s) = ,
s+p
a simple zero
s+z
G1 (s) = ,
z
and a pole/zero pair
p(s + z)
G1 (s) = .
z(s + p)
The augmented system G2 (s) is obtained from

G2 (s) = G(s)G1 (s).

Figure 2: Open loop augmented linear system

5
Each student has a different value of of ωn and ζ to be used in this section. Please ensure that you use your given
values which are available in Canvas under assignments>>Laboratory Exercise I II, and Practical Session (ex13).
To save the text from your session in a file, type
diary filename.doc

Now define the system transfer function G(s) by


G=tf(wnˆ2,[1, 2*Zt*wn, wnˆ2])
Check the system poles/eigenvalues
pole(G)
Record the values of the poles. Plot the step response
step(G)
From the screen output, measure the overshoot Mp and the peak time tp . Record these values.

Question 2.1.1 Comment on the transfer function and on the values of the poles, overshoot and peak time.

Question 2.1.2 Comment on the response.

2.2 Step response with extra pole


In this section, the effect on the step response of augmenting G(s) with an extra pole, −p, of various values is
investigated. The values of the pole are p = 1000, 10, 3.0, 1.0, 0.5, 0.2.
Enter the first value of p by typing
p=0.2
Define the system transfer function G1 (s) by
G1=tf(p,[1, p])
Obtain the augmented system G2 (s) by
G2= G1*G
Record the transfer function of the augmented system, G2 (s). Plot the step response
step(G2)
From the screen output, measure the overshoot Mp and the peak time tp . Record these values. Now repeat the process
for the other values of p.

Question 2.2.1 Produce a table of the results. Compare with the step response for G(s) and comment on the results.

Question 2.2.2 Plot Mp against p and tp against p. Use a log scale for the p-axis. Explain the plots.

Question 2.2.3 What would be the effect of using a negative value for p. Explain why.

2.3 Step response with extra zero


In this section, the effect on the step response of augmenting G(s) with an extra zero, −z, of various values is
investigated. The values of the zero are z = −5, −0.5, 0.2, 0.5, 1.0, 3.0, 10, 1000.
Enter the first value of z by typing
z=1000
Define the system transfer function G1 (s) by
G1=tf([1, z], z)
Obtain the augmented system G2 (s) by
G2= G1*G
Record the transfer function of the augmented system. Plot the step response
step(G2)
From the screen output, measure the overshoot Mp and the peak time tp . On some of the plots, there will be an
‘undershoot’, measure the value of the peak undershoot, Mu . Record these values. Now repeat the process for the
other values of z.

6
Question 2.3.1 Produce a table of the results. Compare with the step response for G(s) and comment on the results.

Question 2.3.2 Plot Mp against z and tp against z. Use a log scale for the z-axis. Explain the plots.

Question 2.3.3 Explain the effect of using a negative value for z. Can you show it mathematically? Find out what
systems which contain right-half-plane zeros are called.

2.4 Step response with extra pole and extra zero

In this section, the effect on the step response of augmenting G(s) with both an extra pole, −p, and an extra zero, −z
of various values is investigated. The values of the pole are p = 0.5, 10, and the values of the zero are z = 0.5, 10.
Thus there are 4 step responses to be obtained.
Enter the first value of p and z by typing
z=0.5,p=0.5
Define the system transfer function G1 (s) by
G1=tf(p*[1,z], z*[1, p])
Obtain the augmented system G2 (s) by
G2= G1*G
Record the transfer function of G1 and of the augmented system G2 (s). Plot the step response of the augmented
system
step(G2)
Now repeat the process for the other combinations of values of p and z.

Question 2.4.1 Produce a table of the transfer functions. Comment on each function?

Question 2.4.2 Explain each of the responses and compare with the step response of G(s) obtained in Section 2.1.

To end recording, type


diary off

7
3 Frequency response - Session III
The laboratory exercise I makes use of the MATLAB Control Toolbox. Some additional functions which provide
unique variables for the exercise can be found in a toolbox directory.

Create a folder located in your Desktop named CLA50123.

3.1 Frequency response with constant natural frequency

In this section, with a constant natural frequency, ωn , the effect of different damping ratios, ζ = 0.1, 0.3, 0.5,
0.707, 0.85, 1.0, 3.0, 6.0, on the frequency responses is investigated.
Each student has a different value of the natural frequency ωn to be used in this section. Please ensure that you use
your given values which are available in Canvas under assignments>>Laboratory Exercise I II, and Practical Session
(ex11).
To save the text from your session in a file, type
diary filename.doc

Now enter into the workspace the first value of ζ by typing


Zt=0.1

Now define the system transfer function G(s) as the ratio of the numerator and denominator polynomials, ωn2 and
s2 + 2ζωn s + ωn2 respectively, by typing
G=tf(wnˆ2,[1, 2*Zt*wn, wnˆ2])

To plot the frequency response of G(s), type


bode(G)
From the screen output, measure the resonant peak Mr and its corresponding frequency ωr . Do not worry if the
values are not very accurate. Record the values.
Now repeat the process for the next value of ζ; Type (or use the up arrow to recall the previous definition of Zt and
edit)
Zt=0.3
Now redefine the new system transfer function G(s) by
G=tf(wnˆ2,[1, 2*Zt*wn, wnˆ2])
using the up arrow.

8
Now plot the frequency response on the same axes as the previous plot. To do this type
hold on
bode(G)

The maximum value of a system frequency response magnitude is referred to as the resonant peak, Mr , and its
corresponding frequency, the resonant frequency, ωr . From the screen output, measure the resonant peak, Mr , and
the resonant frequency, ωr . Record these values.
Repeat the process for all the values of ζ.

Question 3.1.1 Produce a table of the results including the resonant peaks and frequencies. If you have not yet
covered the theory of Bode plots, just note your observations.

Question 3.1.2 Plot Mr against ζ and ωr against ζ. Note your observations.

3.2 Frequency response with constant damping ratio

In this section, with a constant damping ratio, ζ, the effect of different natural frequencies, ωn = 0.5, 1.0, 3.0, 5.0, on
the frequency responses is investigated.
Each student has a different value of the damping ratio ζ to be used in this section. Please ensure that you use your
given values which are available in Canvas under assignments>>Laboratory Exercise I II, and Practical Session
(ex12).
Enter the first value of ωn by typing
wn=0.5
Define the system transfer function G(s) by
G=tf(wnˆ2,[1, 2*Zt*wn, wnˆ2])

Plot the frequency response


bode(G)
From the screen output, measure the resonant peak Mr and the resonant frequency ωr . Record these values. Now
repeat the process for the other values of ωn , remembering to use the hold on command.
From the screen output, measure the resonant frequency ωr and the resonant peak value Mr . Record these values.

Question 3.2.1 Produce a table of the results.

Question 3.2.2 Plot ωr against ωn . Note your observations.

To end recording, type


diary off

Yahya H Zweiri
School of Engineering & the Environment, Kingston University London
February 2019

You might also like