You are on page 1of 37

B1 -

Introduction to State Space and


Matrix Revision
• Module Aims and Learning Outcomes
• Modern Control Methods
• Revision of Matrix addition, multiplication,
and inversion
Module Aims:
• To develop an understanding of the dynamics
of rigid aircraft flight and of the significance of
aircraft dynamic and stability characteristics in
aircraft design.
• To extend student’s knowledge of control
systems and design simple controllers to
modify an aircraft’s natural modes of flight.
Learning Outcomes
• At the end of the module a successful student will be able to;

– identify the natural modes of an aircraft and explain an


aircraft’s long term response to control inputs

– apply analytical techniques to study the static and dynamic


stability of an aircraft and its response to control inputs.

– design controllers to modify the speed, accuracy and damping


of an aircraft’s flight motion using both continuous and digital
state space methods.

– use a computer to simulate the dynamics of an aircraft and the


performance of a control system
Time table
6
5
4
3
2
1
No.

Title/Topic

Lab

Test

final
final
MATLAB test
Aircraft stability
Aircraft stability

State space test

Aircraft control
Aircraft stability

S
S
S
S
S
S
Formative (F) or Summative (S)

I
I
I
I
I
I
Individual (I), Group (G) or Both (I/G)

% of total (Individual work)

30
30
10
10
10
10

-
-
-
-
-
- % of Groupwork

Set week

25
24
20
Hand-in week

25
24
20

Target week for return of marked

29
28
24

work
Number of hours to complete
1
1
1
10

1.5
1.5

assignment
Assessment

-
-

-


Learning Outcome 1
-
-

-


Learning Outcome 2
-
-
-
-

Learning Outcome 3
-
-
-
-

Learning Outcome 4
Classical Control Methods
+
Gc (s) Gp (s)
- controller plant

• Unity Feedback
• Series controllers
– e.g. Proportional, PI, PD, PID, Lead, Lag
• Root Locus Methods
• Frequency Response Methods
State Space Control Methods

u + y
System
-
x

State
Feedback
Advanced State Space Methods

u(t) + y(t)
System
-
+

-
Estimator
y(t)
K
x(t)
Digital State Space Methods

u(k) + y(t)
D/A System
-
+
A/D
-
Estimator
y(k)
K
x(k)
The State Space Matrix Equation
• The philosophy behind state space modelling is to arrange the differential
equations that model a system into a set of first order differential
equations by introducing n dummy variables
• The dummy variables are called STATE VARIABLES
• This set of first order differential equations can then be written down as a
single matrix equation

x = Ax + Bu
x is a vector (column matrix) containing the state variables
u is a vector (column matrix) containing the input variables
A is a square matrix
B is a matrix (not necessarily square!)
The Output Matrix Equation
• We have now defined a model of the system in terms of the state variables
but these are not necessarily the same as the outputs of the system
• We now need to define the output variables in terms of the state variables
and the input variables
• This relationship is called the Output Matrix Equation.

y = Cx + Du
y is a vector (column matrix) containing the output variables
x is a vector (column matrix) containing the state variables
u is a vector (column matrix) containing the input variables
C is a matrix (not necessarily square)
D is a matrix that rarely exists!
A 3rd order, 2 input, 2 output State
Space Model

 x 1   a11 a12 a13   x1   b11 b12 


 x =a       u1 
a 22 a 23 x 2 + b 21 b 22  
   2 21
    u 2 
 x 3  a 31 a 32 a 33   x 3  b31 b32 

 x1 
 y1   c11 c12 c13   
y  = c 
c 23   
x2
 2  21 c 22
 x 3 
Matrix Addition
• Matrices must be the same shape
 a11 a12   b11 b12   ( a11 + b11 ) (a 12 + b12 ) 
a  +  = 
 21 a 22   b 21 b 22  ( a 21 + b 21 ) (a 22 + b 22 ) 
 

 a11 a12 a13   b11 b12 b13   ( a11 + b11 ) ( a12 + b12 ) ( a13 + b13 ) 
