You are on page 1of 91

Control Systems

Mathematical Modeling

Muhammad Farooq Haydar

Flight Dynamics and Control Center


Department of Aeronautics and Astronautics
Institute of Space Technology, Islamabad

March 12, 2019

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 1 / 40


Recap
Review from
Week 1: Introduction last weekand Control
to Feedback
Control =
Feedback Control:
Sensing + Computation +
Actuate Sense Actuation
Sensing + Computation + Actuation:
This course is mainly about input
design Principles
Feedback
I while considering the sensors and
Compute Robustness to Uncertainty
the actuators
Design of Dynamics

Many examples of feedback and control in natural & engineered systems:

BIO

ESE
BIO

ESE
CS
M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 2 / 40
Recap
Review from
Week 1: Introduction last weekand Control
to Feedback
Control =
Feedback Control:
Sensing + Computation +
Actuate Sense Actuation
Sensing + Computation + Actuation:
This course is mainly about input
design Principles
Feedback
I while considering the sensors and
Compute Robustness to Uncertainty
the actuators
Design of Dynamics

Feedback Principles:
Many examples of feedback and control in natural & engineered systems:
Robustness to
BIO
I variations in system parameters (mass, stiffness, damping etc.)
I external disturbance (wind gusts etc.)
ESE
BIO

ESE
CS
M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 2 / 40
Recap
Review from
Week 1: Introduction last weekand Control
to Feedback
Control =
Feedback Control:
Sensing + Computation +
Actuate Sense Actuation
Sensing + Computation + Actuation:
This course is mainly about input
design Principles
Feedback
I while considering the sensors and
Compute Robustness to Uncertainty
the actuators
Design of Dynamics

Feedback Principles:
Many examples of feedback and control in natural & engineered systems:
Robustness to
BIO
Ivariations in system parameters (mass, stiffness, damping etc.)
I external disturbance (wind gusts etc.)
ESE
Design of Dynamics to achieve desired levels of
BIO
I natural frequency (speed of response)

I damping ratio (stability)


ESE
CS
M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 2 / 40
Model-Based Control

Control (or input) design in a feedback system can be counter-intuitive.

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 3 / 40


Model-Based Control

Control (or input) design in a feedback system can be counter-intuitive.


Design with hit-and-trial can be
I expensive
I dangerous
I inefficient.

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 3 / 40


Model-Based Control

Control (or input) design in a feedback system can be counter-intuitive.


Design with hit-and-trial can be
I expensive
I dangerous
I inefficient.

A model
is a mathematical approximation of a real system.

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 3 / 40


Model-Based Control

Control (or input) design in a feedback system can be counter-intuitive.


Design with hit-and-trial can be
I expensive
I dangerous
I inefficient.

A model
is a mathematical approximation of a real system.
helps in control design by giving an idea how the system will respond to an
input.

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 3 / 40


Model-Based Control

Control (or input) design in a feedback system can be counter-intuitive.


Design with hit-and-trial can be
I expensive
I dangerous
I inefficient.

A model
is a mathematical approximation of a real system.
helps in control design by giving an idea how the system will respond to an
input.
needs not to be accurate for control design (feedback provides robustness via
corrective actions).

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 3 / 40


Mass Spring Damper System

Questions to be answered:
How does the mass move if the forcing
frequency changes?
How variations in mass/stiffness/damping
affect the response of system?

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 4 / 40


Mass Spring Damper System

Questions to be answered:
How does the mass move if the forcing
frequency changes?
How variations in mass/stiffness/damping
affect the response of system?
To be used for simulations or control design?

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 4 / 40


Mass Spring Damper System

Questions to be answered:
How does the mass move if the forcing
frequency changes?
How variations in mass/stiffness/damping
affect the response of system?
To be used for simulations or control design?

Assumptions:
Mass, spring and damper properties are
fixed and exactly known.
Springs satisfy Hooke’s law.
Damper is a linear viscous force.

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 4 / 40


Mass Spring Damper System

Writing the system’s equation using rigid-body


mechanics:

mẍ + cẋ + kx = F (t).

Separating the acceleration term:

c k F (t)
ẍ = − ẋ − x + .
m m m

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 5 / 40


State of a dynamic system:
For dynamic systems, input alone does not completely specify the evolution
of the system.

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 6 / 40


State of a dynamic system:
For dynamic systems, input alone does not completely specify the evolution
of the system.
A vector of variable called “state” captures all the information needed in
addition to input.

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 6 / 40


State of a dynamic system:
For dynamic systems, input alone does not completely specify the evolution
of the system.
A vector of variable called “state” captures all the information needed in
addition to input.

Consider a mass driven by an input (force):


F (t)
ẍ = .
m

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 6 / 40


State of a dynamic system:
For dynamic systems, input alone does not completely specify the evolution
of the system.
A vector of variable called “state” captures all the information needed in
addition to input.

