Download as pdf or txt
Download as pdf or txt
You are on page 1of 101

11

ENPM808J
Rehabilitation Robotics

Lecture #2

Anindo Roy, PhD


Suggested reading(s)
• Control Systems

 Position Control Systems (Lectures 2-4)


 Any undergraduate feedback control textbook would do (but not really needed)
12

Technology often motivated by


failures than successes…

Why learn about control systems?


13

The Lokomat Robot


14

The Lokomat Robot


15

The Lokomat Robot


16

The Pelvis Robot (PAM)


17

The Pelvis Robot (PAM)


18

The ReWalk
19

The ReWalk
20

The ReWalk…not quite


• Patient X at the University of Maryland Rehabilitation & Orthopedics
Institute gets therapy with the ReWalk
 Falls at home – a serious adverse event (SAE)
 Study related SAE? Unlikely with only one patient

• Patient Y at the VA New York Bronx undergoes ReWalk therapy


 Falls in the clinic itself while walking with the ReWalk

• Two different patients, two different sites, two independent robots


 Too much of a coincidence

• Potential causes
 Protocol violation (safety) – unlikely (2 sites, different teams)
 Hardware – unlikely (2 different robots)

• What then?
21

What’s the issue?


• State-of-art robots

• One showed no efficacy (disaster), two others were unstable (catastrophe)

• Possibilities: design (unlikely), hardware (perhaps)

• Controller (likely)
 Control strategy – wrong type of controller with respect to application
 Controller settings – right type of controller but poorly tuned

• To understand, we will revisit position control systems (in sufficient


detail)
 Fundamentals of control systems (linear time invariant systems)
 Stability, performance
 Position/trajectory following control
 This will also be a prelude for the rationale for and the theory of impedance control
22

Control Systems: A (thorough)


Primer
Robot  Control  Systems  

•  Closed-­‐loop  control  system  


Illustra>on  using  damped  
•  Control-­‐law  par>>oning   spring  mass  system  
•  Trajectory-­‐following  control  
Robot  Control  Systems  

• Closed-­‐loop  control  system


Illustra>on  using  damped  
• Control-­‐law  par>>oning spring  mass  system  

• Trajectory-­‐following  control

• Force  control Illustra>on  using  damped  


spring  mass  system  

We are not going to discuss force control and instead


focus on impedance control
Robot  Control  Systems  

•  Closed-­‐loop  control  system  


Illustra>on  using  damped  
•  Control-­‐law  par>>oning   spring  mass  system  

•  Trajectory-­‐following  control  

•  Force  control   Illustra>on  using  damped  


spring  mass  system  

•  Impedance  control   Both  robot  manipulator  and  


damped  spring  mass  systems  
35

The feedback control concept


Why "close the loop"?  

Input(s)   Output(s)  

Physical  
System  
Basic  control  structure  

Input(s)   Controller   Output(s)  

Physical  
System  

Concept  of  feed  forward  control:  


Controller  outputs  invariant  of  system  outputs    
Basic  control  structure  

Input(s)   Controller   Output(s)  

Physical  
System  

Concept  of  feedback  control:  


Controller  outputs  depend  on  system  outputs    
The  need  for  control:   Why close the loop?

System  
stability  

Input(s)   Output(s)  

Inverted  pendulum  
Physical   Inherently  unstable  
System  
Some  systems  become  unstable  owing  
to  nature  (e.g.  amplitude)  of  input(s)  
Acquired  instability  
The  need  for  control  

System  
stability  

Input(s)   Output(s)  

System  
performance  
Physical  
System  
Mass-­‐spring-­‐damper  system:  
•  Amplitude,  frequency  response  
•  Steady-­‐state,  rise  &  decay  Emes  
Basic  control  ques>ons  

Q1:  What  is  being  controlled  (i.e.  variable/s)?  


Basic  control  ques>ons  

Q1:  What  is  being  controlled  (i.e.  variable/s)?  


 
Q2:  What  is  desired  (e.g.  stability,  performance  
characteris>cs)?  
Basic  control  ques>ons  

