You are on page 1of 68

國慶 Edition

ME307
Fundamentals of Control Engineering
控制工程基础
Lecture 06: State-Space Modeling
Fall 2020

U Kei Cheang

Department of Mechanical and Energy Engineering


Southern University of Science and Technology
Course Schedule
Academic Calendar for 2020 Fall Semesters
2020 Week Mon Tue Wed Thu Fri Sat Sun National Holidays* Events Dates for UG Students Dates for PG Students
31 1 2 3 4 5 6 Oct 1st: National Day and Mid- • Sep 7th: Convocation • Sep 7th: First Day of Fall Semester • Sep 7th: First Day of Fall Semester
Summer Break Autumn Festival Oct 1st- 8th) • Sep 12th: Teachers' Day Awards (no classes in the morning for 2020 (no classes in the morning)
Ceremony UG students) • Aug-Sep: Postgraduate Exam-free
Fall Semester 7 8 9 10 11 12 13 • Sep 18th: Meeting on Graduate • Sep 12th: Make-up Class Morning Recommendations
Week 1 Education for 2020 UG Students' Classes on Sep • Sep 12th: Make-up Class Morning
• Sep 27th: Meeting on 7th for 2020 PG Students' Classes on Sep
Fall Semester 14 15 16 17 18 19 20 Undergraduate Education • Sep 7th-25th: Advising Week and 7th
September
Week 2 Course Confirmation (3 weeks) • Sep 19th: CET-4 & CET-6 Exam
21 22 23 24 25 26 27 • Sep 19th: CET-4 & CET-6 Exam • Sep 27th: Workday, no classes
Fall Semester • Sep 27th: Work day, no classes scheduled
Week 3 scheduled • Sep 28th-30th: Week 4 Classes
28 29 30 1 2 3 4 • Sep 28th-30th: Week 4 classes scheduled
National Holiday scheduled

Fall Semester 5 6 7 8 9 10 11 • Early Oct: Discipline Education • Oct 10th: Make-up classes for • Oct: SUSTech Master Programs
Month Week 4 Thursday Application
Week 4
• Late Oct: Meeting on Student • Sep-Oct: SUSTech PhD Programs
Fall Semester 12 13 14 15 16 17 18 Admission Application
Week 5 • Oct 10th: Make-up classes for Week
October 4 Thursday
Fall Semester 19 20 21 22 23 24 25
Week 6
Fall Semester 26 27 28 29 30 31 1
Week 7
Fall Semester 2 3 4 5 6 7 8 • Nov 6th-7th: Meeting on Research •Nov 2nd-13th: Mid-term Exam • Nov 13th: SUSTech Sports Meeting
Midterm • Nov 13th: The 6th SUSTech •Nov 13th: SUSTech Sports Meeting (no classes)
Week 8 Mid
Autumn Sports Meeting (no classes) • Nov-Dec: Second Interview of PhD
Fall Semester 9 10 11 12 13 14 15 Programs Admission
Week 9 Mid
November
Fall Semester 16 17 18 19 20 21 22
Week 10
Fall Semester 23 24 25 26 27 28 29
Week 11
Fall Semester 30 1 2 3 4 5 6 • Dec 21st: Academic Degree • Dec 12th: CET-4 & CET-6 Exam • Dec 12th: CET-4 & CET-6 Exam
Evaluation Committee Meeting • Dec 21st-Jan 6th: Spring Semester • Late Dec: Unified National Graduate
Week 12
• Dec 20th: SUSTech Anniversary Course Selection Entrance Examination
Fall Semester 7 8 9 10 11 12 13 Ceremony • Dec 28th-Jan 8th:Final Exam for UG • Dec 28th-Jan 8th: Final Exam for PG
Week 13 • Dec 31st: New Year Party Students (no classes) Students (no classes)

Fall Semester 14 15 16 17 18 19 20
December
Week 14
Fall Semester 21 22 23 24 25 26 27
Week 15 Optional
Fall Semester 28 29 30 31 1 2 3
Week 16 Finals
Fall Semester 4 5 6 7 8 9 10 • Jan 11th-Feb 19th: Advising Week • Nov 2020-Mar 2021: Collaborative
and Course Confirmation for Spring PhD Programs Application
Week 17 Finals
Semester • Dec 2020-Jan 2021: SUSTech PhD
Spring Semester 11 12 13 14 15 16 17 • Jan 23th-31st: Military Training for Application
Week 1 2020 UG Students • Dec 2020-Feb 2021: SUSTech PhD
2021
Application (International Students)
January Spring Semester 18 19 20 21 22 23 24
Week 2
Military Training 25 26 27 28 29 30 31
Week
*(Pending for release by the General Office of the State Council)
2
Recap from last week
Discussed linearity and linearization

Linear Nonlinear

1) Linear equations involve the dependent variable


and its derivatives to the first power.

2) The unknown does not appear inside


transcendental functions (such as sin and ln), or
in a denominator, or squared, cubed, etc.

3) Only pure functions of the independent variable


(i.e. a(x) and b(x)) in front of dependent
variable (i.e. y) and it’s derivatives.

3
Recap from last week
Introduced state-space modeling

System Analysis

Transfer Function State-Space

State-space model consists of the states equation and the output equation.
𝐱ሶ = 𝐀𝐱 + 𝐁𝑢
𝑦 = 𝐂𝐱 + 𝐷𝑢

input output
State
B C
A
4
State-Space Modeling
Example: Represent the translational mechanical system in state space, where x3(t) is the output

1) Equations of motion by inspection.

General form: ? 𝑠 2 +? 𝑠+? 𝑋1 𝑠 + ? 𝑠 2 +? 𝑠+? 𝑋2 𝑠 + ? 𝑠 2 +? 𝑠+? 𝑋3 𝑠 = ?

M1: 𝑠 2 + 𝑠 + 1 𝑋1 𝑠 + 0𝑠 2 − 𝑠 + 0 𝑋2 𝑠 + 0𝑠 2 + 0𝑠 + 0 𝑋3 𝑠 = 𝐹(𝑠)

M2: 0𝑠 2 − 𝑠 + 0 𝑋1 𝑠 + 𝑠 2 + 𝑠 + 1 𝑋2 𝑠 + 0𝑠 2 + 0𝑠 − 1 𝑋3 𝑠 = 0

M3: 0𝑠 2 + 0𝑠 + 0 𝑋1 𝑠 + 0𝑠 2 + 0𝑠 − 1 𝑋2 𝑠 + 𝑠 2 + 𝑠 + 1 𝑋3 𝑠 = 0

Reverse Laplace

𝑠 2 + 𝑠 + 1 𝑋1 𝑠 − 𝑠𝑋2 𝑠 = 𝐹 𝑠 → 𝑥ሷ 1 = −𝑥ሶ 1 − 𝑥1 + 𝑥ሶ 2 + 𝑓

−𝑠𝑋1 𝑠 + 𝑠 2 + 𝑠 + 1 𝑋2 𝑠 − 𝑋3 𝑠 = 0 → 𝑥ሷ 2 = 𝑥ሶ 1 − 𝑥ሶ 2 − 𝑥2 + 𝑥3

