Plan of the Lecture Review: control, feedback, etc. Todays topic: - - PowerPoint PPT Presentation

plan of the lecture
SMART_READER_LITE
LIVE PREVIEW

Plan of the Lecture Review: control, feedback, etc. Todays topic: - - PowerPoint PPT Presentation

Plan of the Lecture Review: control, feedback, etc. Todays topic: state-space models of systems; linearization Plan of the Lecture Review: control, feedback, etc. Todays topic: state-space models of systems; linearization


slide-1
SLIDE 1

Plan of the Lecture

◮ Review: control, feedback, etc. ◮ Today’s topic: state-space models of systems; linearization

slide-2
SLIDE 2

Plan of the Lecture

◮ Review: control, feedback, etc. ◮ Today’s topic: state-space models of systems; linearization

Goal: a general framework that encompasses all examples of

  • interest. Once we have mastered this framework, we can

proceed to analysis and then to design.

slide-3
SLIDE 3

Plan of the Lecture

◮ Review: control, feedback, etc. ◮ Today’s topic: state-space models of systems; linearization

Goal: a general framework that encompasses all examples of

  • interest. Once we have mastered this framework, we can

proceed to analysis and then to design. Reading: FPE, Sections 1.1, 1.2, 2.1–2.4, 7.2, 9.2.1. Chapter 2 has lots of cool examples of system models!!

slide-4
SLIDE 4

Notation Reminder

We will be looking at dynamic systems whose evolution in time is described by differential equations with external inputs. We will not write the time variable t explicitly, so we use x instead of x(t) ˙ x instead of x′(t) or dx dt ¨ x instead of x′′(t) or d2x dt2 etc.

slide-5
SLIDE 5

Example 1: Mass-Spring System

u m x

slide-6
SLIDE 6

Example 1: Mass-Spring System

u m x

Newton’s second law (translational motion): F

  • total force

= ma

slide-7
SLIDE 7

Example 1: Mass-Spring System

u m x

Newton’s second law (translational motion): F

  • total force

= ma = spring force + friction + external force

slide-8
SLIDE 8

Example 1: Mass-Spring System

u m x

Newton’s second law (translational motion): F

  • total force

= ma = spring force + friction + external force spring force = −kx

(Hooke’s law)

friction force = −ρ ˙ x

(Stokes’ law — linear drag, only an approximation!!)

slide-9
SLIDE 9

Example 1: Mass-Spring System

u m x

Newton’s second law (translational motion): F

  • total force

= ma = spring force + friction + external force spring force = −kx

(Hooke’s law)

friction force = −ρ ˙ x

(Stokes’ law — linear drag, only an approximation!!)

F = −kx − ρ ˙ x + u

slide-10
SLIDE 10

Example 1: Mass-Spring System

u m x

Newton’s second law (translational motion): F

  • total force

= ma = spring force + friction + external force spring force = −kx

(Hooke’s law)

friction force = −ρ ˙ x

(Stokes’ law — linear drag, only an approximation!!)

m¨ x = −kx − ρ ˙ x + u

slide-11
SLIDE 11

Example 1: Mass-Spring System

u m x

Newton’s second law (translational motion): F

  • total force

= ma = spring force + friction + external force spring force = −kx

(Hooke’s law)

friction force = −ρ ˙ x

(Stokes’ law — linear drag, only an approximation!!)

m¨ x = −kx − ρ ˙ x + u Move x, ˙ x, ¨ x to the LHS, u to the RHS:

m¨ x + ρ ˙ x + kx = u

slide-12
SLIDE 12

Example 1: Mass-Spring System

u m x

Newton’s second law (translational motion): F

  • total force

= ma = spring force + friction + external force spring force = −kx

(Hooke’s law)

friction force = −ρ ˙ x

(Stokes’ law — linear drag, only an approximation!!)

m¨ x = −kx − ρ ˙ x + u Move x, ˙ x, ¨ x to the LHS, u to the RHS:

¨ x + ρ m ˙ x + k mx = u m

slide-13
SLIDE 13

Example 1: Mass-Spring System

u m x

