You are on page 1of 103

34

ENPM808J
Rehabilitation Robotics

Lecture #3

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)
31

Controller Design
33

Controller

“Device that gives the system the


sort of dynamic response that we
want it to have, rather than the
dynamic response that it naturally
has…”
34

Improving Transient Response


• To increase flexibility in the design of a desired response, we
desire a means to explore responses not naturally occurring
• For example: desired transient
response (%OS, Ts) represented by B
• If gain K is the only “knob” then we
can obtain at best the settling time at
closed-loop pole A
• Goal: speed up the response at A to
that of B without affecting the %OS

So…how to do we accomplish this goal?


36

Improving Steady-State Error


• Both transient response specifications and steady-state
errors are affected by choice of gain K
• We have seen that higher the gain K, smaller the SSE but
larger the %OS
37

Improving Steady-State Error


38

Improving Steady-State Error


• Both transient response specifications and steady-state
errors are affected by choice of gain K
• We have seen that higher the gain K, smaller the SSE but
larger the %OS
• In general:
 Transient response improved by adding an open-loop zero
at or near the origin (derivative compensation)
 SS error improved by adding an open-loop pole at or near
the origin (integral compensation)

• Integral compensation increases the system type and


drives associated SSE to zero
45

Ideal Integral Compensation (PI)


• Representative PI controller

• Compensating network precedes the plant and is defined as


an ideal compensator according to the transfer function:
46

Example

• Demonstrate that the addition of an ideal integral


compensator (PI controller) reduces the SSE to zero for a
step input, without appreciably affecting transient response
• Requirement: maintain the damping ratio of 0.174
47

• Transient response of the system is similar since close-loop poles


and gain K remain roughly unchanged
• However, now Kp = infinity and the steady state error is now
zero as the system is Type 1
48

Improving Transient Response


• Proportional-plus-integral (PI) compensators are used to
improve the steady state response of a system without
affecting its transient response
• We now focus on improving the transient response of a
system, again using cascade compensation
• Objective: design a transient response with required %OS
and shorter Ts (or Tp) than uncompensated system
 Ideal derivative compensation
49

Ideal Derivative Compensation (PD)


• Proportional-plus-derivative (PD) controller
• Places an open-loop zero in the forward path to speed up
the response over the uncompensated system
 Location depends on required response

• Note that differentiation may yield large unwanted signal


due to amplification of noise
50

• Implementing ideal derivative compensation shortened


the response of each case while keeping the same %OS
51

Ideal Derivative Compensation (PD)


Derivative (D)
• Representative PD controller

Proportional (P) Plant

• Compensating network precedes the plant and is defined as an


ideal compensator according to the transfer function:
Chosen to equal the negative
of the compensator zero

Chosen to contribute to the


required loop gain
54

Example

%OS differs by 3%

Ts improved by factor of 3
55

Improving SSE & Transient Response


• Combine the techniques of PI and PD compensation to
improve SS error and transient response, independently
• Design may use either active or passive compensator
components
56

PID Controller Design


• Proportional-plus-integral-plus-derivative (PID) controller
• Adds two zeros, and a pole at the origin
 One zero and the pole at the origin as ideal integral compensator (PI)
 One zero as ideal derivative compensator (PD)

• One of the most popular control methods


• Position controlled rehab robots

• The proportional, integral, and derivative gains (i.e. pole and


zero locations) are tuned to produce desired performance
57

PID Controller Design


Derivative (D)
• Representative PID controller

Integral (I)

Proportional (P) Plant

• Compensating network precedes the plant and is defined


as an ideal compensator according to:
58

Example
• Compensated system
• Reduced peak time
• Reduced SSE
• Slightly slower
transient response
than PD controller
60

Summary of Controller Performance

Controller Effect on Effect on


Type Transient Response Steady State Error
Proportional Limited improvement None
PD Improved None
PI Degraded Improved
PID Improved Improved
33

Was this all worth it? Human


body as inverted pendulum
34

Open-loop system
35

Closed-loop with Position controller


36

Closed-loop with PI Control


37

Closed-loop with PID Control


30

Control Law Partioning in


Robotic Applications
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)  
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)  

SoluEon:  
Control-­‐Law  Par>>oning  
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  
Control-­‐law  Par>>oning  

Control  law  parEEoning:  widely  used  in  robo>cs    


 
Incorporates  a  mathema3cal  model  of  the  
physical  system  (to  be  controlled)  into  the  control  
system  itself  
 
Benefit:  
System  control  is  much  more  robust  and  easy  to  
manage  –  controller  parameters  do  not  depend  
on  system  proper>es!  MulEple  DOF  Robots!!  
Key  concept:  Servomechanism  (“Servo”)  

Servomechanism:  Error  sensing  nega3ve  feedback  to  


correct  the  performance  of  the  physical  system  and  is  
defined  by  its  func3on  
Key  concept:  Servomechanism  (“Servo”)  

Servomechanism:  Error  sensing  nega3ve  feedback  to  


correct  the  performance  of  the  physical  system  and  is  
defined  by  its  func3on  

Error  (e)   Control  signal  (u)  


+  
Ref   Controller   Physical  System   Output  
-­‐  

If  Ref  =  0  (zero  set-­‐point)  


 
e  =  -­‐Output,    u  =  f(e)    
Key  concept:  Servomechanism  (“Servo”)  

Servomechanism:  Error  sensing  nega3ve  feedback  to  


correct  the  performance  of  the  physical  system  and  is  
defined  by  its  func3on  

Error  (e)   Control  signal  (u)  


+  
Ref   Controller   Physical  System   Output  
-­‐  
PD  Control:    
kp(  )  +  kvd/dt(  )    

e  =  -­‐x,    u  =  kpx  +  kvdx/dt  

Servo  (Error,  Control  signals)  does  not  depend  on  system  constants,  
only  closed-­‐loop  error  i.e.  system  output  variable(s)  
Control-­‐law  Par>>oning  

Control  law  parEEoning  (be[er  understood  now)  


 
 
Par33on  the  controller  into  its  servo  por:on  
(separate  from  system  constants)  and  its  model-­‐
based  por:on  (model  of  the  physical  system)  
Control-­‐law  Par>>oning  

Control  system  
Control-­‐law  Par>>oning  

Control  system  

Servo  porEon  
Control-­‐law  Par>>oning  

Control  system  

Model-­‐based  
Servo  porEon  
porEon  
Control-­‐law  Par>>oning  

Control  system  

Choose  control  

Model-­‐based  
Servo  porEon  
porEon  

Through  the  control  law,  we  want  to  achieve  the  following:  
 
Choose  α  and  β  such  that  the  system,  considering  only  f ’  as  
input,  behaves  like  a  unit  mass,  governed  by  the  equa:on  
Control-­‐law  Par>>oning  

Control  system  

Choose  control  

Model-­‐based  
Servo  porEon  
porEon  

Through  the  control  law,  we  want  to  achieve  the  following:  
 
Choose  α  and  β  such  that  the  system,  considering  only  f ’  as  
input,  behaves  like  a  unit  mass,  governed  by  the  equa:on  

Unit mass Input


Control-­‐law  Par>>oning  

,  

Mass
“Everything else”
Control-­‐law  Par>>oning  

Choose  control  

Note  we  can  influence  the  system  directly  through  f’


 
 
Thus,  think  of  f ’  as  the  “new”  input,  and  express  it  as  per  
the  “previous  control  law”  
Control-­‐law  Par>>oning  

Thus,  think  of  f ’  as  the  “new”  input,  and  express  it  as  per  
the  “previous  control  law”  

“New input”
“Previous control law”
Control-­‐law  Par>>oning  

“New system form”

“New input”
“Previous control law”
Control-­‐law  Par>>oning  

“New system form”

“New input”
“Previous control law”

“New” equation of motion


Control-­‐law  Par>>oning  

Control  system  

Model-­‐based  
Servo  porEon  
porEon  

“New” equation of motion


Remember  cri>cal  damping?  

Cri:cal  Damping  occurs  when  

b2 = 4mk
“Effective damping”: “Effective stiffness”:
Coefficient of the Coefficient of the
velocity component in position component in
the equation of motion the equation of motion

(b + kv)2 = 4m(k + kp) kv2 = 4kp


Controller depends on mass Controller independent of mass
Control-­‐law  Par>>oning  

Control  system  

Model-­‐based  
Servo  porEon  
porEon  

“New” equation of motion


Control-­‐law  Par>>oning  

Model-­‐based  
Servo  porEon  
porEon  

Servo  

Model  
Control-­‐law  Par>>oning:  The  Impact  

Assume  a  mul:-­‐dimensional  system  (e.g.  mul>ple  DOF  robot).  


To  see  how  control  law  par>>oning  is  really  useful,  consider  
the  equa>on  of  mo>on:  

M,  B,  K:  matrices  


x:  vector  
f:  vector  
Kv,  Kp:  matrices    

Mul:-­‐dimensional  linear  differen:al  equa:on:  Makes  determina>on  


of  controller  gains  to  achieve  cri>cal  damping  a  nightmare!  
Control-­‐law  Par>>oning:  The  Impact  

Now  we  use  control  law  par::oning  for  the  same  system:  
Control-­‐law  Par>>oning:  The  Impact  

Now  we  use  control  law  par>>oning  for  the  same  system:  
Control-­‐law  Par>>oning:  The  Impact  

Now  we  use  control  law  par>>oning  for  the  same  system:  
Control-­‐law  Par>>oning:  The  Impact  

Choose  Kp  and  Kv  as  diagonal  matrices,  so  that:  


Control-­‐law  Par>>oning:  The  Impact  

Choose  Kp  and  Kv  as  diagonal  matrices,  so  that:  


Control-­‐law  Par>>oning:  The  Impact  

The  cri:cal  damping  is  then  given  by:  

kvi2 = 4kpi

Apply rule to controller gain pair


(kp, kv) for each dimension/DOF…
Control-­‐law  Par>>oning:  The  Impact  

The  cri:cal  damping  is  then  given  by:  

kvi2 = 4kpi

Apply rule to controller gain pair


(kp, kv) for each dimension/DOF…

…Don’t have to worry about complexity or dimension


of system mass, damping, and stiffness matrices: they
are decoupled from controller gains matrices!!
Problem  1  

Compute the motion of the system shown in the figure below if parameter values
are m = 1 kg, b = 2 Ns/m, and k = 2 N/m and the block (initially at rest) is
released from the position x = 1 m.
Solu>on  1:  “Unforced”  system  

k = 4 N/m, b = 2 Ns/m, m = 1 kg, x0 = 1 m, v0 = 0 m/s (initially at rest)

= 2 rad/s = 0.5 < 1 (underdamped)

x(t) =

x(t) = 2e-t(0.5cos1.73t + 0.29sin1.73t)


Problem  2  

If the parameters of the system shown in the figure below are m = 1 kg, b = 1 Ns/
m, and k = 1 N/m, find gains kp and kv for a position-regulated control law that
results in the system’s being critically damped with closed-loop stiffness of 16.0
N/m.
Closed-­‐loop  Control  System  

§  Damped  spring  mass  with  actuaEon  

Choose  control  

What  is  controlled  here?  


Posi>on  
 
Steady  state  ?  
x  =  0  
Solu>on  2:  Remember  cri>cal  damping?  
Cri:cal  Damping  occurs  when  
b2 = 4mk
Closed-loop damping: Closed-loop stiffness:
Velocity coefficient in the Position coefficient in the
closed-loop equation of motion closed-loop equation of motion

Closed-loop EoM

(b + kv)2 = 4m(k + kp), k + kp = 16

kp = 15, kv = 7
Problem  3  

If the parameters of the system shown in the figure below are m = 1 kg, b = 1 Ns/
m, and k = 1 N/m, find α, β, and the gains kp and kv for a position-regulated
control law that results in the system’s being critically damped with closed-loop
stiffness of 16.0 N/m.
Solu>on  3:  Use  Control-­‐law  Par>>oning  

Control  system  

Model-­‐based  
Servo  porEon  
porEon  

Closed-loop EoM
Solu>on  3:  Use  Control-­‐Law  Par>>oning  
Cri:cal  Damping  occurs  when  
kv2 = 4kp
Closed-loop damping: Closed-loop stiffness:
Velocity coefficient in the Position coefficient in the
closed-loop equation of motion closed-loop equation of motion

Closed-loop EoM

kp = 16, kv2 = 4kp

kp = 16, kv = 8, -16 -8
31

Trajectory-Following Control
32

The Lokomat Robot


33

The Pelvis Robot (PAM)


34

The ReWalk
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  
Trajectory-­‐following  Control  

Goal:  Not  just  cri3cal  damping,  but  carry  out  a  certain  


(desired)  trajectory  e.g.  end-­‐effector  trajectory  

xd   Error  (e)   Control  signal  (u)   x  


+  
Ref   Controller   Physical  System   Output  
-­‐  

e  =  xd  –  x  
   
Requirement:  xd  must  be  twice  con>nuously  differen>able  
Key  concept:  Servomechanism  (“Servo”)  

xd   Error  (e)   Control  signal  (u)   x  


+  
Ref   Controller   Physical  System   Output  
-­‐  
PD  Control:    
kp(  )  +  kvd/dt(  )    

e  =  xd  –  x  

Choose  control  

(Instead  of                                                                                              )  
Trajectory-­‐following  Control  

e  =  xd  –  x  

Choose  control  

(Instead  of                                                                                              )  

Control  Law  
ParEEon  
Trajectory-­‐following  Control  

Servo  

Model  
Trajectory-­‐following  Control  

What’s  the  benefit?  


 
Error  (e)  now  behaves  like  a  mass-­‐spring  system  i.e.  we  
can  achieve  cri:cal  damping  of  error  through  
appropriate  choice  of  controller  parameters,  ensuring  
fastest  possible  convergence  of  error  toward  zero  
Problem  1  

Compute the motion of the system shown in the figure below if parameter values
are m = 1 kg, b = 2 Ns/m, and k = 2 N/m and the block (initially at rest) is
released from the position x = 1 m.
Solu>on  1:  “Unforced”  system  

k = 4 N/m, b = 2 Ns/m, m = 1 kg, x0 = 1 m, v0 = 0 m/s (initially at rest)

= 2 rad/s = 0.5 < 1 (underdamped)

x(t) =

x(t) = 2e-t(0.5cos1.73t + 0.29sin1.73t)


Problem  2  

If the parameters of the system shown in the figure below are m = 1 kg, b = 1 Ns/
m, and k = 1 N/m, find gains kp and kv for a position-regulated control law that
results in the system’s being critically damped with closed-loop stiffness of 16.0
N/m.
Closed-­‐loop  Control  System  

§  Damped  spring  mass  with  actuaEon  

Choose  control  

What  is  controlled  here?  


Posi>on  
 
Steady  state  ?  
x  =  0  
Solu>on  2:  Remember  cri>cal  damping?  
Cri:cal  Damping  occurs  when  
b2 = 4mk
Closed-loop damping: Closed-loop stiffness:
Velocity coefficient in the Position coefficient in the
closed-loop equation of motion closed-loop equation of motion

Closed-loop EoM

(b + kv)2 = 4m(k + kp), k + kp = 16

kp = 15, kv = 7
Problem  3  

If the parameters of the system shown in the figure below are m = 1 kg, b = 1 Ns/
m, and k = 1 N/m, find α, β, and the gains kp and kv for a position-regulated
control law that results in the system’s being critically damped with closed-loop
stiffness of 16.0 N/m.
Solu>on  3:  Use  Control-­‐law  Par>>oning  

Control  system  

Model-­‐based  
Servo  porEon  
porEon  

Closed-loop EoM
Solu>on  3:  Use  Control-­‐Law  Par>>oning  
Cri:cal  Damping  occurs  when  
kv2 = 4kp
Closed-loop damping: Closed-loop stiffness:
Velocity coefficient in the Position coefficient in the
closed-loop equation of motion closed-loop equation of motion

Closed-loop EoM

kp = 16, kv2 = 4kp

kp = 16, kv = 8, -16 -8
32

Prelude to Interaction Control:

Drawing from limitations of


position (or force) control
33

Let’s get back to rehab robots…


34

The Pelvis Robot (PAM)


35

Why did position control fail?


36

It should have worked…


• Claim: Lokomat & PAM controllers will render zero steady-state error in
response to a pre-programmed gait trajectory (can we prove this?)
 We will show that a robot exoskeleton leg using a trajectory following controller (e.g.
PID) is closed-loop stable and with zero SSE.
37

It should have worked…


Develop model

• Model dynamics of this leg as a simple pendulum with total mass, M (robot
plus human leg) concentrated at the foot and leg length from the point of
pelvic rotation to the foot, L.

• The variable of interest is 𝜃𝜃, the pendulum angle measured from vertical.

• Assume that the system is driven by external torque, T (motor torque) with
zero initial conditions.
38

It should have worked…


Steps

• The Laplace transform of the linearized equation of motion will yield the
transfer function of the physical system, or the “plant” (𝐺𝐺𝑝𝑝 ) i.e. 𝐺𝐺𝑝𝑝 (𝑠𝑠) =
𝜃𝜃(𝑠𝑠)/𝑇𝑇(𝑠𝑠).

• For a PID controller, the relationship between closed-loop error (e) and
𝑑𝑑𝑑𝑑
controller output (u) is given by: 𝑢𝑢 = 𝐾𝐾𝑝𝑝 𝑒𝑒 + 𝐾𝐾𝑑𝑑 + 𝐾𝐾𝐼𝐼 ∫𝑒𝑒 𝑑𝑑𝑑𝑑. The Laplace
𝑑𝑑𝑑𝑑
transform of this equation will yield the controller transfer function (𝐺𝐺𝑐𝑐 ) i.e.
𝐺𝐺𝑐𝑐 (𝑠𝑠) = 𝑈𝑈(𝑠𝑠)/𝐸𝐸(𝑠𝑠).

• Having computed physical system and controller transfer functions, compute


the closed-loop transfer function (𝐺𝐺𝐶𝐶𝐶𝐶 ) i.e. 𝐺𝐺𝐶𝐶𝐶𝐶 𝑠𝑠 = {𝐺𝐺𝑝𝑝 𝑠𝑠 𝐺𝐺𝑐𝑐 𝑠𝑠 }/{1 +
𝐺𝐺𝑝𝑝 𝑠𝑠 𝐺𝐺𝑐𝑐 𝑠𝑠 }.

• Use sinusoidal input for reference (why?) and compute SSE


39

“Plant” TF
40

Controller TF
41

Closed Loop TF
42

Steady-State Error
• Joint angles during walking are cyclical
 May be modeled as sinusoids

• What is SSE of Lokomat + Human?


 In response to cyclical “healthy” gait trajectory

• If SSE = 0 with PID control…


 Why did Lokomat fail?
 Why did PAM destabilize?
43

The MIT-MANUS Robot


44

The MIT-MANUS Robot


45

The MIT-MANUS Robot


46

MIT-MANUS
47

Why did the MANUS succeed?


• Like the Lokomat (albeit for arm rehabilitation), state-of-art robot

• Unlike the Lokomat, it showed efficacy

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

• Controller (likely)
 Control strategy – right type of controller with respect to application
 Controller settings – right type of controller and appropriately tuned

• To understand, we will understand interaction control (in sufficient


detail)
 What’s the best way for coupled systems to interact?
 Qualitative understanding, followed by quantitative (some rigor)
 Focus on Impedance Control: most common way for interaction control
 Be prepared: easy math, steep learning curve conceptually

You might also like