Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
14 views

DynamicSystems ModelingSimulation VB Part1

Uploaded by

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

DynamicSystems ModelingSimulation VB Part1

Uploaded by

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

Master of Aerospace Engineering

Control 1
Modeling
,
and Simulation

Valérie Budinger – Room 07.036


valerie.budinger@isae-supaero.fr
Course organization

Yves Valerie Yves


Briere Budinger Brière
C1->C4 C5->C9 C10-C12
Control design Methodology

System Modeling Model Analysis


 Dynamic model C7-C9
C5-C6

Control Design

Requirement Requirement
Analysis Specifications
Modeling & Simulation
Classification of models

● Static/Dynamic
𝑑
– Static: time derivative 𝑑𝑡=0
– Dynamic: function of time
In control, the model must be dynamic to represent the rate change of the variables
as a function of time
● Deterministic/Probabilist
– Deterministic: variables known anytime with no randomness
– Probabilist: a probability distribution describes the uncertainties and variations
of the system variables
● Continuous/Discrete
– variables known at every point in time
– variables known at every sampling time
● Mathematical/Physical
– Model described by coefficients with no physical meaning (black box)
– Physical model (based on convervative laws or physical fundamental laws )
Classical modeling methods for physical models

Note: most examples of this course can be found in Control Engineering: A Modern Approach by P. Belanger,
Ed. Oxford University Press
Modeling methodologies

● Modeling from conservative principles (conservation of


energy, mass, electrical charges,..)

● Modeling from fundamental physic laws (Newton’s law)

● Modeling with Lagrange’s Equations


Modeling from conservative principles

• Local conservation law


 continuity equation = partial differential equation which gives a relation
between the amount of the quantity and the "transport" of that quantity.

input amount of the conserved quantity at a point or within a volume =


output amount of the quantity which flows out of the volume

• Principles valid for any isolated systems

• Exact conservation of energy, momentum, electrical charge


Approximate conservation of mass

The conservation law of energy states that the total quantity of energy in an
isolated system does not change .
But its nature may change !
Example of conservative principles

Kirchoff’s laws

Conservation of electrical charges (Kirchoff ‘s first law)


The sum of currents flowing into a node of an electrical
circuit is equal to the sum of currents flowing out of this node
 The algebraic sum of currents at this node is zero 𝐼1 + 𝐼2 - 𝐼3 - 𝐼4 - 𝐼5 =0
 σ 𝒊𝒌 = 𝟎 or
𝐼1 + 𝐼2 = 𝐼3 + 𝐼4 + 𝐼5

Conservation of electrical energy (Kirchoff ‘s second law)


The sum of the electrical potential differences (voltages)
around any closed network is zero
σ 𝒗𝒌 = 𝟎
𝑉- 𝑉1 - 𝑉2 -𝑉3 =0
or
𝑉 = 𝑉1 + 𝑉2 + 𝑉3
Example of conservative principles

Motion of a fluid
• Conservation of the mass

𝝏𝝆
+ 𝐝𝐢𝐯𝝆𝒗 = 𝟎
𝝏𝒕
with 𝝆: density and 𝒗: fluid velocity

If the fluid is incompressible: 𝐝𝐢𝐯𝒗 = 𝟎 (typically a liquid)

• Conservation of angular momentum: Euler equation for an ideal fluid


𝝏𝒗 𝟏
+ 𝒗. 𝛁 𝒗 = 𝒃 − 𝛁𝒑 = 𝟎
𝝏𝒕 𝝆

With 𝒃: density of external force and 𝒑: fluid pressure

𝟏
Note: 𝒗. 𝛁 𝒗 = 𝛁 𝒗 𝟐
+ 𝒓𝒐𝒕𝒗Λ𝒗
𝟐
Example of conservative principles

Tank controlled by a valve

Conservation of the flow


𝐴𝛥𝑙 = 𝐹𝑖𝑛 𝑡 − 𝐹𝑜𝑢𝑡 𝑡
𝑑𝑙
 A 𝑑𝑡 = 𝐴𝒍ሶ = 𝐹𝑖𝑛 − 𝐹𝑜𝑢𝑡
with
A: section of the tank  𝐴𝛥𝑙 : change in the volume
𝐹𝑖𝑛 : input flow of fluid 𝐹𝑖𝑛 𝑡: volume of fluid flowing in
𝐹𝑜𝑢𝑡 : output flow of fluid 𝐹𝑜𝑢𝑡 𝑡: volume of fluid flowing out

Model of the valve: 𝐹𝑜𝑢𝑡 = 𝑐𝑢 𝑙


with c: constant depending on the kind of valve and kind of fluid
u: valve control input
𝒄 𝑭
𝒍ሶ = − 𝑨 𝒖 𝒍 + 𝑨𝒊𝒏 (Note: nonlinear model because of the term 𝒍)
Modeling from fundamental physic laws

Newton's laws of motion or classical mechanics laws

● First law:
Every object will remain at rest or in uniform motion in a straight line unless forced to
change its state by the action of an external force