Q1:  What  is  being  controlled  (i.e.  variable/s)?  


 
Q2:  What  is  desired  (e.g.  stability,  performance  
characteris>cs)?  
 
Q3:  What  is  the  best  mode  of  control  (oTen  
informed  by  Q’s  1  &  2)?  
Basic  control  ques>ons  

Q1:  What  is  being  controlled  (i.e.  variable/s)?  


 
Q2:  What  is  desired  (e.g.  stability,  performance  
characteris>cs)?  
 
Q3:  What  is  the  best  mode  of  control  (oTen  
informed  by  Q’s  1  &  2)?  
 
Q4:  How  to  design  &  tune  the  controller?  
Concept  of  Control  Law  

Control  Law:  
 
Relates  the  controller  output  to  a  system  variable  
such  as  system  input  etc.  

u  =  f(x)  
 
u:  controller  output  (also:  control  signal)  
f:  operator  or  mathema>cal  func>on  (the  “law”)  
x:  system  variable  (e.g.  input)  
Control  Law:  Feed-­‐forward  System  

u  

x   Controller   y  

Physical  
System  

u  =  f(x)  
Control  Law:  Feedback  System  

u  

x   Controller   y  

Physical  
System  

u  =  f(x,  y)  
Robot  Control  Systems  

•  Closed-­‐loop  control  system  


Illustra>on  using  damped  
•  Control-­‐law  par>>oning   spring  mass  system  

•  Trajectory-­‐following  control  

•  Force  control   Illustra>on  using  damped  


spring  mass  system  

•  Impedance  control   Both  robot  manipulator  and  


damped  spring  mass  systems  
Concept  of  Contact  Constraints  
Contact  Constraints  
Contact  Constraints  

zero   Environment  sEffness   infinity  


Contact  Constraints  
sponge  

zero   Environment  sEffness   infinity  


Contact  Constraints  
sponge  

zero   Environment  sEffness   infinity  

§  Posi:on  Control    


§  Applica>ons:  Welding,  spray-­‐
pain>ng,  pick-­‐and-­‐place  
§  Ideal  posi>on  control  exhibits  
infinite  s>ffness  
Contact  Constraints  
sponge  

zero   Environment  sEffness   infinity  

§  Posi:on  Control    


§  Force  Control     §  Applica>ons:  Welding,  spray-­‐
§  Applica>ons:  Grinding,  drilling  
pain>ng,  pick-­‐and-­‐place  
§  Ideal  force  control  exhibits  zero  s>ffness   §  Ideal  posi>on  control  exhibits  
infinite  s>ffness  
36

Making the case for controllers:


Do we need one?
Physical  System:  No  Control  

§  Damped  spring  mass  with  actuaEon  

f
=f

Natural  frequency  
(only  k)  
k:  spring  sEffness  
b:  damping  constant   System  
m:  mass   constants  
f:  applied  force  
x:  posiEon  along  axis  of  applied   Damping  constant  
force   (both  k  and  b)  
Physical  System:  No  Control  

Func>ons  of  ini>al  condi>ons  


x(t) =

Exponen>al  decay   Sinusoid   Solu>on  valid  only  for    


f  =  0  
Decaying  sinusoidal   0  <  ζ  <  1  
oscillaEons  
under-­‐damped  system  
Physical  System:  No  Control  

Underdamped  (0  <  ζ  <  1)  

Vary  ωn  
Fix  ζ  
Decaying  
oscillaEons  
Physical  System:  No  Control  

Underdamped  (0  <  ζ  <  1)  

Fix  ωn  
Vary  ζ  
Decaying  
oscillaEons  
Physical  System:  No  Control  

Underdamped  (0  <  ζ  <  1)  

Fix  b  
Vary  k  

m=1  kg,  b=2  Ns/m,  v0=1  m/s  


Physical  System:  No  Control  

Underdamped  (0  <  ζ  <  1)  