Newton’s second law (translational motion): F

  • total force

= ma = spring force + friction + external force spring force = −kx

(Hooke’s law)

friction force = −ρ ˙ x

(Stokes’ law — linear drag, only an approximation!!)

m¨ x = −kx − ρ ˙ x + u Move x, ˙ x, ¨ x to the LHS, u to the RHS:

¨ x + ρ m ˙ x + k mx = u m

2nd-order linear ODE

slide-14
SLIDE 14

Example 1: Mass-Spring System

u m x

¨ x + ρ m ˙ x + k mx = u m

2nd-order linear ODE

slide-15
SLIDE 15

Example 1: Mass-Spring System

u m x

¨ x + ρ m ˙ x + k mx = u m

2nd-order linear ODE

Canonical form: convert to a system of 1st-order ODEs

slide-16
SLIDE 16

Example 1: Mass-Spring System

u m x

¨ x + ρ m ˙ x + k mx = u m

2nd-order linear ODE

Canonical form: convert to a system of 1st-order ODEs

˙ x = v

(definition of velocity)

˙ v = − ρ mv − k mx + 1 mu

slide-17
SLIDE 17

Example 1: Mass-Spring System

u m x

State-space model: express in matrix form

˙ x ˙ v

  • =

1 − k

m − ρ m

x v

  • +

1 m

  • u
slide-18
SLIDE 18

Example 1: Mass-Spring System

u m x

State-space model: express in matrix form

˙ x ˙ v

  • =

1 − k

m − ρ m

x v

  • +

1 m

  • u

Important: start reviewing your linear algebra now!!

◮ matrix-vector multiplication; eigenvalues and eigenvectors; etc.

slide-19
SLIDE 19

General n-Dimensional State-Space Model

state x =    x1 . . . xn    ∈ Rn input u =    u1 . . . um    ∈ Rm

slide-20
SLIDE 20

General n-Dimensional State-Space Model

state x =    x1 . . . xn    ∈ Rn input u =    u1 . . . um    ∈ Rm

  ˙ x1 . . . ˙ xn   =   A

n × n matrix

    x1 . . . xn   +   B

n × m matrix

    u1 . . . um  

slide-21
SLIDE 21

General n-Dimensional State-Space Model

state x =    x1 . . . xn    ∈ Rn input u =    u1 . . . um    ∈ Rm

  ˙ x1 . . . ˙ xn   =   A

n × n matrix

    x1 . . . xn   +   B

n × m matrix

    u1 . . . um  

˙ x = Ax + Bu

slide-22
SLIDE 22

Partial Measurements

state x =    x1 . . . xn    ∈ Rn input u =    u1 . . . um    ∈ Rm

slide-23
SLIDE 23

Partial Measurements

state x =    x1 . . . xn    ∈ Rn input u =    u1 . . . um    ∈ Rm

  • utput y =

   y1 . . . yp    ∈ Rp y = Cx C– p × n matrix

slide-24
SLIDE 24

Partial Measurements

state x =    x1 . . . xn    ∈ Rn input u =    u1 . . . um    ∈ Rm

  • utput y =

   y1 . . . yp    ∈ Rp y = Cx C– p × n matrix

˙ x = Ax + Bu y = Cx

slide-25
SLIDE 25

Partial Measurements

state x =    x1 . . . xn    ∈ Rn input u =    u1 . . . um    ∈ Rm

  • utput y =

   y1 . . . yp    ∈ Rp y = Cx C– p × n matrix

˙ x = Ax + Bu y = Cx

Example: if we only care about (or can only measure) x1, then y = x1 =

  • 1

. . .

    x1 x2 . . . xn     

slide-26
SLIDE 26

State-Space Models: Bottom Line

˙ x = Ax + Bu y = Cx

slide-27
SLIDE 27

State-Space Models: Bottom Line

˙ x = Ax + Bu y = Cx

State-space models are useful and convenient for writing down system models for different types

  • f systems, in a unified manner.
slide-28
SLIDE 28

State-Space Models: Bottom Line

˙ x = Ax + Bu y = Cx

State-space models are useful and convenient for writing down system models for different types

  • f systems, in a unified manner.

When working with state-space models, what are states and what are inputs?

slide-29
SLIDE 29

State-Space Models: Bottom Line

˙ x = Ax + Bu y = Cx

State-space models are useful and convenient for writing down system models for different types

  • f systems, in a unified manner.

When working with state-space models, what are states and what are inputs? — match against ˙ x = Ax + Bu

slide-30
SLIDE 30

Example 2: RL Circuit

I VS VR VL + − + − + −

slide-31
SLIDE 31

Example 2: RL Circuit

I VS VR VL + − + − + −

−VS + VR + VL = 0

Kirchhoff’s voltage law

VR = RI

Ohm’s law

VL = L ˙ I

Faraday’s law

−VS + RI + L ˙ I = 0

slide-32
SLIDE 32

Example 2: RL Circuit

I VS VR VL + − + − + −

−VS + VR + VL = 0

Kirchhoff’s voltage law

VR = RI

Ohm’s law

VL = L ˙ I

Faraday’s law

−VS + RI + L ˙ I = 0

˙ I = −R LI + 1 LVS

(1st-order system)

slide-33
SLIDE 33

Example 2: RL Circuit

I VS VR VL + − + − + −

−VS + VR + VL = 0

Kirchhoff’s voltage law

VR = RI

Ohm’s law

VL = L ˙ I

Faraday’s law

−VS + RI + L ˙ I = 0

˙ I = −R LI + 1 LVS

(1st-order system)

I – state, VS – input

slide-34
SLIDE 34

Example 2: RL Circuit

I VS VR VL + − + − + −

−VS + VR + VL = 0

Kirchhoff’s voltage law

VR = RI

Ohm’s law

VL = L ˙ I

Faraday’s law

−VS + RI + L ˙ I = 0

˙ I = −R LI + 1 LVS

(1st-order system)

I – state, VS – input Q: How should we change the circuit in order to implement a 2nd-order system?

slide-35
SLIDE 35

Example 2: RL Circuit

I VS VR VL + − + − + −

−VS + VR + VL = 0

Kirchhoff’s voltage law

VR = RI

Ohm’s law

VL = L ˙ I

Faraday’s law

−VS + RI + L ˙ I = 0

˙ I = −R LI + 1 LVS

(1st-order system)

I – state, VS – input Q: How should we change the circuit in order to implement a 2nd-order system? A: Add a capacitor.

slide-36
SLIDE 36

Example 3: Pendulum

` mg mg sin θ θ θ Te

external torque

slide-37
SLIDE 37

Example 3: Pendulum

` mg mg sin θ θ θ Te

external torque

Newton’s 2nd law (rotational motion):

slide-38
SLIDE 38

Example 3: Pendulum

` mg mg sin θ θ θ Te

external torque

Newton’s 2nd law (rotational motion): T

  • total

torque

= J

  • moment
  • f inertia

α

  • angular

acceleration

slide-39
SLIDE 39

Example 3: Pendulum

` mg mg sin θ θ θ Te

external torque

Newton’s 2nd law (rotational motion): T

  • total

torque

= J

  • moment
  • f inertia

α

  • angular

acceleration

= pendulum torque + external torque

slide-40
SLIDE 40

Example 3: Pendulum

` mg mg sin θ θ θ Te

external torque

Newton’s 2nd law (rotational motion): T

  • total

torque

= J

  • moment
  • f inertia

α

  • angular

acceleration

= pendulum torque + external torque pendulum torque = −mg sin θ

  • force

· ℓ

  • lever arm
slide-41
SLIDE 41

Example 3: Pendulum

` mg mg sin θ θ θ Te

external torque

Newton’s 2nd law (rotational motion): T

  • total

torque

= J

  • moment
  • f inertia

α

  • angular

acceleration

= pendulum torque + external torque pendulum torque = −mg sin θ

  • force

· ℓ

  • lever arm

moment of inertia J = mℓ2

slide-42
SLIDE 42

Example 3: Pendulum

` mg mg sin θ θ θ Te

external torque

Newton’s 2nd law (rotational motion): T

  • total

torque

= J

  • moment
  • f inertia

α

  • angular

acceleration

= pendulum torque + external torque pendulum torque = −mg sin θ

  • force

· ℓ

  • lever arm

moment of inertia J = mℓ2 −mgℓ sin θ + Te = mℓ2¨ θ

slide-43
SLIDE 43

Example 3: Pendulum

` mg mg sin θ θ θ Te

external torque

Newton’s 2nd law (rotational motion): T

  • total

torque

= J

  • moment
  • f inertia

α

  • angular

acceleration

= pendulum torque + external torque pendulum torque = −mg sin θ

  • force

· ℓ

  • lever arm

moment of inertia J = mℓ2 −mgℓ sin θ + Te = mℓ2¨ θ

¨ θ = −g ℓ sin θ + 1 mℓ2Te

(nonlinear equation)

slide-44
SLIDE 44

Example 3: Pendulum ¨ θ = −g ℓ sin θ + 1 mℓ2Te

(nonlinear equation)

slide-45
SLIDE 45

Example 3: Pendulum ¨ θ = −g ℓ sin θ + 1 mℓ2Te

(nonlinear equation)

For small θ, use the approximation sin θ ≈ θ

slide-46
SLIDE 46

Example 3: Pendulum ¨ θ = −g ℓ sin θ + 1 mℓ2Te

(nonlinear equation)

For small θ, use the approximation sin θ ≈ θ

sinΘ Θ

3 2 1 1 2 3 3 2 1 1 2 3

¨ θ = −g ℓ θ + 1 mℓ2 Te

slide-47
SLIDE 47

Example 3: Pendulum ¨ θ = −g ℓ sin θ + 1 mℓ2Te

(nonlinear equation)

For small θ, use the approximation sin θ ≈ θ

sinΘ Θ

3 2 1 1 2 3 3 2 1 1 2 3

¨ θ = −g ℓ θ + 1 mℓ2 Te State-space form: θ1 = θ, θ2 = ˙ θ ˙ θ2 = −g ℓ θ + 1 mℓ2 Te = −g ℓ θ1 + 1 mℓ2 Te

slide-48
SLIDE 48

Example 3: Pendulum ¨ θ = −g ℓ sin θ + 1 mℓ2Te

(nonlinear equation)

For small θ, use the approximation sin θ ≈ θ

sinΘ Θ

3 2 1 1 2 3 3 2 1 1 2 3

¨ θ = −g ℓ θ + 1 mℓ2 Te State-space form: θ1 = θ, θ2 = ˙ θ ˙ θ2 = −g ℓ θ + 1 mℓ2 Te = −g ℓ θ1 + 1 mℓ2 Te

˙ θ1 ˙ θ2

  • =

1 −g

θ1 θ2

  • +

1 mℓ2

  • Te
slide-49
SLIDE 49

Linearization

Taylor series expansion: f(x) = f(x0) + f′(x0)(x − x0) + 1 2f′′(x0)(x − x0)2 + . . . ≈ f(x0) + f′(x0)(x − x0)

linear approximation around x = x0

slide-50
SLIDE 50

Linearization

Taylor series expansion: f(x) = f(x0) + f′(x0)(x − x0) + 1 2f′′(x0)(x − x0)2 + . . . ≈ f(x0) + f′(x0)(x − x0)

linear approximation around x = x0

Control systems are generally nonlinear: ˙ x = f(x, u)

nonlinear state-space model

x =    x1 . . . xn    u =    u1 . . . um    f =    f1 . . . fn   

slide-51
SLIDE 51

Linearization

Taylor series expansion: f(x) = f(x0) + f′(x0)(x − x0) + 1 2f′′(x0)(x − x0)2 + . . . ≈ f(x0) + f′(x0)(x − x0)

linear approximation around x = x0

Control systems are generally nonlinear: ˙ x = f(x, u)

nonlinear state-space model

x =    x1 . . . xn    u =    u1 . . . um    f =    f1 . . . fn    Assume x = 0, u = 0 is an equilibrium point: f(0, 0) = 0 This means that, when the system is at rest and no control is applied, the system does not move.

slide-52
SLIDE 52

Linearization

Linear approx. around (x, u) = (0, 0) to all components of f: ˙ x1 = f1(x, u), . . . , ˙ xn = fn(x, u)

slide-53
SLIDE 53

Linearization

Linear approx. around (x, u) = (0, 0) to all components of f: ˙ x1 = f1(x, u), . . . , ˙ xn = fn(x, u) For each i = 1, . . . , n, fi(x, u) = fi(0, 0)

=0

+ ∂fi ∂x1 (0, 0)x1 + . . . + ∂fi ∂xn (0, 0)xn + ∂fi ∂u1 (0, 0)u1 + . . . + ∂fi ∂um (0, 0)um

slide-54
SLIDE 54

Linearization

Linear approx. around (x, u) = (0, 0) to all components of f: ˙ x1 = f1(x, u), . . . , ˙ xn = fn(x, u) For each i = 1, . . . , n, fi(x, u) = fi(0, 0)

=0

+ ∂fi ∂x1 (0, 0)x1 + . . . + ∂fi ∂xn (0, 0)xn + ∂fi ∂u1 (0, 0)u1 + . . . + ∂fi ∂um (0, 0)um Linearized state-space model:

˙ x = Ax + Bu,

where Aij = ∂fi ∂xj

  • x=0

u=0

, Bik = ∂fi ∂uk

  • x=0

u=0

slide-55
SLIDE 55

Linearization

Linear approx. around (x, u) = (0, 0) to all components of f: ˙ x1 = f1(x, u), . . . , ˙ xn = fn(x, u) For each i = 1, . . . , n, fi(x, u) = fi(0, 0)

=0

+ ∂fi ∂x1 (0, 0)x1 + . . . + ∂fi ∂xn (0, 0)xn + ∂fi ∂u1 (0, 0)u1 + . . . + ∂fi ∂um (0, 0)um Linearized state-space model:

˙ x = Ax + Bu,

where Aij = ∂fi ∂xj

  • x=0

u=0

, Bik = ∂fi ∂uk

  • x=0

u=0

Important: since we have ignored the higher-order terms, this linear system is only an approximation that holds only for small deviations from equilibrium.

slide-56
SLIDE 56

Example 3: Pendulum, Revisited

Original nonlinear state-space model: ˙ θ1 = f1(θ1, θ2, Te) = θ2

— already linear

˙ θ2 = f2(θ1, θ2, Te) = −g ℓ sin θ1 + 1 mℓ2 Te

slide-57
SLIDE 57

Example 3: Pendulum, Revisited

Original nonlinear state-space model: ˙ θ1 = f1(θ1, θ2, Te) = θ2

— already linear

˙ θ2 = f2(θ1, θ2, Te) = −g ℓ sin θ1 + 1 mℓ2 Te Linear approx. of f2 around equilibrium (θ1, θ2, Te) = (0, 0, 0): ∂f2 ∂θ1 = −g ℓ cos θ1 ∂f2 ∂θ2 = 0 ∂f2 ∂Te = 1 mℓ2 ∂f2 ∂θ1

  • = −g

ℓ ∂f2 ∂θ2

  • = 0

∂f2 ∂Te

  • =

1 mℓ2

slide-58
SLIDE 58

Example 3: Pendulum, Revisited

Original nonlinear state-space model: ˙ θ1 = f1(θ1, θ2, Te) = θ2

— already linear

˙ θ2 = f2(θ1, θ2, Te) = −g ℓ sin θ1 + 1 mℓ2 Te Linear approx. of f2 around equilibrium (θ1, θ2, Te) = (0, 0, 0): ∂f2 ∂θ1 = −g ℓ cos θ1 ∂f2 ∂θ2 = 0 ∂f2 ∂Te = 1 mℓ2 ∂f2 ∂θ1

  • = −g

ℓ ∂f2 ∂θ2

  • = 0

∂f2 ∂Te

  • =

1 mℓ2 Linearized state-space model of the pendulum:

˙ θ1 = θ2 ˙ θ2 = −g ℓθ1 + 1 mℓ2Te