● Second law:
Force 𝑭 is equal to change in momentum 𝒑 (mass times velocity) per change in time.
For an object with a constant mass m, force 𝑭 is the product of an object's mass
and its acceleration 𝒂
𝒅𝒑 𝒅(𝒎𝒗)
𝑭= = = 𝒎𝒂
𝒅𝒕 𝒅𝒕
● Third law:
For every action (force) in nature there is an equal and opposite reaction.
 if object A exerts a force on object B, then object B exerts an equal force of
opposite direction on object A.
Modeling from fundamental physic laws

Second Newton's laws of motion

● Translation motion:
Force is equal to change in momentum (mass times velocity 𝑝Ԧ = 𝑚𝑣)
Ԧ per change in
time.
𝒅𝒑 𝒅𝒗
𝑭= =𝒎 = 𝒎𝒂
𝒅𝒕 𝒅𝒕
● Rotational motion:
Torque is equal to change in angular momentum (inertia moment times angular
velocity 𝜏Ԧ = 𝐼Ω) per change in time.

𝒅𝝉 𝒅𝛀
𝑻= =𝑰
𝒅𝒕 𝒅𝒕
Example of fundamental physic laws

Active suspension system: system in translation


Example of fundamental physic laws and
conservative laws
Electromechanical actuator connected to a load: system in rotation
Mechanical equation

Te

NTe
Jm
Example of fundamental physic laws and
conservative laws
Electromechanical actuator connected to a load:
electrical equation

𝒗 𝒆𝒎𝒇
Examples of fundamental physic laws

Aircraft model

Notation:
m: aircraft mass
𝚪: acceleration
𝑽: linear speed
𝛀: rotation speed
𝑴: angular momentum
𝑭𝒘 : gravity force
𝑭𝒂𝒆 and 𝑴𝒂𝒆 : aerodynamic forces and couples
𝑭𝑷 and 𝑴𝑷 : propulsion forces and couples
𝚯, 𝝋 𝐚𝐧𝐝 𝝍: euler angles (yaw, pitch, roll)
𝜶: incidence angle
Examples of fundamental physic laws

Aircraft model
Force equations:
𝒎𝚪 = 𝑭𝒘 + 𝑭𝒂𝒆 + 𝑭𝑷
Moment equations:
𝑴ሶ + 𝛀Λ𝑴 = 𝑴𝒂𝒆 + 𝑴𝑷
Kinematic equations:
𝚪 = 𝑽ሶ + 𝛀Λ𝑽

with
𝟏
𝑭𝒂𝒆 = − 𝟐 𝝆 𝒛 𝑺𝑽𝟐 𝑪𝑭
𝟏
𝑴𝒂𝒆 = − 𝝆 𝒛 𝑺𝑳𝑽𝟐 𝑪𝑴
𝟐

and
𝝆 𝒛 : air density, S: aircraft reference surface, L: aircraft reference length
𝑪𝑭 and 𝑪𝑴 : aerodynamic coefficients
Modeling with Lagrange’s Equations

Lagrange’s equations are a powerful tool for modeling systems. The approach is based
on the computation of energy.

1. To use Lagrange’s equations, we define a set of n generalized coordinates (𝑞𝑖 )


which describe the system.

2. The Lagrangian of the system is an energy defined as:

𝒒ሶ 𝒊 − 𝑽(𝒒𝒊 )
𝑳 = 𝑻 𝒒𝒊 , 𝑹
with
𝑻: kinetic energy
𝑽: potential energy

3. Lagranges’ equations are given by:


𝒅 𝝏𝑳 𝝏𝑳
− 𝝏𝒒 𝑹
= 𝑭𝒊 𝒊 = 𝟏. . 𝒏
𝒅𝒕 𝝏𝒒ሶ𝒊 𝒊

with 𝐹𝑖 generalized external forces


Example of Lagrange’s Equations

Pendulum on a moving platform


Example of Lagrange’s Equations

Pendulum on a moving platform - Step 1: Select generalized coordinates


Example of Lagrange’s Equations

Pendulum on a moving platform - Step 2: Compute the Lagragian


Example of Lagrange’s Equations

Pendulum on a moving platform - Step 3: Compute the motion equations


Conclusion on the modeling

• Dynamic deterministic continuous model of physical systems:


Whatever the modeling methodology, we can get Differential Ordinary Equations (ODE), linear or
non linear

Linear case:

• ‘ A model depends on its problem context’


“ Models should be competent to support the solution of a specific problem. This
means that any type of archiving of a model or sub-model should always include information
about the corresponding problem context. “
See: Modeling and Control of Complex Physical Systems. The Port-Hamiltonian Approach. Editors: Duindam, V., Macchelli, A.,
Stramigioli, S., Bruyninckx, H

• Every model is wrong:


“ A model is much simpler than reality. This is its power and its weakness at the same time. The
weakness is that its validity is constrained to the problem context it was constructed for, whereas its
strength is the gain of insight that may be obtained in the key behaviors that play a role in this
particular context.”
See: Modeling and Control of Complex Physical Systems. The Port-Hamiltonian Approach. Editors: Duindam, V., Macchelli, A.,
Stramigioli, S., Bruyninckx, H
Analysis of the system

