Anthropomorphic robotics WHAT A SINGLE JOINT IS MADE OF
Notation d F ( mv) mx Since links are physical objects with mass dt J J f i i J = moment of inertia F r F r
Moment of inertia Around an axis m3 m1 m2 i1 J N mr 2 i i density J volume 2 rdv
Parallel axis theorem J J Mr 2 c Through the center of gravity
Example y x z J 0 x Mass M, M l y l /2 2 2 2 1 3 l /2 Ml J rdv xdx x l /2 3 l /2 12 Ml l l J M M 12 4 3 2 2 2 yl/2
Sum of J y c x c z a x a b L M J x a b 12 M 2 2 Jy ( a c ) 12 M 2 2 Jz ( b c ) 12 2 2 ( b ) M a J top x ( a c ) M top ( L ) 12 2 e.g. top 2 2 2 J hand x J top x J side x J bottom x
Experimental estimation of J object torsional spring Use a photodiode and a computer to measure the frequency Requires calibration from known J f 1 2 K J
Experimental estimation of J object h center of gravity f 1 2 Mgh J
Work and power E const if Fext 0 W K s2 2 Fds W E, E energy 1 2 s1 P mv 2 kinetic energy dw Power P dt Fv
Rotational case E const if ext 0 W K 2 d W E, E energy 1 1 2 J 2 P kinetic energy dw Power P dt
Single joint model end-point link/load motor reduction gears
Motor Let s imagine for now that it is something that generates a given torque
Mechanical transmission Gears Belts Lead screws Cables Cams etc.
Gears 1 2 N1 N2 Distance traveled is the same: r1 1 r2 2 Because the size of teeth is the same: N1 N2 r r 1 2
Furthermore r r 1 1 2 2 N r N r 1 2 1 2 No loss of energy 1 1 2 2
Combining N1 r1 2 1 2 2 N r 2 2 1 2 1 1 # of teeth Inverse relationship between speed and torque output input 2 1 N 2 N 1 TR N 1 N2 mechanical parameter
Equivalent J N J J N N N 1 1 1 1 1 2 2 2 2 2 2 N N J J J 2 1 1 1 2 2 N N 1 2 2 J TR J 2 1 2 J as seen from the motor
In reality 1 2 1 TR Where is the efficiency of the mechanism (from 0 to 1) is related to power, speed ratio doesn t change is also the ratio of input power vs. power at the output t
For example input 20% 30 1 1 output
Example
Motion conversion Start with N 2 2 1 N 1 Design TR, more torque (usually) TR 1 N N 2 1 J J 1 2 2 1
Viscous friction Easy: viscous B 2 2 eq _ viscous TR viscous TR B 22 2 2 Beq 1 TR B2 2 Beq TR B2 Coulomb friction: eq TR F sgn( ) c 2
Lead screw Rotary to linear motion conversion (P=pitch in #of turns/mm or inches) x mass/load motor [ rad] 2 Px 2 Px E E 1 1 M v J 2 2 M J load 2 (2 P) 2 2 rot lin load
Harmonic drives From the harmonic drive website http://www.harmonicdrive.deharmonicdrive de
Gearhead (for real) Standard (serial) Planetary
Example Designing i the single joint Given: J J J TR 2 max eq max eq max load max Then taking into account some more realistic components: max J load TR 2 max
Example (continued) max J load TR 2 max P given max max get P motor power, from catalog This guarantees that the motor can still deliver maximum torque at maximum speed
More on real world components Efficiency Eccentricity Backlash Vibrations To get better results during design mechanical systems can be simulated
Control of a single joint microprocessor actuator mechanics sensor reference amplifier
Components Digital microprocessor: Microcontroller, processor + special interfaces Amplifier (drives the motor) Turns control signals into power signals Actuator E.g. electric motor Mechanics/load The robot! Sensors For intelligence
Actuators Various types: AC, DC, stepper, etc. DC Brushless With brushes We ll have a look at the DC with brushes, simple to control, widely used in robotics
DC-brushless
DC with brushes
Modeling the DC motor Speed-torque and torque-current t relationships are linear
In particular No-load speed current-torquetorque speed-torque stall torque
Real numbers! http://www.minimotor.ch
Electrical diagram Ra La V E arm R g l + E g () t K E
Meaning of components R a V arm R l E g L a Armature resistance (including brushes) Armature voltage Losses due to magnetic field Back EMF produced by the rotation of the armature in the field Coil inductance
We can write V R I L I () t K arm a a a a E for R R l a which is the case at the frequency of interest, and we also have KI T a
On torque and current F il B F qv B lorentz
Thus for many coils
Back to motor modeling ( J J ) () t B () t M L f gr J M J J L f gr Torque generated Inertia of the motor Inertia of the load Friction Gravity
Furthermore V R I L I () t K arm a a a a E K I ( J J ) () t B () t T M L f gr a
Consequently R a K E Varm I L L a a La Ia a K T B f gr J M J L J M J L JM JL A linear system of two equations (differential) Q: can you write a transfer function from these equations? Q: can you transform the equations into a block diagram?
By Laplace-transforming Varm() s () s KE Varm() s Ra Ia () s La Ia () s s() s KE Ia () s R L s K I Varm() s () s KE K ( J J ) () s sb() s R L s T T M L f gr a a a a a
and finally () s KT La JT 2 V () s s [( R J L B) L J ] s( K K R B) L J arm a T a a T T E a a T Considering gravity and friction as additional inputs
Block diagram f gr V arm - R a I - 1 a 1 K sl T B sj T a K E
Analysis tools Control: determine V Va so to move the motor as desired Root locus Pole placement Frequency response Etc.
First block diagram * - A V Km (1 s ) (1 s ) a m 1 s ˆ K p A K K m p Hopen _ loop 1 s 1 s s a m
Root locus A K K m p open _ loop m p 1sa 1sm s H K AK K j 1 a 1 m
Changing K small K t higher K t
Let s add something, second diagram * - - A V Km (1 s ) (1 s ) a m 1 s ˆ K g K p H open _ loop AK ( K sk ) m p g (1 s )(1 s ) s a m
Analysis H open _ loop AK K m p K g (1 s ) K (1 s )(1 s ) s a m p K AKm Kp Z feedback K g K p
Root locus (case 1) j 1 1 a m K K p g K p K g 1 m
Root locus (case 2) j 1 K p 1 K a g m K p K g 1 m
Overall f gr * A Varm 1 a I - 1 1 1s a - R a sl a K T BsJ T s K E K g K p
Error and performance d M () s s KT ( R sl )( B sj ) K K a a T E T closed loop (position) 1 () s () s s 1 () s () s s 1 1 ( s) K p s () s A M () s 1 s a A 1 M ( s ) K 1 s a closed loop (velocity) g
finally lim sh () s lim ht () s0 t 1 d s () s d lim s ( s) lim s s s0 s s0 1 1 ( sk ) p s d K p For zero error K must be 1 or the control structure must be different
Same line of reasoning final gr Ra AK K T p Final value due to friction and gravity R K R gr a gr a max p T p AKTmax AK K K p min gr R AK T a max
PID controller * - K p sk d K i s V arm - R a 1 sl a f gr Ia 1 K T BsJ T K E - 1 s
PID controller We now know why we need the proportionalp We also know why we need the derivative Finally, we add the integral Integrates the error, in practice needs to be limited
Interpreting the PID Proportional: to go where required, linked to the steady-state error Derivative: damping Integral: to reduce the steady-state error
Global view microprocessor actuator mechanics sensor reference amplifier OK OK
About the amplifiers Linear amplifiers H type T type PWM (switching) amplifiers
Let s consider the linear as a starting point V cc
H-type The motor doesn t have a reference to ground (floating) It s difficult to get feedback signals (e.g. to measure the current flowing through the motor)
T-type V cc V cc
On the T-type Bipolar DC supply Dead band (around zero) Need to avoid simultaneous conduction (short circuit)
Things not shown Transistor protection (currents flowing back from the motor) Power dissipation and heat sink Cooling Sudden stop due to obstacles High currents current limits and timeouts
T-type V cc I c R transisor Vcc R motor V cc
PWM amplifiers P V I ce c same current
PWM signal P V I ce c Transistors either on or off When off, current is very low, little power too When on, V is low, working point close to (or in) saturation, power dissipation is low
Comparison 12W for a 6A current using a switching amplifier 72W for a corresponding linear amplifier
Why does it work? () s KT LaJT 2 V () s s [( R J L B) L J ] s( K K R B) L J arm a T a a T T E a a T In practice the motor transfer function is a lowpass filter T s with f s f e ( f s 100 f e ) Switching frequency must be high enough (s=switching switching, e=electric electric pole)
PWM signal V cc T s V cc T s T switching
Feedback in servo amplifiers V cc - V in + VV cc Voltage feedback amplifier
Operating characteristic Vout RL R1 AV in RL R 2 R R 2 1 I L
We ve already seen this V I V in A arm 1 s R sl 1 a - a a Ia 1 K T BsJ T K E () s K L J A V s s R J L B L J s K K R B L J s T a T v 2 in () [( a T a ) a T ] ( T E a ) a T (1 a)
Current feedback - V in + V out
Current feedback V out R R L 1 RL R 2 AV in R R 2 1 I L
Motor driven by a current amplifier V in A 1s a Ia 1 K T BsJ T () s KTAi V () s ( sj B)(1 s ) in T a
Back to the global view microprocessor actuator mechanics sensor reference amplifier OK OK OK
Sensors Potentiometers Encoders Tachometers Inertial sensors Strain gauges g Hall-effect sensors and many more
Potentiometer - r thin resistive film V out r V R cc V cc V out + Simple but noisy Requires A/D conversion Absolute position (good!)
Note TR turns Encoder Motor Gearbox N 1 2 1 TR N 2 1 2 N 2 (most of the time) N N 2 1 2 1 1 N N 1 2 1 2 N 1 turn The resolution of the sensor multiplied by TR
Encoder Absolute Incremental
Absolute encoder phototransistors LEDs transparent motor x x x x x x x x x x x x motor shaft 13 bits required for 0.044 degrees opaque
Incremental encoder Disk single track instead of multiple No absolute position Usually an index marks the beginning gof a turn
Incremental encoder output TTL t t Sensitive to the amount of light collected The direction of motion is not measured
Two-channel encoder 2 channels 90 degrees apart (quadrature signals) allow measuring the direction of motion A B t t
Moreover There are differential encoders Taking the difference of two sensors 180 degrees apart Typically A, B, Index channel A, B, Index (differential) A counter is used to compute the position from an incremental encoder
Increasing resolution Counting UP and DOWN edges X2 or X4 circuits
Absolute position A potentiometer and incremental encoder can be used simultaneously: the pot for the absolute reference, and the encoder because of good resolution and robustness to noise
Analog locking Use digital encoder as much as possible Get to zero error or so using the digital signal When close to zeroing the error: Switch to analog: use the analog signal coming from the photodetector (roughly sinusoidal/triangular) Much higher resolution, precise positioning
Tachometer Use a DC motor The moving coils in the magnetic field will get an induced EMF In practice is better to design a special purpose DC motor for measuring velocity Ripple: typ. 3%
As already seen e e ripple
Measuring speed with digital encoders Frequency to voltage converters Costly (additional electronics) Much better: in software Take the derivative (for free!) vkt ( ) pkt ( ) p(( k1) T) T
Inertial sensors Accelerometers: position sensor K K Ma 2 Kx a 2Kx M a
Gyroscopes Quartz forks driver (causing oscillations) amp V F F 2m V
Strain gauges Principle: deformation R (resistance) Example: conductive paint (Al, Cu) The paint covers a deformable non-conducting substrate L R L, Aconst R A conductivity
Reading from a strain gauge V cc strain gauge R 2 a b R 1 balance V cc RR R R V V f ( R ) 1 2 g b ab 0 ab g
Hall-effect sensors + - V out charges B F F qv B lorentz if electrons
Example Measuring angles (magnetic encoders)
Back to the global view microprocessor actuator mechanics sensor reference amplifier OK OK OK OK
Microprocessors Special DSPs for motion control Some are barely yprogrammable (the control law is fixed) Others are general purpose and they are mixed mode (analog and digital in a single chip)
Example DSP 16 bit ALU and instruction set PWM generator (simply attach this to either T or H amplifier) A/D conversion CAN bus, Serial ports, digital I/O Encoder counters Flash memory and RAM on-board Enough of all these to control two motors (either brush- or brushless)