M1 1 After Class
M1 1 After Class
Ding Zhao
Associate Professor
College of Engineering
School of Computer Science
1 Overview
4 Linearization
1 Overview
4 Linearization
Slides/assignments: Canvas
⇒ Midterm
Root-locus method
due to Evans
was fully developed
Nyquist/Bode (Bell Lab) developed Machine learning controls
methods for analyzing nolinear model-free
the stability of genetic algorithm, neural network
controlled systems reinforcement learning control
Homework: 20%
Midterm : 25%
Projects: 50%
Participation: 5%
1 Overview
4 Linearization
Types of systems
[Brogan, Modern Control Theory,
1990]
Additivity:
H (u1 + u2 ) = H (u1 ) + H (u2 ) , ∀u1 , u2 ∈ S m
Homogeneity:
H(αu) = αH(u), ∀u, ∀ scalar α
These can be combined into
a) ÿ = u − ky2 , for k ∈ R
Let 2 I/O pairs be given by y1 = H(u1 ), y2 = H(u2 )
ÿ1 = u1 − ky12
ÿ2 = u2 − ky22
Add together
ÿ1 + ÿ2 = u1 + u2 − k y12 + y22
Tricks to check time-invariant systems: in Dτ (y(t)) = y(t − τ ), we will replace all the t with
t − τ , while in Dτ (u(t)) = u(t − τ ), we only add −τ in the parentheses of u(t), i.e. we will
not change t outside of u(t). Then check whether Dτ (y(t)) = the output of Dτ (u(t))
1 Overview
4 Linearization
Can we establish theories that can work on all linear control systems in
automotive/aerospace engineering, chemistry reaction, petroleum industry, economy?
First we need to have a universal way to describe these systems. Fortunately, we do.
ẋ = Ax + Bu
y = Cx + Du
The concept of state occupies a central position in modern control theory. But what is state?
State is a complete summary of the status of the system at a particular point in time
The state at any time t0 is a set of the minimum number of parameters xi (t0 ) which
allows a unique output segment Y[t0 ,t] to be associated with each input segment u[t0 ,t] for
every t0 ∈ T and for all t > t0 , t ∈ T .
COLAB LINK
import numpy as np
from scipy.signal import StateSpace, lsim
import matplotlib.pyplot as plt
m = 1 # kg
A = np.asarray([[0., 1.],
[0., 0.]])
B = np.asarray([[0.],
[1. / m]])
C = np.asarray([[1., 0.]])
D = np.asarray([[0.]])
# define the continouse time linear system
cart_sys = StateSpace(A, B, C, D)
0 1 0 −1
Given ẋ = Ax + Bu ⇒ Mẋ′ = AMx′ + Bu
⇒ ẋ′ = M−1 AMx′ + M−1 Bu, y = CMx′ + Du
Let  =M−1 AM (similarity transformation), B̂ = M−1 B, and Ĉ = CM
0 1 0 0 0 0
0 0 −k1 /m1 0 0 0
⇒ Â = B̂ =
0 0 0 1 0 0
k2 /m2 0 (−2k1 − k2 )/m2 0 −k2 /m2 −1/m2
1 0 0 0
Ĉ = Again, we can see the choice of state variables is not unique
0 0 1 0
Ding Zhao (CMU) M1-1: Linear Dynamic Modeling 29 / 42
Summary of State Space Representation
State space form writes high order and coupled DEQs as 1st order equations
Many (infinite) different state equations represent the same DEQ
State equations can be transformed
Choose x1 = y, x2 = ẏ.
2nd order ODE to 1st order ODE
ẋ1 = ẏ = x2
ẋ2 = ÿ = 7t2 ẏ + 2y + u = 7t2 x2 + 2x1 + u
Now
stack
into a vector equation
ẋ1 x2 0 1 x1 0
= = + u
ẋ2 2x1 + 7t2 x2 + u 2 7t2 x2 1
For the output, want y, i.e
x1
y = x1 = 1 0 +0·u
x2
dn y a n−1
dtn + an−1 ddtn−1y + . . . + a1 dy
dt + a0 y = b0 u
n−1
Define state variables: x1 = y, x2 = dy dy
dt , xn = dtn−1
Then, ẋ1 = x2 , ẋ2 = x3 , · · · , ẋn−1 = xn
ẋn = b0 u − an−1 xn−1 − an−2 xn−2 − · · · − a0 x1
Writein matrix form
0 1 0... 0
0 0 1... 0 0
A = ...
.
B = ..
0 0 0... 1 b0
−a0 −a1 −a2 . . . −an−1
C = 1 0 0... 0 D=0
1 Overview
4 Linearization
ẋ = f (x, u), f : Rn × Rm → R
x̄ ∈ Rn is an equilibrium point if
∂f ∂f
ẋ = f (x̄ + δx , ū + δu ) ≈ f (x̄, ū) + |x=x̄,u=ū δx + |x=x̄,u=ū δu
∂x ∂u
∂f ∂f
δ̇x = |x=x̄,u=ū δx + |x=x̄,u=ū δu
∂x ∂u
∂f ∂f ∂f
A= |x=x̄,u=ū ∈ Rn×n , B = |x=x̄,u=ū ∈ Rn×m , is called “Jacobian”
∂x ∂u ∂x
x1 − x31 + x1 x2
ẋ =
−x2 + 2x1 x2
1. Find equilibria
(
x1 − x31 + x1 x2 = 0
⇒ x2 (2x1 − 1) = 0 ⇒ x2 = 0 or x1 = 21
−x2 + 2x1 x2 = 0
x2 = 0 ⇒ x1 (1 − x21 ) = 0 ⇒ x1 = 0, x1 = 1, x1 = −1 ⇒ (0, 0), (1, 0), (−1, 0)
x1 = 21 ⇒ 12 − 213 + 12 x2 = 0 ⇒ x2 = (−1 + 212 ) ⇒ ( 12 , − 34 )
2. Linearization 1
x1 − x31 + x1 x2
0 1 −1
ẋ = ,x = , , , 23
−x2 + 2x1 x2 0 0 0 −4
1 − 3x21 + x2
∂f x1
=
∂x 2x2 2x1 − 1
1 0 −2 −1
(0, 0): δ̇x = δ (−1, 0): δ̇x = δ
0 −1 x 0 −3 x
1 1
−2 1 −2 2
(1, 0): δ̇x = δ ( 21 , − 43 ): δ̇x = δ
0 1 x − 32 0 x
ẋ = f (x, u) ẋ = Ax + Bu
time-invariant
y = g(x, u) y = Cx + Du
where u ∈ Rm is input, x ∈ Rn is the states, and y ∈ Rp is the output. In this course, we will
focus on the linear SS problems.
ẋ = f (x, u), f : Rn × Rm → R
x̄ ∈ Rn is an equilibrium point:
δx = x − x̄, δu = u − ū ⇒ x = δx + x̄, u = δu + ū
∂f ∂f ∂f
A= |x=x̄,u=ū ∈ Rn×n , B = |x=x̄,u=ū ∈ Rn×m , is called “Jacobian”
∂x ∂u ∂x