Time  to  se[le  


i.e.  reach  
steady-­‐state  
does  not  vary  w/  
s:ffness  

m=1  kg,  b=2  Ns/m,  v0=1  m/s  


Physical  System:  No  Control  

Underdamped  (0  <  ζ  <  1)  

Fix  k  
Vary  b  

m=1  kg,  k=1  Ns/m,  v0=1  m/s  


Physical  System:  No  Control  

Our  objecEve:  
Se0ling  3me  be  upper-­‐bounded  
 
That  is,  the  system  should  aCain  its  steady-­‐state  
response  within  desired  :me  (the  upper  bound).  
 
SeCling  :me:  the  >me  it  takes  for  the  system  
response  to  aaain  some  propor>on  (usually  
90-­‐100%)  of  its  steady-­‐state  (final)  response  
Physical  System:  No  Control  

Mathema>cally,  by  defini>on  


 
Steady-­‐state:  
Lim tà∞ x(t) = x(∞)
 
We  desire:  
 
x(t = ts) = x(ts) = λx(∞),      0 ≤ λ ≤ 1
Physical  System:  No  Control  

x(∞) =  Lim tà∞   x(t) =


=0

At t = ts,  

x(t = ts) =
t = ts  
=0

Since e-σt ≠ 0,   αcosωdts – βsinωdts = 0  

ts = (1/ωd)tan-1(α/β)  
Physical  System:  No  Control  

Recall  our  objecEve:  


Se0ling  3me  be  upper-­‐bounded  

ts = (1/ωd)tan-1(α/β) ≤ c  

Can we assure this?  


Physical  System:  No  Control  

Recall  our  objecEve:  


Se0ling  3me  be  upper-­‐bounded  

ts = (1/ωd)tan-1(α/β) ≤ c  

Can we assure this?  

Need controller to shape performance!!  


Physical  System:  Closed-­‐loop  Control  

§  Damped  spring  mass  with  actuaEon  

f
Closed-­‐loop  Control  System  

§  Damped  spring  mass  with  actuaEon  

Choose  control  

f
Closed-­‐loop  Control  System  

§  Damped  spring  mass  with  actuaEon  

Choose  control  

Propor>onal   Control  
Part   Law  
Deriva>ve  
Part  
Closed-­‐loop  Control  System  

§  Damped  spring  mass  with  actuaEon  

Choose  control  

f
Closed-­‐loop  Control  System  

§  Damped  spring  mass  with  actuaEon  

Choose  control  

Controller  
Closed-­‐loop  Control  System  

§  Damped  spring  mass  with  actuaEon  

Choose  control  

Controller  
What  is  controlled  here?  
 
Closed-­‐loop  Control  System  

§  Damped  spring  mass  with  actuaEon  

Choose  control  

Controller  
What  is  controlled  here?  
Posi>on  
 
Closed-­‐loop  Control  System  

§  Damped  spring  mass  with  actuaEon  

Choose  control  

Controller  
What  is  controlled  here?  
Posi>on  
 
Steady  state?  
 
Closed-­‐loop  Control  System  

§  Damped  spring  mass  with  actuaEon  

Choose  control  

Controller  
What  is  controlled  here?  
Posi>on  
 
Steady  state?  
x  =  0  
Physical  System:  With  Control  

§  Damped  spring  mass  with  actuaEon  

f
=f

k = k + kp
k:  spring  sEffness  
b:  damping  constant  
m:  mass  
f:  applied  force  
x:  posiEon  along  axis  of  applied  
force  
b = b + kv
Physical  System:  With  Control  

Recall  our  previous  objecEve:  


Se0ling  3me  be  upper-­‐bounded  

ts = (1/ωd)tan-1(α/β) ≤ c  

Can we assure this?  


Physical  System:  With  Control  

Recall  our  previous  objecEve:  


Se0ling  3me  be  upper-­‐bounded  

ts = (1/ωd)tan-1(α/β) = f(kp, kv) ≤ c

Can we assure this?  

Yes!!
Adjust PD controller parameters!
Physical  System:  With  Control  

Control  allows  us  to  shape  the  performance  

Controller   System  Response  


Parameter   Se]ng  Time   Rise  Time   Overshoot   Steady-­‐State  Error  
kp Small  Change   Decrease   Increase   Decrease  
kv Decrease   Small  Change   Decrease   Small  Change  