a a 22 a 23  + b b 22 b 23  = ( a 21 + b 21 ) ( a 22 + b 22 ) ( a 23 + b 23 )
 21   21  
 a 31 a 32 a 33   b31 b32 b33  ( a 31 + b31 ) ( a 32 + b32 ) ( a 33 + b33 ) 
Matrix Addition Examples

1.3 −2.1  −5.2 3.4   −3.9 1.3 


    ?
6.4 0.3  +  1.4 −3.2 =  7.8 −2.9
 
Pause the video now and
when you have answered
these questions resume the
video to check your answers
3 0 −1  2 0 0   1 0 −1
   
?
0 −1 0  −  4 −1 1  =  −4 0 −1
 
0 4 0  0 −6 −1  0 10 1 
Matrix addition using Matlab
Matrix Multiplication
 b11 b12 
a1 a 2   (
= a1b11+a 2 b 21 ) (a1b12 +a 2b 22 )
b 21 b 22 

(
 a11 a12  b1   a11b1+a12 b 2  )
=
a a   b  (a b +
 21 22  2   21 1 22 2 
a b  )

(
 a11 a12   b11 b12   a11b11+a12 b 21 ) (a11b12 +a12b22 )
=
a    (
 21 a 22  b 21 b 22   a 21b11+a 22 b 21 ) (a 21b12 +a 22b22 )
Matrix Multiplication Examples
 −1 4 
1 2 
 0 1
 =  −1 6
?
Pause the video now and
6 4   −1 2 when you have answered
1 0   2  =  −1
     ? these questions resume the
video to check your answers

 1 −1  4 2   −1 −5
 −1 1   5 7  =  1 5 
    
?
Matrix multiplication using Matlab
Matrix Inversion
adj ( A )
(A)
−1
=
det ( A )

 a11 a12   a 22 −a12 


adj   =
a 21 a 22   −a 21 a11 

 a11 a12 
det   = a11a 22 − a12a 21
a 21 a 22 

NB In matrix algebra instead of dividing you multiply by the inverse


Matrix Inversion
adj ( A )
(A)
−1
=
det ( A )

 a11 a12   a 22 −a12 


adj   =
a 21 a 22   −a 21 a11  swap the lead
diagonal terms

 a11 a12 
det   = a11a 22 − a12a 21
a 21 a 22 

NB In matrix algebra instead of dividing you multiply by the inverse


Matrix Inversion
adj ( A )
(A)
−1
=
det ( A )
change signs on
 a11 a12   a 22 −a12 
adj   = the off-diagonal
a 21 a 22   −a 21 a11 

 a11 a12 
det   = a11a 22 − a12a 21
a 21 a 22 

NB In matrix algebra instead of dividing you multiply by the inverse


Matrix Inversion
adj ( A )
(A)
−1
=
det ( A )

 a11 a12   a 22 −a12 


adj   =
a 21 a 22   −a 21 a11 

 a11 a12  Product of the lead diagonal


det   = a11a 22 − a12a 21 – product of the off-diagonal
a 21 a 22 

NB In matrix algebra instead of dividing you multiply by the inverse


Matrix Inversion
adj ( A )
(A)
−1
=
det ( A )

 a11 a12   a 22 −a12 


adj   =
a 21 a 22   −a 21 a11  swap the lead
diagonal terms

 a11 a12 
det   = a11a 22 − a12a 21
a 21 a 22 

NB In matrix algebra instead of dividing you multiply by the inverse


Matrix Inversion
adj ( A )
(A)
−1
=
det ( A )
change signs on
 a11 a12   a 22 −a12 
adj   = the off-diagonal
a 21 a 22   −a 21 a11 

 a11 a12 
det   = a11a 22 − a12a 21
a 21 a 22 

NB In matrix algebra instead of dividing you multiply by the inverse


Matrix Inversion
adj ( A )
(A)
−1
=
det ( A )

 a11 a12   a 22 −a12 


adj   =
a 21 a 22   −a 21 a11 

 a11 a12  Product of the lead diagonal


det   = a11a 22 − a12a 21 – product of the off-diagonal
a 21 a 22 

NB In matrix algebra instead of dividing you multiply by the inverse


