You are on page 1of 44

Lecture 3: LTI, State-space

representation and Linearization


Instructor: John Audie Cabrera

EEE 101: Control Systems Theory


Recap of Lecture 2
• Familiarized with dynamic systems in differential equations
• Example RLC circuit

EEE 101: Control Systems Theory


Recap of Lecture 2
• Familiarized with dynamic systems in differential equations
• Example Mass Spring Damper System

EEE 101: Control Systems Theory


Overview
• Review of differential equations
• Linear-Time Invariant Systems
• State space representation
• Linearization

EEE 101: Control Systems Theory


Overview
• Review of differential equations
• Linear-Time Invariant Systems
• State space representation
• Linearization

EEE 101: Control Systems Theory


Dynamic Systems modeled as differential
equations
• Linear Ordinary Differential Equations
• Non-linear Ordinary Differential Equations
• Partial Differential Equations

EEE 101: Control Systems Theory


Linear Ordinary Differential Equations
• An 𝑛-th order differential equation (DE) is

𝑑𝑛 𝑦 𝑡 𝑑𝑦 𝑡
𝑎𝑛+1 𝑛
+ ⋯ + 𝑎2 + 𝑎1 𝑦 𝑡 = 𝑓 𝑡
𝑑𝑡 𝑑𝑡
: homogeneous if 𝑓 𝑡 = 0

EEE 101: Control Systems Theory


Input-output differential equation
𝑑𝑛 𝑦 𝑡 𝑑𝑦 𝑡
𝑎𝑛+1 𝑛
+ ⋯ + 𝑎2 + 𝑎1 𝑦 𝑡
𝑑𝑡 𝑑𝑡
𝑑𝑚 𝑢 𝑡 𝑑𝑢 𝑡
= 𝑏𝑚+1 𝑛 + ⋯ + 𝑏2 + 𝑏1 𝑢 𝑡
𝑑𝑡 𝑑𝑡

𝑢(𝑡) 𝑦(𝑡)

EEE 101: Control Systems Theory


Electrical Systems
• Example RLC circuit

EEE 101: Control Systems Theory


Dynamic Systems modeled as differential
equations
• Linear Ordinary Differential Equations
• Non-linear Ordinary Differential Equations
• Partial Differential Equations

EEE 101: Control Systems Theory


Example of Non-linear Differential Equation

• Newton’s second law of motion: 𝜏 = 𝐼𝛼


𝑑 2𝜃
−𝑀𝑔𝑠𝑖𝑛𝜃 = 𝑀𝐿2 2
2
𝑑𝑡
𝑑 𝜃 𝑔
2
+ 𝑠𝑖𝑛𝜃 = 0
𝑑𝑡 𝐿
Dynamic Systems modeled as differential
equations
• Linear Ordinary Differential Equations
• Non-linear Ordinary Differential Equations
• Partial Differential Equations

EEE 101: Control Systems Theory


Example of Partial Differential Equation (PDE)
• Heat Diffusion Equation
𝜕𝐻(𝑡) 𝜕 2 𝐻(𝑡) 𝜕 2 𝐻(𝑡) 𝜕 2 𝐻(𝑡)
=𝛼 2
+ 2
+
𝜕𝑡 𝜕𝑥 𝜕𝑦 𝜕𝑧 2

https://www.youtube.com/watch?v=XIg2qJ2of-A EEE 101: Control Systems Theory


Overview
• Review of differential equations
• Linear-Time Invariant Systems
• State space representation
• Linearization

EEE 101: Control Systems Theory


Why Linear Systems?
• Although in reality there are a lot of nonlinearities, many systems can
be modeled efficiently as linear systems (LTI)
• Linear (LTI) are easy to mathematically manipulate
• Non-linear and partial differential equations are difficult to solve and
rely on linear systems theory as a foundation

EEE 101: Control Systems Theory


Formalizing Linear Time Invariant Systems
(LTI)
• Has two important properties
• Linearity
• Time Invariance

EEE 101: Control Systems Theory


Definition of LTI Systems: Linearity
𝑦 = 𝑓(𝑥)
• Superposition
𝑦1 = 𝑓(𝑥1 ) 𝑦2 = 𝑓(𝑥2 )
𝑦 = 𝑓 𝑥1 + 𝑥2 = 𝑓 𝑥1 + 𝑓 𝑥2
= 𝑦1 + 𝑦2
• Homogeneity
𝑦 = 𝑓 𝛼𝑥 = 𝛼𝑓 𝑥
• or combined definition
Linear if 𝑦 = 𝑓 𝛼𝑥1 + 𝛽𝑥2 = 𝛼𝑓 𝑥1 + 𝛽𝑓 𝑥2