valid for small deviations from equ.

slide-59
SLIDE 59

General Linearization Procedure

◮ Start from nonlinear state-space model

˙ x = f(x, u)

slide-60
SLIDE 60

General Linearization Procedure

◮ Start from nonlinear state-space model

˙ x = f(x, u)

◮ Find equilibrium point (x0, u0) such that f(x0, u0) = 0

slide-61
SLIDE 61

General Linearization Procedure

◮ Start from nonlinear state-space model

˙ x = f(x, u)

◮ Find equilibrium point (x0, u0) such that f(x0, u0) = 0

Note: different systems may have different equilibria, not necessarily (0, 0), so we need to shift variables: x = x − x0 u = u − u0 f(x, u) = f(x + x0, u + u0) = f(x, u)

slide-62
SLIDE 62

General Linearization Procedure

◮ Start from nonlinear state-space model

˙ x = f(x, u)

◮ Find equilibrium point (x0, u0) such that f(x0, u0) = 0

Note: different systems may have different equilibria, not necessarily (0, 0), so we need to shift variables: x = x − x0 u = u − u0 f(x, u) = f(x + x0, u + u0) = f(x, u) Note that the transformation is invertible: x = x + x0, u = u + u0

slide-63
SLIDE 63

General Linearization Procedure

slide-64
SLIDE 64

General Linearization Procedure

◮ Pass to shifted variables x = x − x0, u = u − u0

˙ x = ˙ x

(x0 does not depend on t)

= f(x, u) = f(x, u) — equivalent to original system

slide-65
SLIDE 65

General Linearization Procedure

◮ Pass to shifted variables x = x − x0, u = u − u0

˙ x = ˙ x

(x0 does not depend on t)

= f(x, u) = f(x, u) — equivalent to original system

◮ The transformed system is in equilibrium at (0, 0):

f(0, 0) = f(x0, u0) = 0

slide-66
SLIDE 66

General Linearization Procedure

◮ Pass to shifted variables x = x − x0, u = u − u0

˙ x = ˙ x

(x0 does not depend on t)

= f(x, u) = f(x, u) — equivalent to original system

◮ The transformed system is in equilibrium at (0, 0):

f(0, 0) = f(x0, u0) = 0

◮ Now linearize:

˙ x = Ax + Bu,

where Aij = ∂fi ∂xj

  • x=x0

u=u0

, Bik = ∂fi ∂uk

  • x=x0

u=u0

slide-67
SLIDE 67

General Linearization Procedure

◮ Why do we require that f(x0, u0) = 0 in equilibrium?

slide-68
SLIDE 68

General Linearization Procedure

◮ Why do we require that f(x0, u0) = 0 in equilibrium? ◮ This requires some thought. Indeed, we may talk about

a linear approximation of any smooth function f at any point x0: f(x) ≈ f(x0)+f ′(x0)(x−x0)

— f(x0) does not have to be 0

slide-69
SLIDE 69

General Linearization Procedure

◮ Why do we require that f(x0, u0) = 0 in equilibrium? ◮ This requires some thought. Indeed, we may talk about

a linear approximation of any smooth function f at any point x0: f(x) ≈ f(x0)+f ′(x0)(x−x0)

— f(x0) does not have to be 0

◮ The key is that we want to approximate a given

nonlinear system ˙ x = f(x, u) by a linear system ˙ x = Ax + Bu (may have to shift coordinates: x → x − x0, u → u − u0)

slide-70
SLIDE 70

General Linearization Procedure

◮ Why do we require that f(x0, u0) = 0 in equilibrium? ◮ This requires some thought. Indeed, we may talk about

a linear approximation of any smooth function f at any point x0: f(x) ≈ f(x0)+f ′(x0)(x−x0)

— f(x0) does not have to be 0

◮ The key is that we want to approximate a given

nonlinear system ˙ x = f(x, u) by a linear system ˙ x = Ax + Bu (may have to shift coordinates: x → x − x0, u → u − u0) Any linear system must have an equilibrium point at (x, u) = (0, 0): f(x, u) = Ax + Bu f(0, 0) = A0 + B0 = 0.