Professional Documents
Culture Documents
1
Vijay Kumar and Ani Hsieh
Robo3x-1.1 1
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
The Purpose of Control
Robo3x-1.1 2
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Anatomy of a Feedback Control System
Disturbance
Sensor
Robo3x-1.1 3
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Twin Objectives of Control
• Performance
• Disturbance
Rejection
Robo3x-1.1 4
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Learning Objectives for this Week
• Linear Control
• Modeling in the frequency domain
• Transfer Functions
• Feedback and Feedforward Control
Robo3x-1.1 5
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Frequency Domain Modeling
Robo3x-1.1 6
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Laplace Transforms
Integral Transform that maps functions from
the time domain to the frequency domain
with
Robo3x-1.1 7
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Example
Let , compute
Robo3x-1.1 8
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Inverse Laplace Transforms
Integral Transform that maps functions from
the frequency domain to the time domain
Robo3x-1.1 9
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Example
Let , compute
Robo3x-1.1 10
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Laplace Transform Tables
Robo3x-1.1 11
http://integral-table.com/downloads/LaplaceTable.pdf
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Video 5.2
Vijay Kumar and Ani Hsieh
Robo3x-1.1 12
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Generalizing
Given
How do we obtain ?
Robo3x-1.1 13
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Partial Fraction Expansion
Robo3x-1.1 14
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Case 1: Roots of D(s) are Real & Distinct
Compute the Inverse Laplace of
Robo3x-1.1 15
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Case 2: Roots of D(s) are Real & Repeated
Compute the Inverse Laplace of
Robo3x-1.1 16
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Case 3: Roots of D(s) are Complex
Compute the Inverse Laplace of
Robo3x-1.1 17
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Video 5.3
Vijay Kumar and Ani Hsieh
Robo3x-1.1 18
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Using Laplace Transforms
Given
Robo3x-1.1 19
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Properties of Laplace Transforms
Robo3x-1.1 20
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Summary
Laplace Transforms
• time domain <-> frequency domain
• differential equation <-> algebraic equation
• Partial Fraction Expansion factorizes
“complicated” expressions to
simplify computation of inverse Laplace
Transforms
Robo3x-1.1 21
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Example: Solving an ODE (1)
Given with
, and .
Solve for .
Robo3x-1.1 22
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Example: Solving an ODE (2)
Robo3x-1.1 23
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Video 5.4
Vijay Kumar and Ani Hsieh
Robo3x-1.1 24
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Controller Design
Disturbance
Robo3x-1.1 25
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Controller Design
Disturbance
Input + + + Output
-
Controller
Robo3x-1.1 26
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Controller Design
Disturbance
System Output
Input + + +
Controller
-
Robo3x-1.1 27
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Controller Design
Disturbance
System Output
Input + Controller + +
-
Robo3x-1.1 28
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Transfer Function
Relate a system’s output to its input
1.Easy separation of INPUT, OUTPUT,
SYSTEM (PLANT)
2.Algebraic relationships (vs. differential)
3.Easy interconnection of subsystems in a
MATHEMATICAL framework
Robo3x-1.1 29
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
In General
A General N-Order Linear, Time Invariant ODE
Robo3x-1.1 30
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
General Procedure
1. Convert
2. Analyze
3. Design using
4. Validate using
5. Iterate
Robo3x-1.1 31
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Underlying Assumptions
Linearity
1. Superposition
System
B/c the
2. Homogeneity Laplace
Transform is
Linear!
System
Robo3x-1.1 32
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Video 5.5
Vijay Kumar and Ani Hsieh
Robo3x-1.1 33
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Characterizing System Response
Given
Poles
Zeros
Example:
Robo3x-1.1 35
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
First Order Systems
In general
Let U(s) = 1/s, then
As such,
Therefore,
Robo3x-1.1 36
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Characterizing First Order Systems
Given with U(s) = 1/s
Robo3x-1.1 37
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Characterizing First Order Systems
Time Constant –
Rise Time –
Settling Time –
Robo3x-1.1 38
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Second Order Systems
Given, and U(s) = 1/s
Possible Cases
1. r1 & r2 are real & distinct
2. r1 & r2 are real & repeated
3. r1 & r2 are both imaginary
4. r1 & r2 are complex conjugates
Robo3x-1.1 39
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Case 1: Real & Distinct Roots
Overdamped
response
Robo3x-1.1 40
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Video 5.6
Vijay Kumar and Ani Hsieh
Robo3x-1.1 41
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Case 2: Real & Repeated Roots
Critically
damped
response
Robo3x-1.1 42
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Case 3: All Imaginary Roots
Undamped
response
Robo3x-1.1 43
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Case 4: Roots Are Complex
Underdamped
response
Robo3x-1.1 44
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
A Closer Look at Case 4
Exponential Decay
(Real Part)
Sinusoidal Oscillations
(Imaginary Part)
Robo3x-1.1 45
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Summary of 2nd Order Systems
Given, and U(s) = 1/s
Solution is one of the following:
1. Overdamped: r1 & r2 are real & distinct
2. Critically Damped: r1 & r2 are real &
repeated
3. Undamped: r1 & r2 are both imaginary
4. Underdamped: r1 & r2 are complex
conjugates
Robo3x-1.1 46
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
2nd Order System Parameters
Given and U(s) = 1/s
• Natural Frequency – n
System’s frequency of oscillation with no damping
• Damping Ratio –
Robo3x-1.1 47
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
General 2nd Order System
Given and U(s) = 1/s
• When b = 0
Robo3x-1.1 48
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
General 2nd Order Systems
Second-order system transfer functions have
the form
Example: For
Compute , n, and s1,2?
Robo3x-1.1 49
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Video 5.7
Vijay Kumar and Ani Hsieh
Robo3x-1.1 50
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Characterizing Underdamped Systems
Robo3x-1.1 51
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Peak Time
3
Same Envelope 2
1 Motion
3
of
2
poles
1
1
2
3
Robo3x-1.1 52
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Settling Time
2 2 1
Same Frequency
1 Motion
of
poles
2 1
Robo3x-1.1 53
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Overshoot
3 Same Overshoot
3
2
1 Motion
2 of
1 poles
1
2
3
Robo3x-1.1 54
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
In Summary
s-plane
Robo3x-1.1 55
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Video 5.8
Vijay Kumar and Ani Hsieh
Robo3x-1.1 56
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Independent Joint Control
In general,
n-Link Robot Arm generally has ≥ n
actuators
Single Input Single Output (SISO)
Single joint control
Robo3x-1.1 57
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Permanent Magnet DC Motor
• Picture Here
Basic Principle
Robo3x-1.1 58
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Electrical Part
Armature Current
Back EMF
Motor Torque
Torque Constant
Robo3x-1.1 59
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Mechanical Part
Actuator Dynamics
Gear ratio
Robo3x-1.1 60
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Combining the Two
Robo3x-1.1 62
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Video 5.9
Vijay Kumar and Ani Hsieh
Robo3x-1.1 63
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Two SISO Outcomes
Input Voltage – Motor Shaft Position
Robo3x-1.1 65
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Open-Loop System
Actuator Dynamics
Robo3x-1.1 66
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Our Control Objectives
• Motion sequence of end-effector
positions and orientations (EE poses)
• EE poses Joint Angles Motor
Commands
• Transfer function
Robo3x-1.1 68
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Proportional (P) Control
• Control input proportional to error
• KP – controller gain
• Error is amplified by KP to obtain the desired
output signal
Robo3x-1.1 69
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
P Control of Vehicle Speed
Example: Cruise Control X v
Robo3x-1.1 70
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Performance of P Controller
KP = 10 KP = 50
Robo3x-1.1 72
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Proportional-Derivative (PD) Control
• Control input proportional to error AND 1st
derivative of error
Robo3x-1.1 73
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Performance of PD Controller
KP = 10 Decreases
KP = 10 rise time
KD = 1 KD = 3
Reduces
overshoot
KP = 500 KP = 500 & Settling
KD = 10 KD = 50 Time
Robo3x-1.1 74
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
PD Control of a Joint
w/
Robo3x-1.1 75
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
PD Compensated Closed Loop Response (1)
Robo3x-1.1 76
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
PD Compensated Closed Loop Response (2)
Robo3x-1.1 77
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Picking KP and KD
Design Guidelines
• Critically damped w/
• Pick and
Robo3x-1.1 78
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Performance of the PD Controller
Assuming and
At steady-state
Robo3x-1.1 79
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Video 5.11
Vijay Kumar and Ani Hsieh
Robo3x-1.1 80
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Proportional-Integral-Derivative (PID)
Controller
• Control input proportional to error, 1st
derivative AND an integral of the error
Robo3x-1.1 81
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Performance of PID Controller
KP = 10
KP = 10 KD = 3
KD = 3 KI = 1
KP = 10 • Eliminates SS-Error
KD = 3 • Increases overshoot &
KI = 50 settling time
Robo3x-1.1 82
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
PID Control of a Joint
w/
Robo3x-1.1 83
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
PID Compensated Closed Loop Response (1)
Robo3x-1.1 84
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
PID Compensated Closed Loop Response (2)
Robo3x-1.1 85
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Picking KP, KD, and KI
Design Guidelines
• System stable if KP, KD, and KI >0
•
• Set KI = 0 and pick KP, KD, then go back to pick
KI w/ in mind
Robo3x-1.1 86
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Summary of PID Characteristics
Robo3x-1.1 87
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Tuning Gains
• Appropriate gain selection is crucial for
optimal controller performance
• Analytically (R-Locus, Frequency Design, Ziegler
Nichols, etc)
• Empirically
• The case for experimental validation
• Model fidelity
• Optimize for specific hardware
• Saturation and flexibility
Robo3x-1.1 88
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Feedforward Control
• Motion sequence of end-effector
positions and orientations (EE poses)
• What if instead of , we want
?
Robo3x-1.1 89
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Video 5.12
Vijay Kumar and Ani Hsieh
Robo3x-1.1 90
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Closed Loop Transfer Function (1)
Robo3x-1.1 91
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Closed Loop Transfer Function (2)
Robo3x-1.1 92
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Closed Loop Transfer Function (3)
Robo3x-1.1 93
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Picking F(s)
Closed loop transfer function given by
Robo3x-1.1 94
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Will This Work?
Let F(s) = 1/G(s), i.e., a(s) = p(s) and b(s) = q(s),
then
Robo3x-1.1 95
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Caveats – Minimum Phase Systems
Picking F(s) = 1/G(s), leads to
• Assume system w/o FF loop is stable
• By picking F(s) = 1/G(s), we require
numerator of G(s) to be Hurwitz (or
)
• Systems whose numerators have roots with
negative real parts are called Minimum Phase
Robo3x-1.1 96
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Feedforward Control w/ Disturbance
Robo3x-1.1 98
Property of Penn Engineering, Vijay Kumar and Ani Hsieh
Overall Performance
Robo3x-1.1 99
Property of Penn Engineering, Vijay Kumar and Ani Hsieh