0% found this document useful (0 votes)
6 views

Lecture 7

The document discusses block diagrams and their use in modeling dynamic systems and for computer simulation using MATLAB/Simulink. It defines what a block diagram is, lists common block types like integrators and gains, and provides examples of constructing block diagrams from equations of motion. Specifically, it shows how to build block diagrams representing input-output and state-variable models of systems like a mass-spring-damper. The goal is to introduce block diagram modeling of dynamic systems as a way to simulate their behavior in MATLAB/Simulink.

Uploaded by

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

Lecture 7

The document discusses block diagrams and their use in modeling dynamic systems and for computer simulation using MATLAB/Simulink. It defines what a block diagram is, lists common block types like integrators and gains, and provides examples of constructing block diagrams from equations of motion. Specifically, it shows how to build block diagrams representing input-output and state-variable models of systems like a mass-spring-damper. The goal is to introduce block diagram modeling of dynamic systems as a way to simulate their behavior in MATLAB/Simulink.

Uploaded by

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

AERO 480 and MECH 6091:

Flight Control Systems

Block Diagrams and Computer Simulation Using


Matlab/Simulink

• What is Block Diagram? • Brief introduction to Matlab/Simulink


• Elements of a Block Diagram • Block diagrams vs. Matlab/Simulink
• Diagrams for input-output equations • Computer simulation using
Matlab/Simulink
• Diagram for state-variable equations
Lecture Notes on AERO 480 and MECH 6091: Flight Control Systems, Youmin Zhang (CU)
Block Diagrams
What is Block Diagram?
• A Block Diagram is an interconnection of blocks representing basic
mathematical operations in such a way that the overall diagram is
equivalent to the system’s mathematical model.
• In such a diagram, the lines interconnecting the blocks represent the
variables describing the system behaviour.
• The block represent operations or functions that use one or more of
these variables to calculate other variables.
Example: lines blocks
fa ( t ) 1 x x x
∫ dt ∫ dt
+ - M
-
B

K Mx + Bx + Kx = f a ( t )
Lecture 7 Lecture Notes on AERO 480 and MECH 6091: Flight Control Systems 2
Block Diagrams (cont’d)
Elements of a Block Diagram
Summer: x1
+
+ y
x2 y = x1 + x 2 − x3
-
x3
Gain: x y
K y = Kx

Integrator: x x
∫ dt y( t ) = y( 0 ) + ∫ t0 u( λ )dλ
(u ) ( y)

Constant: y
C

Lecture 7 Lecture Notes on AERO 480 and MECH 6091: Flight Control Systems 3
Block Diagrams (cont’d)
Diagrams for Input-Output Equations
Illustrate with the Mass-Spring-Damper example given before:
Mx + Bx + Kx = f a ( t )
(1) Identify output variable
x
(2) Solve for highest derivative of output variable
1 B K 1
x = ( − Bx − Kx + f a ( t )) = − x − x+ fa( t )
M M M M
(3) Create a sequence of output variables using integrator blocks

x x x x 1 x 1 x
∫ dt ∫ dt or
s s
Integrator 1 Integrator 2

Lecture 7 Lecture Notes on AERO 480 and MECH 6091: Flight Control Systems 4
1 B K 1
x = ( − Bx − Kx + f a ( t )) = − x − x+ fa( t )
M M M M

Block Diagrams (cont’d)


(4) Complete diagram with a summer (using result from previous step)
fa ( t ) 1 x x x
∫ dt ∫ dt
+ - M
-
B

fa ( t ) 1 x x x
or, ∫ dt ∫ dt
M + -
-
B
M
K
M
B K
Note : We can also use - and - for gain blocks, with positive nodes in summer.
M M
Lecture 7 Lecture Notes on AERO 480 and MECH 6091: Flight Control Systems 5
Block Diagrams (cont’d)
Example 4.2:
M 1M 2 x( 4 ) + [M 1 K 2 + M 2 ( K1 + K 2 )]x + K1 K 2 x = K 2 f a ( t ),
where x = x1 , B = 0
Solve for highest derivative:
x( 4 ) =
1
{− [M 1K 2 + M 2 ( K1 + K 2 )]x − K1K 2 x + K 2 f a ( t )}
M 1M 2
then we have:

fa ( t ) 1 x ( 4) x x x x
K2 ∫ dt ∫ dt ∫ dt ∫ dt
+ - M 1M 2
-
M 1 K 2 + M 2 ( K1 + K 2 )