Consider a mass driven by an input (force):


F (t)
ẍ = .
m
I acceleration is completely determined by the input (force).

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 6 / 40


State of a dynamic system:
For dynamic systems, input alone does not completely specify the evolution
of the system.
A vector of variable called “state” captures all the information needed in
addition to input.

Consider a mass driven by an input (force):


F (t)
ẍ = .
m
I acceleration is completely determined by the input (force).
I velocity is calculated as
Z t1
ẋ = ẍdt + ẋ0 .
t0
|{z}
| {z } initial velocity
change in velocity

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 6 / 40


State of a dynamic system:
For dynamic systems, input alone does not completely specify the evolution
of the system.
A vector of variable called “state” captures all the information needed in
addition to input.

Consider a mass driven by an input (force):


F (t)
ẍ = .
m
I acceleration is completely determined by the input (force).
I velocity is calculated as
Z t1
ẋ = ẍdt + ẋ0 .
t0
|{z}
| {z } initial velocity
change in velocity

I position is calculated as
Z t1 Z t1 
x= ẍdt + ẋ0 dt + x0 .
t0 t0
|{z}
| {z } initial position
change in position

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 6 / 40


Mass Spring Damper System: State Space Form

Can you identify the state variable in the system?

c k F (t)
ẍ = − ẋ − x + .
m m m

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 7 / 40


Mass Spring Damper System: State Space Form

Can you identify the state variable in the system?

c k F (t)
ẍ = − ẋ − x + .
m m m
The state of the mass spring damper system is comprised of position (x) and
velocity (ẋ) of the mass.

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 7 / 40


Mass Spring Damper System: State Space Form

Can you identify the state variable in the system?

c k F (t)
ẍ = − ẋ − x + .
m m m
The state of the mass spring damper system is comprised of position (x) and
velocity (ẋ) of the mass.
The number of states is equal to number of integrators present in the system,
I called order of the system.

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 7 / 40


Mass Spring Damper System: State Space Form

Can you identify the state variable in the system?

c k F (t)
ẍ = − ẋ − x + .
m m m
The state of the mass spring damper system is comprised of position (x) and
velocity (ẋ) of the mass.
The number of states is equal to number of integrators present in the system,
I called order of the system.
Accelerations are not part of the state, because they can be calculated
without integration.

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 7 / 40


Mass Spring Damper System: State Space Form

If we write the state vector of mass spring damper system:


   
x1 x
= .
x2 ẋ

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 8 / 40


Mass Spring Damper System: State Space Form

If we write the state vector of mass spring damper system:


   
x1 x
= .
x2 ẋ

Then we can write the model as a system of first order differential equations:

ẋ1 = x2
k c F (t)
ẋ2 = − x1 − x2 + .
m m m

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 8 / 40


Mass Spring Damper System: State Space Form

If we write the state vector of mass spring damper system:


   
x1 x
= .
x2 ẋ

Then we can write the model as a system of first order differential equations:

ẋ1 = x2
k c F (t)
ẋ2 = − x1 − x2 + .
m m m
Equivalently:       
ẋ1 0 1 x1 0
= k c + 1 [F (t)].
ẋ2 −m −m x2 m
| {z }
ẋ=Ax+Bu

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 8 / 40


Mass Spring Damper System: State Space Form

The model of system can thus be written as a first order (matrix) differential
equation:       
ẋ1 0 1 x1 0
= k c + 1 [F (t)]. (1)
ẋ2 −m −m x2 m
| {z }
ẋ=Ax+Bu

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 9 / 40


Mass Spring Damper System: State Space Form

The model of system can thus be written as a first order (matrix) differential
equation:       
ẋ1 0 1 x1 0
= k c + 1 [F (t)]. (1)
ẋ2 −m −m x2 m
| {z }
ẋ=Ax+Bu

The output of the system can be taken as position, which is given by an


algebraic equation:    
  x1 0
y= 1 0 + [F (t)]. (2)
x2 0
| {z }
y=Cx+Du

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 9 / 40


Mass Spring Damper System: State Space Form

The model of system can thus be written as a first order (matrix) differential
equation:       
ẋ1 0 1 x1 0
= k c + 1 [F (t)]. (1)
ẋ2 −m −m x2 m
| {z }
ẋ=Ax+Bu

The output of the system can be taken as position, which is given by an


algebraic equation:    
  x1 0
y= 1 0 + [F (t)]. (2)
x2 0
| {z }
y=Cx+Du

Any idea why equations (1)-(2) are called “state-space” representation?

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 9 / 40


bles for all t ' t0 .
State Vectors and State Space
ables.
he state vC
here the
apacitor
pace. A State space
e vector,
articular vR

ferential
are the State vector, x(t)

State vector trajectory


the out-
State vector, x(4)
ariables

efine the FIGURE 3.3 Graphic representation of state


M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 10 / 40
State Space Form

dx dx
= f (x, u) = Ax + Bu x ∈ Rn ,
dt dt
y = h(x, u) y = Cx + Du u ∈ Rp ,
Nonlinear system Linear system y ∈ Rm .

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 11 / 40


State Space Form

dx dx
= f (x, u) = Ax + Bu x ∈ Rn ,
dt dt
y = h(x, u) y = Cx + Du u ∈ Rp ,
Nonlinear system Linear system y ∈ Rm .

Linear ODE (higher order):

dn q dn−1 q dq
+ a1 + ... + an−1 + an q = u.
dtn dtn−1 dt
n−1
d q dq
y = b1 n−1 + ... + bn−1 + bn q
dt dt

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 11 / 40


State Space Form

dx dx
= f (x, u) = Ax + Bu x ∈ Rn ,
dt dt
y = h(x, u) y = Cx + Du u ∈ Rp ,
Nonlinear system Linear system y ∈ Rm .

Linear ODE (higher order):

dn q dn−1 q dq
+ a1 + ... + an−1 + an q = u.
dtn dtn−1 dt
n−1
d q dq
y = b1 n−1 + ... + bn−1 + bn q
dt dt

How can this ODE be written as a system of first order ODEs?

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 11 / 40


dn q dn−1 q dq
n
+ a1 n−1 + ... + an−1 + an q = u.
dt dt dt
dn−1 q dq
y = b1 n−1 + ... + bn−1 + bn q
dt dt
   q 
x1
 x2   dq 
  
dt 
.. 
 
=⇒ x =  ...  =   . ,
 
xn−1   dn−2 q 
 dtn−2 
xn dn−1 q
n−1 dt

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 12 / 40


dn q dn−1 q dq
n
+ a1 n−1 + ... + an−1 + an q = u.
dt dt dt
dn−1 q dq
y = b1 n−1 + ... + bn−1 + bn q
dt dt
   q 
x1
 x2   dq 
  
dt 
.. 
 
=⇒ x =  ...  =   . ,
 
xn−1   dn−2 q 
 dtn−2 
xn dn−1 q
n−1 dt

      
x1 0 1 0 ··· 0 x1 1
  
x2 0 0 1 ··· 0   x2  0
d 
 
 
.. ..
   
  ..   .. 
 =. .   .  + . u
dt       
xn−1   0 0 0 ··· 1  xn−1  0
xn −an −an−1 −an−2 · · · −a1 xn 0
 
y = b1 b2 . . . bn x + Du

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 12 / 40


State Space Form

Choice of state is not unique.


I different choices of units,
I sums and differences of mass positions.
Inputs are external to the system.
Outputs are the variables which we can measure.
Different types of models for different purposes:
I ordinary differential equations for rigid body mechanics
I partial differential equations for fluid flow, solid mechanics
I finite state machines for manufacturing, logic controllers

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 13 / 40


Quarter-Car Suspension

Figure: (a) passive suspension, (b) full-active suspension, (c) hydraulic-active suspension.

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 14 / 40


Quarter-Car Model

Questions to be answered:
How do the road-bumps affect the
compartment at different frequencies?
I at which speed should I drive on this rough
road?
A stiff suspension is better or a soft one?
How variations in loading/mass affect the
comfort level?

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 15 / 40


Quarter-Car Model

Questions to be answered:
How do the road-bumps affect the
compartment at different frequencies?
I at which speed should I drive on this rough
road?
A stiff suspension is better or a soft one?
How variations in loading/mass affect the
comfort level?

Assumptions:
Mass, spring and damper properties are
fixed and exactly known.
Springs satisfy Hooke’s law.
Damper is a linear viscous force.

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 15 / 40


Quarter-Car Model

Writing the system’s equation using rigid-body


mechanics:

ms z̈s = −cs (żs − żus ) − ks (zs − zus ) (3)


mus z̈us = cs (żs − żus ) + ks (zs − zus ) − kt (zus − zr )
(4)

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 16 / 40


Quarter-Car Model: State Space Form

Can you identify the state variable in the system?

ms z̈s = −cs (żs − żus ) − ks (zs − zus )


mus z̈us = cs (żs − żus ) + ks (zs − zus ) − kt (zus − zr )

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 17 / 40


Quarter-Car Model: State Space Form

Can you identify the state variable in the system?

ms z̈s = −cs (żs − żus ) − ks (zs − zus )


mus z̈us = cs (żs − żus ) + ks (zs − zus ) − kt (zus − zr )

The state of the quarter car model is comprised of positions ( zs , zus ) and
velocities ( żs , żus ) of both masses.

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 17 / 40


Quarter-Car Model: State Space Form

If we write the state vector of quarter-car model:


   
x1 zs
x2  zus 
  =  .
x3   żs 
x4 żus

Then we can write the model as system of first order differential equations:

