Aerospace System Guidance and Control Lesson IV Introduction To Simulink
Aerospace System Guidance and Control Lesson IV Introduction To Simulink
Introduction to Simulink
Politecnico di Milano
Website:
http://www.skywarder.eu
E-mail:
luigi.cocco@skywarder.eu
Contents
1 Introduction 1
1.1 Simulink . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.2 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.3 Most important blocks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 Pulse Response 4
2.1 Simulink Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
4 Direct integration 12
4.1 Altitude time domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.1.1 Yaw time domain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
i
Chapter 1
Introduction
1.1 Simulink
Simulink provides a graphical interface that allows you to dene and build the model through
its block diagram. The blocks are transported and moved on the work surface by the mouse.
Simulink includes a large number of libraries that contain many blocks capable of perform-
ing operations (more or less elementary) on signals. Simulink fully integrates with MATLAB.
Simulink starts by typing << Simulink >> on the MATLAB prompt or press the Simulink icon in
the MATLAB toolbar 1.1.
Simulink new model can be open by clicking New model in the upper left
1
Aerospace System Guidance and Control Lesson IV
In order to create a block model, following instruction has to be done • Copying blocks (sub-
systems) necessary to create the calculation model you want inside the working area • Connect
blocks with arrows made with mouse • Select the simulation parameters • Start the simulation
and results analysis The Blocks of the model can be choosen by Simulink libraries or dened by
user, and the copy can be made dragging blocks from libraries to workspace. Libraries can be
selected by icons shown in Fig.1.2
The Simulink’s libraries as said in the previous section oers a lot of blocks but most used blocks
can be found in the libraries showed in the figure below :
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. 2
Lesson IV Aerospace System Guidance and Control
3 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Chapter 2
Pulse Response
In this chapter the pulse response of a generic system will be studied the system will be build on
simulink and system’s step response will be tested, this test is a preliminary analysis of system’s
stability. The generic system of this example is described by the following transfer function
−s + 1
G(s) =
s2 + 2s + 2
4
Lesson IV Aerospace System Guidance and Control
5 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Chapter 3
Blimp dynamic model can be written in a Laplace domain and the system’s transfer function
can be implemented on Simulink in order to study the dynamic stability of the system excited
by a pulse input. Blimp’s equations of motion are reported below
• Altitude
1 ¨
˙ D)
z(t) = ((T1 + T2 )Θ(t) − 2ρz(t)Sc
m
in Laplace domain it become
T
z(s) = Θ(s)
(ms2 + 2ρScD s)
Where T = T1 + T2 ;
•Yaw
1 ¨ L2 ˙˙
ψ̈(t) = ((T1 (t) − T2 (t))d − ρScD ψ(t))
J 4
in the Laplace domain
(T1 (s) − T2 (s))
ψ(s) = 2
d
(Js2 + ρScD L4 s)
where T1 is the righet engine and T2 is the left.
6
Lesson IV Aerospace System Guidance and Control
• mtot = 2 Kg
• cD = 0.3
• S =πR2 = π ∗ 0.22 = 0.1257m2
And so, the transfer function is
10
z(s) = Θ(s)
(2s2 + 0.094s)
7 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Aerospace System Guidance and Control Lesson IV
As showed by the figure, the system is unstable, so if the system is excited by any input (pertur-
bation) it will never come back to original position. Now it should be clear that the system must
be controlled in order to keep desired position (altitude) or direction (angle between longitudinal
axis and target) and to stabilize it against the perturbations.
In this section will be implemented a simple PID controller, the purpose is to show that the
controller makes the system stable and it allow to reach the nal altitude (target).
Fig.3.5 shows the altitude and the engine angle that the controller have used in order to reach
the target :
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. 8
Lesson IV Aerospace System Guidance and Control
The constants of controller PID used for this example are 0.1 for the proportional term and 0.3
for the derivative. These constants are not obtained with some algebraic equations but by some
dierent shooting , that isn’t a rigorous method but it’s used in most of pratical cases.
9 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Aerospace System Guidance and Control Lesson IV
As said at the beginning of this section this system is unstable like the altitude system, thus the
control is necessary to stabilize it.
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. 10
Lesson IV Aerospace System Guidance and Control
11 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Chapter 4
Direct integration
1 ¨
z(t) = ˙ D)
(TΘ(t) − 2ρz(t)Sc
m
12
Lesson IV Aerospace System Guidance and Control
Comparing the response obtained with the Laplace transformation, it’s easy to see that these are
the same graphics, as showed below
1 ¨ L2 ˙˙
ψ̈(t) = ((T1 (t) − T2 (t))d − ρScD ψ(t))
J 4
call T = T1 − T2
1 ¨ L2 ˙˙
ψ̈(t) = (T (t)d − ρScD ψ(t))
J 4
the model is
13 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Aerospace System Guidance and Control Lesson IV
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. 14