Haptics ME7960, Sect. 007 Td ’ ClToday’s Class...Potentiometer (not common in haptics – noisy...
Transcript of Haptics ME7960, Sect. 007 Td ’ ClToday’s Class...Potentiometer (not common in haptics – noisy...
HapticsME7960, Sect. 007
Lect. 3: Physical HapticLect. 3: Physical Haptic Systems
Spring 2011Prof William ProvancherProf. William Provancher
University of UtahSalt Lake City, UT USA
We would like to acknowledge the many colleagues whose course materials were borrowed and adapted in putting together this course, namely: Drs. Allison Okamura (JHU), Katherine Kuchenbecker (U Penn), Francois Conti, Federico Barbagli, and Kenneth Salisbury (Stanford), Ed Colgate (Northwestern), Hong Tan (Purdue), Blake Hannaford and Ganesh Sankaranarayanan (U. Washington), and Karon MacLean (UBC).
T d ’ ClToday’s Class Physical Haptic Systems Physical Haptic Systems
Actuators for haptic/tactile systems Actuator types Actuator examples
Sensors Amplifier Control Card
O i f C t l A hit t Overview of Control Architecture Overall system view Admittance/Impedance type devices KinematicsKinematics
Readings Diego Ruspini and Oussama Khatib, “Haptic Display for Human
Interaction with Virtual Dynamic Environments,” Journal of R b ti S t 18(12) 769 783 (2001)
2
Robotic Systems 18(12),769–783 (2001) read through p. 774
Ph i l H ti S tPhysical Haptic Systems Basic Elements of a haptic system Basic Elements of a haptic system
Physical device (the plant of a control system) Actuators and transmission
S
Discussed today
Sensors High power (current) amplifier + power supply
(what magnitude of currents?) Controller Computer Controller Control (DAQ) Card( ) Servo control loop (typically
at 1kHz) Why??? Analog Controller (quite rare)
3
Analog Controller (quite rare)
Illustration from K. J. Kuchenbecker and G. Niemeyer, “Induced Master Motion in Force-Reflecting Teleoperation.” ASME Journal of Dynamic Systems, Measurement, and Control. Volume 128(4):800-810, December 2006.
© W. Provancher 2009
Physical Haptic SystemsPhysical Haptic Systems
Actuators and transmissionActuators and transmission
4
Illustration from K. J. Kuchenbecker and G. Niemeyer, “Induced Master Motion in Force-Reflecting Teleoperation.” ASME Journal of Dynamic Systems, Measurement, and Control. Volume 128(4):800-810, December 2006.
© W. Provancher 2009
H ti /T til A t t T Electromagnetic Actuators
Haptic/Tactile Actuator Types Not typically used in haptic Electromagnetic Actuators
Electric motors DC Brushed PM Motors
(most commonly used in haptics)DC B hl
systems. Why??
DC Brushless Stepper Motors
Voice coils and linear motors Lawrence force W
/Kg)
Lawrence force Pneumatic Actuators Hydraulic
SMA r Den
sity
(W
SMA Piezoelectric Electro-rheological
Pow
erWeight (Kg)
5
Magneto-rheological (and magnetic particle brakes) … An interesting exception can be found in
Lawrence, D. A., Pao, L. Y., and Aphanuphong, S. 2006. Unwarping Encoder Ripple in Low Cost Haptic Interfaces. In Proceedings of Haptics Symposium (March 25 - 29, 2006), Washington, DC, 12.
© A. Okamura 2006 + W. Provancher 2009
Brushed DC (direct current) PM ( t t) t(permanent magnet) motors Most commonly used
BrushRotor(armature) Most commonly used
actuator in haptic devices How do they work? Brush
Commutator( )
Rotating armature with coil windings is caused to rotate relative to a permanent magnet
current is transmitted through brushes to armature, Stator
(Permanent
Housing
and is constantly switched so that the armature magnetic field remains fixed
(Permanent Magnets)
6© A. Okamura 2006 + W. Provancher 2009
DC Motors: Two-pole ExamplePermanent
3-pole most common (Maxon motors have more)
PermanentMagnet
( )
Power supplied through brushes generates a magnetic field around the armaturearmature.
The north pole of the armature is pushed away from the north magnet andfrom the north magnet and pulled toward the south, causing rotation.
When the armaturecommutator
When the armature becomes horizontal, the connections between the commutator and the brushes reverse, and the process repeats
PermanentMagnetBrush
7
process repeats.Source: wikipedia.org
[Slide courtesy of S. Bamberg, Univ. of Utah]
DC t tDC motor terms Cogging / Torque Ripple Cogging / Torque Ripple
Tendency for torque output to ripple as the brushes transfer power (on bad motors this can be felt)
Friction/damping Caused by bearings and eddy currents (mostly, it’s
coulomb friction that you feel but at high speedscoulomb friction that you feel, but at high speeds, especially through a geared transmission, viscous friction can begin to dominate)
St ll t Stall torque Max torque delivered by motor when operated continuously
without cooling (In most applications, you design
8
g ( pp , y gmotors to stay away from stall for efficiency. However, haptic devices are mostly standing still)
© A. Okamura 2006 + W. Provancher 2009
M t E tiMotor Equations
Torque constant K Torque constant, KT
Kt = Ke (for Kt ≡ N*m/A, Ke ≡ V/(Rad/s))Kt = 9 55 x 10-3 Ke N*m/A (for Kt ≡ N*m/A Ke ≡ V/KRPM)
Dynamic equation
Kt = 9.55 x 10 Ke N m/A (for Kt ≡ N m/A, Ke ≡ V/KRPM)Kt = 1.3524 Ke oz*in/A (for Kt ≡ oz*in/A, Ke ≡ V/KRPM)
Dynamic equation
9
Back EMFArmatureResistance
ArmatureInductance
© A. Okamura 2006 + W. Provancher 2009
B h d DC tBrushed DC motors Pros BrushRotor
(armature) Pros High bandwidth linear
actuator Easy to obtain with a wide
Brush
Commutator( )
Easy to obtain with a wide variety of sizes
Easy to control Cons Cons To get large torques, the
armature inertia gets too high to make a good Stator
(Permanent
Housing
impedance device Generates lots of heat Relatively expensive for
d lit t (
(Permanent Magnets)
10
good quality motors (e.g., Maxon motors)
© A. Okamura 2006 + W. Provancher 2009
DC Motors with leadscrews or b ll f li tiballscrews for linear motion Pros Pros High mechanical advantage
and high forcesg Can render stiff interactions
Cons
Haptic Master
Most not backdrivable Requires (expensive) force
sensor Haptic Master (Moog Inc.)
sensor Difficult controller design Possible eccentric vibration
11© W. Provancher 2009
http://www.engineersedge.com/hydraulic/images/linear-actuator-animation.gif
Possible eccentric vibration
DC Motors with capstan drives for rotary motionfor rotary motion
MotorCapstanPulley
Pros Cog-less “gear-
ratio” transmission
SensAble (Premium) Phantom
MotorEduHaptics.org
ratio” transmission Cons Issues with friction
TMotor
Capstan Pulley
Cable Issues with friction
transmission of cable on capstan pulley Sector
P lle
Cable
12© W. Provancher 2009
High cable tension high drag Possibly high reflected N2 inertia
Pulley
DC Motors with capstan drives for linear motion
Pros Cog-less linear
transmission
Clark, J. E., Provancher, W. R., Mitiguy, P. “Theory, Simulation, And Hardware: Lab Design For An Integrated System Dynamics Education,” In Proc. of ASME IMECE, Orlando, FL, Nov. 5–11, 2005, p 147–153.
Cons Relatively low forces
TCable Issues with friction
transmission of cable on t ll
TMotorCable
13© W. Provancher 2009
capstan pulleyMotor
Capstan Pulley Cable
V i C il A t tVoice Coil Actuators
Pros Pros Very high bandwidth linear
actuatoractuator Relatively high forces
Cons Cons Large relative size Short stroke Short stroke Generates lots of heat
Illustrations from Dimitrios A. Kontarinis and Robert D. Howe, “Tactile Display of Vibratory Information in
14© W. Provancher 2009
, p y yTeleoperation and Virtual Environments.” PRESENCE, 4(4):387-402, 1995Murray, A.M. and Klatzky, R.L. and Khosla, P.K, Psychophysical Characterization and Testbed Validation of a Wearable Vibrotactile Glove for Telemanipulation, Presence: Teleoperators & Virtual Environments, MIT Press 12:2, pp. 156-182, 2003
Lawrentz force magnetic l it ti d ilevitation devices
Pros Pros 6-DOF force feedback
ConsC l it Complexity hardware design Controller Controller
Limited workspace
15
Illustrations from butterflyhaptics.com/ andBerkelman, P. “A Novel Coil Configuration to Extend the Motion Range of Lorentz Force Magnetic Levitation Devices for Haptic Interaction”, Proceedings of the 2007 IEEE/RSJ International Conference on Intelligent Robots and Systems San Diego, CA, USA, Oct 29 - Nov 2, 2007 © W. Provancher 2009
P ti t tPneumatic actuators How do they work? How do they work?
Compressed air pressure is used to transfer energy from the power source to haptic interface. p p
Many different types (piston, McKibben, …) Concerns are friction and bandwidth Concerns are friction and bandwidth
16
Festo.comwww.pneumaticsfirst.org
© A. Okamura 2006 + W. Provancher 2009
Pneumatic actuators,cont. McKibben Artificial Muscle McKibben Artificial Muscle,
pneumatically actuated with similar properties to biological musclesmuscles Spring-like, flexible, for use within
robotic arms and for prosthesis Shadowrobot hand High force to weight ratio Constructed from internal air
bladder and outer braided weave Shadowrobot McKibben Actuatorshell
As bladder inflates, shell allows for expansion while maintaining cylindrical shape causing the
Shadowrobot. McKibben Actuator
17
cylindrical shape, causing the muscle to shorten http://www.shadowrobot.com/airmuscles/
© R. Wood (Harvard ES159/259) 2008 + W. Provancher 2009
Inflated – contractedDeflated – extended
Examples of pneumatic actuators f t til di lfor tactile displays
4x6 Pneumatic Array4x6 Pneumatic Array
M.B. Cohn, M. Lam, and R.S. Fearing, ``Tactile Feedback for Teleoperation'' SPIE Conf. 1833, Telemanipulator Technology, Boston, MA, Nov. 15-16, 1992.
G. Moy, C. Wagner, and R.S. Fearing, A Compliant Tactile Display for Teletaction IEEE Int Conf on Robotics and Automation April 2000
18
Teletaction, IEEE Int. Conf. on Robotics and Automation, April 2000.
© W. Provancher 2009
H d li t tHydraulic actuators Pros Pros High forces Small actuator size on arm
d ff tor end effector Cons Dangerous: Can kill you!!g y Need big hydraulic pump Hydraulic seals need
maintenancemaintenance
19
Sarcos Dexterous Master & ArmSame basic actuator designs as pneumatics (with modifications)
www.pneumaticsfirst.org © W. Provancher 2009
Shape Memory Alloy (SMA)(Li A t t )(Linear Actuators) Most commonly in wire form: contracts when heated Most commonly in wire form: contracts when heated Repeated strains can be up to 3%
Based upon a solid state phase change (molecular realignment) Two phases: Martensite and Austenite At low temperatures the material is Martensite At low temperatures, the material is Martensite If the Martensite material is loaded, this creates a
deformation (typically seen as a shortening wire) ‘Shape memory’ occurs when heated: the material will Shape memory occurs when heated: the material will
‘remember’ its undeformed shape by heating to the Austenite phase Since the Austenite and undeformed Martensite phases have
20
Since the Austenite and undeformed Martensite phases have the same shape
© R. Wood (Harvard ES159/259) 2008 + W. Provancher 2009
Sh M All (SMA)Shape Memory Alloy (SMA)
Pros Pros Relatively robust
High force / High power density High force / High power density Small size Inexpensive and readily available (especially in Inexpensive and readily available (especially in
wire form) Cons Cons Low efficiency (bad for portable applications) Gets hot (bad for direct contact with skin typically… however, see
21
( yp y ,[Scheibe et al. 2007] on next slide).
© R. Wood (Harvard ES159/259) 2008 + W. Provancher 2009
Examples of SMA T til Di lSMA Tactile Displays
[Fisher 1996]
[Kontarinis et al 1995] [Wellman et al 1997]
22
[Kontarinis, et al. 1995] [Wellman, et al. 1997]
Scheibe, R. and Moehring, M. and Froehlich, B., Tactile Feedback at the Finger Tips for Improved Direct Interaction in Immersive Environments, Proc. IEEE Symposium on 3D User Interfaces 2007 pp. 10-14, 2007 © W. Provancher 2009
Pi l t i A t tPiezoelectric Actuators Piezoelectric crystal strains when voltage is applied Piezoelectric crystal strains when voltage is applied Strains can be up to 0.1%
Details Direct piezoelectric effect: a piezoelectric material will
generate charges (electric field) upon the application of stress along a properly poled direction
Converse piezoelectric effect: a piezoelectric material will change its shape upon the application of an electric field (along a poled direction)
charge separation
23
after poling: createsa dipole
© R. Wood (Harvard ES159/259) 2008 + W. Provancher 2009
Examples of Pi l t i T til Di lPiezoelectric Tactile Displays
Glassmire thesis (2006)
TPaD: Tactile Pattern Display.
Piezoelectric tactile pin array
TPaD: Tactile Pattern Display.
24
Piezoelectric tactile pin array[Summers & Chanter 2002]
© W. Provancher 2009
[Homma, et al. 2004]Winfield & Colgate (2007)http://lims.mech.northwestern.edu/projects/TPaD/index.htm
Physical Haptic SystemsPhysical Haptic Systems
SensorsSensorsPositionSensor
ForceSensor
25
Illustration from K. J. Kuchenbecker and G. Niemeyer, “Induced Master Motion in Force-Reflecting Teleoperation.” ASME Journal of Dynamic Systems, Measurement, and Control. Volume 128(4):800-810, December 2006.
© W. Provancher 2009
S i h ti tSensors in haptic systems Motion sensors
Rotary motion Incremental and absolute Encoders (also resolvers, but less common) Hall effect sensor Potentiometer (not common in haptics – noisy Tachometer (pulse or generator)Tachometer (pulse or generator) Optical gray-scale analog sensors
Linear (translational) motion (less common) Encoders, potentiometer, optical emitter-detector,
Acceleration MEMS (most common now) MEMS (most common now) Piezoelectric and others
3D, 6-DOF motion Vision based (Vicon), ultrasonic (Logitech), magnetic (Polhemus, Ascension Flock of Birds),
others( ) ( ) Pressure (Tactile) (Also shape, but less common)
Capacitive, piezoelectric… Force sensors
Load cells (flexure + strain/displacement sensor)FSRs
26
FSRs Others…
We’ll discuss the most common of these © W. Provancher 2009
Force Sensors6-Axis JR3 ForceTorque Load Cell
How do they work? Typically a flexure + a strain
gage (sometimes alsogage (sometimes also piezoelectric sensors, but these tend to drift) Good quality 6-axis force-torque JR3 com Good quality 6 axis force torque
sensor is ~$6-7K Force Sensing Resistor
(FSR)
JR3.com
ATI Nano17 Transducer
(FSR) Piezoresistive ink Tons of sensor drift
Ch $10
Interlink FSR
Cheap ~$10
www.ati-ia.comTekscan Flexiforce FSR
27© W. Provancher 2009www.tekscan.com/flexiforce
www.interlinkelectronics.com
T ki S A li tiTracking Sensor Applications
Eye tracking Eye tracking Head tracking Body tracking Hand tracking Most important for typical haptic interfaces
28© A. Okamura 2006
D f F dDegrees of Freedom
Number of independent position variables Number of independent position variables needed to in order to locate all parts of a mechanismmechanism
DOF of motion DOF f i DOF of sensing
DOF of actuation DOF does not always correspond to number
of joints!
29© A. Okamura 2006
S tSensor types
Magnetic Magnetic Optical Acoustic Inertial Mechanical Most important for typical haptic interfaces
30© A. Okamura 2006
M h i l T kMechanical Trackers
Ground based linkages most commonly used Ground-based linkages most commonly used Position Sensors
Di i l d ( i l MR) Digital: encoders (optical or MR) Analog: Hall-effect (magnetic)
31© A. Okamura 2006
O ti l E dOptical Encoders How do they work? EmitterDetector How do they work? Focused beam of light aimed at a
paired photodetector is interrupted by a coded patterned disk
Incremental Encoder
a coded patterned disk Produces a number of pulses per
revolution ( pulses = cost) Quantization problems at low Quantization problems at low
speeds Absolute vs. differential encoders
Wikipedia.org
Absolute Encoder
Why choose one vs. other? Extra considerations if choosing
incremental?
32© A. Okamura 2006 + W. Provancher 2009
saba.kntu.ac.irAbsolute Encoder Disk
Wikipedia.org
O ti l E dOptical Encoders Phase-quadrature encoder Phase quadrature encoder
2 channels, 90° out of phase allows sensing of direction of rotation g 4-fold increase in resolution
Schmitt trigger electronics create square waveform from analog detector signal
MR d k i il l b t ith ti d
33
MR encoders work similarly, but with magnetic sensors and metal disk
© A. Okamura 2006 + W. Provancher 2009
Quadrature Encoder States & DecodingDisk rotation CCW
1 1
00
Ch. 1 Encoder Signal
1
00
1
00
Ch. 2 Encoder Signal
Encoder States
00
A B C DSimplified Encoder Disk
EmitterDetectorEncoder States
A B C D
Disk rotation CCW
Simplified Encoder Disk(4 CPR, 16 PPR) (shown in state A)
Ch. 1 Encoder SensorBlockstransmission
Ch. 1
Ch. 2 0
0
0
1
1
1
1
0 45 deg.
CC
W D
Rotatio
of light
2
1
34
A B C D
Disk rotation CW
Ch. 2 Encoder Sensor
iskon
Allowstransmission of light (hole)© W. Provancher 2009
H ll Eff t SHall-Effect Sensors
How do they work? How do they work? A small transverse voltage is generated across a
current-carrying conductor in the presence of acurrent-carrying conductor in the presence of a magnetic field
(Discovery made in 1879, but not useful until the advent ofuntil the advent of semiconductor technology)
35© A. Okamura 2006
H ll Eff t SHall-Effect Sensors
Amount of voltage output related to the strength of magnetic field passing through.
Linear over small range of motion Need to be calibrated
Affected by temperature, other magnetic objects in the environments
36© A. Okamura 2006
H ll Eff t SHall-Effect SensorsFrom StanfordH ti P ddl
Haptic Paddle
magnet
Hall-effectHall effectSensor with
3 leads
The voltage varies sinusoidally with rotation
37
angle© A. Okamura + W. Provancher 2009
M i V l itMeasuring Velocity
Differentiate position Differentiate position advantage: use same sensor as position sensor
disadvantage: get noise signal disadvantage: get noise signal Alternative
f d ti b t ti k for encoders, measure time between ticks
38© A. Okamura 2006
Digital differentiationDigital differentiation Many different methods y Simple Example: Position reading at time 1 = P1
V = P2 – P1t
Position reading at time 2 = P2 t is the period of the servo loop (in sec. or counts)
Th iti i t i ll l d fi d i t l The position is typically sampled on a fixed interval Differentiation increases noise -
39© A. Okamura + W. Provancher 2009
Noisy Velocity readings
Noise on velocity signal can create jitter, especially at high K gains (many haptic controllers don’t even includeat high Kv gains (many haptic controllers don t even include damping)
Common solutions Tach/Generator
Voltage a speed (same source as back EMF) Resolution only as great as your A/D converter Not great at low speeds
Integrate the signal from an accelerometer Integrate the signal from an accelerometer Time per tick rather than ticks per time
use a special chip that measures time between ticks Especially good to do at slow speedsp y g p Fares poorly at high velocities
Filtering (conventional to smooth or Kalman filtering to combine sensor signals)
40
Almost always FILTER your velocity signal!!© W. Provancher 2009
Digital differentiationD li ith i b filt iDealing with noise by filtering How do you deal with noise How do you deal with noise Filtering
Example 1: Pre-filter positionsV = P2 – P1
t Average 20 readings = P1 Average next 20 readings = P2
Example 2: Post-filter Velocities (more common) Example 2: Post filter Velocities (more common) Position reading at time 1 = P1 Position reading at time 2 = P2
C l l t i t t l it Calculate instantaneous velocity Set velocity equal to filtered version of instantaneous
velocity
41
Filtered velocity = Filtered instantaneous velocity used in controller © A. Okamura + W. Provancher 2009
Digital Filtering Common filter types
FIR filters Median (with defined sample window) Moving average (with defined sample window)
IIR filters Fading memory filterg y Filtered value = old_value * filter_ratio
+ current value * (1 – filter_ratio) Typical filter ratio 0.8 to 0.9yp Can simulate in Matlab with a step input to figure out equivalent
cutoff frequency (function of filter_ratio and sample frequency) Filter output = 0.667 at sec and 10%-90% rise time ~2.2
Time constant RC 1/ Corner freq enc f 1/(2 ) Time constant RC = 1/, Corner frequency fc = 1/(2 ) E.g., 90:10 fading memory filter (i.e., filter ratio = 0.9) has
fc = 15.2 Hz when running a 1 KHz servo loop. Set fc near (typically above) the mechanical time constant
42
Set fc near (typically above) the mechanical time constant of your system
Why not just set filter_ratio = .999 ???© W. Provancher 2009
Physical Haptic SystemsPhysical Haptic Systems
Power AmplifierPower AmplifierPower
Amplifier
43
Illustration from K. J. Kuchenbecker and G. Niemeyer, “Induced Master Motion in Force-Reflecting Teleoperation.” ASME Journal of Dynamic Systems, Measurement, and Control. Volume 128(4):800-810, December 2006.
© W. Provancher 2009
Power (Current) AmplifiersLMD18200 H-Bridge PWM Amp
Courtesy of Stanford SPDL
PWM (Pulse Width Modulation) More efficient Copley, AMC, etc. make p y
PWM amps with closed-loop current control capability (~$350) Voltage in proportional current out
Other low end H-Bridge PWM amps l il bl ( LMD18200 $10)
AMC PWM Amplifier
also available (e.g., LMD18200, ~$10) Linear
Higher bandwidth than PWM, but not typically neededyp y
Haptic paddle uses a LM675 high current op. amp
Many commercial linear amps also available
44
available
© W. Provancher 2009
Stanford haptic paddle Linear Amp
Example of PWM Control SignalExample of PWM Control Signal Varying the duty cycle of the PWM
signal is analogous to changing the voltage Equivalent
Voltage
50%C
Voltage
Duty Cycle
~90%Duty Cycle
45© W. Provancher 2009
Duty Cycle
Physical Haptic Systems Computer Controller Control (DAQ) Card( )
ControlCard
46
Illustration from K. J. Kuchenbecker and G. Niemeyer, “Induced Master Motion in Force-Reflecting Teleoperation.” ASME Journal of Dynamic Systems, Measurement, and Control. Volume 128(4):800-810, December 2006.
© W. Provancher 2009
DAQ/Controller Computer CardUsually a PCI bus card
Common control cards Common control cards Sensoray 626 (~$700)
Four 14-bit D/A outputs, up to 6 encoder inputs,… Four 14 bit D/A outputs, up to 6 encoder inputs,… dSpace 1104 (ACE1104CLP, ~$5K) Quanser Q4 and Q8 ( $4K) IOTech (e.g., DaqBoard/3001 ~$1K)) Servo2go (ISA bus only, but 8 ch. for ~$1K)
Sensoray 626
Computer Boards DAC and Encoder inputs on separate cards
National Instruments
47
National Instruments DAC and Encoder inputs on separate cards
© W. Provancher 2009
S TSome Terms
AD/DA AD/DA analog to digital
digital to analog digital to analog Interrupt service routine
S L Servo Loop Servo rate Usually needs to be >500 Hz, and most often is
1,000 Hz
48© A. Okamura 2006
D/A d A/DD/A and A/D
Converts between He adecimaBinarDecimal Converts between voltages and counts C t t
Hexadecimal
Binary Decimal
0 0000 0
1 0001 1
2 0010 2
Computer stores information digitally, and communicates with the
3 0011 3
4 0100 4
5 0101 5
6 0110 6 communicates with the outside world using +/-10V signals
7 0111 7
8 1000 8
9 1001 9
A10101010V signals E.g., for 8-bit 0-5V ADC
2.5V = 10000000
A 1010 10
B 1011 11
C 1100 12
D 1101 13
49MSB
E 1110 14
F 1111 15 LSB© A. Okamura 2006
D/A d A/DD/A and A/D
Converts voltages to counts and vice versa Converts voltages to counts and vice versa A 12-bit card:
212 d i l b (4096) 212 decimal numbers (4096)
Decimal (base 10): 2994
Binary (base 2):
1 1 0 0 1 0 0 1 0 1
Hexadecimal (base 16): 1 1 0 0 1 0 0 1 0 1
50
B B 2 = BB2
© A. Okamura 2006
Physical Haptic Systems Computer Controller Admittance/Impedance
ControllerProgramp
Controller code/software
51
Illustration from K. J. Kuchenbecker and G. Niemeyer, “Induced Master Motion in Force-Reflecting Teleoperation.” ASME Journal of Dynamic Systems, Measurement, and Control. Volume 128(4):800-810, December 2006.
© W. Provancher 2009
The Prototypical Closed Loop C t l S tControl System
Error
Command ControlL
Driver Plant+ Output
Law-
Feedback
• Typical Control Input Terms: Proportional, Derivative, Integral • Combinations: PD PI PID depending on
52© W. Provancher 2009
• Combinations: PD, PI, PID depending on response required
I d d Ad ittImpedance and Admittance
• Impedance Control An impedance (Z) determines the force: p ( )f = func(x) => Z = F(s)/X(s)
• Admittance Control An admittance (Y) determines position: x = func(f) => Y = X(s)/F(s)
• Can’t do both at the same time
53
• A robot or a person can do either © A. Okamura 2009
I d d Ad itt• Most haptic displays use impedance control
Impedance and Admittance Most haptic displays use impedance control
– Allows “transparency” at lower cost
• Robots are both • Examples of admittance control devices:
Steady-Hand Robot and HapticMaster
54© A. Okamura 2009
I d C t l• Robot in force control = impedance
Impedance Control • Robot in force control = impedance • This is the most common haptic display
control modecontrol mode • Virtual environments are expressed more
naturally: Fmotor= kx + bv + manaturally: Fmotor kx bv ma • Typically uses current-control amplifiers
with a DC motor (why??)
55© A. Okamura 2009 + W. Provancher 2011
Ad itt C t l• Robot in position/velocity control =
Admittance Control Robot in position/velocity control
admittance • Still have to generate a desired force Still have to generate a desired force
(because of current control amp) • Example 1: typical linear admittance control law• Example 1: typical linear admittance control law
vdes= K * FmeasFmotor= Kp*(xdes- xmeas)Fmotor Kp (xdes xmeas)
• Example 2: xdes= func(Fmeas, xmeas)
56
des ( meas, meas)Fmotor= Kp*(xdes- xmeas)
© A. Okamura 2009 + W. Provancher 2011
The Prototypical Closed Loop C t l S tControl System
Error
Command ControlL
Driver Plant+ Output
Law-
Feedback
• Typical Control Input Terms: Proportional, Derivative, Integral • Combinations: PD PI PID depending on
57© W. Provancher 2009
• Combinations: PD, PI, PID depending on response required
Example controllerExample controllerImplementing the simplestpossible PID Controllerpossible PID Controller
Control Effort = K * e + K * e K * vControl Effort = KP e + KI e – KD v
KP = Proportional GainP
KI = Integral Gain
KD = Derivative Gain
58
e = Error = Desired Position – Actual Positionv = Velocity
© W. Provancher 2009
P ti lProportionalKP * e
• Effect: big signal for large error, small signal for small error
P
• Results in some steady-state error Needs a nonzero error to generate a control actionaction
• Essentially a spring at the desired position (F = k x) ( )– High gain makes a stiffer spring and increases
tendency to oscillate
59© A. Okamura 2009
D i tiDerivative– KD * v
• Effect: slows control action and damps oscillations; increases system stability ; y y
• Can also make response more sluggish • Based on first derivative: either noise or Based on first derivative: either noise or
filtering lag (for velocity estimate from position) can actually introduce instability again
60© A. Okamura 2009
I t lIntegralKI * e
• Effect: integrates error over time – Control signal builds up and eventually brings
I
error to zero
• Reduces steady-state error and improves system responsivenesssystem responsiveness
• Unpleasant side effects: – Integrator wind-up – Decreased stability
61© A. Okamura 2009
T i PID t llTuning a PID controller
• Iterate! – Start with P: increase until unstable – Add D until stable – If SS error is a problem, add I – (add D until stable) ( )– Add more P, adjust D, etc.
• Compromise between responsiveness and t bilitstability
• In haptics, the setpoint depends on the context: how stable does it need to be?
62
context: how stable does it need to be?
© A. Okamura 2009
Di ti tiDiscretization
• Sampling introduces “steps” in the signal (“sample and hold”) ( p )
• Transition between stepped and continuous signal can cause problems in feedback control
• Vast topic beyond the scope of this lecture… For now, just remember: – Sample 2 to 10 times (or faster) the fastest frequency in the system – A sufficiently stiff model or controller will eventually
63
y ymake any system unstable
© A. Okamura 2009
Other things your controller ill dwill need
Need Kinematics Need Kinematics Determine endpoint position
Calculate velocities Calculate velocities Calculate force-torque relationships Sometimes need Dynamics Sometimes need Dynamics
If you are weak on these topics, you may t t h k t I t d ti t b tiwant to check out Introduction to robotics:
mechanics and control by Craig (1989) or notes from your robotics course
64
notes from your robotics course.
© A. Okamura 2006
Ki tiKinematics
Think of a Think of a manipulator/ interface as a set of bodiesas a set of bodies connected by a chain of jointsof joints
Revolute most common for hapticcommon for haptic interfaces
65
From Craig, p. 69
© A. Okamura 2006
Ki tiKinematics
Moving between Joint Space and Moving between Joint Space and Cartesian Space
Forward kinematics: based on joint angles, calculate end-effector position
66
calculate end-effector position
© A. Okamura 2006
J i t i blJoint variables
Be careful how you define joint positions Be careful how you define joint positions
Ab l R l i
67
Absolute Relative
© A. Okamura 2006
Ab l t f d ki tiAbsolute forward kinematics
x = L1cos(1) + L2cos(2) y L sin( ) + L sin( )y = L1sin(1) + L2sin(2)
Sometimes done this way with haptic devices (e g can be usedhaptic devices (e.g., can be used when controlling elbow and shoulder joints of a Phantom Premium since its joint motions cause motion
68
joint motions cause motion independently at the end effector)
© A. Okamura 2006
R l ti f d ki tiRelative forward kinematics
x = L1cos(1) + L2cos(1+2)y = L sin( ) + L sin( + )y = L1sin(1) + L2sin(1+ 2)
Usually done this way with robots, sometimes with hapticrobots, sometimes with haptic devices
Typically used if you have actuators t j i t (i l ti t ti )
69
at joints (i.e., relative actuation)
© A. Okamura 2006
V l itVelocity
Recall that the forward kinematics tells us the Recall that the forward kinematics tells us the end-effector position based on joint positions H d l l t l it ? How do we calculate velocity?
Use a matrix called the Jacobian
70© A. Okamura 2006
F l ti j i t tFormulating joint torques
The Jacobian can be used to relate joint The Jacobian can be used to relate joint torques to end-effector forces:
TT
Why is this important for haptic displays?
71© A. Okamura 2006
R di f t tiReading for next time
Diego Ruspini and Oussama Khatib “Haptic Diego Ruspini and Oussama Khatib, HapticDisplay for Human Interaction with Virtual Dynamic Environments ” Journal of RoboticDynamic Environments, Journal of Robotic Systems 18(12),769–783 (2001) read through p 774 read through p. 774
N t l t ill b “H ti R d i ” Next lecture will be on “Haptic Rendering”
72
Supplemental Information on Ki ti d J biKinematics and Jacobians
Although “Introduction to Robotics” is a Although Introduction to Robotics is a prerequisite for this class, we recognize that some of you may be a little rusty withsome of you may be a little rusty with kinematics, hence the pages that follow will provide a refresher as a reference to look atprovide a refresher as a reference to look at on your own
73© A. Okamura 2006
J i t i blJoint variables
Be careful how you define joint positions Be careful how you define joint positions
Ab l R l i
74
Absolute Relative
© A. Okamura 2006
Ab l t f d ki tiAbsolute forward kinematics
x = L1cos(1) + L2cos(2) y L sin( ) + L sin( )y = L1sin(1) + L2sin(2)
Sometimes done this way with haptic devices (e g can be usedhaptic devices (e.g., can be used when controlling elbow and shoulder joints of a Phantom Premium since its joint motions cause motion
75
joint motions cause motion independently at the end effector)
© A. Okamura 2006
R l ti f d ki tiRelative forward kinematics
x = L1cos(1) + L2cos(1+2)y = L sin( ) + L sin( + )y = L1sin(1) + L2sin(1+ 2)
Usually done this way with robots, sometimes with hapticrobots, sometimes with haptic devices
Typically used if you have actuators t j i t (i l ti t ti )
76
at joints (i.e., relative actuation)
© A. Okamura 2006
I Ki tiInverse Kinematics
Using the end effector position calculate the Using the end-effector position, calculate the joint angles N t d ft i h ti Not used often in haptics But useful for calibration Th b There can be: No solution (workspace issue)
1 l i 1 solution More than 1 solution
77© A. Okamura 2006
E lExample
Two possible solutions Two possible solutions Two approaches:
algebraic method
geometric method
78© A. Okamura 2006
V l itVelocity
Recall that the forward kinematics tells us the Recall that the forward kinematics tells us the end-effector position based on joint positions H d l l t l it ? How do we calculate velocity?
Use a matrix called the Jacobian
79© A. Okamura 2006
F l ti th J biFormulating the Jacobian Use the chain Use the chain
rule:
Substitute in Substitute in expressions for x & y from ybefore and take partial derivatives
80
derivatives:
© A. Okamura 2006
A bl i M t iAssemble in a Matrix
81© A. Okamura 2006
Si l itiSingularities
Most devices will have values for which the Most devices will have values for which the Jacobian is singular Thi th t th d i h l t This means that the device has lost one or more degrees of freedom in Cartesian Space T ki d Two kinds: Workspace boundary
W k i t i Workspace interior
82© A. Okamura 2006
Si l it M thSingularity Math If the matrix is invertible then it is non If the matrix is invertible, then it is non-
singular
Can check invertibility if J by taking the Can check invertibility if J by taking the determinant of J . If it is equal to 0, then it is singular g
Can use this method to check which values of will cause singularities
83© A. Okamura 2006
C l l ti Si l itiCalculating Singularities
Simplify nomenclature: i ( Simplify nomenclature: sin(=s12
For what values of and does this equal zero?
84
equal zero?
© A. Okamura 2006
E f lEven more useful….
The Jacobian can be used to relate joint The Jacobian can be used to relate joint torques to end-effector forces:
T Why is this important for haptic displays?
85© A. Okamura 2006
H d t thi ti ?How do you get this equation?
P i i l f i t l k Principle of virtual work States that changing the
coordinate frame does not change the total work of a systemsystem
86© A. Okamura 2006