−𝑋2 𝑠 + 𝑠 2 + 𝑠 + 1 𝑋3 𝑠 = 0 → 𝑥ሷ 3 = −𝑥ሶ 3 − 𝑥3 + 𝑥2

5
State-Space Modeling
2) Select the state variables. From the equations, you can see that 𝑥1 , 𝑥1ሶ , 𝑥1ሷ , 𝑥2 , 𝑥2ሶ , 𝑥2ሷ , 𝑥3 , 𝑥3ሶ , 𝑥3ሷ need to be
represented in the state-space model. Follow this rule, convert dependent variable and its derivatives into state
variables EXCEPT for the highest derivatives.

𝑥1 → 𝑥1 = 𝑥1

𝑥1ሶ → 𝑥2 = 𝑥1ሶ

𝑥2 → 𝑥3 = 𝑥2

𝑥2ሶ → 𝑥4 = 𝑥2ሶ

𝑥3 → 𝑥5 = 𝑥3

𝑥3ሶ → 𝑥6 = 𝑥3ሶ

3) Use original equations to define the dynamics of the system. Just “dot” of the states to obtain the variables.

𝑥1 = 𝑥1 → 𝑥1ሶ = 𝑥1ሶ = 𝑥2

𝑥2 = 𝑥1ሶ → 𝑥2ሶ = 𝑥1ሷ

𝑥3 = 𝑥2 → 𝑥3ሶ = 𝑥2ሶ = 𝑥4

𝑥4 = 𝑥2ሶ → 𝑥4ሶ = 𝑥2ሷ

𝑥5 = 𝑥3 → 𝑥5ሶ = 𝑥3ሶ = 𝑥6

𝑥6 = 𝑥3ሶ → 𝑥6ሶ = 𝑥3ሷ

6
State-Space Modeling
4) Substitute the states and the dynamics into the differential equations. If there is a conflict, use the states
𝑥1 = 𝑥1 → 𝑥1ሶ = 𝑥1ሶ = 𝑥2
𝑥2 = 𝑥1ሶ → 𝑥2ሶ = 𝑥1ሷ
𝑥3 = 𝑥2 → 𝑥3ሶ = 𝑥2ሶ = 𝑥4
𝑥4 = 𝑥2ሶ → 𝑥4ሶ = 𝑥2ሷ
𝑥5 = 𝑥3 → 𝑥5ሶ = 𝑥3ሶ = 𝑥6
𝑥6 = 𝑥3ሶ → 𝑥6ሶ = 𝑥3ሷ
𝑥ሷ 1 = −𝑥ሶ 1 − 𝑥1 + 𝑥ሶ 2 + 𝑓 → 𝑥2ሶ = −𝑥2 − 𝑥1 + 𝑥4 + 𝑓
𝑥ሷ 2 = 𝑥ሶ 1 − 𝑥ሶ 2 − 𝑥2 + 𝑥3 → 𝑥4ሶ = 𝑥2 − 𝑥4 − 𝑥3 + 𝑥5
𝑥ሷ 3 = −𝑥ሶ 3 − 𝑥3 + 𝑥2 → 𝑥6ሶ = −𝑥6 − 𝑥5 + 𝑥3
5) Define the dynamics as a function of the states
𝑥1ሶ = 𝑥2
𝑥2ሶ = −𝑥2 − 𝑥1 + 𝑥4 + 𝑓
𝑥3ሶ = 𝑥4
𝑥4ሶ = 𝑥2 − 𝑥4 − 𝑥3 + 𝑥5
𝑥5ሶ = 𝑥6
𝑥6ሶ = −𝑥6 − 𝑥5 + 𝑥3
There 6 equations are the states equations. So what we’ve done is take the 3 original 2nd order differential equations
and change them into 6 first order differential equations
7
State-Space Modeling
6) Expand out the dynamics to include all of the states (optional step)

𝑥1ሶ = 𝑥1ሶ = 𝑥2 → 𝑥1ሶ = 0𝑥1 + 𝑥2 + 0𝑥3 + 0𝑥4 + 0𝑥5 + 0𝑥6 + 0𝑓 𝑡

𝑥2ሶ = −𝑥2 − 𝑥1 + 𝑥4 + 𝑓 → 𝑥2ሶ = −𝑥1 − 𝑥2 + 0𝑥3 + 𝑥4 + 0𝑥5 + 0𝑥6 + 𝑓 𝑡

𝑥3ሶ = 𝑥2ሶ = 𝑥4 → 𝑥3ሶ = 0𝑥1 + 0𝑥2 + 0𝑥3 + 𝑥4 + 0𝑥5 + 0𝑥6 + 0𝑓 𝑡

𝑥4ሶ = 𝑥2 − 𝑥4 − 𝑥3 + 𝑥5 → 𝑥4ሶ = 0𝑥1 + 𝑥2 − 𝑥3 − 𝑥4 + 𝑥5 + 0𝑥6 + 0𝑓 𝑡

𝑥5ሶ = 𝑥6 → 𝑥5ሶ = 0𝑥1 + 0𝑥2 + 0𝑥3 + 0𝑥4 + 0𝑥5 + 𝑥6 + 0𝑓 𝑡

𝑥6ሶ = −𝑥6 − 𝑥5 + 𝑥3 → 𝑥6ሶ = 0𝑥1 + 0𝑥2 + 𝑥3 + 0𝑥4 − 𝑥5 − 1𝑥6 + 0𝑓 𝑡

7) Now write this in matrix form

𝐱ሶ = 𝐀𝐱 + 𝐁𝑢
𝑥1ሶ 0 1 0 0 0 0 𝑥1 0
𝑥2ሶ −1 −1 0 1 0 0 𝑥2 1
𝑥3ሶ 0 0 0 1 0 0 𝑥3 0
= 𝑥4 + 0 𝑓(𝑡)
𝑥4ሶ 0 1 −1 −1 1 0
𝑥5ሶ 0 0 0 0 0 0 𝑥5 0
𝑥6ሶ 0 0 1 0 −1 −1 𝑥6 0

8
State-Space Modeling
8) Finally express the state-space model for the output x3(t)
Output is represented by y
𝑦 = 𝐂𝐱 + 𝐃𝑢
where y can relate to the states as such
𝑦 = 𝑥3 (𝑡) = 𝑥5
Expand this out
𝑦 = 0𝑥1 + 0𝑥2 + 0𝑥3 + 0𝑥4 + 𝑥5 + 0𝑥6 + 0𝑓(𝑡)
Express as matrix
𝑥1
𝑥2
𝑥3
𝑦= 0 0 0 0 1 0 𝑥 + 0 𝑓(𝑡)
4
𝑥5
𝑥6
If you want to use x4 as the output, the model can be written as
𝑥1
𝑥2
𝑥3
𝑦= 0 0 0 1 0 0 𝑥
4
𝑥5
𝑥6
9
State-Space Modeling
Example: Represent the rotational mechanical system in state space, where θ1(t) is the output.

Try this yourselves!


5 minutes!

𝑥1ሶ 0 1 0 0 𝑥1 0 𝑥1
𝑥2ሶ −0.18 0 0.18 0 𝑥2 1 𝑥2
a) 𝑥3ሶ
= 𝑥3 + 0 0.006𝑇 𝑦 = 3.33 0 0 0 𝑥
0 0 0 1 3
𝑥4ሶ 1 0 −1 −1 𝑥4 0 𝑥4
𝑥1ሶ 0 1 0 0 𝑥1 0 𝑥1
𝑥2ሶ −1 0 1 0 𝑥2 0 𝑥2
b) = 𝑥3 + 1 0.003𝑇 𝑦 = 0 3.33 0 0 𝑥
𝑥3ሶ 0 0 0 1 3
𝑥4ሶ 0.18 0 −0.18 −1 𝑥4 0 𝑥4
𝑥1ሶ 0 1 0 0 𝑥1 1 𝑥1
𝑥2ሶ −0.18 0 1 0 𝑥2 0 𝑥2
c) = 𝑥3 + 0 0.001𝑇 𝑦 = 0 0 3.33 0 𝑥
𝑥3ሶ 0 0 0 1 3
𝑥4ሶ 0.18 0 −1 −1 𝑥4 0 𝑥4
𝑥1ሶ 0 1 0 0 𝑥1 0 𝑥1
𝑥2ሶ −1 0 1 0 𝑥2 0 𝑥2
d) = 𝑥3 + 0 0.009𝑇 𝑦 = 0 0 0 3.33 𝑥
𝑥3ሶ 0 0 0 0.18 3
𝑥4ሶ 1 0 −1 −0.18 𝑥4 1 𝑥4

10
State-Space Modeling
Example: Represent the rotational mechanical system in state space, where θ1(t) is the output.

1) Find equivalence system using gear ratio

𝜃2 𝑁1 100
= → 𝜃1 = 𝜃2 → 𝜃1 = 3.33𝜃2
𝜃1 𝑁2 30

2 2
𝑁1 100 100 100
𝐽𝑒 = 𝐽1 = 50 = 555.56 𝑇𝑒 = 𝑇 =𝑇 = 3.33𝑇
𝑁2 30 30 30
11
State-Space Modeling
Example: Represent the rotational mechanical system in state space, where θ1(t) is the output.

2) Find equation of motion by inspection

General form: ? 𝑠 2 +? 𝑠+? 𝜃1 𝑠 + ? 𝑠 2 +? 𝑠+? 𝜃2 𝑠 = ?

J1: 555.56𝑠 2 + 0𝑠 + 100 𝜃2 𝑠 + 0𝑠 2 + 0𝑠 − 100 𝜃3 𝑠 = 3.33𝑇(𝑠)

J2: 0𝑠 2 + 0𝑠 − 100 𝜃2 𝑠 + 100𝑠 2 + 100𝑠 + 100 𝜃3 𝑠 = 0

rearrange

555.56𝑠 2 + 100 𝜃2 𝑠 − 100𝜃3 𝑠 = 3.33𝑇(𝑠)

−100𝜃2 𝑠 + 100𝑠 2 + 100𝑠 + 100 𝜃3 𝑠 = 0

12
State-Space Modeling
Take the inverse Laplace transform

555.56𝑠 2 + 100 𝜃2 𝑠 − 100𝜃3 𝑠 = 3.33𝑇 𝑠 → 𝜃2ሷ + 0.18𝜃2ሶ − 0.8𝜃3 = 0.006𝑇

−100𝜃2 𝑠 + 100𝑠 2 + 100𝑠 + 100 𝜃3 𝑠 = 0 → −𝜃2 + 𝜃3ሷ + 𝜃3ሶ + 𝜃3 = 0

2) Select the state variables. From the equations, you can see that 𝜃2 , 𝜃2ሶ , 𝜃2ሷ , 𝜃3 , 𝜃3ሶ , 𝜃3ሷ need to be represented in the
state-space model. Follow this rule, convert dependent variable and its derivatives into state variables EXCEPT for
the highest derivatives. In this case 𝜃2 , 𝜃2ሶ , 𝜃3 needs to be converted to state variables. We will also include 𝜃2ሶ
because we know that we need to use 𝜃2ሶ to get to 𝜃2ሷ eventually.
𝜃2 → 𝑥1 = 𝜃2

𝜃2ሶ → 𝑥2 = 𝜃2ሶ
𝜃3 → 𝑥3 = 𝜃3

𝜃3ሶ → 𝑥4 = 𝜃3ሶ
3) Use original equations to define the dynamics of the system. Just “dot” of the states to obtain the variables.

𝑥1 = 𝜃2 → 𝑥1ሶ = 𝜃2ሶ

𝑥2 = 𝜃2ሶ → 𝑥2ሶ = 𝜃2ሷ

𝑥3 = 𝜃3 → 𝑥3ሶ = 𝜃3ሶ

𝑥4 = 𝜃3ሶ → 𝑥4ሶ = 𝜃3ሷ

13
State-Space Modeling
4) Substitute the states and the dynamics into the differential equations. If there is a conflict, use the states

𝑥1 = 𝜃2 → 𝑥1ሶ = 𝜃2ሶ

𝑥2 = 𝜃2ሶ → 𝑥2ሶ = 𝜃2ሷ

𝑥3 = 𝜃3 → 𝑥3ሶ = 𝜃3ሶ

𝑥4 = 𝜃3ሶ → 𝑥4ሶ = 𝜃3ሷ

𝜃2ሷ + 0.18𝜃2 − 0.18𝜃3 = 0.006𝑇 → 𝑥2ሶ + 0.18𝑥1 − 0.18𝑥3 = 0.006𝑇

−𝜃2 + 𝜃3ሷ + 𝜃3ሶ + 𝜃3 = 0 → −𝑥1 + 𝑥4ሶ + 𝑥4 + 𝑥3 = 0

5) Define the dynamics as a function of the states

𝑥1ሶ = 𝜃2ሶ → 𝑥1ሶ = 𝑥2

𝑀1 𝑥2ሶ + 𝐷𝑥2 + 𝐾𝑥1 − 𝐾𝑥3 = 0 → 𝑥2ሶ = −0.18𝑥1 + 0.18𝑥3 + 0.006𝑇

𝑥3ሶ = 𝜃3ሶ → 𝑥3ሶ = 𝑥4

−𝐾𝑥1 + 𝑀2 𝑥4ሶ + 𝐾𝑥3 = 𝑓 𝑡 → 𝑥4ሶ = 𝑥1 − 𝑥3 − 𝑥4

These 4 equations are the states equations. So what we’ve done is take the 2 original 2nd order differential equations
and change them into 4 first order differential equations

14
State-Space Modeling
6) Expand out the dynamics to include all of the states (optional step)

𝑥1ሶ = 𝑥2 → 𝑥1ሶ = 0𝑥1 + 𝑥2 + 0𝑥3 + 0𝑥4 + 0(0.006𝑇)

𝑥2ሶ = −0.18𝑥1 + 0.18𝑥3 + 0.006𝑇 → 𝑥2ሶ = −0.18𝑥1 + 0𝑥2 + 0.18𝑥3 + 0𝑥4 + 0.006𝑇

𝑥3ሶ = 𝑥4 → 𝑥3ሶ = 0𝑥1 + 0𝑥2 + 0𝑥3 + 𝑥4 + 0(0.006𝑇)

𝑥4ሶ = 𝑥1 − 𝑥3 − 𝑥4 → 𝑥4ሶ = 𝑥1 + 0𝑥2 − 𝑥3 − 𝑥4 + 0(0.006𝑇)

7) Now write this in matrix form

𝐱ሶ = 𝐀𝐱 + 𝐁𝑢
𝑥1ሶ 0 1 0 0 𝑥1 0
𝑥2ሶ −0.18 0 0.18 0 𝑥2 1
= 𝑥3 + 0.006𝑇
𝑥3ሶ 0 0 0 1 0
𝑥4ሶ 1 0 −1 −1 𝑥4 0

15
State-Space Modeling
8) Finally express the state-space model for the output θ1(t)

Output is represented by y

𝑦 = 𝐂𝐱 + 𝐃𝑢

where y can relate to the states as such

𝑁2
𝑦 = θ1(t) = 𝜃2 3.33𝜃2 = 𝑥1
𝑁1

Expand this out

𝑦 = 3.33𝑥1 + 0𝑥2 + 0𝑥3 + 0𝑥4 + 0(0.006𝑇)

Express as matrix

𝑥1
𝑥2
𝑦 = 3.33 0 0 0 𝑥
3
𝑥4

Why is this 3.33 instead of 1?

16
State-Space Modeling
8) Finally express the state-space model for the output θ1(t)

Output is represented by y

𝑦 = 𝐂𝐱 + 𝐃𝑢

where y can relate to the states as such

𝑁2
𝑦 = θ1(t) = 𝜃2 = 3.33𝜃2 = 3.33𝑥1
𝑁1

Expand this out

𝑦 = 3.33𝑥1 + 0𝑥2 + 0𝑥3 + 0𝑥4 + 0(0.006𝑇)

Express as matrix

𝑥1
𝑥2
𝑦 = 3.33 0 0 0 𝑥
3
𝑥4

Why is this 3.33 instead of 1?

17
Modeling

Differential
Equation

Transfer State-
Function Space

18
State-Space to Transfer Function
We’ve discussed both transfer functions and state-space models. Now we can find out how to go
from one to the other. First, from state-space to transfer function.

System Analysis

Transfer Function State-Space


𝑌 𝑠 𝐱ሶ = 𝐀𝐱 + 𝐁𝑢
𝐺 𝑠 =
𝑈(𝑠) 𝑦 = 𝐂𝐱 + 𝐃𝑢
(1) Change state space model from time domain to frequency domain using Laplace
𝑠𝐗(𝑠) = 𝐀𝐗(𝑠) + 𝐁𝑈(𝑠)
𝑌(𝑠) = 𝐂𝐗(𝑠) + 𝐃𝑈(𝑠)
(2) Rearrange and combine the equations
−1
𝑠𝐗 𝑠 = 𝐀𝐗 𝑠 + 𝐁𝑈 𝑠 → 𝐗 𝑠 = 𝑠𝐼 − 𝐀 𝐁𝑈(𝑠)
−1
𝑌(𝑠) = 𝐶 𝑠𝐈 − 𝐀 𝐁𝑈(𝑠) + 𝐷𝑈(𝑠)
(3) Rearrange output equation Y(s) into transfer function form G(s) = Y(s)/U(s)
𝑌 𝑠 −1
= 𝐺 𝑠 = 𝐂 𝑠𝐈 − 𝐀 𝐁+𝐃
𝑈 𝑠
19
State-Space to Transfer Function
Example: Convert the state-space model to transfer function

B x

u(t) M
K

We already obtain the state-space model


𝑥1ሶ 0 1 𝑥1 0
= + 𝑢
𝑥2ሶ −𝑘/𝑚 −𝑏/𝑚 𝑥2 1/𝑚 1
𝑥1
𝑦= 1 0 𝑥 + 0 𝑢1
2

1) Identify the A, B, C, and D matrices


0 1 0
𝐀= 𝐁= 𝐂= 1 0 𝐃= 0
−𝑘/𝑚 −𝑏/𝑚 1/𝑚

20
State-Space to Transfer Function
2) Arrange A, B, C, and D matrix into the transfer function form

𝑌 𝑠 −1
𝐺 𝑠 = = 𝐂 𝑠𝐈 − 𝐀 𝐁+𝐃
𝑈 𝑠

−1
1 0 0 1 0
𝐺 𝑠 = 1 0 𝑠 − + 0
0 1 −𝑘/𝑚 −𝑏/𝑚 1/𝑚

−1
𝑠 0 0 1 0
𝐺 𝑠 = 1 0 − + 0
0 𝑠 −𝑘/𝑚 −𝑏/𝑚 1/𝑚

−1
𝑠 −1 0
𝐺 𝑠 = 1 0 𝑘/𝑚 𝑠 + 𝑏/𝑚 1/𝑚

3) Find the inverse of [sI ‒ A]‒1

1 𝑠 + 𝑏/𝑚 1 0
𝐺 𝑠 = 1 0
𝑠 𝑠 + 𝑏/𝑚 + 𝑘/𝑚 −𝑘/𝑚 𝑠 1/𝑚

http://www.mathwarehouse.com/algebra/matrix/inverse-of-a-matrix.php#answer
21
State-Space to Transfer Function
4) Simplify and rearrange to the transfer function form

1 𝑠 + 𝑏/𝑚 1 0
𝐺 𝑠 = 1 0
𝑠 𝑠 + 𝑏/𝑚 + 𝑘/𝑚 −𝑘/𝑚 𝑠 1/𝑚

1 1/𝑚
𝐺 𝑠 = 1 0
𝑏 𝑘 𝑠/𝑚
𝑠2 + 𝑠 +
𝑚 𝑚

1 1/𝑚
𝐺 𝑠 = 1 0
2 𝑏 𝑘 𝑠/𝑚
𝑠 + 𝑠+
𝑚 𝑚

1 1
𝐺 𝑠 = 0
𝑏 𝑘 𝑚
𝑠2 + 𝑠 +
𝑚 𝑚

1
𝐺 𝑠 =
𝑚𝑠 2 + 𝑏𝑠 + 𝑘

22
State-Space to Transfer Function
Recall from the first lecture, the same system was used…
Let’s find the transfer function for the spring-damper-mass system.
1) First get the equation of motion using previous method:
Force equal to mass times acceleration:
𝐹 𝑡 = 𝑚𝑎 = 𝑚𝑥(𝑡)

Identify individual forces of the total force.
The applied force
𝐹𝑎𝑝𝑝𝑙𝑖𝑒𝑑 𝑡 = 𝑓(𝑡)
The spring force with k
𝐹𝑠𝑝𝑟𝑖𝑛𝑔 (𝑡) = −𝑘𝑥 𝑡
The damping force, which is commonly considered as friction
𝐹𝑑𝑎𝑚𝑝𝑖𝑛𝑔 𝑡 = −𝑏𝑣 𝑡 = −𝑏𝑥ሶ 𝑡
Force balance can then be written as
𝐹𝑎𝑝𝑝𝑙𝑖𝑒𝑑 (𝑡) + 𝐹𝑠𝑝𝑟𝑖𝑛𝑔 𝑡 + 𝐹𝑑𝑎𝑚𝑝𝑖𝑛𝑔 (𝑡) = 𝐹(𝑡)
Replace the terms
𝑓(𝑡) − 𝑘𝑥 𝑡 − 𝑏𝑥ሶ 𝑡 = 𝑚𝑥(𝑡)