“Tuning look-up table”  


Physical  System:  With  Control  
Underdamped  (ζ  =  0.1)   Overdamped  (ζ  =  2)  

SEffness  dominates   Damping  dominates  


More  oscillatory     Slow  convergence    
We  desire:    
Fastest  possible  transi:on  of  the  system  
to  its  res:ng  state  (or  steady-­‐state)  value  
How?  
Physical  System:  With  Control  
Underdamped  (ζ  =  0.1)   Overdamped  (ζ  =  2)  

SEffness  dominates   Damping  dominates  


More  oscillatory     Slow  convergence    
Cri:cal  Damping  
(b + kv)2 = 4m(k + kp)
FricEon  and  damping  are  in  “balance”  
Physical  System:  With  Control  
Underdamped  (ζ  =  0.1)   Overdamped  (ζ  =  2)  

CriEcally  damped  (ζ  =  1)  


SEffness  dominates   Damping  dominates  
More  oscillatory     Slow  convergence    
Is  the  problem  solved?  

Cri:cal  Damping  
(b + kv)2 = 4m(k + kp)

Choice  of  controller  parameters  


depends  on  mass  (or  inerEa)!!  
Is  the  problem  solved?  

Cri:cal  Damping  
(b + kv)2 = 4m(k + kp)

Problem:    
Make  the  controller  parameters  independent  
of  system  proper3es  (e.g.  mass)  
25

Modeling & Analysis in Frequency


Domain

Physical System Modeling

Laplace Transforms

Transfer Functions
26

Modeling Systems
• Systems may be studied in the frequency or time domain
• Frequency-domain: how the amplitude of the signal changes
with respect to frequency
Transfer functions

• Time-domain: how a signal changes over time


State equations

• Equations (either domain) may be used to describe the


relationship between the input and output of a system

This relationship is the


essence of control!
27

Modeling Systems
• The relationship between the input and output is
described by a mathematical function called a transfer
function
• Transfer functions can be used in block diagrams to study
the flow of inputs, outputs, controllers, and so on
• Systems described by differential equations are difficult to
model with block diagrams
Laplace transform may be used
30

Example: Car Suspension


• Modeled as a mass-spring-damper system
• Goal: determine xout d 2x
Newton: F = ma = m 2
Fin dt

Damping:
dx
F = Dv = D
dt

k D xout Spring: F = kx
31

Example: Car Suspension


• Modeled as a mass-spring-damper system
• Goal: determine xout Applying Newton’s Second Law:

Fin
2
d x
∑ F = m dt 2 = Fin − FD − Fk
d 2x dx
∑ F = m dt 2 = Fin − D dt − kx
k D xout
d 2x dx
m 2 + D + kx = Fin
dt dt
Second order differential equation
44

Example: Car Suspension


• Mass-spring-damper system
• When initial conditions are zero:
Fin
d x(t )
2
dx(t )
m 2
+D + kx(t ) = f (t )
dt dt

xout ms X ( s ) + DsX ( s ) + kX ( s ) = F ( s )
2
k D

We’ve gone from a difficult-to-solve second order LDE


to a quadratic algebraic equation
45

Example: Car Suspension


• Mass-spring-damper system

ms X ( s ) + DsX ( s ) + kX ( s ) = F ( s )
2

Fin
(ms + Ds + k ) X ( s ) = F ( s )
2

F (s)
= ms + Ds + k
2

k D xout X (s)
X (s) 1
= 2 = G (s)
F ( s ) ms + Ds + k
54

Where are we headed?


• Transfer functions form the basis of control system design

Fin

k D xout

X (s) 1
= 2 = G (s)
F ( s ) ms + Ds + k
34

Design & Analysis of Feedback


Systems

Error Regulation
35

Analysis and Design of Feedback


Systems
• Now we can engineer system performance parameters

“Unity Feedback” (H = 1)

• Percent overshoot
• Settling time
• Peak time
• Rise time
37

