Professional Documents
Culture Documents
x instead of x(t)
dx
ẋ instead of x0 (t) or
dt
d2 x
ẍ instead of x00 (t) or 2
dt
etc.
Example 1: Mass-Spring System
x
m u
Example 1: Mass-Spring System
x
m u
m u
m u
m u
m u
m u
mẍ + ρẋ + kx = u
Example 1: Mass-Spring System
x
m u
m u
m u
ρ k u
ẍ + ẋ + x = 2nd-order linear ODE
m m m
Example 1: Mass-Spring System
m u
ρ k u
ẍ + ẋ + x = 2nd-order linear ODE
m m m
m u
ρ k u
ẍ + ẋ + x = 2nd-order linear ODE
m m m
ẋ = v (definition of velocity)
ρ k 1
v̇ = − v− x+ u
m m m
Example 1: Mass-Spring System
x
m u
ẋ 0 1 x 0
= k ρ + 1 u
v̇ −m −m v m
Example 1: Mass-Spring System
x
m u
ẋ 0 1 x 0
= k ρ + 1 u
v̇ −m −m v m
xn um
General n-Dimensional State-Space Model
x1 u1
state x = ... ∈ Rn input u = ... ∈ Rm
xn um
ẋ1 A x1 B u1
.
.. = .
.. + ...
n×n n×m
ẋn matrix xn matrix um
General n-Dimensional State-Space Model
x1 u1
state x = ... ∈ Rn input u = ... ∈ Rm
xn um
ẋ1 A x1 B u1
.
.. = .
.. + ...
n×n n×m
ẋn matrix xn matrix um
ẋ = Ax + Bu
Partial Measurements
x1 u1
state x = ... ∈ Rn input u = ... ∈ Rm
xn um
Partial Measurements
x1 u1
state x = ... ∈ Rn input u = ... ∈ Rm
xn um
y1
..
output y = . ∈ Rp y = Cx C– p × n matrix
yp
Partial Measurements
x1 u1
state x = ... ∈ Rn input u = ... ∈ Rm
xn um
y1
..
output y = . ∈ Rp y = Cx C– p × n matrix
yp
ẋ = Ax + Bu
y = Cx
Partial Measurements
x1 u1
state x = ... ∈ Rn input u = ... ∈ Rm
xn um
y1
..
output y = . ∈ Rp y = Cx C– p × n matrix
yp
ẋ = Ax + Bu
y = Cx
Example: if we only care about (or can only measure) x1 , then
x1
x2
y = x1 = 1 0 . . . 0 .
..
xn
State-Space Models: Bottom Line
ẋ = Ax + Bu
y = Cx
State-Space Models: Bottom Line
ẋ = Ax + Bu
y = Cx
State-space models are useful and convenient for
writing down system models for different types
of systems, in a unified manner.
State-Space Models: Bottom Line
ẋ = Ax + Bu
y = Cx
State-space models are useful and convenient for
writing down system models for different types
of systems, in a unified manner.
ẋ = Ax + Bu
y = Cx
State-space models are useful and convenient for
writing down system models for different types
of systems, in a unified manner.
−VS + RI + LI˙ = 0
Example 2: RL Circuit
+ VR
+ +
VS I VL
−VS + RI + LI˙ = 0
R 1
I˙ = − I + VS (1st-order system)
L L
Example 2: RL Circuit
+ VR
+ +
VS I VL
−VS + RI + LI˙ = 0
R 1
I˙ = − I + VS (1st-order system)
L L
I – state, VS – input
Example 2: RL Circuit
+ VR
+ +
VS I VL
−VS + RI + LI˙ = 0
R 1
I˙ = − I + VS (1st-order system)
L L
I – state, VS – input
Q: How should we change the circuit in order to implement a
2nd-order system?
Example 2: RL Circuit
+ VR
+ +
VS I VL
−VS + RI + LI˙ = 0
R 1
I˙ = − I + VS (1st-order system)
L L
I – state, VS – input
Q: How should we change the circuit in order to implement a
2nd-order system? A: Add a capacitor.
Example 3: Pendulum
✓ `
✓
Te
external
mg sin ✓ torque
mg
Example 3: Pendulum
Newton’s 2nd law (rotational motion):
✓ `
✓
Te
external
mg sin ✓ torque
mg
Example 3: Pendulum
Newton’s 2nd law (rotational motion):
✓ `
✓ T = |{z}
J α
Te |{z}
total moment
|{z}
angular
external torque of inertia acceleration
mg sin ✓ torque
mg
Example 3: Pendulum
Newton’s 2nd law (rotational motion):
✓ `
✓ T = |{z}
J α
Te |{z}
total moment
|{z}
angular
external torque of inertia acceleration
mg sin ✓ torque
= pendulum torque + external torque
mg
Example 3: Pendulum
Newton’s 2nd law (rotational motion):
✓ `
✓ T = |{z}
J α
Te |{z}
total moment
|{z}
angular
external torque of inertia acceleration
mg sin ✓ torque
= pendulum torque + external torque
mg
pendulum torque = −mg sin θ · |{z}
`
| {z }
force lever arm
Example 3: Pendulum
Newton’s 2nd law (rotational motion):
✓ `
✓ T = |{z}
J α
Te |{z}
total moment
|{z}
angular
external torque of inertia acceleration
mg sin ✓ torque
= pendulum torque + external torque
mg
pendulum torque = −mg sin θ · |{z}
`
| {z }
force lever arm
2
moment of inertia J = m`
Example 3: Pendulum
Newton’s 2nd law (rotational motion):
✓ `
✓ T = |{z}
J α
Te |{z}
total moment
|{z}
angular
external torque of inertia acceleration
mg sin ✓ torque
= pendulum torque + external torque
mg
pendulum torque = −mg sin θ · |{z}
`
| {z }
force lever arm
2
moment of inertia J = m`
g 1
θ̈ = − sin θ + Te (nonlinear equation)
` m`2
Example 3: Pendulum
g 1
θ̈ = − sin θ + Te (nonlinear equation)
` m`2
Example 3: Pendulum
g 1
θ̈ = − sin θ + Te (nonlinear equation)
` m`2
For small θ, use the approximation sin θ ≈ θ
Example 3: Pendulum
g 1
θ̈ = − sin θ + Te (nonlinear equation)
` m`2
For small θ, use the approximation sin θ ≈ θ
3 g 1
sinHΘL θ̈ = − θ + Te
2 ` m`2
Θ 1
-3 -2 -1 1 2 3
-1
-2
-3
Example 3: Pendulum
g 1
θ̈ = − sin θ + Te (nonlinear equation)
` m`2
For small θ, use the approximation sin θ ≈ θ
3 g 1
sinHΘL θ̈ = − θ + Te
2 ` m`2
Θ 1
State-space form: θ1 = θ, θ2 = θ̇
-3 -2 -1 1 2 3
-1 g 1 g 1
θ̇2 = − θ + 2
Te = − θ1 + Te
-2 ` m` ` m`2
-3
Example 3: Pendulum
g 1
θ̈ = − sin θ + Te (nonlinear equation)
` m`2
For small θ, use the approximation sin θ ≈ θ
3 g 1
sinHΘL θ̈ = − θ + Te
2 ` m`2
Θ 1
State-space form: θ1 = θ, θ2 = θ̇
-3 -2 -1 1 2 3
-1 g 1 g 1
θ̇2 = − θ + 2
Te = − θ1 + Te
-2 ` m` ` m`2
-3
θ̇1 0 1 θ1 0
= g + 1 Te
θ̇2 −` 0 θ2 m`2
Linearization
Taylor series expansion:
1
f (x) = f (x0 ) + f 0 (x0 )(x − x0 ) + f 00 (x0 )(x − x0 )2 + . . .
2
≈ f (x0 ) + f 0 (x0 )(x − x0 ) linear approximation around x = x0
Linearization
Taylor series expansion:
1
f (x) = f (x0 ) + f 0 (x0 )(x − x0 ) + f 00 (x0 )(x − x0 )2 + . . .
2
≈ f (x0 ) + f 0 (x0 )(x − x0 ) linear approximation around x = x0
For each i = 1, . . . , n,
∂fi ∂fi
fi (x, u) = fi (0, 0) + (0, 0)x1 + . . . + (0, 0)xn
| {z } ∂x1 ∂xn
=0
∂fi ∂fi
+ (0, 0)u1 + . . . + (0, 0)um
∂u1 ∂um
Linearization
Linear approx. around (x, u) = (0, 0) to all components of f :
For each i = 1, . . . , n,
∂fi ∂fi
fi (x, u) = fi (0, 0) + (0, 0)x1 + . . . + (0, 0)xn
| {z } ∂x1 ∂xn
=0
∂fi ∂fi
+ (0, 0)u1 + . . . + (0, 0)um
∂u1 ∂um
Linearized state-space model:
∂fi ∂fi
ẋ = Ax + Bu, where Aij =
∂xj x=0
, Bik =
∂uk x=0
u=0 u=0
Linearization
Linear approx. around (x, u) = (0, 0) to all components of f :
For each i = 1, . . . , n,
∂fi ∂fi
fi (x, u) = fi (0, 0) + (0, 0)x1 + . . . + (0, 0)xn
| {z } ∂x1 ∂xn
=0
∂fi ∂fi
+ (0, 0)u1 + . . . + (0, 0)um
∂u1 ∂um
Linearized state-space model:
∂fi ∂fi
ẋ = Ax + Bu, where Aij =
∂xj x=0
, Bik =
∂uk x=0
u=0 u=0
ẋ = f (x, u)
General Linearization Procedure
I Start from nonlinear state-space model
ẋ = f (x, u)
ẋ = f (x, u)
x = x − x0 u = u − u0
f (x, u) = f (x + x0 , u + u0 ) = f (x, u)
General Linearization Procedure
I Start from nonlinear state-space model
ẋ = f (x, u)
x = x − x0 u = u − u0
f (x, u) = f (x + x0 , u + u0 ) = f (x, u)
x = x + x0 , u = u + u0
General Linearization Procedure
General Linearization Procedure
I Pass to shifted variables x = x − x0 , u = u − u0
f (0, 0) = f (x0 , u0 ) = 0
General Linearization Procedure
I Pass to shifted variables x = x − x0 , u = u − u0
f (0, 0) = f (x0 , u0 ) = 0
I Now linearize:
∂fi ∂fi
ẋ = Ax + Bu, where Aij =
∂xj x=x0
, Bik =
∂uk x=x0
u=u0 u=u0
General Linearization Procedure
I Why do we require that f (x0 , u0 ) = 0 in equilibrium?
General Linearization Procedure
I Why do we require that f (x0 , u0 ) = 0 in equilibrium?
I This requires some thought. Indeed, we may talk about
a linear approximation of any smooth function f at
any point x0 :
f (x, u) = Ax + Bu f (0, 0) = A0 + B0 = 0.