0% found this document useful (0 votes)
56 views17 pages

Aerospace System Guidance and Control Lesson IV Introduction To Simulink

The document provides an introduction to Simulink and its use in modeling dynamic systems. It discusses the pulse response of a generic system using Simulink. It also models the altitude and yaw stability of a blimp system in Simulink. For altitude stability, it builds a transfer function model and shows that the uncontrolled system is unstable in response to a pulse input. This indicates the need for control systems to stabilize the blimp's altitude and yaw.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views17 pages

Aerospace System Guidance and Control Lesson IV Introduction To Simulink

The document provides an introduction to Simulink and its use in modeling dynamic systems. It discusses the pulse response of a generic system using Simulink. It also models the altitude and yaw stability of a blimp system in Simulink. For altitude stability, it builds a transfer function model and shows that the uncontrolled system is unstable in response to a pulse input. This indicates the need for control systems to stabilize the blimp's altitude and yaw.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

March 11, 2015

Aerospace System Guidance and Control


Lesson IV

Introduction to Simulink

Skyward Experimental Rocketry

Politecnico di Milano

Author: Luigi Cocco

Editor: Francescodario Cuzzocrea


Abstract
Simulink is an environment for modeling, analysis, and the simulation of dynamic systems, it
supports the simulation of linear systems, and/or non- linear, operating with continuous signals
and/or discrete signals, continuous and/or discrete time.

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

3 Blimp system’s stability 6


3.1 Altitude stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1.1 Simulink Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.1.2 Controlled altitude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.2 Yaw stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2.1 Simulink model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2.2 Yaw PID . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11

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.

Figure 1.1: Simulink

• Simulink and MATLAB interacting through the workspace;


• The model parameters can be specied within the Simulink blocks using symbolic variables,
whose value is stored in the workspace of MATLAB;
• Simulation results can be stored by block called To workspace

1.2 Getting started

Simulink new model can be open by clicking New model in the upper left

1
Aerospace System Guidance and Control Lesson IV

Figure 1.2: New Model

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

1.3 Most important blocks

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

Figure 1.3: Most important blocks

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

2.1 Simulink Model


The model is composed by a transfer function, scope, and pulse input, these blocks can be found
respectively from Continuos,Sinks,Sources libraries, so the simulink model is showed in Fig.2.1

Figure 2.1: Simulink Model

and the output (scope) is showed below :

4
Lesson IV Aerospace System Guidance and Control

Figure 2.2: Scope

5 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Chapter 3

Blimp system’s stability

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.

3.1 Altitude stability


In this section, altitude’s transfer function will be implemented on simulink and it’s stability will
be tested by using pulse input. This analysis allow to understood the dynamic behavior of the
system under the external perturbation.

3.1.1 Simulink Model


As already seen in chapter 2 the transfer function block can be use to build the laplace model
of the system, however in this example the coecients of numerator and denominator of transfer
function have to be calculated
Data
• ρ= 1.225Kg/m3
• T = 10 N

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)

and below is showed the relative model :

Figure 3.1: Altitude Simulink Model

and the system response:

Figure 3.2: System response

7 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Aerospace System Guidance and Control Lesson IV

Figure 3.3: Pulse

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.

3.1.2 Controlled altitude

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).

Figure 3.4: Simulink Controlled Altitude

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

Figure 3.5: Altitude and engine angle

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.

3.2 Yaw stability


As was done in the previous section the yaw’s stability will be investigated, it will be showed
that the system isn’t stable like altitude’s system, instead the control of yaw will be developed
in the next lessons.

3.2.1 Simulink model


Data
2 2 2
• J = m1 L4 + m2 L4 = mtot L2 = 1Kg ∗ m2
• ρ= 1.225Kg/m3
• mtot = 2 Kg
• cD = 0.3
• S =πR2 = π ∗ 0.22 = 0.1257m2
• d = 0.1
Transfer function is
0.1
ψ(s) = T (s)
(s2 + 0.0115s)

where T (s) = T1 (s) − T2 (s). The respective model is

9 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Aerospace System Guidance and Control Lesson IV

Figure 3.6: Simulink Yaw Model

The response is showed below

Figure 3.7: Pulse response

Figure 3.8: Pulse

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

3.2.2 Yaw PID


As the altitude system, The yaw PID controller was implemented in order to reach a target angle,
the constants of PID used for this example are obtained in the same manner of the altitude system
by shooting . The Fig.3.9 shows the Simulink Model

Figure 3.9: Yaw Simulink Model

the response is showed below

Figure 3.10: Yaw response

The PID constants are P=3, D=10.

11 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.
Chapter 4

Direct integration

In this chapter a direct integration of equations of motion will be implemented on Simulink in


order to show that the system is unstable also in time domain.

4.1 Altitude time domain

Rearranging altitude’s equation of motion it become

1 ¨
z(t) = ˙ D)
(TΘ(t) − 2ρz(t)Sc
m

and it can be implemented on Simulink as showed below

Figure 4.1: Altitude time domain integration

and the response is showed in Fig.4.2

12
Lesson IV Aerospace System Guidance and Control

Figure 4.2: Altitude time pulse response

Comparing the response obtained with the Laplace transformation, it’s easy to see that these are
the same graphics, as showed below

Figure 4.3: Direct integration response and laplace response

4.1.1 Yaw time domain

Yaw time domain equation of motion is

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

Figure 4.4: Yaw time domain integration

The Fig.4.5 shows the comparison of the responses

Figure 4.5: Yaw time domain integration

So the responses are the same like in the altitude system.

This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License. 14

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy