Professional Documents
Culture Documents
Mathematical Modeling
BIO
ESE
BIO
ESE
CS
Many examplesPrinciples:
Feedback of feedback and control in natural & engineered systems:
Robustness to BIO
I variations in system parameters (mass, stiffness, damping etc.)
ESE
I external disturbance (wind gusts etc.)
BIO
ESE
CS
Many examplesPrinciples:
Feedback of feedback and control in natural & engineered systems:
Robustness to BIO
I variations in system parameters (mass, stiffness, damping etc.)
ESE
I external disturbance (wind gusts etc.)
BIO
Design of Dynamics to achieve desired levels of
I natural frequency (speed of response)
ESE
I damping ratio (stability)
CS
A model
is a mathematical approximation of a real system.
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.
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.
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?
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?
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.
c k F (t)
ẍ = − ẋ − x + .
m m m
I position is calculated as
Z t1 Z t1
x= ẍdt + ẋ0 dt + x0 .
t0 t0
|{z}
| {z } initial position
change in position
Accelerations are not part of the state, because they can be calculated
without integration.
ẋ1 = x2
k c F (t)
ẋ2 = − x1 − x2 + .
m m m
ẋ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
ferential
are the State vector, x(t)
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 .
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
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 .
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
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
Assumptions:
Mass, spring and damper properties are
fixed and exactly known.
Springs satisfy Hooke’s law.
Damper is a linear viscous force.
M. Farooq Haydar (FlyCon, IST) Control Systems March 13, 2018 15 / 40
Quarter-Car Model
ẋ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
d 2θ MgL
J sin θ
L
dt2 2
2
T T
Mg cos θ
θ Mg θ θ
L
2
Mg sin θ
Mg
(a) (b) (c)
d2 θ MgL
M. Farooq Haydar (FlyCon, IST) JControlSystems sin θ T March 13, 2018
3
23 / 40
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
2
T T
Mg cos θ
θ Mg θ θ
L
2
Mg sin θ
Mg
(a) (b) (c)
Solution:
FIGURE 3.14 a. Simple pendulum; b. force components of Mg; c. free-body diagram
d2 θ MFirst
SOLUTION: gL draw a free-body diagram as shown in Figure 3.14(c). Summing
J 2 we
torques, + get sin θ = T
dt 2
d2 θ MgL
M. Farooq Haydar (FlyCon, IST) JControlSystems sin θ T March 13, 2018
3
23 / 40
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
2
x1 = θ
T T
Mg cos θx = dθ
2
θ Mg θ dt θ
L
2
Mg sin θ
Mg
(a) (b) (c)
Solution:
FIGURE 3.14 a. Simple pendulum; b. force components of Mg; c. free-body diagram
d2 θ MFirst
SOLUTION: gL draw a free-body diagram as shown in Figure 3.14(c). Summing
J 2 we
torques, + get sin θ = T
dt 2
d2 θ MgL
M. Farooq Haydar (FlyCon, IST) JControlSystems sin θ T March 13, 2018
3
23 / 40
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
2
x1 = θ
T T
Mg cos θx = dθ
2
θ Mg θ dt θ
L
2
Mg sin θẋ1 = x2
Mg
(a) (b) M gL T
ẋ2 = − sin x1 + (c)
2J J
Solution:
FIGURE 3.14 a. Simple pendulum; b. force components of Mg; c. free-body diagram
d2 θ MFirst
SOLUTION: gL draw a free-body diagram as shown in Figure 3.14(c). Summing
J 2 we
torques, + get sin θ = T
dt 2
d2 θ MgL
M. Farooq Haydar (FlyCon, IST) JControlSystems sin θ T March 13, 2018
3
23 / 40
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
2
x1 = θ
T T
Mg cos θx = dθ
2
θ Mg θ dt θ
L
2
Mg sin θẋ1 = x2
Mg
(a) (b) M gL T
ẋ2 = − sin x1 + (c)
2J J
Solution:
FIGURE 3.14 a. Simple pendulum; b. force components of Mg; c. free-body diagram
Is the state space model linear?
d2 θ MFirst
SOLUTION: gL draw a free-body diagram as shown in Figure 3.14(c). Summing
J 2 we
torques, + get sin θ = T
dt 2
d2 θ MgL
M. Farooq Haydar (FlyCon, IST) JControlSystems sin θ T March 13, 2018
3
23 / 40
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
2
x1 = θ
T T
Mg cos θx = dθ
2
θ Mg θ dt θ
L
2
Mg sin θẋ1 = x2
Mg
(a) (b) M gL T
ẋ2 = − sin x1 + (c)
2J J
Solution:
FIGURE 3.14 a. Simple pendulum; b. force components of Mg; c. free-body diagram
Is the state space model linear?
d2 θ MFirst
SOLUTION: gL draw a free-body diagram as shown in Figure 3.14(c). Summing
J 2 we
torques, + get sin θ = T How can we linearize this system?
dt 2
d2 θ MgL
M. Farooq Haydar (FlyCon, IST) JControlSystems sin θ T March 13, 2018
3
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
ẋ1 = x2
M gL T
ẋ2 ≈ − x1 +
2J J
The linearized state space model (around the downward equilibrium point):
ẋ1 0 1 x1 0
≈ M gL + 1 T
ẋ2 − 2J 0 x 2 J
ẋ1 = x2
M gL T
ẋ2 ≈ x1 +
2J J
ẋ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 x2 J
l l
(m1 + m2 ) z̈ + m1 z cos θ θ̈ − m1 sin θ θ̇2 + bżż = F
2 ✓ 2 ✓˙
2
l ` l m1 l
m1 cos θ z̈ + m1 θ̈ = m1 g sin θ F
2 4 2
z
bż
M. Farooq Haydar (FlyCon, IST) mControl
1 = 0.25Systems m2 = 1.0 ` = 1.0
March 13, 2018 g27=/ 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
∂ ∂
¨
cos θθ̈ ≈ cos θ̄θ̄ + cos θθ̈ ¨ θ − θ̄ + cos θθ̈ θ̈ − θ̄¨
∂θ (θ̄,θ̄) ∂ θ̈ (θ̄,θ̄¨)
= cos θ̄θ̄¨ − sin θ̄θ̄¨ (δθ) + cos θ̄ δ θ̈
= δ θ̈
∂ ∂
¨
cos θθ̈ ≈ cos θ̄θ̄ + cos θθ̈ ¨ θ − θ̄ + cos θθ̈ θ̈ − θ̄¨
∂θ (θ̄,θ̄) ∂ θ̈ (θ̄,θ̄¨)
= cos θ̄θ̄¨ − sin θ̄θ̄¨ (δθ) + cos θ̄ δ θ̈
= δ θ̈
∂ ∂
˙ 2
2 2
sin θθ̇ ≈ sin θ̄θ̄ + sin θθ̇ ˙ θ − θ̄ + 2
sin θθ̇ θ̇ − θ̄˙
∂θ (θ̄,θ̄) ∂ θ̇ ˙
(θ̄,θ̄)
= sin θ̄θ̄˙2 + cos θ̄ (δθ) θ̄˙2 + 2θ̄˙ sin θ̄ δ θ̄˙
=0
∂ ∂
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 θ̄ (δθ)
= δθ
Linearized Model:
l
(m1 + m2 ) δz̈ + m1 δ θ̈ + bż = δF
2
l l2 l
m1 δz̈ + m1 δ θ̈ = m1 g δθ
2 4 2
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.
l
(m1 + m2 ) z̈ + m1 θ̈ + bż = F
2
l l2 l
m1 z̈ + m1 θ̈ = m1 g θ
2 4 2
l
(m1 + m2 ) z̈ + m1 θ̈ + bż = F
2
l l2 l
m1 z̈ + m1 θ̈ = m1 g θ
2 4 2
b m1 g F
z̈ = − ż − θ+
m2 m2 m2
b 2(m1 + m2 )g 2F
θ̈ = 2 ż + θ−
m2 l m2 l m2 l
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 θ̇
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 0 − mb m
− m12 g
0
1
x2 =
2
x2 + m2 [F ]
dt x3 0 0 0 1 x3 0
x4 b
0 2m l 2(m1 +m2 )g
m l 0 x4 − m22 l
2 2
y= 0 0 1 0 x + 0 F
M. Farooq Haydar (FlyCon, IST) Control Systems March 13, 2018 33 / 40
Case Study: Satellite Attitude Control
Js
✓
Rotational spring k
and damper b at joint
Jp
Js θ̈ = τ − b θ̇ − φ̇ − k (θ − φ)
Jp
k
Jp φ̈ = b θ̇ − φ̇ b+ k (θ − φ)
Js ✓
M. Farooq Haydar (FlyCon, IST) Control Systems March 13, 2018 34 / 40
Case Study: Satellite Attitude Control
Js θ̈ = τ − b θ̇ − φ̇ − k (θ − φ)
Jp φ̈ = b θ̇ − φ̇ + k (θ − φ)
x1 θ
x2 θ̇
=
x3 φ
x4 φ̇
x1 θ
x2 θ̇
=
x3 φ
x4 φ̇
x1 0 1 0 0 x1 0
k
d x2 − Js − Js b k k 1
= Js Js x2 + Js [F ]
dt x3 0 0 0 1 x3 0
k b
x4 Js Js − Js − Jks
k x4 0
1 0 0 0 0
y= x + F
−1 1 0 0 0
M. Farooq Haydar (FlyCon, IST) Control Systems March 13, 2018 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. Farooq Haydar (FlyCon, IST) Control Systems March 13, 2018 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 r and the
y
maneuvering thrusters as a pair of forces F1 and F2 acting at Fa2 distance r below the
aircraft (determined by the geometry of the thrusters).
Let (x, y, θ ) denote the position and orientation ofx the centerFof 1
mass of the
aircraft. Let m be the mass of the
(a) Harrier “jump jet” vehicle, J the moment of inertia,
(b) Simplified model g the gravita-
tional constant
Figureand
3.18:cVectored
the damping coefficient.
thrust aircraft. Then
The Harrier AV-8B the equations
military of motion
aircraft (a) redirects its for the
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 cosa θ − F2 sin
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
= figure
rF1 . shows that the model also applies to rear wheel
steering if the sign of the velocity is reversed. ∇
It is convenient to redefine the inputs so that the origin is an equilibrium point
Example 3.11 Vectored thrust aircraft
ofM.the system
Farooq Haydar with zero
(FlyCon, IST) input. Letting
ControluSystems
1 = F1 and u2 = F2 March
− mg, 13, the
2018 equations
36 / 40
Frequency Response Models
1
4 10
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
M.frequencies
Farooq Haydarshown in the
(FlyCon, IST)time responses.
Control Systems March 13, 2018 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
3.3.
the system.
MODELING METHODOLOGY 3-25
u2
u1 u1 + u2 u ku u sat(u)
Σ k
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
M. at the output.
Farooq Haydar The system
(FlyCon, IST) block (f) represents the full input/output response
Control Systems of a2018
March 13, dynamical
38 / 40
Block Diagrams: Insect Flight Control Systems
3-26 CHAPTER 3. SYSTEM MODELING
Wind
(d) Drag
Aero-
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
the loop.
M. Farooq Haydar (FlyCon, IST) Control Systems March 13, 2018 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
propoerties.
Design controllers to tweak the dynamic properties.