23
State-Space to Transfer Function
2) Derived a transfer function which describes the relationship between output and input.

𝑜𝑢𝑡𝑝𝑢𝑡 𝑉𝑜 𝑠
𝐺𝑝 𝑠 = =
𝑖𝑛𝑝𝑢𝑡 𝑉𝑖 (𝑠)

Applied force 𝑓(𝑡) is input and position x(t) is output.

𝑓(𝑡) − 𝑘𝑥 𝑡 − 𝑏𝑥ሶ 𝑡 = 𝑚𝑥(𝑡)


Change from the time domain to the frequency domain.

𝐹 𝑠 − 𝑘𝑋 𝑠 − 𝑏𝑠𝑋 𝑠 = 𝑚𝑠 2 𝑋(𝑠)

Rearrange

𝐹 𝑠 = 𝑘𝑋 𝑠 + 𝑏𝑠𝑋 𝑠 + 𝑚𝑠 2 𝑋(𝑠) = (𝑘 + 𝑏𝑠 + 𝑚𝑠 2 )𝑋(𝑠)

Rewrite in terms of input and output to derive the transfer function


Same transfer function as
𝑋 𝑠 1
𝐺𝑝 𝑠 = = the one converted from the
𝐹 𝑠 𝑚𝑠 2 + 𝑏𝑠 + 𝑘 state-space model

24
State-Space to Transfer Function
Example: Find the transfer function, T(s) = Y(s)/U(s), where U(s) is the input and Y(s) is the output.

0 1 0 10
𝐱ሶ = 0 0 1 𝐱+ 0 𝑢
−1 −2 −3 0

𝑦= 1 0 0𝐱

1) Identify the A, B, C, and D matrices

0 1 0 10
𝐀= 0 0 1 𝐁= 0
−1 −2 −3 0

𝐂= 1 0 0 𝐃=0

25
State-Space to Transfer Function
0 1 0 10
𝐀= 0 0 1 𝐁= 0 𝐂= 1 0 0 𝐃=0
−1 −2 −3 0

2) Arrange A, B, C, and D matrix into the transfer function form

𝑌 𝑠 −1
𝐺 𝑠 = = 𝐂 𝑠𝐈 − 𝐀 𝐁+𝐃
𝑈 𝑠

−1
𝑠 0 0 0 1 0 10
𝐺 𝑠 = 1 0 0 0 𝑠 0 − 0 0 1 0 +0
0 0 𝑠 −1 −2 −3 0

−1
𝑠 −1 0 10
𝐺 𝑠 = 1 0 0 0 𝑠 −1 0 +0
1 2 𝑠+3 0

26
State-Space to Transfer Function
−1
𝑠 −1 0 10
𝐺 𝑠 = 1 0 0 0 𝑠 −1 0 +0
1 2 𝑠+3 0

3) Find the inverse of [sI ‒ A]‒1

1 𝑠 2 + 3𝑠 + 2 𝑠+1 1 10
𝐺 𝑠 = 1 0 0 3 −1 𝑠 𝑠+3 𝑠 0
𝑠 + 3𝑠 2 + 2𝑠 + 1
−𝑠 − 2𝑠 + 1 𝑠2 0

4) Simplify and rearrange to the transfer function form

1 10
𝐺 𝑠 = 3 𝑠 2 + 3𝑠 + 2 𝑠+1 1 0
𝑠 + 3𝑠 2 + 2𝑠 + 1
0

1
𝐺 𝑠 = 3 2
10(𝑠 2 + 3𝑠 + 2)
𝑠 + 3𝑠 + 2𝑠 + 1

10(𝑠 2 + 3𝑠 + 2)
𝐺 𝑠 = 3
𝑠 + 3𝑠 2 + 2𝑠 + 1

27
State-Space to Transfer Function
Convert the state and output equations to a transfer function.

−4 −1.5 2
𝐱ሶ = 𝐱+ 𝑢(𝑡)
4 0 0

𝑦 = 1.5 0.625 𝐱

Try this yourselves!

5 minutes!

𝑠+5
a) 𝐺 𝑠 =
𝑠 2 + 4𝑠 + 6

3𝑠 + 5
b) 𝐺 𝑠 =
𝑠 2 + 4𝑠 + 6
𝑠+1
c) 𝐺 𝑠 =
𝑠 2 + 2𝑠 + 3
3𝑠 + 1
d) 𝐺 𝑠 =
𝑠 2 + 4𝑠 + 6

28
State-Space to Transfer Function
Convert the state and output equations to a transfer function.

−4 −1.5 2
𝐱ሶ = 𝐱+ 𝑢(𝑡)
4 0 0

𝑦 = 1.5 0.625 𝐱

1) Identify the A, B, C, and D matrices

−4 −1.5 2
𝐀= 𝐁=
4 0 0

𝐂 = 1.5 0.625 𝐃=0

29
State-Space to Transfer Function
−4 −1.5 2
𝐀= 𝐁= 𝐂 = 1.5 0.625 𝐃=0
4 0 0

2) Arrange A, B, C, and D matrix into the transfer function form

𝑌 𝑠 −1
𝐺 𝑠 = = 𝐂 𝑠𝐈 − 𝐀 𝐁+𝐃
𝑈 𝑠

−1
𝑠 0 −4 −1.5 2
𝐺 𝑆 = 1.5 0.625 − +0
0 𝑠 4 0 0

−1
𝑠+4 1.5 2
𝐺 𝑆 = 1.5 0.625 +0
−4 𝑠 0

3) Find the inverse of [sI ‒ A]‒1

1 𝑠 −1.5 2
𝐺 𝑆 = 1.5 0.625 2 +0
𝑠 + 4𝑠 + 6 4 𝑠+4 0

30
State-Space to Transfer Function
4) Simplify and rearrange to the transfer function form

1 𝑠 −1.5 2
𝐺 𝑆 = 1.5 0.625 2 +0
𝑠 + 4𝑠 + 6 4 𝑠+4 0

3𝑠 + 5
𝐺 𝑠 =
𝑠 2 + 4𝑠 + 6

31
Transfer Function to State-Space
Now that you know how to go from state-space to transfer function, let’s go from transfer function
back to state-space.

System Analysis

Transfer Function State-Space


𝑌 𝑠 𝐱ሶ = 𝐀𝐱 + 𝐁𝑢
𝐺 𝑠 =
𝑈(𝑠) 𝑦 = 𝐂𝐱 + 𝐃𝑢
(1) Rearrange transfer function

𝑋 𝑠 1
= 2 → 𝑎𝑠 2 𝑋 𝑠 + 𝑏𝑠𝑋 𝑠 + 𝑐𝑋 𝑠 = 𝐹(𝑠)
𝐹(𝑠) 𝑎𝑠 + 𝑏𝑠 + 𝑐

(2) Use reverse Laplace to find differential equation

𝑎𝑥ሷ + 𝑏𝑥ሶ + 𝑐𝑥 = 𝑓(𝑡)

(2) Define the states variable and find the state equation and output equation.

𝐱ሶ = 𝐀𝐱 + 𝐁𝑢

𝑦 = 𝐂𝐱 + 𝐃𝑢

