Assignment title: Information
Introduction
The objective of the laboratory exercise is to study the characteristics of linear dynamic systems. In control engineering,
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 be 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
G(s) = ω
2
n
s
2 + 2ζωns + ω2
n
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 configuration
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).
The frequency 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
r(t) = {
0 for t < 0
1 for t ≥ 0
which in the Laplace domain is
R(s) = 1
s
,
the step response is
y(t) = g(t) ⋆ r(t) = ∫ t
0
g(t)dt
where g(t) is the impulse response, which in the Laplace domain is
Y (s) = G(s)R(s) = G(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. Some additional functions which provide
unique variables for the exercise can be found in the following toolbox directory:
cd('K:\Teaching Materials\ME\ME5012\ME5012lab');
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.
To obtain the value of ωn you will use in this section, type
[wn]=ME5012ex11('Surname');
where you substitute your own surname for Surname. ENSURE THAT YOU TYPE IN YOUR SURNAME CORRECTLY
WITHOUT ANY SPACE AND/OR SYMBOL! This places a value into the variable wn in the MATLAB
workspace. To check this value, type
wn
Question 1.1.1 Record this value.
Now, change to the following directory:
cd('H:\Desktop');
To save the text from your session in a file, type
diary filename.txt
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, ω
2
n and
s
2 + 2ζωns + ω
2
n 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
3
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)
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.2 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.3 Include the plots and explain the curves.
Question 1.1.4 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.
To obtain the value of ζ you will use in this section, type
cd('K:\Teaching Materials\ME\ME5012\ME5012lab');
[Zt]=ME5012ex12('Surname');
where you substitute your own surname for Surname. This places a value into the variable Zt . To check this value,
type
Zt
Question 1.2.1 Record this value.
4
Now, change to the following directory:
cd('H:\Desktop');
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.2 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.3 Plot tp against ωn. Explain the curve.
To end recording, type
diary off
5
2 Extra poles and zeros - Session II
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 the following toolbox directory:
cd('K:\Teaching Materials\ME\ME5012\ME5012lab');
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
G(s) = ω
2
n
s
2 + 2ζωns + ω2
n
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
G1(s) = p
s + p
,
a simple zero
G1(s) = s + z
z
,
and a pole/zero pair
G1(s) = p(s + z)
z(s + p)
.
The augmented system G2(s) is obtained from
G2(s) = G(s)G1(s).
Figure 2: Open loop augmented linear system
6
To obtain the value of ωn and ζ you will use in this section, type
[wn,Zt]=ME5012ex13('Surname');
where you substitute your own surname for Surname.
Question 2.1.1 Record these values.
Now, change to the following directory:
cd('H:\Desktop');
To save the text from your session in a file, type
diary filename.txt
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.2 Comment on the transfer function and on the values of the poles, overshoot and peak time.
Question 2.1.3 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.
7
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.
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
8
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 the following toolbox directory:
cd('K:\Teaching Materials\ME\ME5012\ME5012lab');
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.
To obtain the value of ωn you will use in this section, type
[wn]=ME5012ex11('Surname');
where you substitute your own surname for Surname. ENSURE THAT YOU TYPE IN YOUR SURNAME CORRECTLY!.
This places a value into the variable wn in the MATLAB workspace. To check this value, type
wn
Question 3.1.1 Record this value.
Now, change to the following directory:
cd('H:\Desktop');
To save the text from your session in a file, type
diary filename.txt
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, ω
2
n and
s
2 + 2ζωns + ω
2
n
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.