Control Systems: Steady-State Errors


• Previously we noted three requirements for the
performance of a control system:
 Transient response
 Stability
 Steady-state errors

Response
38

Control Systems: Steady-State Errors


• Steady-state error (SSE): difference between the input (command)
and output for a prescribed test input as t → ∞
• SSE depends on type of input and the system type
• *Note: assume all systems are stable*

Response
42

Control Systems: Steady-State Errors


• Sources of steady-state error
• Nonlinear sources
 Backlash in gears

• System configuration: consider system with step input


and pure gain
E ( s) = R( s) − C ( s)

c(t ) SS = Ke(t ) SS
1
e(t ) SS = c(t ) SS
Error diminishes K
as gain K increases
43

SS Error for Unity Feedback Systems


• Steady-state errors can be calculated in two ways
 Closed-loop transfer function, T(s)
 Open-loop transfer function, G(s), for unity feedback system
44

SS Error for Unity Feedback Systems


• Steady-state errors can be calculated in two ways
 Closed-loop transfer function, T(s)
• Let’s explore the steady-state, or final value, of the error

E ( s) = R( s) − C ( s)

C ( s ) = R ( s )T ( s )

E ( s ) = R( s )[1 − T ( s )]
How do we determine the steady-state error at time t?
45

SS Error for Unity Feedback Systems


• Steady-state errors can be calculated in two ways
 Closed-loop transfer function, T(s)

E ( s) = R( s) − C ( s)

C ( s ) = R ( s )T ( s )

E ( s ) = R( s )[1 − T ( s )]

e(∞ ) = lim sE ( s ) = lim sR ( s )[1 − T ( s )]


s →0 s →0
47

SS Error for Unity Feedback Systems


• Steady-state errors can be calculated in two ways
 Closed-loop transfer function, T(s)
 Open-loop transfer function, G(s), for unity feedback system

E ( s) = R( s) − C ( s)

C ( s ) = E ( s )G ( s )

R( s)
E (s) =
1 + G (s)
29

Design & Analysis of Feedback


Systems

Stability Analysis
30

Stability of Control Systems


• Previously we noted three requirements for the
performance of a control system:
 Transient response
 Stability
 Steady-state errors

Response
31

Stability of Control Systems


• Recall that the total response of a system is the sum of
the forced and natural responses:

c(t ) = c forced (t ) + cnatural (t )


32

Stability of Control Systems


• Using these concepts, we can develop definitions of stability,
instability, and marginal stability
• Stability: tendency of a system’s response to return to its
original, or commanded, state after being disturbed
33

Stability of Control Systems


• Using these concepts, we can develop definitions of stability,
instability, and marginal stability
• Stable
 Natural response approaches zero as time approaches infinity
 Every bounded input yields a bounded output
BIBO
• Unstable
 Natural response grows without bound as time approaches infinity
 Any bounded input yields an unbounded output
• Marginally Stable
 Natural response remains constant or oscillates as time approaches
infinity
 Stable for some bounded inputs and unstable for others
34

Stability of Control Systems


• Potential issues with unstable systems?
• Degraded performance
• Damage to
 The system
 Adjacent structures
 Human life
35

Stability of Control Systems


• Potential issues with over-stable systems?
• Stable aircraft do not tend to turn quickly
 Consider then the limit case of the ultra-stable aircraft
36

Stability of Control Systems


• Analysis of closed loop
transfer function poles
• Stable?
 Poles in left half-plane (LHP)
• Unstable?
 Poles in RHP

• Marginally stable?
 Poles on Im axis
37

Stability of Control Systems


38

1
K s ( s + 1)( s + 2)

Effect of gain: Trade off between SSE and stability


39

1
K s ( s + 1)( s + 2)
40

1
K s ( s + 1)( s + 2)
41

1
K s ( s + 1)( s + 2)
42

1
K s ( s + 1)( s + 2)
43

1
K s ( s + 1)( s + 2)
44

1
K s ( s + 1)( s + 2)
45

1
K s ( s + 1)( s + 2)

You might also like