K1 K 2

Lecture 7 Lecture Notes on AERO 480 and MECH 6091: Flight Control Systems 6
Block Diagrams (cont’d)
x1 B x2
Example 4.3: Representation of Ex. 4.2 K1
M1 M2
fa(t)
K2
M 1v1 = − K1 x1 + B( v2 − v1 ) + K 2 ( x2 − x1 )
M 2 v2 = − K 2 ( x2 − x1 ) − B( v2 − v1 ) + f a ( t )
Rewrite/rearrange the equations from
pp. 3-12, we have:
M 1x1 = − Bx1 − ( K1 + K 2 )x1 + Bx2 + K 2 x2
x1 =
1
[− Bx1 − ( K1 + K 2 )x1 + Bx2 + K 2 x2 ] M 2 x2 = − Bx2 + Bx1 − K 2 x2 + K 2 x1 + f a ( t )
M1

x2 =
1
[ f a ( t ) − Bx2 + Bx1 − K 2 x2 + K 2 x1 ]
M2

Then we have following block diagram:


(Refer to next page.)

Lecture 7 Lecture Notes on AERO 480 and MECH 6091: Flight Control Systems 7
Block Diagrams (cont’d)
+
+ -
1
M1
x1
∫ dt .
x1
∫ dt . x1

-
. B
K1 + K 2 .
K2

fa ( t )
+
+ +
-
1
M2
x2
∫ dt .
x2
∫ dt .x2

-
. B
. K2 x1 =
1
M1
[− Bx1 − ( K1 + K 2 )x1 + Bx2 + K 2 x2 ]

x2 =
1
[ f a ( t ) − Bx2 + Bx1 − K 2 x2 + K 2 x1 ]
M2 8
Lecture 7 Lecture Notes on AERO 480 and MECH 6091: Flight Control Systems
Block Diagrams (cont’d)
Diagrams for state-variable equations
Standard format for state-variable equations:
q = Aq + Bu
(*) ⇐ All variables could be matrices/vectors.
y = Cq + Du
Procedure:
1. Draw an integrator for each state variable
2. Assemble terms needed to create each state variable derivative
3. Assemble terms for output variables
The following diagram is a state-variable diagram for (*) assuming all
variables are scalars: q q
B ∫ dt
+
u +
A
y
q = Aq + Bu .
D y = Cq + Du
+
Question: Can you draw the block diagram +
for Ex. 4.3 in state-variable format? C
Lecture 7 Lecture Notes on AERO 480 and MECH 6091: Flight Control Systems 9
Block Diagrams (cont’d)
Example: Redraw the block x1 B x2
K1
diagram for Ex. 4.3 in state-variable
M1 M2
equation format. fa(t)
K2
The state-variable equations becomes: M 1v1 = − K1 x1 + B( v2 − v1 ) + K 2 ( x2 − x1 )
M 2 v2 = − K 2 ( x2 − x1 ) − B( v2 − v1 ) + f a ( t )
x1 = v1
M 1x1 = − Bx1 − ( K1 + K 2 )x1 + Bx 2 + K 2 x2
v1 =
1
[− ( K1 + K 2 )x1 − Bv1 + K 2 x2 + Bv2 ] M 2 x2 = − Bx2 + Bx1 − K 2 x2 + K 2 x1 + f a ( t )
M1
x2 = v2
x1 =
1
[− Bx1 − ( K1 + K 2 )x1 + Bx2 + K 2 x2 ]
v2 =
1
[ f a ( t ) + K 2 x1 + Bv1 − K 2 x2 − Bv2 ] M1
M2 x2 =
1
[ f a ( t ) − Bx2 + Bx1 − K 2 x2 + K 2 x1 ]
M2

Then we have following block diagram:


(Refer to next page.)

Lecture 7 Lecture Notes on AERO 480 and MECH 6091: Flight Control Systems 10
Block Diagrams (cont’d)
+
+ -
1 v1 = x1
M1
∫ dt
v1 = x1
∫ dt . x1 . x1 = v1
-
. B
v1 =
1
M1
[− ( K1 + K 2 )x1 − Bv1 + K 2 x2 + Bv2 ]

K1 + K 2 . x2 = v2

v2 =
1
M2
[ f a ( t ) + K 2 x1 + Bv1 − K 2 x2 − Bv2 ]