ẋ1 = x3
ẋ2 = x4
ks kus cs cus
ẋ3 = − x1 + x2 − x3 + x4
ms ms ms ms
ks (kus + kt ) cs cus kt
ẋ4 = x1 − x2 + x3 − x4 + zr .
mus mus mus mus mus

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 18 / 40


Quarter-Car Model: State Space Form
Equivalently:
      
ẋ1 0 0 1 0 x1 0
ẋ2   0 0 0 1  x2   0 
  =  ks cus    +  
ẋ3  − m kus
ms
cs
−m ms
 x3   0  [zr ]
s s
ks (kus +kt ) cs cus kt
ẋ4 mus − mus mus mus
x4 mus
| {z }
ẋ=Ax+Bu

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 19 / 40


Quarter-Car Model: State Space Form
Equivalently:
      
ẋ1 0 0 1 0 x1 0
ẋ2   0 0 0 1  x2   0 
  =  ks cus    +  
ẋ3  − m kus
ms
cs
−m ms
 x3   0  [zr ]
s s
ks (kus +kt ) cs cus kt
ẋ4 mus − mus mus mus
x4 mus
| {z }
ẋ=Ax+Bu

The output of the system can be taken as position of sprung mass, or


possibly even unsprung mass as:
 
  x1  
1 0 0 0  x2 
 0
y= + [z ].
0 1 0 0 x3  0 r
x4
| {z }
y=Cx+Du

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 19 / 40


Linearization

Problem: almost every practical system is nonlinear!

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 20 / 40


Linearization

Problem: almost every practical system is nonlinear!

Idea: use first order Taylor series approximation around the equilibrium
point.

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 20 / 40


Linearization

Problem: almost every practical system is nonlinear!

Idea: use first order Taylor series approximation around the equilibrium
point.

Rationale: Feedback can provide corrective action against minor errors arising
from linear approximation:

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 20 / 40


Linearization

Figure: Approximation of sin(x) with Taylor series (degree of the Taylor polynomial
1,3,5,7,9,11,13).

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 21 / 40


Linearization

Linearization is always specific to the operating/equilibrium point.


A nonlinear system can be approximated by infinitely many linear systems at
different operating points.

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 22 / 40


length of the pendulum. Assume the mass is evenly distributed, with the center of
mass at L/2. Then linearize the state equations about the pendulum’s equilibrium
point—the vertical position with zero angular velocity.
Example

d 2θ MgL
J sin θ

L
dt2 2
T 2 T
Mg cos θ
θ Mg θ θ

L
2

Mg sin θ
Mg
(a) (b) (c)

FIGURE 3.14 a. Simple pendulum; b. force components of Mg; c. free-body diagram

SOLUTION: First draw a free-body diagram as shown in Figure 3.14(c). Summing


torques, we get

M. F. Haydar (FlyCon, IST) d2 θ MgL


Control Systems March 12, 2019 23 / 40
length of the pendulum. Assume the mass is evenly distributed, with the center of
mass at L/2. Then linearize the state equations about the pendulum’s equilibrium
point—the vertical position with zero angular velocity.
Example
We can take the states:

d 2θ MgL
J sin θ

L
dt2 2
T 2 T
Mg cos θ
θ Mg θ θ

L
2

Mg sin θ
Mg
(a) (b) (c)

FIGURE 3.14
Solution:
a. Simple pendulum; b. force components of Mg; c. free-body diagram
d2 θ M gL
SOLUTION:
J 2 + sin θ = T
dt First
2 draw a free-body diagram as shown in Figure 3.14(c). Summing
torques, we get

M. F. Haydar (FlyCon, IST) d2 θ MgL


Control Systems March 12, 2019 23 / 40
length of the pendulum. Assume the mass is evenly distributed, with the center of
mass at L/2. Then linearize the state equations about the pendulum’s equilibrium
point—the vertical position with zero angular velocity.
Example
We can take the states:

d 2θ MgL
J 2 sin θ

L
x1 = θ dt 2
T 2 T

Mg cos θ x2 =
θ θ
dt θ
Mg

L
2

Mg sin θ
Mg
(a) (b) (c)

FIGURE 3.14
Solution:
a. Simple pendulum; b. force components of Mg; c. free-body diagram
d2 θ M gL
SOLUTION:
J 2 + sin θ = T
dt First
2 draw a free-body diagram as shown in Figure 3.14(c). Summing
torques, we get

M. F. Haydar (FlyCon, IST) d2 θ MgL


Control Systems March 12, 2019 23 / 40
length of the pendulum. Assume the mass is evenly distributed, with the center of
mass at L/2. Then linearize the state equations about the pendulum’s equilibrium
point—the vertical position with zero angular velocity.
Example
We can take the states:

d 2θ MgL
J 2 sin θ

L
x1 = θ dt 2
T 2 T

Mg cos θ x2 =
θ θ
dt θ
Mg

L
2

ẋ1 = x2
Mg sin θ M gL T
Mg ẋ2 = − sin x1 +
(a) (b) 2J J(c)

FIGURE 3.14
Solution:
a. Simple pendulum; b. force components of Mg; c. free-body diagram
d2 θ M gL
SOLUTION:
J 2 + sin θ = T
dt First
2 draw a free-body diagram as shown in Figure 3.14(c). Summing
torques, we get

M. F. Haydar (FlyCon, IST) d2 θ MgL


Control Systems March 12, 2019 23 / 40
length of the pendulum. Assume the mass is evenly distributed, with the center of
mass at L/2. Then linearize the state equations about the pendulum’s equilibrium
point—the vertical position with zero angular velocity.
Example
We can take the states:

d 2θ MgL
J 2 sin θ

L
x1 = θ dt 2
T 2 T

Mg cos θ x2 =
θ θ
dt θ
Mg

L
2

ẋ1 = x2
Mg sin θ M gL T
Mg ẋ2 = − sin x1 +
(a) (b) 2J J(c)

FIGURE 3.14
Solution:
a. Simple pendulum; b. forceIscomponents c. free-body
of Mg;model
the state space linear?diagram
d2 θ M gL
SOLUTION:
J 2 + sin θ = T
dt First
2 draw a free-body diagram as shown in Figure 3.14(c). Summing
torques, we get

M. F. Haydar (FlyCon, IST) d2 θ MgL


Control Systems March 12, 2019 23 / 40
length of the pendulum. Assume the mass is evenly distributed, with the center of
mass at L/2. Then linearize the state equations about the pendulum’s equilibrium
point—the vertical position with zero angular velocity.
Example
We can take the states:

d 2θ MgL
J 2 sin θ

L
x1 = θ dt 2
T 2 T

Mg cos θ x2 =
θ θ
dt θ
Mg

L
2

ẋ1 = x2
Mg sin θ M gL T
Mg ẋ2 = − sin x1 +
(a) (b) 2J J(c)

FIGURE 3.14
Solution:
a. Simple pendulum; b. forceIscomponents c. free-body
of Mg;model
the state space linear?diagram
d2 θ M gL
SOLUTION:
J 2 + sin θ = T How can we linearize this system?
dt First
2 draw a free-body diagram as shown in Figure 3.14(c). Summing
torques, we get

M. F. Haydar (FlyCon, IST) d2 θ MgL


Control Systems March 12, 2019 23 / 40
ẋ1 = x2
M gL T
ẋ2 = − sin x1 +
2J J
for small x1 (which is θ)
sin x1 ≈ x1

ẋ1 = x2
M gL T
ẋ2 ≈ − x1 +
2J J

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 24 / 40


ẋ1 = x2
M gL T
ẋ2 = − sin x1 +
2J J
for small x1 (which is θ)
sin x1 ≈ x1

ẋ1 = x2
M gL T
ẋ2 ≈ − x1 +
2J J
The linearized state space model (around the downward equilibrium point):
      
ẋ1 0 1 x1 0
≈ + 1 T
ẋ2 − M2JgL 0 x2 J

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 24 / 40


ẋ1 = x2
M gL T
ẋ2 = − sin x1 +
2J J
What will be the linearized model around upright equilibrium point?

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 25 / 40


ẋ1 = x2
M gL T
ẋ2 = − sin x1 +
2J J
What will be the linearized model around upright equilibrium point?
for small x1 (which is θ)
sin x1 ≈ −x1

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 25 / 40


ẋ1 = x2
M gL T
ẋ2 = − sin x1 +
2J J
What will be the linearized model around upright equilibrium point?
for small x1 (which is θ)
sin x1 ≈ −x1

ẋ1 = x2
M gL T
ẋ2 ≈ x1 +
2J J

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 25 / 40


ẋ1 = x2
M gL T
ẋ2 = − sin x1 +
2J J
What will be the linearized model around upright equilibrium point?
for small x1 (which is θ)
sin x1 ≈ −x1

ẋ1 = x2
M gL T
ẋ2 ≈ x1 +
2J J
The linearized state space model around upright equilibrium point:
      
ẋ1 0 1 x1 0
≈ M gL + 1 T
ẋ2 2J 0 x 2 J

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 25 / 40


ẋ1 = x2
M gL T
ẋ2 = − sin x1 +
2J J

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 26 / 40


ẋ1 = x2
M gL T
ẋ2 = − sin x1 +
2J J
Writing in matrix form:
     
ẋ1 0 1 0
= + 1 T
ẋ2 − M2JgL sin x1 0 J

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 26 / 40


ẋ1 = x2
M gL T
ẋ2 = − sin x1 +
2J J
Writing in matrix form:
     
ẋ1 0 1 0
= + 1 T
ẋ2 − M2JgL sin x1 0 J

Taking the Jacobian at origion also gives:


     
ẋ1 0 1 0
= 1 + 1 T
ẋ2 − M2JgLcos
0
: 0 J

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 26 / 40