32
Transfer Function to State-Space
Example: Find the state-space representation for the transfer function. Output is x1.

𝐶 𝑠 24
= 3
𝑅 𝑠 𝑠 + 9𝑠 2 + 26𝑠 + 24

1) Rearrange transfer function and find differential equation

𝑠 3 + 9𝑠 2 + 26𝑠 + 24 𝐶 𝑠 = 24𝑅 𝑠

Take the inverse Laplace transform

𝑐ഺ + 9𝑐ሷ + 26𝑐ሶ + 24𝑐 = 24𝑟

33
Transfer Function to State-Space
𝑐ഺ + 9𝑐ሷ + 26𝑐ሶ + 24𝑐 = 24𝑟

2) Select state variables

𝑐 → 𝑥1 = 𝑐

𝑐ሶ → 𝑥2 = 𝑐ሶ

𝑐ሷ → 𝑥3 = 𝑐ሷ

3) Use original equations to define the dynamics of the system. Just “dot” of the states to obtain the variables.

𝑥1 = 𝑐 → 𝑥1ሶ = 𝑐ሶ

𝑥2 = 𝑐ሶ → 𝑥2ሶ = 𝑐ሷ

𝑥3 = 𝑐ሷ → 𝑥3ሶ = 𝑐ഺ

4) Substitute the states and the dynamics into the differential equations. If there is a conflict, use the states

𝑐ഺ + 9𝑐ሷ + 26𝑐ሶ = 24𝑐 = 24𝑟 → 𝑥3ሶ + 9𝑥3 + 26𝑥2 + 24𝑥1 = 24𝑟

34
Transfer Function to State-Space
5) Define the dynamics as a function of the states

𝑥1ሶ = 𝑐ሶ → 𝑥1ሶ = 𝑥2

𝑥2ሶ = 𝑐ሷ → 𝑥2ሶ = 𝑥3

𝑥3ሶ + 9𝑥3 + 26𝑥2 + 24𝑥1 = 24𝑟 → 𝑥3ሶ = −24𝑥1 − 26𝑥2 − 9𝑥3 + 24𝑟

These 3 equations are the states equations. So what we’ve done is take the original 3rd order differential equations
and change them into 3 first order differential equations

6) Expand out the dynamics to include all of the states (optional step)

𝑥1ሶ = 𝑐ሶ → 𝑥1ሶ = 0𝑥1 + 𝑥2 + 0𝑥3 + 0𝑟

𝑥2ሶ = 𝑐ሷ → 𝑥2ሶ = 0𝑥1 + 0𝑥2 + 𝑥3 + 0𝑟

𝑥3ሶ + 9𝑥3 + 26𝑥2 + 24𝑥1 = 24𝑟 → 𝑥3ሶ = −24𝑥1 − 26𝑥2 − 9𝑥3 + 24𝑟

7) Now write this in matrix form

𝐱ሶ = 𝐀𝐱 + 𝐁𝑢

𝑥1ሶ 0 1 0 𝑥1 0
𝑥2ሶ = 0 0 1 𝑥2 + 0 𝑟
𝑥3ሶ −24 −26 𝑥
−9 3 24

35
Transfer Function to State-Space
8) Finally express the state-space model for the output x1

Output is represented by y

𝑦 = 𝐂𝐱 + 𝐃𝑢

where y can relate to the states as such

𝑦 = 𝑐 = 𝑥1

Expand this out

𝑦 = 𝑥1 + 0𝑥2 + 0𝑥3 + 0𝑥4 + 0𝑟

Express as matrix

𝑥1
𝑦 = 1 0 0 𝑥2
𝑥3

36
Transfer Function to State-Space
Example: Find the state-space representation for the transfer function. Output is x1.

This problem differs since the numerator has a polynomial instead of just a constant.

37
Transfer Function to State-Space
Example: Find the state-space representation for the transfer function. Output is x1.

This problem differs since the numerator has a polynomial instead of just a constant.

1) Separate system into 2 blocks. First block has denominator and second block has numerator.

2) Find the state equations for the block containing the denominator (first block)

We can cheat and get this from the previous example

𝑥1ሶ 0 1 0 𝑥1 0
𝑥2ሶ = 0 0 1 𝑥2 + 0 𝑟
𝑥3ሶ −24 −26 𝑥
−9 3 1

38
Transfer Function to State-Space

h(t)

We will cover this in more


details in a later lecture

https://en.wikibooks.org/wiki/Control_Systems/Block_Diagrams
39
Transfer Function to State-Space
3) Introduce the effect of the block with the numerator

𝐶 𝑠 𝑠 2 + 7𝑠 + 2
=
𝑋1 𝑠 1

3.1) Find the corresponding differential equation

Cross-multiplying yields

𝐶 𝑠 = 𝑠 2 + 7𝑠 + 2 𝑋1 𝑠

Take the inverse Laplace transform

𝑐 = 𝑥ሷ + 7𝑥ሶ + 2𝑥

40
Transfer Function to State-Space
𝑐 = 𝑥ሷ + 7𝑥ሶ + 2𝑥

3.2) Select state variables

𝑥 → 𝑥1 = 𝑥

𝑥ሶ → 𝑥2 = 𝑥ሶ

𝑥ሷ → 𝑥3 = 𝑥ሷ

3.3) Use original equations to define the dynamics of the system. Just “dot” of the states to obtain the variables.

𝑥1 = 𝑥 → 𝑥1ሶ = 𝑥ሶ

𝑥2 = 𝑥ሶ → 𝑥2ሶ = 𝑥ሷ

𝑥3 = 𝑥ሷ → 𝑥3ሶ = 𝑥ഺ

3.4) Substitute the states and the dynamics into the differential equations. If there is a conflict, use the states

𝑐 = 𝑥ሷ + 7𝑥ሶ + 2𝑥 → 𝑐 = 𝑥3 + 7𝑥2 + 2𝑥1

41
Transfer Function to State-Space
3.5) Define the output

Note that the process is different here, because c is actually the output. So we do not define the dynamics here,
rather we are defining the output.

𝑦 = 𝑐 𝑡 = 2𝑥1 + 7𝑥2 + 𝑥3

3.6) Now write this in matrix form

𝑦 = 𝐂𝐱 + 𝐃𝑢

𝑥1
𝑦 = 2 7 1 𝑥2
𝑥3

42
Transfer Function to State-Space
Example: Find the state equations and output equation for the transfer function G(s).

𝑋 𝑠 2𝑠 + 1
𝐺 𝑠 = = 2
𝑅 𝑠 𝑠 + 7𝑠 + 9

Try this one!

5 minutes

𝑥1ሶ −9 1 𝑥1 0 𝑥1ሶ −9 −7 𝑥1 0
a) = + 𝑟 b) = + 𝑟
𝑥2ሶ 0 −7 𝑥2 1 𝑥2ሶ 1 0 𝑥2 1

𝑥1 𝑥1
𝑦= 1 2 𝑥 𝑦= 1 2 𝑥
2 2

𝑥1ሶ 0 1 𝑥1 0 𝑥1ሶ 0 −9 𝑥1 0
c) = + 𝑟 d) = + 𝑟
𝑥2ሶ −9 −7 𝑥2 1 𝑥2ሶ −7 1 𝑥2 1