K2

fa ( t )
+
+ +
-
1 v2 = x2
M2
∫ dt
v2 = x2
∫ dt. .x2

-
. B
. K2

Lecture 7 Lecture Notes on AERO 480 and MECH 6091: Flight Control Systems 11
Block Diagrams (cont’d)
Example 4.4: (see Problem 2.4 and practice this example yourself )
x1 B3 x2
K1
M1 fa(t) M2
B1 K3 B2 K2

FBD:

The state-variable equations: M 1 x1 + ( B1 + B3 )x1 + ( K1 + K 3 )x1 − B3 x2 − K 3 x2 = f a ( t )


x1 = v1 − B3 x1 − K 3 x1 + M 2 x2 + ( B2 + B3 )x2 + ( K 2 + K 3 )x2 = 0

v1 =
1
[ f a ( t ) − K1 x1 − B1v1 − B3 ( v1 − v 2 ) − K 3 ( x1 − x 2 )]
M1
x 2 = v 2

v 2 =
1
[− K 2 x 2 − B2 v 2 + B3 ( v1 − v 2 ) + K 3 ( x1 − x 2 )]
M2
Lecture 7 Lecture Notes on AERO 480 and MECH 6091: Flight Control Systems 12
Block Diagrams (cont’d)
Example 4.4: f a (t ) + 1 v1 v1 = x1 x1
x1 = v1 ∫ dt ∫ dt
- - M1
v1 =
1
[ f a ( t ) − K1 x1 − B1v1 − B3 ( v1 − v2 ) − K 3 ( x1 − x2 )] - -
M1
x 2 = v2 B1
v2 =
1
[− K 2 x2 − B2v2 + B3 ( v1 − v2 ) + K 3 ( x1 − x2 )]
M2
K1
+
B3
- +
K3
-
+
1 v2 v2 = x2 x2
∫ dt ∫ dt
+ - M2
-

B2

K2
Lecture 7 Lecture Notes on AERO 480 and MECH 6091: Flight Control Systems 13
Block Diagrams (cont’d)

Lecture 7 Lecture Notes on AERO 480 and MECH 6091: Flight Control Systems 14
Block Diagrams (cont’d)
Elements of a Block Diagram Blocks in Simulink

Summer: x1
+ x1 + x1 +
+ y + y y
x2 y = x1 + x 2 − x3 x2 x2 +
-
x3 - x3 -
x3
Gain: x y
K y = Kx K
Gain
Input 1 Output
Integrator: x x
∫ dt y( t ) = y( 0 ) + ∫ t0 u( λ )dλ
s
Input Integrator
Constant: y 1 Output
C
IC s
Integrator
Initial
Condition 15
Lecture 7 Lecture Notes on AERO 480 and MECH 6091: Flight Control Systems
F16 AIRCRAFT: System Description

Right elevator

Left elevator

Right Aileron

Left Aileron
STATES AND INPUT CONTROLS
ϕ
Canards

Rudder

Lecture 7 Lecture Notes on AERO 480 and MECH 6091: Flight Control Systems 16
F16 AIRCRAFT: System Modelization
Linearization
Parameter Flight Conditions 2 Flight Condition3

Mach number 0.6 0.9


Altitude 30 000 (ft.) 20 000 (ft.)
Dynamic Pressure 158.81 lb./ft2 552.113 lb./ft2
Trim Velocity 596.91 ft./s 933.23 ft./s
Trim angle of attack 4.705 deg 1.86 deg

Equation s of State space Autopilot


Linearization
Motion Model Controller

Lecture 7 ENGR691X
Lecture Notes on AERO 480 and MECH 6091: Flight Control Systems 17
F16 AIRCRAFT: Simulation

y
Estimated def lections
Estimated states
probability
ref
u

Scopes
Pilote Commande Desired Output

y x' = Ax+Bu
u u u_pf y noised y
Estimated def lection Vector y = Cx+Du

Actuator f ault Probability Actuator faults AFTI-F16 Aircraft Low-cost


modelisation sensors
Sliding Mode Control

diag_Fc
u
probability

estimated state Vector


y
estimated def lection Vector

EMMAE_FDI

F16 MATLAB/Simulink Block Diagram

Lecture 7 Lecture Notes on AERO 480 and MECH 6091: Flight Control Systems 18

You might also like