: 𝑦 and 𝑥 can be functions of time 𝑦(𝑡) and 𝑥(𝑡) EEE 101: Control Systems Theory
Definition of LTI system: Time invariance
• Time shift independent (invariant)
𝑦=𝑓 𝑡
𝑦 𝑡 − 𝜏 = 𝑓(𝑡 − 𝜏)
For 𝜏 ∈ ℝ

The system is independent from time t.


If input is shifted, the output will just also shift in time

EEE 101: Control Systems Theory


Examples
1. 𝑦 = 𝑓(𝑥) = 2𝑥
2. 𝑦 = 𝑓 𝑥 = 𝑥 2
3. 𝑦 = 𝑓 𝑥 = 𝑥𝑡

EEE 101: Control Systems Theory


Examples: Solutions
• 𝑓 𝑥 = 2𝑥
Let’s take two points 𝑥1 and 𝑥2 with scalars 𝛼, 𝛽 ∈ ℝ
𝑓 𝛼𝑥1 = 2𝛼𝑥1 = 𝛼𝑓 𝑥1 𝑓 𝛽𝑥2 = 2𝛽𝑥2 = 𝛽𝑓 𝑥2
𝑓 𝛼𝑥1 + 𝛽𝑥2 = 2(𝛼𝑥1 + 𝛽𝑥2 )
To be linear, 𝑓 𝛼𝑥1 + 𝛽𝑥2 = 𝛼𝑓 𝑥1 + 𝛽𝑓 𝑥2
2 𝛼𝑥1 + 𝛽𝑥2 = 2𝛼𝑥1 + 2𝛽𝑥2
= 𝛼𝑓 𝑥1 + 𝛽𝑓 𝑥2
Linear!
Time invariant
𝑓 𝑥(𝑡 − 𝜏) = 2𝑥 𝑡 − 𝜏 = 2𝑥𝑠ℎ𝑖𝑓𝑡𝑒𝑑

EEE 101: Control Systems Theory


Examples: Solutions
• 𝑓 𝑥 = 𝑥2
Let’s take two points 𝑥1 and 𝑥2 with scalars 𝛼, 𝛽 ∈ ℝ
𝑓 𝛼𝑥1 = 𝛼𝑥1 2 𝑓 𝛽𝑥2 = 𝛽𝑥2 2
𝑓 𝛼𝑥1 + 𝛽𝑥2 = 𝛼𝑥1 + 𝛽𝑥2 2
To be linear, 𝑓 𝛼𝑥1 + 𝛽𝑥2 = 𝛼𝑓 𝑥1 + 𝛽𝑓 𝑥2
𝛼𝑥1 + 𝛽𝑥2 2 ≠ 𝛼𝑥1 2 + 𝛽𝑥2 2
not linear!
Time invariant
𝑓 𝑥(𝑡 − 𝜏) = 𝑥(𝑡 − 𝜏)2 = 𝑥𝑠ℎ𝑖𝑓𝑡𝑒𝑑 2
EEE 101: Control Systems Theory
Examples: Solutions
• 𝑓 𝑥 = 𝑡𝑥
Let’s take two points 𝑥1 and 𝑥2 with scalars 𝛼, 𝛽 ∈ ℝ
𝑓 𝛼𝑥1 = 𝑡𝛼𝑥1 = 𝛼𝑓 𝑥1 𝑓 𝛽𝑥2 = 𝑡𝛽𝑥2 = 𝛽𝑓 𝑥2
𝑓 𝛼𝑥1 + 𝛽𝑥2 = 𝑡(𝛼𝑥1 + 𝛽𝑥2 )
To be linear, 𝑓 𝛼𝑥1 + 𝛽𝑥2 = 𝛼𝑓 𝑥1 + 𝛽𝑓 𝑥2
t 𝛼𝑥1 + 𝛽𝑥2 = 𝑡𝛼𝑥1 + 𝑡𝛽𝑥2
= 𝛼𝑓 𝑥1 + 𝛽𝑓 𝑥2
Linear!
Time variant
𝑓 𝑥(𝑡 − 𝜏) = 𝑡 − 𝜏 𝑥 𝑡 − 𝜏 = 𝑡𝑥𝑠ℎ𝑖𝑓𝑡𝑒𝑑 − 𝜏𝑥𝑠ℎ𝑖𝑓𝑡𝑒𝑑