Matrix Inversion Example
 4 −3
 1 3
−1  2 1  0.4 −0.3
=  =
 −2 4 
  ? 10 0.2 0.1 
  Pause the video now and
when you have answered
these questions resume the
video to check your answers
3rd order
T
 a 22 a 23  a 21 a 23  a 21 a 22  
 det a − det 
a 32  
det 
 32 a 33  a 31 a 33  a 31
a 11 a 12 a 13   
 a 12 a 13  a 11 a 13  a 11 a 12  
adj a 21 a 22 a 23  = − det a det  − det 
  a 33  a 31 a 33  a 31 a 32  
a 31 a 32 a 33   32

 det a 12 a 13  a 11
− det 
a 13  a 11
det 
a 12  
 a   a 22  
 22 a 23  a 21 a 23  a 21

a11 a12 a13 


  a 22 a 23  a 21 a 23  a 21 a 22 
det a 21 a 22 a 23 = a11 det   − a12 det a  + a13 det a 
   32 33 
a a  31 33 
a  31 a 32 
a 31 a 32 a 33 
3rd order
T
 a 22 a 23  a 21 a 23  a 21 a 22  
 det a − det 
a 32  
det 
 32 a 33  a 31 a 33  a 31
a 11 a 12 a 13   
 a 12 a 13  a 11 a 13  a 11 a 12  
adj a 21 a 22 a 23  = − det a det  − det 
  a 33  a 31 a 33  a 31 a 32  
a 31 a 32 a 33   32

 det a 12 a 13  a 11
− det 
a 13  a 11
det 
a 12  
 a   a 22  
 22 a 23  a 21 a 23  a 21

a11 a12 a13 


  a 22 a 23  a 21 a 23  a 21 a 22 
det a 21 a 22 a 23 = a11 det   − a12 det a  + a13 det a 
   32 33 
a a  31 33 
a  31 a 32 
a 31 a 32 a 33 
3rd order
T
 a 22 a 23  a 21 a 23  a 21 a 22  
 det a − det 
a 32  
det 
 32 a 33  a 31 a 33  a 31
a 11 a 12 a 13   
 a 12 a 13  a 11 a 13  a 11 a 12  
adj a 21 a 22 a 23  = − det a det  − det 
  a 33  a 31 a 33  a 31 a 32  
a 31 a 32 a 33   32

 det a 12 a 13  a 11
− det 
a 13  a 11
det 
a 12  
 a   a 22  
 22 a 23  a 21 a 23  a 21

a11 a12 a13 


  a 22 a 23  a 21 a 23  a 21 a 22 
det a 21 a 22 a 23 = a11 det   − a12 det a  + a13 det a 
   32 33 
a a  31 33 
a  31 a 32 
a 31 a 32 a 33 
3rd order Transpose = swap
rows with columns
NB alternating signs

T
 a 22 a 23  a 21 a 23  a 21 a 22  
 det a − det 
a 32  
det 
 32 a 33  a 31 a 33  a 31
a 11 a 12 a 13   
 a 12 a 13  a 11 a 13  a 11 a 12  
adj a 21 a 22 a 23  = − det a det  − det 
  a 33  a 31 a 33  a 31 a 32  
a 31 a 32 a 33   32

 det a 12 a 13  a 11
− det 
a 13  a 11
det 
a 12  
 a   a 22  
 22 a 23  a 21 a 23  a 21

a11 a12 a13 


  a 22 a 23  a 21 a 23  a 21 a 22 
det a 21 a 22 a 23 = a11 det   − a12 det a  + a13 det a 
   32 33 
a a  31 33 
a  31 a 32 
a 31 a 32 a 33 
3rd order
T
 a 22 a 23  a 21 a 23  a 21 a 22  
 det a − det 
a 32  
det 
 32 a 33  a 31 a 33  a 31
a 11 a 12 a 13   
 a 12 a 13  a 11 a 13  a 11 a 12  
adj a 21 a 22 a 23  = − det a det  − det 
  a 33  a 31 a 33  a 31 a 32  
a 31 a 32 a 33   32

 det a 12 a 13  a 11