ẋ1 = x2
M gL T
ẋ2 = − sin x1 +
2J J
Writing in matrix form:
     
ẋ1 0 1 0
= + 1 T
ẋ2 − M2JgL sin x1 0 J

Taking the Jacobian at origion also gives:


     
ẋ1 0 1 0
= 1 + 1 T
ẋ2 − M2JgLcos
0
: 0 J

Jacobian provides a linear approximation (i.e., tangent plane) in the multivariable


case.

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 26 / 40


Case Study: Inverted Pendulum

   
l l
(m1 + m2 ) z̈ + m1 cos θ θ̈ − m1 sin θ θ̇2 + bż = F
z2 2 ż
   2
 ✓  ✓˙
l l l
m1 cos
` θ z̈ + m1 m1 θ̈ = m1 g sin θ
2 4 2
F
z
bż
M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 27 / 40
Case Study: Inverted Pendulum
   
l l
(m1 + m2 ) z̈ + m1 cos θ θ̈ − m1 sin θ θ̇2 + bż = F
2 2
     
l l2 l
m1 cos θ z̈ + m1 θ̈ = m1 g sin θ
2 4 2

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 28 / 40


Case Study: Inverted Pendulum
   
l l
(m1 + m2 ) z̈ + m1 cos θ θ̈ − m1 sin θ θ̇2 + bż = F
2 2
     
l l2 l
m1 cos θ z̈ + m1 θ̈ = m1 g sin θ
2 4 2

Lets linearize the equation around the equilibrium point z̄, θ̄, F̄ which is found
by setting ż = z̈ = θ̇ = θ̈ = 0.

F̄ = 0,
 
l
m1 g sin θ = 0.
2

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 28 / 40


Case Study: Inverted Pendulum
   
l l
(m1 + m2 ) z̈ + m1 cos θ θ̈ − m1 sin θ θ̇2 + bż = F
2 2
     
l l2 l
m1 cos θ z̈ + m1 θ̈ = m1 g sin θ
2 4 2

Lets linearize the equation around the equilibrium point z̄, θ̄, F̄ which is found
by setting ż = z̈ = θ̇ = θ̈ = 0.

F̄ = 0,
 
l
m1 g sin θ = 0.
2

Thus, any point θ̄ = nπ can be an equilibrium point (for integer n), if external
force F̄ is zero.
Linearization can be performed either
I by taking Jacobian of the nonlinear state space equations,
I or by linearizing each term and then converting to state space form.
M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 28 / 40
Case Study: Inverted Pendulum
Thus linearizing around the “inverted” position (i.e., θ̄ = 0 ± kπ where k is an
even integer):

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 29 / 40


Case Study: Inverted Pendulum
Thus linearizing around the “inverted” position (i.e., θ̄ = 0 ± kπ where k is an
even integer):

∂    ∂    
¨
cos θθ̈ ≈ cos θ̄θ̄ + cos θθ̈ ¨ θ − θ̄ + cos θθ̈ θ̈ − θ̄¨
∂θ (θ̄,θ̄ ) ∂ θ̈ (θ̄,θ̄¨)
 
= cos θ̄θ̄¨ − sin θ̄θ̄¨ (δθ) + cos θ̄ δ θ̈
= δ θ̈

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 29 / 40


Case Study: Inverted Pendulum
Thus linearizing around the “inverted” position (i.e., θ̄ = 0 ± kπ where k is an
even integer):

∂    ∂    
¨
cos θθ̈ ≈ cos θ̄θ̄ + cos θθ̈ ¨ θ − θ̄ + cos θθ̈ θ̈ − θ̄¨
∂θ (θ̄,θ̄ ) ∂ θ̈ (θ̄,θ̄¨)
 
= cos θ̄θ̄¨ − sin θ̄θ̄¨ (δθ) + cos θ̄ δ θ̈
= δ θ̈

∂    ∂    

sin θθ̇2 ≈ sin θ̄θ̄˙2 + sin θθ̇2 ˙ θ − θ̄ + sin θθ̇2 θ̇ − θ̄˙
∂θ (θ̄,θ̄) ∂ θ̇ ˙
(θ̄,θ̄)
 
= sin θ̄θ̄˙2 + cos θ̄ (δθ) θ̄˙2 + 2θ̄˙ sin θ̄ δ θ̄˙
=0

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 29 / 40


Case Study: Inverted Pendulum


∂  ∂
cos θz̈ ≈ cos θ̄z̄¨ + (cos θz̈)|(θ̄,z̄¨) θ − θ̄ + (cos θz̈) (z̈ − z̄¨)
∂θ ∂ z̈ (θ̄,z̄¨)

= cos θ̄z̄¨ − sin θ̄ (δθ) z̄¨ + cos θ̄ (δz̈)


= δz̈

∂ 
sin θ ≈ sin θ̄ + (sin θ)|(θ̄) θ − θ̄
∂θ
= sin θ̄ + cos θ̄ (δθ)
= δθ

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 30 / 40


Case Study: Inverted Pendulum

Linearized Model:

l
(m1 + m2 ) δz̈ + m1 δ θ̈ + bż = δF
2
l l2 l
m1 δz̈ + m1 δ θ̈ = m1 g δθ
2 4 2

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 31 / 40


Case Study: Inverted Pendulum

Linearized Model:

l
(m1 + m2 ) δz̈ + m1 δ θ̈ + bż = δF
2
l l2 l
m1 δz̈ + m1 δ θ̈ = m1 g δθ
2 4 2

Note:
It is common in literature to drop δ with the variables, but one should never forget
that linearized models only work with small deviations.

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 31 / 40


Case Study: Inverted Pendulum

l
(m1 + m2 ) z̈ + m1 θ̈ + bż = F
2
l l2 l
m1 z̈ + m1 θ̈ = m1 g θ
2 4 2

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 32 / 40


Case Study: Inverted Pendulum

l
(m1 + m2 ) z̈ + m1 θ̈ + bż = F
2
l l2 l
m1 z̈ + m1 θ̈ = m1 g θ
2 4 2

after solving for z̈ and θ̈


b m1 g F
z̈ = − ż − θ+
m2 m2 m2
b (m1 + m2 )g 2F
θ̈ = 2 ż + θ−
m2 l m2 l m2 l

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 32 / 40


Case Study: Inverted Pendulum

b m1 g F
z̈ = − ż − θ+
m2 m2 m2
b 2(m1 + m2 )g 2F
θ̈ = 2 ż + θ−
m2 l m2 l m2 l

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 33 / 40


Case Study: Inverted Pendulum

b m1 g F
z̈ = − ż − θ+
m2 m2 m2
b 2(m1 + m2 )g 2F
θ̈ = 2 ż + θ−
m2 l m2 l m2 l
   
x1 z
x2  ż 
 = 
x3  θ 
x4 θ̇

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 33 / 40


Case Study: Inverted Pendulum

b m1 g F
z̈ = − ż − θ+
m2 m2 m2
b 2(m1 + m2 )g 2F
θ̈ = 2 ż + θ−
m2 l m2 l m2 l
   
x1 z
x2  ż 
 = 
x3  θ 
x4 θ̇
      
x1 0 1 0 0 x1 0
d  x  0 − mb2 −m1g
0 x2   m1 
 =
2 m2    +  2  [F ]
dt x3  0 0 0 1 x3   0 
x4 0 2 mb2 l 2(m1 +m2 )g
m2 l 0 x4 − m22 l
     
y= 0 0 1 0 x + 0 F

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 33 / 40


Case Study: Satellite Attitude Control

Js

Rotational spring k
and damper b at joint

Jp

 
Js θ̈ = τ − b θ̇ − φ̇ − k (θ − φ)
 
Jp Jp φ̈ = b θ̇ − φ̇ + k (θ − φ)
k b
Js ✓
M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 34 / 40
Case Study: Satellite Attitude Control

 
Js θ̈ = τ − b θ̇ − φ̇ − k (θ − φ)
 
Jp φ̈ = b θ̇ − φ̇ + k (θ − φ)

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 35 / 40


Case Study: Satellite Attitude Control

 
Js θ̈ = τ − b θ̇ − φ̇ − k (θ − φ)
 
Jp φ̈ = b θ̇ − φ̇ + k (θ − φ)

   
x1 θ
x2   θ̇ 
 = 
x3  φ
x4 φ̇

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 35 / 40


Case Study: Satellite Attitude Control

 
Js θ̈ = τ − b θ̇ − φ̇ − k (θ − φ)
 
Jp φ̈ = b θ̇ − φ̇ + k (θ − φ)

   
x1 θ
x2   θ̇ 
 = 
x3  φ
x4 φ̇
      
x1 0 1 0 0 x1 0
d  x  − Jk − Jb
 = s
2
k
Js
k  
x
Js   2
 1 
 Js  [F ]
s
+
dt x3   0 0 0 1  x3   0 
k b k k
x4 Js Js − Js − Js
x4 0
   
1 0 0 0   0  
y= x + F
−1 1 0 0 0

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 35 / 40


Example: Vectored Thrust Aircraft
3-32 CHAPTER 3. SYSTEM MODELING

r
y
F2

x F1
(a) Harrier “jump jet” (b) Simplified model

Figure 3.18: Vectored thrust aircraft. The Harrier AV-8B military aircraft (a) redirects its
engine thrust downward so that it can “hover” above the ground. Some air from the engine
is diverted to the wing tips to be used for maneuvering. As shown in (b), the net thrust on
the aircraft can be decomposed into a horizontal force F1 and a vertical force F2 acting at a
distance r from the center of mass.

front-wheel steering. The figure shows that the model also applies to rear wheel
steering if the sign of the velocity is reversed. ∇
Example 3.11 Vectored thrust aircraft
M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 36 / 40
steering if the sign of the velocity is reversed. ∇
Example: Vectored Thrust Aircraft
Example 3.11 Vectored thrust aircraft
3-32 CHAPTER 3. SYSTEM MODELING
Consider the motion of vectored thrust aircraft, such as the Harrier “jump jet”
shown Figure 3.18a. The Harrier is capable of verticalθtakeoff by redirecting its
thrust downward and through the use of smaller maneuvering thrusters located on
its wings. A simplified model of the Harrier is shown in Figure 3.18b, where we
focus on the motion of the vehicle in a vertical plane through the wings of the
aircraft. We resolve the forces generated by the main downward thruster and the
r
maneuvering thrusters as a pair of forces F1 andy F2 acting at a distance r below the
F2
aircraft (determined by the geometry of the thrusters).
Let (x, y, θ ) denote the position and orientation of the center of mass of the
x F
aircraft. Let m be the mass of the vehicle, J the moment of inertia,1 g the gravita-
(a) Harrier “jump jet” (b) Simplified model
tional constant and c the damping coefficient. Then the equations of motion for the
Figure 3.18: Vectored thrust aircraft. The Harrier AV-8B military aircraft (a) redirects its
vehicle areengine
given bydownward so that it can “hover” above the ground. Some air from the engine
thrust
is diverted to the wing tips to be used for maneuvering. As shown in (b), the net thrust on
mẍ = F1into
the aircraft can be decomposed θ − F2 sin
cosa horizontal forceθF1− cẋ,
and a vertical force F2 acting at a
distance r from the center of mass.
mÿ = F1 sin θ + F2 cos θ − mg − cẏ, (3.29)
front-wheel steering.J θ̈The rF1 . shows that the model also applies to rear wheel
= figure
steering if the sign of the velocity is reversed. ∇
It is convenient to redefine the inputs so that the origin is an equilibrium point
of the Examplewith3.11 zero
Vectored thrust aircraftu = F and u = F − mg, the equations
M. F.system
Haydar (FlyCon, IST) input. Letting 1
Control Systems 1 2 2 March 12, 2019 36 / 40
Frequency Response Models

3-24 CHAPTER 3. SYSTEM MODELIN

1
4 10

Gain (log scale)


2 0
10
Output y

0
−1
10
−2

−2
−4 10 −1 0 1
0 10 20 30 40 50 10 10 10
Time [s] Frequency [rad/sec] (log scale)

Figure 3.12: A frequency response (gain only) computed by measuring the response of
individual sinusoids. The figure on the left shows the response of the system as a function
of time to a number of different unit magnitude inputs (at different frequencies). The figure
on the right shows this same data in a different way, with the magnitude of the response
plotted as a function of the input frequency. The filled circles correspond to the particular
frequencies
M. F. Haydar shown
(FlyCon, in the time responses.
IST) Control Systems March 12, 2019 37 / 40
Block Diagrams

Problem: Real systems are very complicated and its hard to follow the effects
of different inputs individually.
Idea: focus only on the information flow and ignore the details of the
system.
3.3. MODELING METHODOLOGY 3-25

u2
u1 u1 + u2 u ku u sat(u)
Σ k

(a) Summing junction (b) Gain block (c) Saturation


! t
u f (u) u ! u(t) dt u y
0
System

(d) Nonlinear map (e) Integrator (f) Input/output system

Figure 3.14: Standard block diagram elements. The arrows indicate the the inputs and out-
puts of each element, with the mathematical operation corresponding to the blocked labeled
at the output. The system block (f) represents
M. F. Haydar (FlyCon, IST)
the full input/output response
Control Systems
of a dynamical
March 12, 2019 38 / 40
Block Diagrams: Insect Flight Control Systems
3-26 CHAPTER 3. SYSTEM MODELING

Wind
(d) Drag
Aero-
dynamics

Ref (a) Sensory (b) Wing


(c) Body
Σ Motor Aero- Σ
Dynamics
System dynamics

(e) Vision
−1
System

Figure 3.15: A block diagram representation of the flight control system for an insect flying
against the wind. The mechanical portion of the model consists of the rigid-body dynamics
of the fly, the drag due to flying through the air and the forces generated by the wings. The
motion of the body causes the visual environment of the fly to change, and this information
is then used to control the motion of the wings (through the sensory motor system), closing
M.the loop. (FlyCon, IST)
F. Haydar Control Systems March 12, 2019 39 / 40
What is next?

We will learn
how to analyze models.
I examine the dynamic characteristics of systems using models.
Check if the dynamic properties of the system match our desired properties.
Design controllers to tweak the dynamic properties.

M. F. Haydar (FlyCon, IST) Control Systems March 12, 2019 40 / 40

You might also like