EEE 101: Control Systems Theory


Exercise
• Describe

𝑓(𝑥) = 𝑚𝑥 + 𝑏

Linear?
Time Invariant?
Exercise solution
• 𝑓 𝑥 = 𝑚𝑥 + 𝑏
Let’s take two points 𝑥1 and 𝑥2 with scalars 𝛼, 𝛽 ∈ ℝ
𝑓 𝛼𝑥1 = 𝛼𝑥1 + 𝑏 𝑓 𝛽𝑥2 = 𝛽𝑥2 + 𝑏
Remark: Homogeneity not satisfied! Already proven non-linear.
𝑓 𝛼𝑥1 + 𝛽𝑥2 = 𝑚 𝛼𝑥1 + 𝛽𝑥2 + 𝑏

Time invariant
𝑓 𝑥(𝑡 − 𝜏) = 𝑚𝑥 𝑡 − 𝜏 + 𝑏 = 𝑚𝑥𝑠ℎ𝑖𝑓𝑡𝑒𝑑 + 𝑏
Linear Ordinary differential equations
𝑑𝑛 𝑦 𝑡 𝑑𝑦 𝑡
𝑎𝑛+1 𝑛
+ ⋯ + 𝑎2 + 𝑎1 𝑦 𝑡
𝑑𝑡 𝑑𝑡
𝑑𝑚 𝑢 𝑡 𝑑𝑢 𝑡
= 𝑏𝑚+1 𝑛 + ⋯ + 𝑏2 + 𝑏1 𝑢 𝑡
𝑑𝑡 𝑑𝑡

Linear?

EEE 101: Control Systems Theory


Linear Ordinary differential equations
𝑑 𝑛 𝑦1 𝑡 𝑑𝑦1 𝑡 𝑑 𝑚 𝑢1 𝑡 𝑑𝑢1 𝑡
𝑎𝑛+1 𝑛
+ ⋯ + 𝑎2 + 𝑎1 𝑦1 𝑡 = 𝑏𝑚+1 𝑛
+ ⋯ + 𝑏2 + 𝑏1 𝑢1 𝑡
𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡
𝑑 𝑛 𝑦2 𝑡 𝑑𝑦2 𝑡 𝑑 𝑚 𝑢2 𝑡 𝑑𝑢2 𝑡
𝑎𝑛+1 𝑛 + ⋯ + 𝑎2 + 𝑎1 𝑦2 𝑡 = 𝑏𝑚+1 𝑛 + ⋯ + 𝑏2 + 𝑏1 𝑢2 𝑡
𝑑𝑡 𝑑𝑡 𝑑𝑡 𝑑𝑡

Let 𝑦 be the output corresponding to input 𝑢1 + 𝑢2

𝑑𝑛 𝑦 𝑡 𝑑𝑦 𝑡
𝑎𝑛+1 𝑛 + ⋯ + 𝑎2 + 𝑎1 𝑦 𝑡
𝑑𝑡 𝑑𝑡 𝑚
𝑑 (𝑢1 𝑡 +𝑢2 𝑡 ) 𝑑(𝑢1 𝑡 +𝑢2 𝑡 )
= 𝑏𝑚+1 + ⋯ + 𝑏2 + 𝑏1 (𝑢1 𝑡 + 𝑢2 𝑡 )
𝑑𝑡 𝑛 𝑑𝑡
∴ 𝑦 = 𝑦1 + 𝑦2

: for a complete definition of linearity in ODEs, initial conditions must be considered EEE 101: Control Systems Theory
Overview
• Review of differential equations
• Linear-Time Invariant Systems
• State space representation
• Linearization

EEE 101: Control Systems Theory


Consider the first order system
𝑎2 𝑦 + 𝑎1 𝑦 = 𝑢
𝑎1 1
𝑦=− 𝑦+ 𝑢
𝑎2 𝑎2
We can represent the system as,

𝑢
System 𝑦
𝑦

EEE 101: Control Systems Theory


State space representation
• Output 𝑦(𝑡0 ) is a function of 𝑓(𝑡0 ), 𝑦(𝑡0 )
𝑦 𝑡0 + Δ𝑡 − 𝑦(𝑡0 )
𝑦(𝑡0 ) ≈
Δ𝑡
𝑦 𝑡0 + Δ𝑡 = 𝑦 𝑡0 + 𝑦(𝑡0 )Δ𝑡

EEE 101: Control Systems Theory


