system dynamic and control
1_Introduction.pdf
1
Dynamics and Control
Topic 1: Introduction
2
Tentative Lecture Schedule
3
What is Control?
Think of some “control” examples:
• From your study
• From industry
• From real-life
Commonly used terms in “control”?
4
Open Loop Control vs. Closed Loop Control? Open Loop Control:
• There is no feedback • Calibration is the key! • Can be sensitive to disturbances
5
Open Loop Control:
• Objective: make bread toasted • Control action: set timer • Control result (performance)?
• How to improve the performance? • Use temp sensor • Use microprocessor and actuator to control the spring • Worth it?
Feedback
Closed Loop Control:
• There is a feedback (sensor) • Compare actual behavior with desired behavior • Make corrections based on the error • The sensor is the key element of a feedback control • Design a proper control algorithm is the focus of this
subject!
Room Temp Control: Open or Closed?
• Feedback? • Control objective? • Controller? • System/plant? • Disturbance?
Applications of Feedback Control
• Manufacturing
Applications of Feedback Control
• Robotics
UNDERWATER ROBOT
Applications of Feedback Control
• Aerospace and Astronautics
Applications of Feedback Control: BIG DOG in Action
BOSTON DYNAMICS
Sensing Actuation Control Plant ControlSystem = + + +
BIG DOG CONTROL: Block Diagram
DISTURBANCE
Environment
Foot Trajectory Planning
Desired Walking Speed
REFERENCE
Joint angles & velocities
Robot Joint torques
Robot Robot
Virtual Leg IK
Virtual Leg FK
Virtual
Leg VM
PD Servo
Virtual Leg Coords
Virtual Leg Forces
State Machine
Leg State Gait
Coordination Mechanisms
Influences to/from other legs
+
IK=inverse kinematics FK=forward kinematics VM=virtual model
Exercise: • Use Block Diagram to represent this driving system • Indicate: sensor, actuator, control, plant, reference &
disturbance
Brain Hand Foot
Eye
Car _
Desired Direction Desired Speed
Direction Speed
Controller Actuators Plant Error Disturbances
Sensor
Control Actuation
Sensor
Plant _
Reference Response
Error
General Block Diagram Representation
Feedback Control Concept Not limited to engineering systems only!
Human Grasping Motion
Feedback Control Concept…cont’d Not limited to engineering systems only!
e.g. Taking Dynamics & Control…
Two Main Criteria of Good Feedback Control
• Acceptable Dynamic Responses
• Stability Crash of SAAB JAS-39 due to instability
Systematic Control Design Process
Goals of This Course
To learn the basics of feedback control systems
1. Modeling as a transfer function and a block diagram • Laplace transform (Mathematics!) • Mechanical, electrical, electromechanical systems
2. Analysis • Step response, frequency response • Stability: Routh-Hurwitz criterion, (Nyquist criterion)
3. Design • Root locus technique, frequency response technique, • PID control, lead/lag compensator
4. Programming ability / Actual Implementation • Matlab • Simulink
Course Roadmap
Recap today’s topics +
Questions? Block Diagrams
Recap today’s topics +
Questions?
Homework 1 - Part A
1. Find 2 open-loop control examples and 2 closed-loop control examples in your daily life. Represent these examples using block diagram. Clearly indicate Control Reference, Controller, Plant, Actuator, Feedback Element in the block diagram.
2. Compared to open-loop control, discuss the pros and cons of feedback control.
3. What are the two main criteria in feedback control design?
4. Describe the procedures of feedback control system design.
1_MathReview.pdf
1
Dynamics and Control
• Math Preparation (Review of Complex Number)
• Complex Number in Matalb
Week Topics Exam Reading
1 Introduction Ch 1-2
2 Math Review Ch 1-2
3 Modelling (Frequency + Time Domain) Ch 2
4 Time Response Ch 4
5 Block Diagram M-Exam 1 Ch 5
6 Stability Ch 6
7 Midterm Review + Make up Ch 1-6
8 Experiment
9 Spring Break
10 Steady State Errors Ch 7
11 Root Locus Ch 8
12 Design Via Root Locus M-Exam 2 Ch 9
13 Design Via Root Locus Ch 9
14 Frequency Response Ch 10
15 Design Via Frequency Response Ch 11
16 Final Review + Make up Ch 7-11
17 Final Exam Final Exam 2
Tentative Lecture Schedule
2
Math Prerequisites
1. Complex Numbers 2. Linear Ordinary Differential Equations 3. Laplace Transform to Solve ODE’s 4. Partial Fraction Expansion 5. Linearization
WARNING!!
THIS IS A VERY MATH INTENSIVE COURSE!
It is your responsibility to review these topics. We assume that you have passed all the pre- required calculus courses and already have a GOOD command of all these prerequisites.
ADD/DROP deadline is Sept 8!
Complex Number: A Little History
Math is used to explain our universe. When a recurring phenomenon is seen and can’t be explained by our present mathematics, new systems of mathematics are derived. In the real number system, we can’t take the square root of negatives, therefore the complex number system was created.
Girolamo’s Problem
40
10
xy
yx
In The Great Art, published in 1545, Girolamo Cardano discusses the
following problem.
To find x and y, use substitution.
04010
40)10(
2
xx
xx
Apply the Quadratic Formula.
155
2
)40()1(41010 2
x
Due to the symmetry in the problem, x and y take on ± values.
5 10 15 20
2
4
6
8
10
12
No Intersection!
Bombelli And Imaginary Numbers
1
1
1
1
4
3
2
i
ii
i
i
Rafael Bombelli in the 1560’s figured out a way to work with imaginary
numbers. Definition of Imaginary unit, i
Using these rules, Bombelli worked Cardano’s cubic solutions to arrive
at real results.
Complex Numbers: Definition
A complex number consists of a real and an imaginary term:
𝑎 + 𝑏𝑖
where 𝑎 and 𝑏 are real numbers and 𝑖 is the imaginary unit.
Both real numbers and imaginary numbers have specific physical meanings in control engineering
Complex Numbers: Addition and Subtraction
Add/subtract real to real, and imaginary to imaginary
Example: (6 + 7i) + (3 - 2i)
(6 + 3) + (7i - 2i) = 9 + 5i
When subtracting, DON’T FORGET to distribute the negative sign!
Example: (3+2i) – (5 – i)
(3 – 5) + (2i – (-i)) = -2 + 3i
Complex Numbers: Multiplication
(2 3i) (3 6i)
26 12i 9i 18i
6 3i 18 ( 1)
6 3i 18 24 3i
Complex Numbers: Division/Simplification
• In order to simplify complex numbers (they must always be in the form a + bi, you must multiply by the complex conjugate:
2
3 8i (4 3i) (3 8i) (4 3i)
4 3i (4 3
12 41i
i)
12 9i 32i 24i
16 9
25
12 41i
25 25
Exercise 1
Simplify:
Solution:
i
i
4
23
2
2
13 2i 3 2i 4 i 12 11i 2i
4 i 4 i 4 i
0 11 i
17 1716 i
Complex Numbers: Geometrical Interpretation
Jean-Robert Argand in 1806 came up with the idea of a
geometrical interpretation of complex numbers. Replace the x-
axis with the real part of complex numbers, and the y-axis with
the imaginary part.
Thus, 𝒛 = 𝒂 + 𝒃𝒊 has the graphical interpretation:
Complex Numbers: Trigonometric and Polar Forms
A complex number can be represented in the trigonometric form:
𝒂 = 𝐫𝐜𝐨𝐬(𝜽)
𝒃 = 𝐫𝐬𝐢𝐧(𝜽)
𝒛 = 𝒂 + 𝒃𝒊 = 𝐫𝐜𝐨𝐬 𝛉 + 𝒓𝐬𝐢𝐧 𝜽 𝒊
Recall Euler’s formula:
𝒆𝒊𝜽 = 𝐜𝐨𝐬𝜽 + 𝒊𝐬𝐢𝐧𝜽
Based on this, a complex number can also be represented in polar form:
𝒛 = 𝒓𝒆𝒊𝜽 = 𝒓∠𝜽
r
Complex Numbers: Angle of Quadrants Conjugate Pair
Complex Numbers: Angle of Quadrants Conjugate Pair
Exercise 2:
Represent these complex numbers in polar form
First key in these complex numbers in Matlab
21505.24
88302
65 2
4
3
60
21
izzez
jzezz i
i
The variable z in function compass (z) can be a single variable, or an array. In this example, it is an array , holding 6 elements
Homework 1 - Part B
1. Practice all the exercises in this PPT.
For the following problems 2-7, you need to verify your solutions in Matlab.
2. For this complex number, 𝟒 − 𝟒𝒊, give its exponential form.
Solution: 4 𝟐𝒆−𝒊 𝝅
𝟒
3. For this complex number, 𝒆−𝒊 𝟐𝝅
𝟑 , give its Cartesian form.
Solution: -1/2-i 𝟑/2
4. Multiplication problems • (2 + 5i)(4 − i) [Solution 13 + 18i] • (1 − 2i)(8 − 3i) [Solution 2 − 19i]
5. Find the conjugates for the following complex numbers • 12 +7i [Solution 12 − 7i]
• 2i( 𝟏
𝟐 − i) [Solution 2 − i]
6. Division problems • (1+4i)/(3+2i) [Solution 11/13 +i*10/13] • 1/(1+i) [Solution =1/2+i*1/2]
7. Let z = 2 − 2i and w = −1 − 3i, • Carefully plot z and w in the complex plane. • Plot the complex number 𝒛 − w (𝒛 is the conjugate of z). Solution:
2_Modelling(3).pdf
2/1/2016
1
1
Dynamics and Control
Topic II: Modelling of Physical Systems
• Review of ODE • Laplace Transform • Linear Time Invariant (LTI) systems • Transfer Function • Modelling of Physical Systems • Modelling in Matlab
Math Prerequisites
1. Complex Numbers 2. Linear Ordinary Differential Equations 3. Laplace Transform to Solve ODE’s 4. Partial Fraction Expansion 5. LTI 6. Transfer Function
3
Schedule
4
Road Map
Recap today’s topics +
Questions? Block Diagrams
Why Mathematical Modelling?
6
Review of ODE’s
Spring-mass system f 𝒕 is an external force 𝒙 𝒕 is the displacement of the mass block
𝒙 𝒕 = 𝟎 is the equilibrium point
Free body diagram Newton’s 2nd Law: 𝑭 = 𝒎𝒂
𝚺𝑭 = 𝒇 𝒕 − 𝒌𝒙 𝒕 = 𝒎𝒙 (𝒕) 𝒇 𝒕 = 𝒎𝒙 (𝒕)+ 𝒌𝒙 𝒕
(input – output relationship)
A differential equation (or "DE") contains derivatives or differentials
f
2/1/2016
2
7
Physics is filled with all sort of differential relations
Damped Vibration Laminar Flow Electrical Circuit
8
Solving ODEs
Example 1: Differential equation: Rewrite this equation using differentials: Integrate both sides: The solution is:
9
Solving ODEs
Example 2: Differential equation: Rewrite this equation using differentials: Integrate both sides: The solution is:
2
)2.0sin(
t
dt
d
10
Solving ODEs
More examples:
WE DON’T LIKE integration!! We want a simpler method!!
11
A Simplified Method: Laplace Transform
Definition:
For a function f(t), f(t) = 0 for t<0, Laplace Transform is defined as: where is a complex variable. The Inverse Laplace Transform is:
12
Laplace Transform Example – Step Input
, for t>0
s
s e
s
dte
dtetfsF
st
st
st
1
]10[ 11
1
)()(
0
0
0
Memorize the result!
Unit Step Input
2/1/2016
3
13
1
1)(
0)(
)()(
0
0
0
0
0
0
dtt
dtedtet
dtetsF
stst
st
1)(
0undefined,
0 0, )(
InputImpulseUnit
t
t
t t
Memorize the result!
Laplace Transform Example – Impulse Input
14
20
0
0 0
0
0
1111
1 ]00[
1
)()(
sss dte
s
dte s
dte s
e s
t
dtet
dtetfsF
st
st
stst
st
st
0for,)(
InputRampUnit
tttf
Memorize the result!
Laplace Transform Example – Ramp Input
15
Laplace Transform Table
• We still have to do these
nasty integration?
• Things have not been simplified at all!!
• We normally use Laplace Transform tables rather than solving the preceding equations directly
• This greatly simplifies the transformation process
16
More Laplace Transform Table
17
More Laplace Transform Table…cont’d
18
How to Use Laplace Transform Table
( ) 3cos8f t t
2 ( ) 5/( 100)F s s
Exercise 1:
, find the Laplace transform of it. Exercise 2:
, find the inverse transform of it. Exercise 3:
, find the inverse transform of it.
2)3/(1)( ssF
2/1/2016
4
Laplace Transform of Differential Terms
Differentiation Theorem
( ) (0)sF s f
2 ( ) (0) (0)s F s sf f
1 2
( 1)
( ) (0) (0)
(0)
n n n
n
s F s s f s f
f
19
. . . . . .
𝓛 𝒅𝒇
𝒅𝒕
𝓛 𝒅𝟐𝒇
𝒅𝒕𝟐
𝓛 𝒅𝒏𝒇
𝒅𝒕𝒏
f
Mass and Spring Exercise
( )mx kx f t
0 (0)x x
0 (0)x x
Consider a vibration system with mass and spring
Solve this problem using
Laplace transform.
( )x t ( )f t ( )F s
0 0
2
( ) ( ) ( )
F s m sx x X s
ms k
Solution in Laplace domain:
( )X s
20
f(t) is a unit impulse function
1m 4k
In this example, let
2 2 2
1 1 2 ( )
4 2 2 X s
s s
Solution in Laplace domain:
1 ( ) sin2
2 x t t
Solution in time domain:
21
0)0( 0 xx 0)0( 0 xx
We did not use integration, but solved the ODE using LT!
𝒇 𝒕 = 𝛅(𝐭) ⇒ 𝑭 𝒔 = 𝟏
22
Steps in Solving ODE Using Laplace Transform
1. Transform time domain function to frequency
domain function : 𝒙 𝒕 → 𝑿(𝒔)
2. Solving for solution (Algebraic problem)
3. Transform the solution in frequency domain
back to time domain:𝑿(𝒔) → 𝒙 𝒕
WE CAN USE LAPLACE TRANSFORM TABLES
FOR THESE TRANSFORMATIONS
23
Partial Fraction Expansion
Given the following differential equation, solve for 𝒚 𝒕 if all initial
conditions are zero:
𝒅𝟐𝒚
𝒅𝒕𝟐 + 𝟏𝟐
𝒅𝒚
𝒅𝒕 + 𝟑𝟐𝒚 = 𝟑𝟐𝒖 𝒕
1. The Laplace transform of the equation is:
𝒔𝟐𝒀 𝒔 + 𝟏𝟐𝒔𝒀 𝒔 + 𝟑𝟐𝒀 𝒔 = 𝟑𝟐
𝒔
2. Solving for the solution in s domain:
𝒀 𝒔 = 𝟑𝟐
𝒔(𝒔𝟐 + 𝟏𝟐𝒔 + 𝟑𝟐)
3. Solve for 𝒚 𝒕 using the terms in the table.
But no terms can be used directly!
We need to form the partial fraction expansion of 𝒀 𝒔 to match the
terms in the table.
teety t 8421)(
Interesting Case: Complex Conjugate Poles
Example:
After expansion,
Complex numbers involved.
Terms not found from the table.
2
2 ( )
2 5
s X s
s s
Partial Fraction Expansion…Special Case
𝑿 𝒔 = 𝒔 + 𝟐
(𝒔 + 𝟏 + 𝟐𝒋)(𝒔 + 𝟏 − 𝟐𝒋)
2/1/2016
5
2 2
2 ( )
( 1) 2
s X s
s
2 2 5 0s s Pole equation:
Therefore:
Solution:
2 2 2 2 5 ( 1) 2s s s
Trick: remain in second order form
Partial Fraction Expansion…Complex Number…cont’d
tetetx tt 2sin 2
12cos)(
Consider a vibration system with mass, damping, and spring.
The initial conditions are:
The system parameters are:
The input to the system is:
an impulse signal
Use Laplace transform to find the system’s response.
26
Partial Fraction Expansion Exercise: Mass, Damping, and Spring System
f
2c 1m
(0) 0x (0) 0x
75.k
)()( ttf
Consider a vibration system with mass, damping, and spring.
The initial conditions are:
The system parameters are:
The input to the system is:
a step signal f(t) = 1
Use Laplace transform to find the system’s response.
27
Partial Fraction Expansion Exercise: Mass, Damping, and Spring System
f
2c 1m
(0) 0x (0) 0x
75.k
28
Linear Time Invariant (LTI) System
f
Consider this mass-spring system again. The input and output relation of the system can be described using the following differential equation:
𝒎𝒙 (𝒕)+ 𝒌𝒙 𝒕 = 𝒇 𝒕
Let us use a more general differential equation to describe the input and output relation of a physical system:
𝒅𝒏𝒚(𝒕)
𝒅𝒕𝒏 + 𝒂𝒏−𝟏
𝒅𝒏−𝟏𝒚(𝒕)
𝒅𝒕𝒏−𝟏 +⋯+ 𝒂𝒐𝒚 𝒕 = 𝒃𝒎
𝒅𝒎𝒖 𝒕
𝒅𝒕𝒎 +⋯+ 𝒃𝒐𝒖(𝒕)
29
Linear Time Invariant (LTI) System We assume that all systems studied in this subject are linear time invariant.
• That means, this equation contain no powers or other
functions or products of the independent variables or derivatives
• Nonlinear examples: 𝒙 𝒕 𝒚 𝒕 + 𝒚 𝒕 = 𝒖 𝒕 𝒙𝟐 𝒕 + 𝒙 𝒕 = 𝒖 𝒕 𝒔𝒊𝒏 𝒕 𝒙 𝒕 + 𝒙 𝒕 + 𝟐 = 𝒖(𝒕)
• All coefficients are constant coefficients • Time-variant example: a moving car consuming gas is not
strictly time-invariant – the total mass is reducing
𝒅𝒏𝒚(𝒕)
𝒅𝒕𝒏 + 𝒂𝒏−𝟏
𝒅𝒏−𝟏𝒚(𝒕)
𝒅𝒕𝒏−𝟏 +⋯+ 𝒂𝒐𝒚 𝒕 = 𝒃𝒎
𝒅𝒎𝒖 𝒕
𝒅𝒕𝒎 +⋯+ 𝒃𝒐𝒖(𝒕)
30
Properties of Linear Time Invariant (LTI) System
Superposition
Homogeneity
2/1/2016
6
31
Linear Time Invariant (LTI) System Example 1
Suppose the input to the plant consists of three impulses at times t = 0 of size 7, 8, 9. What is the value of y(t) at time t = 5? Use both superposition and homogeneity properties, we can find:
= 7ℎ 5 + 8ℎ 5 + 9ℎ(5)
Suppose the inputs are three impulses at times t = 0, 1, 2 of size 7, 8, 9. What is the value of y(t) at time t = 5?
32
Linear Time Invariant (LTI) System Example 2
Any signal can be thought of as the summation (integral) of many impulses at different points in time
By the principal of superposition, if we can find the response of the system to one impulse, we will be able to find the response to an arbitrary input
𝑦(𝑡)
Arbitrary input
h(t-
33
Convolution Integral
Impulse at time t Impulse at time τ
Arbitrary input
The convolution integral Its abbreviation y(t)=u(t)*g(t)
34
Cascaded LTI System
The Laplace transform of the convolution integral For this cascaded system, what is the output? Output:
y(t) = u(t)*g(t)
𝒀 𝒔 = 𝓛 𝒚 𝒕 = 𝓛 𝒖 𝒕 ∗ 𝒈(𝒕) = 𝑼 𝒔 𝑮(𝒔)
The transfer function of a system is defined as the
ratio of the Laplace transforms of the output and input
with zero initial conditions.
Example 1:
Find the transfer function for a system modelled by the
following ODE
𝒅𝒄(𝒕)
𝒅𝒕 + 𝟐𝒄 𝒕 = 𝒓(𝒕)
35
Transfer Function
𝑮 𝒔 = 𝒀(𝒔)
𝑼(𝒔)
Example 2:
Use the result in Example 1, to find the response to an
unit step input, assuming zero initial conditions
36
Transfer Function…cont’d
2/1/2016
7
Example 3:
Find the transfer function corresponding to the ODE
𝒅𝟑𝒄
𝒅𝒕𝟑 + 𝟑
𝒅𝟐𝒄
𝒅𝒕𝟐 + 𝟕
𝒅𝒄
𝒅𝒕 + 𝟓𝒄 =
𝒅𝟐𝒓
𝒅𝒕𝟐 + 𝟒
𝒅𝒓
𝒅𝒕 + 𝟑𝒓
37
Transfer Function…cont’d
38
Modelling of Physical Systems
Mechanical Systems Electrical Systems
ODE ODE Impedance
39
Modelling of Translational Mechanical Systems Translational Mechanical Systems…Example
Find the transfer function for this system.
39
Spring Damper Mass System
ODE ODE Impedance
Modelling of Rotational Mechanical Systems
40
Rotational Mechanical Systems…Example
Torsion Disk Control System 41
Find the transfer function.
2/1/2016
8
ODE ODE ODE
Modelling of Electrical Systems
40
TF TF
Modelling of Electrical Systems
40
Electrical Systems…Example
RLC Circuit
41
Find the transfer function for the system, assuming input is V(t) and output is i(t).
Commonality of Physical Systems
41
Compare the transfer functions of these systems. What do you find?
Recap today’s topics +
Questions?
Homework 2
All the problems are from Chapter 2 Problem 2 Problem 4 Problem 7 Problem 8 Problem 16 Problem 23
2/1/2016
9
Appendix: MATLAB EXERCISES
Ex. 1. Spring-Mass-Damper System Response When subjected to an impulse input, the output is Use y <– x, x <- time in MATLAB program
)(3)( 5.15. tt eetx
You can save it as a file exervise1.m You can run the program using “Run” button. Or type in the file name
This the result (does it make sense, given in impulse input?) Change the increment step, and increase the response time in your program, and observe the effects.
3_TimeResponse.pdf
2/3/2016
1
1
Dynamics and Control
Topic III: Time Response
• System natural response and forced response • The location of the poles and zeroes of the transfer
function in the “s-plane” • Investigate the relationship between system
components and time response • Predict the time response of a system from its
transfer function • Special facts about 1st and 2nd order systems
Week Topics Exam Reading
1 Introduction Ch 1-2
2 Math Review Ch 1-2
3 Modelling (Frequency + Time Domain) Ch 2
4 Time Response Ch 4
5 Block Diagram M-Exam 1 Ch 5
6 Stability Ch 6
7 Midterm Review + Make up Ch 1-6
8 Experiment
9 Spring Break
10 Steady State Errors Ch 7
11 Root Locus Ch 8
12 Design Via Root Locus M-Exam 2 Ch 9
13 Design Via Root Locus Ch 9
14 Frequency Response Ch 10
15 Design Via Frequency Response Ch 11
16 Final Review + Make up Ch 7-11
17 Final Exam Final Exam 2
Schedule
2
Course Roadmap
Block Diagrams
Why Time Response?
5
System Response
• The output response of a system is the sum of two related responses
I.The natural response describes dissipation, oscillation, or unstable growth from initial conditions
II.The forced response describes how the system reacts to external inputs
• Together these elements determine the overall response of the system
f
6
A Familiar Example – Nature Response
The external input to the system is f(t) =0 (Nature Response).
The system ODE: 𝒎𝒙 𝒕 + 𝑹𝒙 𝒕 + 𝒌𝒙 𝒕 = 𝒇 𝒕 = 𝟎
𝒎[𝒔𝟐𝑿 𝒔 − 𝒔𝒙 𝟎 − 𝒙 𝟎 ] + 𝑹[𝒔𝑿 𝒔 − 𝒙(𝟎)] + 𝒌𝑿 𝒔 = 𝟎
The Laplace transform:
𝑿 𝒔 = 𝒎𝒔 +𝑹 𝒙 𝟎 +𝒎𝒙 𝟎
𝒎𝒔𝟐 + 𝑹𝒔 + 𝒌
Rearrange the function:
2/3/2016
2
7
A Familiar Example - Natural Response
The system parameters are: Mass m = 1 kg, Damping co. R = 4 Ns/m, Spring co. k = 3N/m
The initial conditions are: 𝒙(𝟎) = .5 m, 𝒙 (0) = 0
𝑿 𝒔 = 𝒎𝒔 +𝑹 𝒙 𝟎 +𝒎𝒙 𝟎
𝒎𝒔𝟐 + 𝑹𝒔 + 𝒌
𝑿 𝒔 = . 𝟓 𝒔 + 𝟒
𝒔𝟐 + 𝟒𝒔+ 𝟑 =
. 𝟓 𝒔 + 𝟒
(𝒔 + 𝟏)(𝒔 + 𝟑) =.𝟕𝟓
𝟏
𝒔 + 𝟏 −.𝟐𝟓
𝟏
𝒔 + 𝟑
Apply inverse Laplace transform,
𝒙 𝒕 =.𝟕𝟓𝒆−𝒕−.𝟐𝟓𝒆−𝟑𝒕
8
A Familiar Example - Natural Response
What if we increase the spring constant? Mass m = 1 kg, Damping co. R = 4 Ns/m, Spring co. k = 20 N/m
𝑿 𝒔 = . 𝟓 𝒔 + 𝟒
𝒔𝟐 + 𝟒𝒔+ 𝟐𝟎 =
. 𝟓 𝒔 + 𝟒
(𝒔 + 𝟐)𝟐+𝟏𝟔
𝑿 𝒔 =. 𝟓 𝒔 + 𝟐
𝒔 + 𝟐 𝟐 + 𝟏𝟔 +
𝟐
𝒔 + 𝟐 𝟐 + 𝟏𝟔
𝒙 𝒕 =.𝟓𝒆−𝟐𝒕(𝒄𝒐𝒔𝟒𝒕 + 𝟎. 𝟓𝒔𝒊𝒏𝟒𝒕)
𝑿 𝒔 = 𝒎𝒔 +𝑹 𝒙 𝟎 +𝒎𝒙 𝟎
𝒎𝒔𝟐 + 𝑹𝒔 + 𝒌
9
A Familiar Example - Natural Response
Compare the responses in MATLAB (write the code in m file):
𝒙 𝒕 =.𝟕𝟓𝒆−𝒕−.𝟐𝟓𝒆−𝟑𝒕
𝒙 𝒕 =.𝟓𝒆−𝟐𝒕 𝒄𝒐𝒔𝟒𝒕 + 𝟎. 𝟓𝒔𝒊𝒏𝟒𝒕 Result:
When the spring constant is increased, system response is faster, but with overshoot.
10
MATLAB code - Natural Response % Solving for the time responses for the spring mass damper system
t=0:.1:10; % select time base
x1=.75*exp(-t)-.25*exp(-3*t); % natural response plot(t,x1,'r'); % plot in red hold on; % hold the plot
x2=.5*exp(-2*t).*(cos(4*t)+.5*sin(4*t)); % forced response % be careful with ".*" plot(t,x2,'b'); % plot in blue
grid; % add grid to the plot xlabel('Time in s'); ylabel('Response in m'); title('Comparing System Natural Responses');
pause; hold; % release the current the plot
Note! There is a dot here!!
f
11
A Familiar Example – Forced Response
The external input f(t) ≠ 𝟎. We will assume initial conditions are 0 when considering forced response.
The system ODE: 𝒎𝒙 𝒕 + 𝑹𝒙 𝒕 + 𝒌𝒙 𝒕 = 𝒇(𝒕)
𝑿 𝒔
𝑭(𝒔) =
𝟏
𝒎𝒔𝟐 + 𝑹𝒔 + 𝒌
𝒎𝒔𝟐𝑿 𝒔 +𝑹𝒔𝑿 𝒔 + 𝒌𝑿 𝒔 = 𝑭(𝒔)
The Laplace transform:
The transfer function:
12
A Familiar Example – Forced Response
Assume f(t) = 1. The system parameters are: Mass m = 1 kg, Damping co. R = 4 Ns/m, Spring co. k = 3 N/m
𝑿 𝒔 = 𝟏
𝒎𝒔𝟐 + 𝑹𝒔 + 𝒌 𝑭(𝒔) =
𝟏
𝒔
𝟏
𝒔𝟐 + 𝟒𝒔 + 𝟑
The transfer function is:
When the spring constant is increased to k = 20 N/m,
the transfer function is :
𝑿 𝒔 = 𝟏
𝒎𝒔𝟐 + 𝑹𝒔 + 𝒌 𝑭(𝒔) =
𝟏
𝒔
𝟏
𝒔𝟐 + 𝟒𝒔 + 𝟐𝟎
Compare the responses in MATLAB (Write the code in m file).
𝒙 𝒕 = 𝟏
𝟑 − 𝟏
𝟐 𝒆−𝒕 +
𝟏
𝟔 𝒆−𝟑𝒕
𝒙 𝒕 = 𝟏
𝟐𝟎 −
𝟏
𝟐𝟎 𝒆−𝟐𝒕𝐜𝐨𝐬𝟒𝒕 +
𝟑
𝟒 𝒆−𝟐𝒕𝐬𝐢𝐧𝟒𝒕
2/3/2016
3
13
MATLAB code – Forced Response
% Forced Response for Step Input % 1st system: Y(s)/F(s) = 1/(s^2 + 4s + 3) sys = tf(1,[1,4,3]); % tf = transfer function step(sys); % response to a step input pause; % 2nd system: Y(s)/F(s) = 1/(s^2 + 4s + 20) sys = tf(1,[1,4,20]); % tf = transfer function step(sys); % response to a step input
Ist click
2nd click
14
% Another way to program a transfer function
t=0:.1:7;
% 1st system: Y(s)/F(s) = 1/(s^2 + 4s + 3)
numt1=[1]; % define numerator of T1
dent1=[1 4 3]; % define denominator of T1
T1=tf(numt1, dent1); % create transfer f. for T1
[y1,t1]=step(T1,t); % run step r. and save points
% 2nd system: Y(s)/F(s) = 1/(s^2 + 4s + 20)
numt2=[1]; % define numerator of T2
dent2=[1 4 20]; % define denominator of T2
T2=tf(numt2, dent2); % create transfer f. for T2
[y2,t2]=step(T2,t); % run step r. and save points
plot(t1,y1,'-.', t2,y2,'-'); % chose plot pattern
xlabel('Time in s');
ylabel('Response in m');
title('Response Comparison');
MATLAB code – Forced Response
15
Natural Response and Forced Response
Natural Response Forced Response
K=3Nm
K=20Km
K=20Km
K=3Nm
16
Poles, Zeroes, and Responses
Transfer function
• The poles of a transfer function are the values of s that cause the transfer function to become infinite
• The zeroes of a transfer function are the values of s that cause the transfer function to go to zero
• A qualitative understanding of the effect of poles and zeroes can help us to quickly estimate performance
𝑮 𝒔 = 𝒀(𝒔)
𝑼(𝒔)
17
The s-plane
In the forced response example, when k = 3N/m, the output is Apply inverse Laplace transform, we can find
𝒙 𝒕 = 𝟏
𝟑 −
𝟏
𝟐 𝒆−𝒕 +
𝟏
𝟔 𝒆−𝟑𝒕
𝑿 𝒔 = 𝟏
𝒎𝒔𝟐 + 𝑹𝒔 + 𝒌 𝑭 𝒔 =
𝟏
𝒔𝟐 + 𝟒𝒔 + 𝟑
𝟏
𝒔 =
𝟏
𝒔(𝒔 + 𝟏)(𝒔 + 𝟑)
Pole zero
18
The s-plane In the forced response example, when k = 20 N/m, the output is
Apply inverse Laplace transform, we can find
𝒙 𝒕 = 𝟏
𝟐𝟎 −
𝟏
𝟐𝟎 𝒆−𝟐𝒕(𝐜𝐨𝐬𝟒𝒕 + 𝟒𝐬𝐢𝐧𝟒𝒕)
𝑿 𝒔 = 𝟏
𝒎𝒔𝟐 + 𝑹𝒔 + 𝒌 𝑭 𝒔 =
𝟏
𝒔𝟐 + 𝟒𝒔 + 𝟐𝟎
𝟏
𝒔
= 𝟏
𝒔(𝒔 + 𝟐 + 𝟒𝒋)(𝒔 + 𝟐 − 𝟒𝒋)
2/3/2016
4
19
Qualitative Effect of Poles
Assume a system has the following transfer function:
If the input to the system is a unit impulse, we can find the time response is:
𝒚 𝒕 = 𝒆−𝝈𝒕 Sketch system response: when 𝝈 > 𝟎, pole is located on the left hand side of the s-plane, system stable when 𝝈 < 𝟎, pole is located on the right hand side of the s-plane, system unstable
𝑮 𝒔 = 𝒀(𝒔)
𝑼(𝒔) =
𝟏
𝒔 + 𝝈
20
Qualitative Effect of Poles
• So we can conclude that in general, if the poles of the system are on the left hand side of the s-plane, the system is stable
• Poles in the right hand plane will
introduce components that grow without bound
• Poles on real axis generate exponential response
• Poles as conjugate pairs lead to oscillation
21
First Order Systems
Consider this RL circuit. I(s) is the output, and V(s) is the input to the circuit. The transfer function of this system is:
𝑰(𝒔)
𝑽(𝒔) =
𝟏
𝑳𝒔 + 𝑹 =
𝟏/𝑳
𝒔 + 𝑹/𝑳 =
𝒂
𝒔 + 𝝈
In general, we represent a first order system like this:
𝑮 𝒔 = 𝑪(𝒔)
𝑹(𝒔) =
𝒂
𝒔 + 𝝈
22
First Order Systems
If the input R(s) is a unit step, the system response is:
𝑪(𝒔) =
𝟏
𝒔
𝒂
𝒔 + 𝝈
The system time response is:
𝒄 𝒕 = 𝒂
𝝈 (𝟏 − 𝒆−σ𝒕)
Natural response Forced response
The system time response is: 23 𝒄 𝒕 = 𝒂
𝝈 (𝟏 − 𝒆−σ𝒕)
σ
Response Characteristics
𝑎/𝜎
• Time constant 1/σ
𝒕 = 𝟏/σ, 𝒄 𝒕 =.𝟔𝟑 𝒂
𝝈
• Rising time Tr Time for the response to go from 10% to 90% of the final response
• Settling time Ts Time to reach 98% of the final response
1/σ 2/σ 3/σ 4/σ 5/σ
24
• The dynamic model of a system is not known.
• The unit step response of the system is given on the left.
• Estimate the dynamic model of the system.
First Order Systems Example
2/3/2016
5
25
• For a first order system we have a single, real pole • Many systems of interest are of higher order • Second order systems are quite common. The
general dynamic model is:
• In control engineering, we normally use the following standard form for a second order system:
Second Order Systems
cbss
a sG
2 )(
22
2
2 )(
nn
n
ss CsG
26
Second Order Systems – Some Examples
The transfer functions for both systems: or
cbss
a sG
2 )(
f
22
2
2 )(
nn
n
ss CsG
27
Damping Ratio & Natural Frequency
• 𝝎𝒏 is the natural frequency of the system, i.e., the frequency of a oscillation of the system without damping
• 𝝇 is the damping ratio of the system
No damper
28
Location of Poles
• Consider a general second order system:
• The poles are the roots of the denominator: recall:
22
2
2 )(
nn
n
ss CsG
02 22 nnss
nn j 21roots
29
Location of Poles
• When there are two identical roots:
Laplace transform term
1 nroots
1
nn j 21roots
30
Location of Poles
• When , there are two real poles:
1
1
nn 1roots 2
nn j 21roots
2/3/2016
6
31
Location of Poles
• When , there are two complex poles:
1
1
nn j 21roots
nn j 21roots
32
Location of Poles
• When , there are two imaginary poles:
0
0
njroots
nn j 21roots
33 Second Order System Behaviors
Different Damping Cases
35
• Find damping ratio for each system, report the expected response and sketch the response.
Second Order Systems Example
36
Underdamped Second Order System
• A common model for physical systems • Damping ratio 𝝇 < 𝟏 • Step response for a 2nd-order underdamped system
𝑪 𝒔 = 𝝎𝒏 𝟐
𝒔(𝒔𝟐 + 𝟐𝝇𝝎𝒏𝒔 +𝝎𝒏 𝟐)
𝒄 𝒕 = 𝟏 − 𝟏
𝟏−𝝇𝟐 𝒆−𝝇𝝎𝒏𝒕𝐜𝐨𝐬(𝝎𝒏 𝟏 − 𝝇𝟐𝒕 − 𝝓)
where 𝝓 = tan−𝟏(𝝇/ 𝟏 − 𝝇𝟐)
2/3/2016
7
37
2nd-Order System Responses for damping ratios
• Tr, rise time. Time required for the response to go from .1 to .9 of the final value
• Tp, peak time. Time required to reach the 1st maximum peak
• Ts, settling time. Time required to reach and stay within 2% of the steady-state value
• %OS, percent overshoot
• 𝝎𝒏 natural frequency
• 𝝇 damping ratio
38
Response Characteristics
• Tp, peak time. 𝑻𝒑 = 𝝅
𝝎𝒏 𝟏−𝝇𝟐
• %OS, overshoot. %𝐎𝐒 = 𝒆
−( 𝝇𝝅
𝟏−𝝇𝟐 )
∗ 𝟏𝟎𝟎
• Ts, settling time. 𝑻𝒔= 𝟒
𝝇𝝎𝒏
• Tr, rise time. No analytical form. Can be found from plot. 𝐓𝐫 ≈ 𝟏. 𝟖/𝝎𝒏 (empirical formula)
39
Evaluation of Response Characteristics
40
Second-Order System Example
Finding Tp, %𝐎𝐒, Ts and Tr for the following system when subjected to a step input:
𝑮 𝑺 = 𝟏𝟎𝟎
𝒔𝟐 + 𝟏𝟓𝒔 + 𝟏𝟎𝟎
41
Relating Poles to Response Characteristics
ddnn jj 21roots
42
Pole Location and Response Characteristics
2/3/2016
8
43
Pole Location and Response Characteristics
44
Pole Location and Response Characteristics
45
Example 1: Given pole location, predicting response Matlab Exercise 1 (code given)
P1=[1 3+7i]; P2=[1 3-7i]; deng=conv(P1, P2); omegan=sqrt(deng(3)/deng(1)) zeta=(deng(2)/deng(1))/(2*omegan) Ts=4/(zeta*omegan) Tp=pi/(omegan*sqrt(1-zeta^2)) Tr=omegan/1.8 Os=100*exp(-zeta*pi/sqrt(1-zeta^2))
Matlab Exercise 2 (write your code)
• Plot response subject to unit step input • Move poles around (in 3 directions), observe the changes • Prepare a one-page report, discussing how location of
poles affects the system response (in terms of time response characteristics), attach your code
46
Example 2: Find Allowable Region for Poles
Find allowable region in the s-plane for the poles of a transfer function to meet the requirements: Tr < 0.6 sec Os% < 10% Ts < 3 sec
47
Example 3: Transient Response Through Component Design
Given the system shown above, find J and D to yield 20% overshoot and a settling time of 2 seconds for a step input torque T(t)
48
Additional Poles
• The preceding discussed are second order systems (two poles)
• What happens to the system response if there are additional poles (higher order system)?
2/3/2016
9
49
Additional Poles
• The preceding discussed are second order systems (two poles)
• Consider a third order system with an additional pole at α
• By partial fraction expansion, we can obtain the step response
• The response of the system consists two parts: contribution by the original
second system contribution by the
additional pole
)(sG
)(sG
50
Additional Poles
Infinity Far Near
α=∞, effect of Case III ≈ 0
51
Additional Poles
C3(t), additional pole is at infinity
52
Additional Zeros
Consider a second order system: An addition zero is added to the system: The response of the system consists two parts: • the derivative of the original system • a scaled version of the original system
53
Additional Zeros
54
In Class Exercise 1. Find the Transfer Function of the System
2/3/2016
10
55
In Class Exercise 2. Find the Transfer Function of the System
56
Homework 3
All the problems are from Chapter 4 Problems 1 – 8. Problems 12 -14. Problem 29.
4_Block Diagrams.pdf
10/18/2014
1
1
Dynamics and Control
Topic IV: Block Diagrams
2
Week Day Topics Exam Reading
1 Aug 25 No Class
2 Sept 1 Labor Day
3 Sept 8 Introduction/Math Review Ch. 1-2
4 Sept 15 Modelling (Frequency + Time Domain) Ch 2
5 Sept 22 Time Response Ch 4
6 Sept 29 Block Diagram M-Exam 1 Ch 5
7 Oct 6 Stability Ch 6
8 Oct 13 Fall Break
9 Oct 20 Midterm Review + Make up Ch 1-6
10 Oct 27 Steady State Errors Ch 7
11 Nov 3 Root Locus Ch 8
12 Nov 10 Design Via Root Locus M-Exam 2 Ch 9
13 Nov 17 Design Via Root Locus Ch 9
14 Nov 24 Frequency Response Ch 10
15 Dec. 1 Design Via Frequency Response Ch 11
16 Dec. 8 Final Review + Make up Ch 7-11
16 Dec. 11 Final Exam 10:30 -12:30 Final Exam
Schedule
Course Roadmap
Block Diagrams
Why Block Diagrams?
f
G(s)
We have been working with individual subsystems represented by a block with its input and output.
Sensing Actuation Control PlantControlSystem = + + +
Remember… BIG DOG CONTROL: Block Diagram Representation
DISTURBANCE
Environment
Foot Trajectory Planning
Desired Walking Speed
REFERENCE
Joint angles & velocities
Robot Joint torques
RobotRobot
Virtual Leg IK
Virtual Leg FK
Virtual
Leg VM
PD Servo
Virtual Leg Coords
Virtual Leg Forces
State Machine
Leg State Gait
Coordination Mechanisms
Influences to/from other legs
+
IK=inverse kinematics FK=forward kinematics VM=virtual model
10/18/2014
2
7
• Like the BIG DOG, in reality, many systems are composed of multiple subsystems
• Block Diagrams Method is for combining subsystems and simplifying system representation
• Schematic elements used in block diagrams
Schematic Elements
Brain Hand Foot
Eye
Car_
Desired Direction
Desired Speed
Direction
Speed Hands + Feet
Cascaded System
Parallel System
Brain Hand
Foot
Eye
Car_
Desired Direction
Desired Speed
Direction
Speed
Feedback System
General form
Block Diagram Reduction – Example 1
• Search for the general form • Apply the general formal • Reduce to a single transfer
function
Find Transient Response – Example 2
For the system shown above, find Tp, OS, Ts
numg = [25]; Ts = 4/(z*wn) deng = poly([0 -5]); Tp = pi/(wn*sqrt(1-z^2)) G = tf (numg, deng) OS=exp(-z*pi/sart(1-z^2))*100 T = feedback (G, 1) step(T) [numt, dent] = tfdata(T, ‘v’); pause wn = sqrt(dent(3)) z=dent(2)/(2*wn)
Unity feedback
10/18/2014
3
Gain Design for Transient Response – Example 3
• Find the value of K so that the system will respond with OS=10%
• Can we select Ts as a designed criterion?
Shuttle Pitch Control - Example 4
• A real system that incorporates feedback to control the
pitch of the space shuttle (amongst other things).
• We manipulate block diagrams for control design and analysis.
• The control
mechanisms include
the body flap,
elevons and engines
• Measurements are
made by the
vehicle’s inertial
unit, gyros and accelerometers
A simplified model of the pitch controller for the space shuttle
Transfer Function?
Transfer Function:
17
Homework 4
Reduce the block diagram to a single transfer function. Use Matlab to verify your result.
Problems 15-17.