EGB345 Control and Dynamic Systems JJF/15
COMPUTER LAB 2 – MODELLING AND CHECKING YOUR ANSWERS
You will need to demonstrate some of skills developed in this computer lab in
your pre-lab submission.
Task 1: You are told that a vehicle with suspension has transfer function:
where R(s)corresponds to the road surface and X
s
(s)is the suspension height.
When this vehicle is driven over the 100 mm high gutter the following response is
observed.
0 0.5 1 1.5 2 2.5 3 3.5 4
0
20
40
60
80
100
120
140
160
Time Response
Time (sec)
V
e
h
ic
le
H
e
ig
h
t
(m
m
)
(a) Enter the transfer function of the suspension system into MATLAB. Use the tf( )
function to generate the transfer function – type “help tf” to get information on how
to use the function. Generate the time response for your transfer function using the
step( ) function – again the help system can give you the details of use. Compare
your transfer function to the response shown above to verify your solution.
PTO: Task 2 on next page.
Learning Objectives
• To learn how to build transfer functions and checking answers.
• To practice modelling in Simulink.
Where Learning Outcomes Assessed:
• In Pre-lab report, Prac lab report, mid-semester and final exam.
Task 2: Enter the functional diagram for the conventional cruise control system for a
car. An appropriate diagram is shown below. Most elements can be found in the
Commonly Used Blocks group in the Simulink library. The Transfer Function element is
found in the Continuous group. Coefficients can be entered by double clicking on the
Transfer Function box and entering [1] into the “Numerator coefficients” and [1 5 0]
into the “Denominator coefficients”. The Step block is found in the Sources group. Blocks
are wired together by simply dragging the mouse from inputs to outputs.
1
s +5s2
Transfer FcnStep Scope
1
Gain
(b) Run the simulation (play button in the toolbar) and note the time response by
opening the Scope box (double click). Vary the Gain element (double click) to change
the time response to a more appropriate response for a cruise control system,
particularly noting the effect of large values of gain.
Learning Objectives