Consider the second order system
𝑎3 𝑦 + 𝑎2 𝑦 + 𝑎1 𝑦 = 𝑢
𝑎2 𝑎1 1
𝑦=− 𝑦− 𝑦+ 𝑢
𝑎3 𝑎3 𝑎3

Define a vector
𝑦 𝑦 ← function of 𝑥
𝑥= 𝑦 ⟹ 𝑥=
𝑦 ← function of 𝑥 and 𝑢

EEE 101: Control Systems Theory


Using the new vector
𝑦 0
𝑦
𝑥= = − 𝑎2 𝑦 − 𝑎1 𝑦 + 1 𝑢
𝑦
𝑎3 𝑎3 𝑎3

Depends on 𝑥 Depends on 𝑢

𝑢
𝑦
𝑦 System
𝑦
𝑦

EEE 101: Control Systems Theory


Using the new vector
𝑦 0
𝑦
Recall:
𝑦 𝑦 𝑥= = − 𝑎2 𝑦 − 𝑎1 𝑦 + 1 𝑢
𝑥= 𝑦 ⟹ 𝑥= 𝑦
𝑦 𝑎3 𝑎3 𝑎3

Depends on 𝑥 Depends on 𝑢

𝑢
𝑦
𝑦 System
𝑦
𝑦

EEE 101: Control Systems Theory


Representing the output
0 1 0
Recall:
𝑦 𝑦 𝑥 = − 𝑎1 −
𝑎2 𝑥 + 1 𝑢 y = 𝐶𝑥 = 0 1 𝑥
𝑥= 𝑦 ⟹ 𝑥=
𝑦 𝑎3 𝑎3 𝑎3

Depends on 𝑥 Depends on 𝑢

𝑢
𝑦 y
𝑦 System
𝑦 What if we are
𝑦 only interested
in 𝑦 as output

EEE 101: Control Systems Theory


State space representation
• We can represent 𝑛th order linear differential equation into a 1st order system of
the general form

𝑥 = 𝐴𝑥 + 𝐵𝑢
𝑦 = 𝐶𝑥 + 𝐷𝑢

Where
𝑥 ∈ ℝ𝑚𝑥1 , 𝐴 ∈ ℝ𝑚𝑥𝑛 , 𝑥 ∈ ℝ𝑛𝑥1 , 𝐵 ∈ ℝ𝑚𝑥𝑟 , 𝑢 ∈ ℝ𝑟𝑥1 , 𝑦 ∈ ℝ𝑞𝑥1 , 𝐶 ∈ ℝ𝑞𝑥𝑛 , 𝐷 ∈ ℝ𝑞𝑥𝑟
• State variables 𝑥
 intermediary variables from your input to output
 Completely describe the behavior of the system
 Need not be observable or measurable quantities

EEE 101: Control Systems Theory


Example RLC circuit
Solution:
𝑣 𝑣
Let 𝑥 = ⇒𝑥=
𝑖 𝑖
𝑢=𝑒
𝑣
𝑥=
𝑖
0 1/𝐶 𝑣 0
= + 𝑒
−1/𝐿 −𝑅/𝐿 𝑖 1/𝐿
0 1/𝐶 0
= 𝑥+ 𝑢
−1/𝐿 −𝑅/𝐿 1/𝐿

We want to observe capacitor voltage


𝑣 only
𝑣
𝑦= 1 0 = 1 0𝑥
𝑖

EEE 101: Control Systems Theory


Example Pendulum
Solution:
𝜃
Let 𝑥 = ⟹ 𝑥= 𝜃 , 𝑢=𝑇
𝜃 𝜃
1 1
𝜃=− 𝐵 𝜃 + 𝑀𝑔𝐿𝑠𝑖𝑛𝜃 + 𝑇
𝑀𝐿2 𝑀𝐿2
𝜃 0
𝜃
𝑥= = 1 + 1 𝑇
𝜃 − 𝐵 𝜃 + 𝑀𝑔𝐿𝑠𝑖𝑛𝜃
𝑀𝐿2 𝑀𝐿2

System is not linear!

Dynamic Equation:
𝑀𝐿2 𝜃 + 𝐵𝜃 + 𝑀𝑔𝐿𝑠𝑖𝑛𝜃 = 𝑇

EEE 101: Control Systems Theory