Analysis Analysis
in the frequency domain in the time-domain

 Transfer function  State-space


representation
Transfer function
Laplace tranform of a ODE
Transfer function
Case of linear Ordinary Differential Equations:

If initial conditions are null

Case of non linear systems:

1° - Linearize the ODE e.g. via Taylor series

𝑑𝑓 1 𝑑²𝑓 1 𝑑3 𝑓 3
𝑓 𝑥 = 𝑓 𝑥0 + ቚ 𝑥 − 𝑥0 + ቚ 𝑥− 𝑥0 ²+ 3ቚ 𝑥 − 𝑥0 +…
𝑑𝑥 𝑥0 2 𝑑𝑥² 𝑥0 6 𝑑𝑥 𝑥0

2° - Apply the Laplace transform to get the transfer function


Laplace tranform of a ODE
Transfer function

Some definitions:

• The roots of the numerator are named zeros.


• The roots of the denominator are named poles.
• The poles of a real system are necessarily real or complex conjugate since the
coefficients of the characteristic polynomial are real
 A transfer function of a LTI system can be decomposed with distinct poles

nc nk
ak + bk s
 
ci
G( s) = +
i =1
s + pi k =1 s 2 + 2 k nk s + n2k
Frequency domain analysis
from transfer function

Response to a harmonic signal whose frequency


varies from 0 to infinity.

BODE plot:
- magnitude plot: GdB = 20Log10 ( F( jw ) )
- phase plot: f = arg(F( jw ))