𝑥1 𝑥1
𝑦= 1 2 𝑥 𝑦= 1 2 𝑥
2 2

43
Transfer Function to State-Space
Example: Find the state equations and output equation for the transfer function G(s).

𝑋 𝑠 2𝑠 + 1
𝐺 𝑠 = = 2
𝑅 𝑠 𝑠 + 7𝑠 + 9

This problem differs since the numerator has a polynomial in s instead of just a constant term

1) Separate system into 2 blocks. First block has denominator and second block has numerator.

1
2𝑠 + 1
𝑠 2 + 7𝑠 + 9

2) Find the state equations for the block containing the denominator (first block)

2.1) Rearrange transfer function and find differential equation

𝑠 2 + 7𝑠 + 9 𝑋 𝑠 = 𝑅 𝑠 → 𝑠 2 𝑋 𝑠 + 7𝑠𝑋 𝑠 + 9𝑋 𝑠 = 𝑅 𝑠

Take the inverse Laplace transform

𝑥ሷ + 7𝑥ሶ + 9𝑥 = 𝑟

44
Transfer Function to State-Space
𝑥ሷ + 7𝑥ሶ + 9𝑥 = 𝑟

2.2) Select state variables

𝑥 → 𝑥1 = 𝑥

𝑥ሶ → 𝑥2 = 𝑥ሶ

2.3) Use original equations to define the dynamics of the system. Just “dot” of the states to obtain the variables.

𝑥1 = 𝑥 → 𝑥1ሶ = 𝑥ሶ = 𝑥2

𝑥2 = 𝑥ሶ → 𝑥2ሶ = 𝑥ሷ

2.4) Substitute the states and the dynamics into the differential equations. If there is a conflict, use the states

𝑥ሷ + 7𝑥ሶ + 9𝑥 = 𝑟 → 𝑥2ሶ + 7𝑥2 + 9𝑥1 = 𝑟

2.5) Define the dynamics as a function of the states

𝑥1ሶ = 𝑥2 → 𝑥1ሶ = 𝑥2

𝑥2ሶ + 7𝑥2 + 9𝑥1 = 𝑟 → 𝑥2ሶ = −9𝑥1 − 7𝑥2 + 𝑟

These 2 equations are the states equations. So what we’ve done is take the original 2nd order differential equations
and change them into 2 first order differential equations

45
Transfer Function to State-Space
2.6) Expand out the dynamics to include all of the states (optional step)

𝑥1ሶ = 𝑥2 → 𝑥1ሶ = 0𝑥1 + 𝑥2 + 0𝑟

𝑥2ሶ + 7𝑥2 + 9𝑥1 = 𝑟 → 𝑥2ሶ = −9𝑥1 − 7𝑥2 + 𝑟

2.7) Now write this in matrix form

𝐱ሶ = 𝐀𝐱 + 𝐁𝑢

𝑥1ሶ 0 1 𝑥1 0
= 𝑥 + 𝑟
𝑥2ሶ −9 −7 2 1

46
Transfer Function to State-Space
3) Introduce the effect of the block with the numerator

1
2𝑠 + 1
𝑠 2 + 7𝑠 + 9

𝐶 𝑠 2𝑠 + 1
=
𝑋1 𝑠 1

3.1) Find the corresponding differential equation

Cross-multiplying yields

𝐶 𝑠 = 2𝑠 + 1 𝑋1 𝑠

Take the inverse Laplace transform

𝑐 = 2𝑥ሶ + 𝑥

47
Transfer Function to State-Space
𝑐 = 2𝑥ሶ + 𝑥

3.2) State variables

𝑥 → 𝑥1 = 𝑥 Why use highest


𝑥ሶ → 𝑥2 = 𝑥ሶ derivative?

3.4) Substitute the states into the differential equations. The states were already
defined in step (2)
𝑐 = 2𝑥ሶ + 𝑥 → 𝑐 = 2𝑥2 + 𝑥1

3.5) Define the output

𝑦 = 𝑐 𝑡 = 𝑥1 + 2𝑥2

3.6) Now write this in matrix form

𝑦 = 𝐂𝐱 + 𝐃𝑢
𝑥1
𝑦= 1 2 𝑥
2

4) Finally, the state-space model for this transfer function is


𝑥1ሶ 0 1 𝑥1 0
= 𝑥 + 𝑟
𝑥2ሶ −9 −7 2 1
𝑥1
𝑦= 1 2 𝑥
2

48
State-Space Linearization
Example: First represent the simple pendulum in state space: Mg is the weight, T is an applied torque
in the u direction, and L is the length of the pendulum. Assume the mass is evenly distributed, with
the center of mass at L/2. Then linearize the state equations about the pendulum’s equilibrium
point—the vertical position with zero angular velocity.

Finding the differential equation model was covered in previous lectures.

49
State-Space Linearization
1) First find the equation of motion using the sum of torques
𝑀𝑔𝐿
𝐽𝜃ሷ + sin 𝜃 = 𝑇
2
2) Find state-space model

2.2) Select state variables

𝜃 → 𝑥1 = 𝜃

𝜃ሶ → 𝑥2 = 𝜃ሶ

2.3) Use original equations to define the dynamics of the system. Just “dot” of the states to obtain the variables.

𝑥1 = 𝜃 → 𝑥1ሶ = 𝜃ሶ = 𝑥2

𝑥2 = 𝜃ሶ → 𝑥2ሶ = 𝜃ሷ

2.4) Substitute the states and the dynamics into the differential equations. If there is a conflict, use the states
𝑀𝑔𝐿 𝑀𝑔𝐿
𝐽𝜃ሷ + sin 𝜃 = 𝑇 → 𝐽𝑥2ሶ + sin 𝑥1 = 𝑇
2 2

2.5) Define the dynamics as a function of the states

𝑥1ሶ = 𝑥2 → 𝑥1ሶ = 𝑥2
𝑀𝑔𝐿 𝑀𝑔𝐿 𝑇
𝐽𝑥2ሶ + sin 𝑥1 = 𝑇 → 𝑥2ሶ = − sin 𝑥1 −
2 2𝐽 𝐽

50
State-Space Linearization
𝑀𝑔𝐿 𝑇
𝑥1ሶ = 𝑥2 , 𝑥2ሶ = − sin 𝑥1 −
2𝐽 𝐽

3) Linearize the nonlinear terms

3.1) find equilibrium point

As I mentioned equilibrium point 𝑥1,0 and 𝑥2,0 (remember x0) should be zero when the system is not moving

𝑥1,0 = 𝑥2,0 = 0

3.2) Redefine x for the small excursion

𝑥1 = 𝑥1,0 + 𝛿𝑥1 = 0 + 𝛿𝑥1 = 𝛿𝑥1

𝑥2 = 𝑥2,0 + 𝛿𝑥2 = 0 + 𝛿𝑥2 = 𝛿𝑥2

Substitute

𝛿𝑥ሶ 1 = 𝛿𝑥2

𝑀𝑔𝐿 𝑇
𝛿𝑥ሶ 2 = − sin 𝛿𝑥1 −
2𝐽 𝐽

51
State-Space Linearization
3.3) Linearize nonlinear terms using 𝑓 𝑥 ≈ 𝑓 𝑥0 + 𝑚𝑎 𝛿𝑥