− det 
a 13  a 11
det 
a 12  
 a   a 22  
 22 a 23  a 21 a 23  a 21

a11 a12 a13 


  a 22 a 23  a 21 a 23  a 21 a 22 
det a 21 a 22 a 23 = a11 det   − a12 det a  + a13 det a 
   32 33 
a a  31 33 
a  31 a 32 
a 31 a 32 a 33 
3rd order
T
 a 22 a 23  a 21 a 23  a 21 a 22  
 det a − det 
a 32  
det 
 32 a 33  a 31 a 33  a 31
a 11 a 12 a 13   
 a 12 a 13  a 11 a 13  a 11 a 12  
adj a 21 a 22 a 23  = − det a det  − det 
  a 33  a 31 a 33  a 31 a 32  
a 31 a 32 a 33   32

 det a 12 a 13  a 11
− det 
a 13  a 11
det 
a 12  
 a   a 22  
 22 a 23  a 21 a 23  a 21

a11 a12 a13 


  a 22 a 23  a 21 a 23  a 21 a 22 
det a 21 a 22 a 23 = a11 det   − a12 det a  + a13 det a 
   32 33 
a a  31 33 
a  31 a 32 
a 31 a 32 a 33 

NB alternating signs
Matrix Inversion Example
−1
1 0 −1  1.2 −0.1 0.4 
2 4 0 
 
 0 1 3 
 ?
=  −0.6 0.3 −0.2 

 0.2 −0.1 0.4  Pause the video now and
when you have answered this
question resume the video to
check your answers
Inverse Matrix using Matlab
4th order adjoint/determinant
T
 a 22 a 23 a 24 a 21 a 23 a 24 a 21 a 22 a 24 a 21 a 22 a 23 
 
 a 32 a 33 a 34 − a 31 a 33 a 34 a 31 a 32 a 34 − a 31 a 32 a 33 
 a 42 a 43 a 44 a 41 a 43 a 44 a 41 a 42 a 44 a 41 a 42 a 43 
 
 a12 a13 a14 a11 a13 a14 a11 a12 a14 a11 a12 a13 
− a − a 31 a 33 
 a11 a12 a13 a14 
 32
a 33 a 34 a 31 a 33 a 34 a 32 a 34 a 31 a 32

a a 22 a 23 a 24   a 42 a 43 a 44 a 41 a 43 a 44 a 41 a 42 a 44 a 41 a 42 a 43 
adj  21  = 
 a 31 a 32 a 33 a 34   a12 a13 a14 a11 a13 a14 a11 a12 a14 a11 a12 a13 
   a 22
a 41 a 42 a 43 a 44  a 23 a 24 − a 21 a 23 a 24 a 21 a 22 a 24 − a 21 a 22 a 23 
 
 a 42 a 43 a 44 a 41 a 43 a 44 a 41 a 42 a 44 a 41 a 42 a 43 
 
 a12 a 13 a14 a11 a13 a14 a11 a12 a14 a11 a12 a13 
 − a 22 a 23 a 24 a 21 a 23 a 24 − a 21 a 22 a 24 a 21 a 22 a 23 
 
 a 32 a 33 a 34 a 31 a 33 a 34 a 31 a 32 a 34 a 31 a 32 a 33 

 a11 a12 a13 a14 


a a 22 a 23 a 24 
a 22 a 23 a 24 a 21 a 23 a 24 a 21 a 22 a 24 a 21 a 22 a 23
det  21  = a11 a 32 a 33 a 34 − a12 a 31 a 33 a 34 + a13 a 31 a 32 a 34 − a14 a 31 a 32 a 33
 a 31 a 32 a 33 a 34 
  a 42 a 43 a 44 a 41 a 43 a 44 a 41 a 42 a 44 a 41 a 42 a 43
a 41 a 42 a 43 a 44 
Summary of Lecture
• A state space model consists of 2 matrix equations

x = A x + Bu y = Cx + Du
• The order of the system is equal to the number of
state variables
• Only add matrices of the same shape
• When multiplying matrices remember “cross the
row, down the column”
• An inverse matrix is the adjoint/determinant

You might also like