NICHOLS plot:
Parametric curve scaled according to :
20Log10 ( F( jw ) ) = f (arg(F( jw )))
NYQUIST plot:
Parametric curve scaled according to :
Im(F( jw )) = f (Re(F( jw ))
Example of frequential analysis

1° order transfer function Example for K = 10 and 𝜔0 = 10

𝐾 𝐾
𝐻 𝑠 = 𝑠  𝐻 𝑗𝜔 = 𝑗𝜔
1+𝜔 1+𝜔
0 0

𝐾
𝑔𝑎𝑖𝑛 = |𝐻 𝑗𝜔 | =
𝜔2
1+ 2
𝜔0
𝐾 𝜔2
|𝐻 𝑗𝜔 |𝑑𝐵 = 20𝑙𝑜𝑔 =20log(K)-10log(1 + )
𝜔2
𝜔02
1+ 2
𝜔0

𝜔
phase (𝐻 𝑗𝜔) = −atan( )
𝜔0
Example of frequential analysis

2° order transfer function Example for K = 10 , 𝜔0 = 100, 𝜀= 0.7

𝐾
𝐻 𝑠 =
2𝜀𝑠 𝑠2
1+ 𝜔 +
0 𝜔²0

𝑔𝑎𝑖𝑛 = |𝐻 𝑗𝜔 |
𝐾
=
2 2
𝜔 2 2𝜀𝜔
1− 2 + 𝜔
𝜔0 0

2𝜀𝜔
𝜔0
phase (𝐻 𝑗𝜔) = −atan
𝜔2
1− 2
𝜔0
Example of frequential analysis

1 1
𝐻 𝑠 = 𝑠
1 + 10 1 + 2 ∗ 0.7 𝑠 + 𝑠²
100 100²

Matlab code: H = tf(1,[1/10 1])*tf(1,[1/100^2 2*0.7/100 1]); bode(H);


Transfer function & Block diagram

𝑱𝒆 𝝎ሶ = 𝑵𝒌𝒎 𝒊 (𝑻𝑳 =0)  𝑱𝒆 𝒔𝝎 = 𝑵𝒌𝒎 𝒊

𝒅𝒊
𝑳 𝒅𝒕 + 𝑹𝒊 = 𝒗 − 𝒌𝒆 𝑵𝝎  𝑳𝒔𝒊 + 𝑹𝒊 = 𝒗 − 𝒌𝒆 𝑵𝝎
𝒗−𝒌𝒆 𝑵𝝎
𝒊= 𝑳𝒔+𝑹
State-space representation
State equations

● System modeled by an differential equation of order n

𝑑𝑦 𝑛 𝑡 𝑑𝑦 𝑘 𝑡
𝑎𝑛 + ⋯ +𝑎𝑘 + ⋯ + 𝑎0 𝑦 𝑡 = 𝑢(𝑡)
𝑑𝑡 𝑛 𝑑𝑡𝑘
𝑡 is “continuous time”

● Question:
Can we write this equation as a set of first-order differential equations?
State equations

Example: Mass moving at the speed 𝑣 under the influence of an external force 𝐹 against a
friction force 𝑘 ∗ 𝑣
𝑑𝑣 𝑑𝑥
𝑀 = 𝐹 − 𝑘 ∗ 𝑣 with =𝑣
𝑑𝑡 𝑑𝑡
𝑑2 𝑥 𝑑𝑥
𝑀 =𝐹−𝑘∗  1 equation of order 2
𝑑𝑡² 𝑑𝑡

Let us define 𝑥 and 𝑣 as state variables and 𝐹 as an input :


𝑥1 = 𝑥
𝑥2 = 𝑣
𝑢=𝐹
We can write:
𝑥1ሶ = 𝑥2
𝑘 ∗ 𝑥2 𝑢
𝑥2ሶ = − +
𝑀 𝑀
We now have 2 equations of order 1

The output equation depends on the choice of the output variables.


• If the displacement 𝑥 is of interest : 𝑦 = 𝑥1
• If the speed 𝑣 is of interest : 𝑦 = 𝑥2
State-space equations: general case

A state-space representation is given by:

𝑥(𝑡)
ሶ = 𝑓(𝑥, 𝑢, 𝑡)
𝑦(𝑡) = ℎ(𝑥, 𝑢, 𝑡)

𝑥(𝑡) is a state vector for the system S if it is a vector containing the minimum
number of variables required to satisfy the following property:

If, at a given instant t0, x0(t) is known, then y(t1) and x(t1) can be uniquely determined
for all t1>t0 if u(t) is known on the interval [t0 t1].

u y
Input vector Output vector
System S
x state vector
State space representation: linear system

A linear system can be expressed as:

𝑥(𝑡)
ሶ = 𝐴 𝑡 𝑥(𝑡) + 𝐵 𝑡 𝑢(𝑡)
𝑦(𝑡) = 𝐶 𝑡 𝑥(𝑡) + 𝐷 𝑡 𝑢(𝑡)

• A state matrix: n x n ==> Dynamic interaction


• B input matrix: n x m ==> Input action (actuators)
• C output matrix: p x n ==> Measures (sensors)
• D direct transmission matrix: p x m ==> Direct link between input and measures

If the system is linear and the matrices are constant, the system is linear time-
invariant (LTI).
𝑥(𝑡)
ሶ = 𝐴𝑥(𝑡) + 𝐵𝑢(𝑡)
𝑦(𝑡) = 𝐶𝑥(𝑡) + 𝐷𝑢 (𝑡)
Example of linear state-space representation

Electromechanical actuator connected to a load:


State space representation

𝑵 𝟏
𝑱𝒆 𝝎ሶ = 𝑵𝒌𝒎 𝒊 − 𝑻𝑳 𝝎ሶ = 𝑱 𝒌𝒎 𝒊 − 𝑱 𝑻𝒍
𝒆 𝒆

𝒅𝒊 𝒅𝒊 𝑹 𝟏 𝒌𝒎 𝑵
𝑳 + 𝑹𝒊 = 𝒗 − 𝒌𝒎 𝑵𝝎  = − 𝒊+ 𝒗− 𝝎
𝒅𝒕 𝒅𝒕 𝑳 𝑳 𝑳

𝒅 𝝎 𝝎 𝒗
= + 𝑻𝒍
𝒅𝒕 𝒊 𝒊

𝝎
If 𝝎 is the output, 𝒀 =
𝒊
Example of linear state-space representation

Electromechanical actuator connected to a load:


State space representation

𝑵 𝟏
𝑱𝒆 𝝎ሶ = 𝑵𝒌𝒎 𝒊 − 𝑻𝑳 𝝎ሶ = 𝑱 𝒌𝒎 𝒊 − 𝑱 𝑻𝒍
𝒆 𝒆

𝒅𝒊 𝒅𝒊 𝑹 𝟏 𝑵𝒌𝒆
𝑳 𝒅𝒕 + 𝑹𝒊 = 𝒗 − 𝑵𝒌𝒆 𝝎  𝒅𝒕 = − 𝑳 𝒊 + 𝑳 𝒗 − 𝝎
𝑳

𝒅 𝜽 𝜽 𝒗
𝝎 = 𝝎 + 𝑻𝒍
𝒅𝒕
𝒊 𝒊
𝜽
If 𝜽 is the output, 𝒀 = 𝝎
𝒊
Non uniqueness of state space representation

Electromechanical actuator connected to a load:


State space representation

𝑵 𝟏
𝝎ሶ = 𝒌𝒎 𝒊 − 𝑻𝒍
𝑱𝒆 𝑱𝒆

𝒅𝒊 𝑹 𝟏 𝑵
= − 𝒊 + 𝒗 − 𝒌𝒆 𝝎
𝒅𝒕 𝑳 𝑳 𝑳

𝑻𝒎 = 𝒌𝒎 𝒊

𝟎 𝟏 𝟎 𝟎 𝟎
𝜽 𝑵𝒌𝒎 𝜽 𝒗
𝒅 𝟎 𝟎 −𝟏
1° state-space representation:
𝒅𝒕
𝝎 = 𝑱𝒆 𝝎 + 𝟎
𝟏 𝑱𝒆 𝑻𝒍
𝒊 𝑵𝒌𝒆 𝑹 𝒊
𝟎 − − 𝑳 𝟎
𝑳 𝑳

𝑵𝒌𝒆 𝑹
𝒊 𝟎 − − 𝒊
𝟏 𝟎
𝑳 𝑳 𝒗
𝒅 𝑳 −𝟏
2° state-space representation: 𝝎 = 𝟎 𝟎
𝑵𝒌𝒎 𝝎 + 𝟎 𝑱 𝑻
𝒅𝒕 𝒆 𝒍
𝜽 𝑱𝒆 𝜽
𝟎 𝟏 𝟎 𝟎 𝟎

𝟎 𝟏 𝟎
𝜽 𝑵 𝜽 𝟎 𝟎
𝒅 𝟎 𝟎 −𝟏 𝒗
3° state-space representation: 𝝎 = 𝑱𝒆 𝝎 + 𝟎 𝑱 𝑻
𝒅𝒕 𝒌𝒎 𝒆 𝒍
𝑻𝒎 𝑵𝒌 𝒌 𝑹𝒌𝒎 𝑻𝒎
𝟎 − 𝒆 𝒎 − 𝑳 𝟎
𝑳 𝑳
Example of nonlinear state-space representation

Pendulum on a moving platform

𝑴 + 𝒎 𝒙ሷ + 𝒎𝒍𝜽ሷ cos 𝜽 − 𝒎𝒍𝜽ሶ 𝟐 sin 𝜽 = 𝑭


𝒙ሷ cos 𝜽 + 𝒍𝜽ሷ − 𝒈 sin 𝜽 = 𝟎

We define 𝑿 = 𝒙 𝜽 𝒗 𝝎 𝒕

We solve the 2 equations for determining 𝒙ሷ and 𝜽.ሷ

Then we get the nonlinear state-space model:

𝑥ሶ = 𝑣
𝜃ሶ = 𝜔 𝑿ሶ = 𝒇 𝑿, 𝑭
𝐹 + 𝑚𝑙𝜔2 sin 𝜃 − 𝑚𝑔 sin 𝜃 cos 𝜃 𝐘 = 𝒈 𝑿, 𝑭
𝒙ሷ = 𝑣ሶ =
𝑀 + 𝑚(1 − 𝑐𝑜𝑠 2 𝜃)
−𝐹 cos 𝜃 − 𝑚𝑙𝜔2 sin 𝜃 cos 𝜃 + 𝑀 + 𝑚 𝑔 sin 𝜃
𝜃ሷ = 𝜔ሶ =
𝑙(𝑀 + 𝑚 1 − 𝑐𝑜𝑠 2 𝜃 )
Linearization

Let us consider a nonlinear time-invariant system represented by:


𝑥ሶ = 𝑓 𝑥, 𝑢
y = 𝑔 𝑥, 𝑢

Let us consider an equilibrium point (𝑥*,𝑦*) defined at 𝑢=𝑢*such that:


𝑓 𝑥 ∗, 𝑢 ∗ = 0 (which implies 𝑥ሶ ∗= 0)
𝑔 𝑥 ∗, 𝑢 ∗ = 𝑦 ∗

Deviations from equilibrium point are written:


𝑥 𝑡 = 𝑥 ∗ +Δ𝑥 𝑡
𝑦 𝑡 = 𝑦 ∗ +Δ𝑦 𝑡
𝑢 𝑡 = 𝑢 ∗ +Δ𝑢 𝑡
Because 𝑥ሶ ∗= 0, we get:
Δ𝑥ሶ = 𝑓 𝑥 ∗ +Δ𝑥 𝑡 , 𝑢 ∗ +Δ𝑢 𝑡
Δ𝑦ሶ = 𝑔 𝑥 ∗ +Δ𝑥 𝑡 , 𝑢 ∗ +Δ𝑢 𝑡 − 𝑦 ∗
Example of linearization

Tank controlled by a valve

𝒄 𝑭
𝒍ሶ = − 𝑨 𝒖 𝒍 + 𝑨𝒊𝒏 = 𝒇(𝒍, 𝒖, 𝑭𝒊𝒏 )

Linearization around 𝑙 ∗= 𝑙𝑑 and 𝐹 ∗𝑖𝑛 = 𝐹𝑑

Compute u*
𝑐 𝐹∗𝑖𝑛 𝐹𝑑
− 𝐴 𝑢 ∗ 𝑙𝑑 + =0  𝑢 ∗=
𝐴 𝑐 𝑙𝑑
Compute
𝜕𝑓 𝑐 𝜕𝑓 𝑐 𝜕𝑓 1
𝜕𝑙
= − 2𝐴 𝑙 𝑢 𝜕𝑢
= −𝐴 𝑙 𝜕𝐹𝑖𝑛
=𝐴

Linearized model
𝒄𝒖∗ 𝒄 𝟏
 ∆𝒍ሶ = − ∆𝒍 − 𝑨 𝒍𝒅 ∆𝒖 + 𝑨 ∆𝑭𝒊𝒏
𝟐𝑨 𝒍𝒅
Linearization: Jacobian of matrices

For small deviations, expanding the components of 𝑓 and 𝑔 in a Taylor series, we get
the linearized system:

𝛿𝑓 𝛿𝑓
Δ𝑥ሶ = ቤ Δ𝑥 + ቤ Δ𝑢
𝛿𝑥 𝑥=𝑥∗ 𝛿𝑢 𝑢=𝑢∗

𝛿𝑔 𝛿𝑔
Δ𝑦ሶ = ቤ Δ𝑥 + ቤ Δ𝑢
𝛿𝑥 𝑦=𝑦∗ 𝛿𝑢 𝑢=𝑢∗

where
𝛿𝑓
ቚ is the Jacobian of 𝑓 with respect to 𝑥
𝛿𝑥 𝑥=𝑥∗
𝛿𝑔
ቚ is the Jacobian of 𝑔 with respect to 𝑥
𝛿𝑥 𝑥=𝑥∗
𝛿𝑓
ቚ is the Jacobian of 𝑓 with respect to 𝑢
𝛿𝑢 𝑢=𝑢∗
𝛿𝑔
ቚ is the Jacobian of 𝑔 with respect to 𝑢
𝛿𝑢 𝑢=𝑢∗
Example of linearization

Pendulum on a moving platform

𝑥ሶ = 𝑣
𝜃ሶ = 𝜔
𝐹+𝑚𝑙𝜔2 sin 𝜃−𝑚𝑔 sin 𝜃 cos 𝜃
𝑥ሷ = 𝑣ሶ =
𝑀+𝑚(1−𝑐𝑜𝑠 2 𝜃)
−𝐹 cos 𝜃−𝑚𝑙𝜔2 sin 𝜃 cos 𝜃+ 𝑀+𝑚 𝑔 sin 𝜃
𝜃ሷ = 𝜔ሶ = 𝑙(𝑀+𝑚 1−𝑐𝑜𝑠 2 𝜃 )

What is the the linearized model at 𝑥 ∗= 0 and 𝜃 ∗= 0 ?

1° method: Compute the Jacobian of the functions with respect to 𝑥 , 𝜃 , 𝑣 𝑎𝑛𝑑 𝜔


at 𝑥 ∗= 0 , 𝜃 ∗= 0 , 𝑥ሶ ∗= 𝑉0 ,𝜃ሶ ∗= 𝜔0
(here quite complex)
Example of linearization

Pendulum on a moving platform


2° method: Compute the Lagrangian for small changes by developing terms of order
𝜃2
higher than 2: sin 𝜃 = 𝜃 and cos 𝜃 = 1 − 2
1 1 2 1
𝐿 = 𝑀 𝑥ሶ 2
+ 2 𝑚 𝑥ሶ + 𝜃𝑙ሶ − 𝑉0 − 𝑚𝑔𝑙 1 − 2 𝜃 2
2
𝛿𝐿 𝛿𝐿 𝛿𝐿 𝛿𝐿
 𝛿 𝑥ሶ
= 𝑀𝑥ሶ + 𝑚 𝑥ሶ + 𝑙𝜃ሶ 𝛿𝑥
=0 𝛿 𝜃ሶ
= 𝑚𝑙 𝑥ሶ + 𝑙 𝜃ሶ 𝛿𝜃
= 𝑚𝑔𝑙𝜃

Lagrange’s equations are:


𝑀 + 𝑚 𝑥ሷ + 𝑚𝑙 𝜃ሷ = 𝐹
𝑚𝑙 𝑥ሷ + 𝑚𝑙 2 𝜃ሷ − 𝑔𝑚𝑙𝜃 = 0

Linearized state-space model (∆𝑥 = 𝑥 𝑎𝑛𝑑 ∆𝜃 = 𝜃 , linearization around 0):


𝒙ሶ = 𝒗
𝜽ሶ = 𝝎
𝒎𝒈 𝑭
𝒙ሷ = 𝒗ሶ = − 𝑴 𝜽 + 𝑴
𝑴+𝒎 𝒈 𝑭
𝜽ሷ = 𝝎ሶ = 𝜽 − 𝑴𝒍
𝑴𝒍
Observability

An LTI system is observable if the initial state 𝑥 0 = 𝑥0 can be uniquely deduced


from knowledge of the input 𝑥 𝑡 and output 𝑦(𝑡) for all 𝑡 positive.
The observability allows computing the state 𝑥(𝑡) for all 𝑡.
The concept of observability indicates if a sensor can capture the dynamics of a
system (or of some of its states). If a state is unobservable, the sensor will remain at
zero.

Observability test: Consider a LTI system of order 𝑛.


A necessary and sufficient condition for observability is:

𝐶
𝐶𝐴
𝑟𝑎𝑛𝑘 𝑂 = 𝑟𝑎𝑛𝑘 =𝑛
𝐶𝐴𝑛−1
𝑂 is called observability matrix.
Controllability

An LTI system is controllable if, for every 𝑥𝑡 , there exists an input function 𝑢 𝑡 such
that the system state is taken from 𝑥0 to 𝑥𝑡 between 0 and 𝑡.
The controllability allows the state to get any desired value.
The concept of controllability indicates if the actuators can control the state of the
system. If a state is uncontrollable, the it cannot be altered by the input 𝑢.

Controllabilty test: consider a LTI system of order 𝑛.


The system is controllable is:

𝑟𝑎𝑛𝑘 𝐶 = 𝑟𝑎𝑛𝑘 𝐵 𝐴𝐵 𝐴2 𝐵 … 𝐴𝑛−1 𝐵 = 𝑛

𝐶 is called controllability matrix.


State-Space representation vs Transfer function
Link Transfer function – State-space
representation

Let consider a LTI system with 𝐷 = 0 (most practical cases)

𝑥(𝑡)
ሶ = 𝐴𝑥(𝑡) + 𝐵𝑢(𝑡)
𝑦(𝑡) = 𝐶𝑥(𝑡)
And let apply the Laplace transform:
𝑠𝐼𝑋 𝑠 − 𝑥 0 = 𝐴𝑋 𝑠 + 𝐵𝑈 𝑠
𝑌 𝑠 = 𝐶𝑋(𝑠)
Solve and get:
𝑋 𝑠 = 𝑠𝐼 − 𝐴 −1 𝐵𝑈 𝑠 + 𝑠𝐼 − 𝐴 −1 𝑥(0)
𝑌 𝑠 = 𝐶 𝑠𝐼 − 𝐴 −1 𝐵𝑈 𝑠 + 𝐶 𝑠𝐼 − 𝐴 −1 𝑥(0)

And then the transfer function is:

𝑌 𝑠 −1 𝐵
𝑇 𝑠 = = 𝐶 𝑠𝐼 − 𝐴
𝑈 𝑠
Link Transfer function – State-space
representation

𝑌 𝑠 −1
𝑇 𝑠 = = 𝐶 𝑠𝐼 − 𝐴 𝐵
𝑈 𝑠

The denominator of 𝑇 𝑠 is named characteristic polynomial.

 eigenvalues of the matrix A = poles of the transfer function


= roots of the characteristic polynomial

The order of the LTI model is the highest degree of the characteristic polynomial.
It is egal to the number of states of the model.
Time-domain analysis
from state space representation

The time response can be found in 2 ways:

- Inverse of the Laplace transform of 𝑌 𝑠 = 𝐶 𝑠𝐼 − 𝐴 −1


𝐵𝑈 𝑠 + 𝐶 𝑠𝐼 − 𝐴 −1
𝑥(0)

- Integration of the state-space representation: compute 𝑥(𝑡) and then 𝑦(𝑡)

𝑥(𝑡)
ሶ = 𝐴𝑥(𝑡) + 𝐵𝑢(𝑡) x(t ) = e A ( t −t 0 )
x(t0 ) +  e A(t − ) Bu ( )d
t0

Initial condition response Zero state response


or zero input response
Integration of the state-space representation:
demonstration

How to get the time response? By integrating of the state-space representation.

Starting from:

𝑥ሶ 𝑡 = 𝐴𝑥(𝑡) + 𝐵𝑢(𝑡)
We get:

e𝑒−−𝐴𝑡
At
x (𝑥t )ሶ = − At −𝐴𝑡
𝑡 e= + Bu (t ))+ 𝐵𝑢(𝑡)
𝑒( Ax(t) 𝐴𝑥(𝑡)
− At
𝑒e−𝐴𝑡 ( x𝑥(tሶ )𝑡− Ax t )) = e − At=Bu𝑒(−𝐴𝑡
− (𝐴𝑥(𝑡) t ) 𝐵𝑢(𝑡)
t
d − At x(t ) = e A ( t −t 0 )
x(t0 ) +  e A(t − ) Bu ( )d
[e x(t )] = e − At Bu (t )
dt t0
t t
d − A − A
 d [e x( )]d =  e Bu( )d
t0 t0
Initial condition response Particular solution
t
e − At x(t ) − e − At 0 x(t0 ) =  e − A Bu ( )d
t0
Transfer function vs state space representation

b0 + b1s + ... + bm s m N ( p)
F ( p) = =K
a0 + a1s + ... + an s n
D( p ) initial conditions : x(0) = x0
non uniqueness of state space representation:
poles : pi such than D ( pi ) = 0
x = Mx˜
zeros : zi such that N ( zi ) = 0

• The transfer function allows:


• studying the dynamic properties of a system without integrating differential equations
• making a frequential interpretation of the system behaviour.
• State space representation allows:
• representing MIMO (Multi Inputs Multi Outputs) systems using the same formalism,
• analysing governability and observability
• taking into account the initial conditions in a simple way.
Simulation
Block diagram representation
Block diagram:
example of a linear system

𝑱𝒕 𝝎ሶ = 𝑵𝒌𝒎 𝒊

𝒅𝒊
𝑳𝒆 𝒅𝒕 + 𝑹𝒆 𝒊 = 𝒗 − 𝒌𝒆 𝑵𝝎
Block diagram:
example of a nonlinear system

Differential equation

m𝑙 2 𝜃ሷ + mgl sinθ + kl𝜃ሶ = Γ

1
𝜃ሷ = (Γ −mgl sinθ − kl𝜃)ሶ
m𝑙2

Block diagram

𝜃ሷ 𝜃ሶ 𝜃
Block diagram:
State space representation of linear invariant system

X Y
U
B  C

A
𝑥(𝑡)
ሶ = 𝐴𝑥(𝑡) + 𝐵𝑢(𝑡)
𝑦(𝑡) = 𝐶𝑥(𝑡) + 𝐷𝑢 (𝑡)
D

• A state matrix: n x n ==> Dynamic interaction


• B input matrix: n x m ==> Input action (actuators)
• C output matrix: p x n ==> Measures (sensors)
• D direct transmission matrix: p x m ==> Direct link between input and measures
Blocks diagrams: interconnection

Consider G1 and G2 two transfer functions.


Causal simulation/Acausal simulation

Simulation from bloc diagrams is based on causality: inputs are chosen when
implementing the model and the outputs are computed for defined inputs .
Outputs are consequences or effects of inputs (causes).
Matlab/ Simulink ® simulation program only deals with causal models: the model is
defined by mean of assignments (block diagram have an input and an output).

Acausal simulation program Matlab/ Simscape® or Modelica ® are based on models


described by acausal relations or equations. The models are made of blocs defined with
interface nodes which are not assigned as inputs or outputs but only as variables.
In case of interconnection of systems of different domains (e.g. fluid and structure), blocks
are defined with « interconnection » ports corresponding to a pair of power-conjugated
variables (i.e. their product represent a power). The interconnection of the blocks is made
feasible by the energy conservation principle.

Causal Acausal
Model Model

inputs outputs interconnection ports


Modeling of uncertainties
Modeling of uncertainties

● A mathematical model of any real system is always just an approximation of the


true real system

● Uncertainties: discrepancy between the mathematical model and the real


dynamics of the system

● Origin of uncertainties:
– Unmodelled (usually high-frequency) dynamics
– nonlinearities in the modelling
– effects of deliberate reduced-order models,
– system-parameter variations due to environmental changes and system wear
Modeling of uncertainties

Structured parametric uncertainties


● variations of certain system parameters over some possible value ranges
(complex or real)
● generally in low-frequency

● Example:
Model of a mass-stiffner-damper system
𝑚𝑥ሷ + 𝑐 𝑥ሶ + 𝑘𝑥 = 𝑓
with 𝑚 , 𝑐, 𝑘 : mass, damping constant and spring stiffness
Model with uncertainties
𝑚𝑂 + 𝛿𝑚 𝑥ሷ + 𝑐0 + 𝛿𝑐 𝑥ሶ + 𝑘0 + 𝛿𝑘 𝑥 = 𝑓
with 𝑚𝑂 , 𝑐0 ,𝑘0 : nominal parameter values
Modeling of uncertainties

Unstructured uncertainties

● neglected or non-modeled dynamics


● generally in high-frequency
● for time-invariant linear system, modeled by a block ∆ which may be
represented by a transfer function
● Example
Additive uncertainties configuration Multiplicative uncertainties configuration
𝐺(𝑠) = 𝐺0 (𝑠) + ∆(𝑠) 𝐺(𝑠) = 𝐺0 (𝑠) 𝐼 + ∆(𝑠)
Block diagram:
representation of structured uncertainties
Augmented state-space model:
Let z1, z2 and z3 be x˙2, x2 and x1, respectively and considered them as fictitious output vector
0 1 𝑑1 0
𝑥1ሶ 𝑥1 0 0 0 1 𝑓
= − 𝑘0 𝑐0
𝑥2 + −1 −1 −1 𝑑2 +
𝑥2ሶ −
𝑚0 𝑚0 𝑑3 𝑚0
𝑘0 𝑐0 1
𝑧1 − − −1 −1 −1 𝑑1
𝑧2 = 𝑚0 𝑚0 𝑥1 + 0 0 0 𝑑2 + 𝑚0 𝑓
0 1 𝑥2 0
𝑧3 0 0 0 𝑑3
1 0 0
𝑥1
𝑦= 1 0 𝑥
2
Block diagram:
representation of structured uncertainties
Model of a mass-stiffner-damper system with uncertainties
𝑚𝑂 + 𝛿𝑚 𝑥ሷ + 𝑐0 + 𝛿𝑐 𝑥ሶ + 𝑘0 + 𝛿𝑘 𝑥 = 𝑓
State-space representation
𝑥ሶ 1 = 𝑣 = 𝑥2
1
𝑥ሶ 2 = − 𝑘0 + 𝛿𝑘 𝑥1 − 𝑐0 + 𝛿𝑐 𝑥2 + 𝑓
𝑚0 +𝛿𝑚

𝑦 = 𝑥1
Block diagram:
representation of structured uncertainties

d1, d2 and d3 are the signals coming out from the perturbation blocks
𝑑1 = 𝛿𝑚 𝑧1 ; 𝑑2 = 𝛿𝑐 𝑧2 ; 𝑑3 = 𝛿𝑘 𝑧3

You might also like