𝑓 𝑥 = sin 𝛿𝑥1

𝑓 𝑥0 = sin 0 = 0
small angle
𝑑𝑓 𝑥0 𝑑𝑓 sin 𝛿𝑥1 approximation
= 𝑚𝑎 = ቤ = cos 0 = 1
𝑑𝑥 𝑑𝛿𝑥1 𝛿𝑥 1 =0

sin 𝑥1 ≈ 𝛿𝑥1

3.4) Substitute linearized terms

𝛿𝑥ሶ 1 = 𝛿𝑥2
𝑀𝑔𝐿 𝑇
𝛿𝑥ሶ 2 = − 𝛿𝑥1 −
2𝐽 𝐽

All terms are linear.

3.5) Put into matrix form

𝑥ሶ = 𝐴𝑥 + 𝐵𝑢

0 1
𝛿𝑥ሶ 1 𝑀𝑔𝐿 𝛿𝑥1 0
= 0 𝛿𝑥2 + 𝑇
𝛿𝑥ሶ 2 1/𝐽
2𝐽

52
State-Space Linearization
Example: Represent the translational mechanical system state space about the equilibrium
displacement. The spring is nonlinear, where the relationship between the spring force, fs(t), and the
spring displacement, xs(t), is fs(t) = 2𝑥𝑠2 (t). The system is in equilibrium when the spring force is
equal to 10 N. The applied force is f(t) = 10 + δf(t). Assume the output to be the displacement of the
mass, x(t).

Try this yourselves!

5 minutes!

53
State-Space Linearization
Example: Represent the translational mechanical system state space about the equilibrium
displacement. The spring is nonlinear, where the relationship between the spring force, fs(t), and the
spring displacement, xs(t), is fs(t) = 2𝑥𝑠2 (t). The system is in equilibrium when the spring force is
equal to 10 N. The applied force is f(t) = 10 + δf(t). Assume the output to be the displacement of the
mass, x(t).

Before beginning the problem, find the equilibrium point.

The system is in equilibrium when

𝑓𝑠,0 𝑡 = 2𝑥02 = 10

𝑥0 = 5

The equilibrium point is at 𝑥0 = 5.

54
State-Space Linearization
Example: Represent the translational mechanical system state space about the equilibrium
displacement. Equilibrium point is x0 = 5. The applied force is f(t) = 10 + δf(t). Assume the output
to be the displacement of the mass, x(t).

1) Find equation of motion by inspection

𝑥ሷ + 2𝑥 2 = 10 + 𝛿𝑓(𝑡)

2) Linearize the nonlinear terms

2.1) Redefine x for the small excursion

𝑥 = 5 + 𝛿𝑥1

Substitute


5 + 𝛿𝑥1 + 2( 5 + 𝛿𝑥1 )2 = 10 + 𝛿𝑓(𝑡)

Differentiating constants yield zeros, therefore

2
ሷ 𝑑 5 + 𝛿𝑥 𝑑2 𝛿𝑥
5 + 𝛿𝑥1 = 2
= 2
= 𝛿𝑥ሷ 1
𝑑𝑡 𝑑𝑡

55
State-Space Linearization
2.2) Linearize nonlinear terms using 𝑓 𝑥 ≈ 𝑓 𝑥0 + 𝑚𝑎 𝛿𝑥

𝑓 𝑥 = ( 5 + 𝛿𝑥1 )2
2
𝑓 𝑥0 = 5 = 5

𝑑𝑓 𝑥 𝑑(𝑥 2 )
ቤ = 𝑚𝑎 = อ = 2𝑥0 ቚ =2 5
𝑑𝑥 𝑥 𝑑𝑥 5
0 𝑥0

( 5 + 𝛿𝑥1 ) ≈ 5 + 2 5𝛿𝑥

2.3) Substitute linearized terms

𝛿𝑥ሷ 1 + 2(5 + 2 5𝛿𝑥) = 10 + 𝛿𝑓(𝑡)

𝛿𝑥ሷ + 4 5𝛿𝑥 = 𝛿𝑓(𝑡)

56
State-Space Linearization
3) Find state-space

3.1) Select state variables

𝛿𝑥 → 𝑥1 = 𝛿𝑥

𝛿𝑥ሶ → 𝑥2 = 𝛿𝑥ሶ

3.2) Use original equations to define the dynamics of the system. Just “dot” of the states to obtain the
variables.

𝑥1 = 𝛿𝑥 → 𝑥1ሶ = 𝛿𝑥ሶ = 𝑥2

𝑥2 = 𝛿𝑥ሶ → 𝑥2ሶ = 𝛿𝑥ሷ

3.3) Substitute the states and the dynamics into the differential equations. If there is a conflict, use
the states

𝛿𝑥ሷ + 4 5𝛿𝑥 = 𝛿𝑓(𝑡) → 𝑥2ሶ + 4 5𝑥1 = 𝛿𝑓(𝑡)

3.4) Define the dynamics as a function of the states

𝑥2ሶ + 4 5𝑥1 = 𝛿𝑓(𝑡) → 𝑥2ሶ = −4 5𝑥1 + 𝛿𝑓(𝑡)


57
State-Space Linearization
3.5) Put into matrix form

𝐱ሶ = 𝐀𝐱 + 𝐁𝑢

𝑥1ሶ 0 1 𝑥1 0
= + 𝛿𝑓(𝑡)
𝑥2ሶ −4 5 0 𝑥2 1

4) Find output equation at x1


𝑥1
𝑦= 1 0 𝑥
2

58
State-Space Linearization
Example: Consider the mechanical system. If the spring is nonlinear, and the force, Fs, required to
stretch the spring is Fs = 2𝑥12 , represent the system in state space linearized about x1 = 1 if the output
is x2.

Try this yourselves!

5 minutes!

59
State-Space Linearization
Example: Consider the mechanical system. If the spring is nonlinear, and the force, Fs, required to
stretch the spring is Fs = 2𝑥12 , represent the system in state space linearized about x1 = 1 if the output
is x2.

Finish this for homework.


Show all steps.

60
State-Space
➢ This is the end of state-space modeling.

➢ If I see more interesting examples, I will include in it in the next lecture.

➢ Next topics after the holiday are Poles and Time Response.

61
Homework
Read
✓1.1, 1.3, 1.4
✓2.1, 2.2, 2.3, 2.5, 2.6, 2.7, 2.10, 2.11
✓3.1, 3.2, 3.3, 3.4, 3.5, 3.6, 3.7

62
Homework
C3P4. Represent the system in state space where the output is x3(t).

63
Homework
C3P11. For each system, write the state equations and the output equation.

64
Homework
C3P13. Represent the following transfer function in state space. Give your answer in
vector-matrix form.

𝑠 2 + 3𝑠 + 8
𝑇 𝑠 =
𝑠 + 1 𝑠 2 + 5𝑠 + 5

65
Homework
C3P14. Find the transfer function G(s) = Y(s)/R(s) for each of the following systems
represented in state space:

66
Homework
C3P20. Consider the mechanical system. If the spring is nonlinear, and the force, Fs,
required to stretch the spring is Fs = 2𝑥12 , represent the system in state space linearized
about x1 = 1 if the output is x2.

67
68

You might also like