Example Pendulum
Solution:
𝜃
Let 𝑥 = ⟹ 𝑥= 𝜃 , 𝑢=𝑇
𝜃 𝜃
1 1
𝜃=− 𝐵 𝜃 + 𝑀𝑔𝐿𝑠𝑖𝑛𝜃 + 𝑇
𝑀𝐿2 𝑀𝐿2
𝜃 0
𝑥= 𝜃 = 1 + 1 𝑇
𝜃 − 𝐵 𝜃 + 𝑀𝑔𝐿𝑠𝑖𝑛𝜃
𝑀𝐿2 𝑀𝐿2

System is not linear!

We can approximate 𝑠𝑖𝑛𝜃 ≈ 𝜃 for small values of 𝜃


Dynamic Equation: 0 1 𝜃 0
𝑥= 𝜃 = + 𝑇
𝑀𝐿2 𝜃 + 𝐵𝜃 + 𝑀𝑔𝐿𝑠𝑖𝑛𝜃 = 𝑇 𝜃 −𝑔/𝐿 −𝐵/𝑀𝐿 𝜃 2
1/𝑀𝐿2

Now it’s linear!

EEE 101: Control Systems Theory


Example Pendulum
What happens when we use our linear
approximation but get big 𝜃?
Actual
Approximated

Dynamic Equation:
𝑀𝐿2 𝜃 + 𝐵𝜃 + 𝑀𝑔𝐿𝑠𝑖𝑛𝜃 = 𝑇

We want to deviate only slightly from some


operating condition
EEE 101: Control Systems Theory
Recall Taylor series expansion
𝑦=𝑓 𝑥
At some operating point 𝑥0
𝑑𝑓 𝑥 − 𝑥0 𝑑2 𝑓 𝑥 − 𝑥0 2
= 𝑓 𝑥0 + + +⋯
𝑑𝑥 𝑥=𝑥 1! 𝑑𝑥 2!
0 𝑥=𝑥0
𝑥 1 2
Example: at 𝑥0 = 0. 𝑓 𝑥 = 𝑒 = 1 + 𝑥 + 𝑥 +⋯
2

EEE 101: Control Systems Theory


Recall Taylor series expansion
𝑦=𝑓 𝑥
At some operating point 𝑥0
𝑑𝑓 𝑥 − 𝑥0 𝑑2 𝑓 𝑥 − 𝑥0 2
= 𝑓 𝑥0 + + +⋯
𝑑𝑥 𝑥=𝑥 1! 𝑑𝑥 2!
0 𝑥=𝑥0
𝑥 1 2
Example: at 𝑥0 = 0. 𝑓 𝑥 = 𝑒 = 1 + 𝑥 + 𝑥 +⋯
2

1st order approx. 2nd order approx. 3rd order approx.


EEE 101: Control Systems Theory
Approximation
• The slope at the operating point
𝑑𝑓
𝑚=
𝑑𝑥 𝑥=𝑥0
May be used to approximate the curve over a small range 𝑥 − 𝑥0
• Approximation of 𝑦 is then
𝑦 = 𝑦0 + 𝑚(𝑥 − 𝑥0 )

EEE 101: Control Systems Theory


Linear Approximation
𝑦 = 𝑦0 + 𝑚 𝑥 − 𝑥0
𝑦 − 𝑦0 = 𝑚 𝑥 − 𝑥0
∆𝑦 = 𝑚∆𝑥
Recall 𝑓(𝑥) = 𝑚𝑥 + 𝑏
Linearize at 𝑥0 = 0
𝑦0 = 𝑓 𝑥0 = 𝑚𝑥0 + 𝑏
𝑦0 = 𝑏
𝑦 − 𝑏 = 𝑚𝑥
∆𝑦 = 𝑚∆𝑥

EEE 101: Control Systems Theory


Example Pendulum
Pick operating point to be at the equilibrium of the
system
𝜃0 = 0 ⇒ 𝑇0 = 0
Linear Approximation
𝑑 sin 𝜃
𝑇 − 𝑇0 = 𝑀𝑔𝐿 𝜃 − 𝜃0
𝑑𝜃 𝜃=𝜃
0
𝑇 = 𝑀𝑔𝐿 cos 0 𝜃 − 𝜃0 = 𝑀𝑔𝐿𝜃

The approximation is good for −𝜋/4 ≤ 𝜃 ≤ 𝜋/4


𝑇 = 𝑀𝑔𝐿 sin 𝜃
For a swing within ±30 ͦ the linearized response is
within 2% of the actual nonlinear pendulum response

EEE 101: Control Systems Theory


Summary
• Review of differential equations
• Linear-Time Invariant Systems
• State space representation
• Linearization

EEE 101: Control Systems Theory

You might also like