MCE493/593 and EEC492/592 Prosthesis Design and Control Electromechanical Actuators Part 2 Applications to Prosthetic Devices Hanz Richter Department of Mechanical Engineering 2014 1 / 19
Integrating actuators into robotic models The actuator has been modeled with 1 Kinematic model: n j (q j ) q j = w 2 Actuator dynamics: relationship between control input, actuator speed w and joint torque τ j. The kinematic model connects joint and actuator motion variables. The dynamic model specifies τ j. This information is sufficient to obtain an augmented robotic model by direct substitution. The procedure is always the same, just need to use the specific actuator model. 2014 2 / 19
Basic example: gearmotor driving j-th link Voltage-driven motor equation: ẇ + α2 RJ m w = ( α RJ m ) V j ( ) τf +τ L J m Gears kinematics: w = n q j Gears with inertia and friction: ( J2 +n 2 J 1 ) qj = nτ L τ j τ f2 Solve for τ L from motor equation: τ L = J m ẇ α2 R w+ α R V j τ f Substitute into gear dynamics (last element before linkage) using the kinematics. Aim to relate τ j and V i, eliminating all variables other than the joint coordinate: τ j = nα R V j nτ f τ f2 (nα)2 R q j (J 2 +n 2 (J 1 +J m )) q j 2014 3 / 19
Basic example: augmented model When the final expression for τ j is substituted into the linkage model, the following happens: Term (J 2 +n 2 (J 1 +J m )) q j moves to the left hand side. The j-th element of the augmented mass matrix is M a (j,j) = M(j,j)+(J 2 +n 2 (J 1 +J m )) Term (nα)2 R q j moves to the left hand side. The j-the element of the dissipation matrix is R a (j,j) = R(j,j)+ (nα)2 R q j. The friction terms can be combined with the dissipation matrix or treated as disturbances for control purposes. The control term remains on the right hand side as u j = nα R V j. M a (q) q +C a (q, q)+g a (q)+r a (q)+f e (q) = u Note that the Coriolis, gravity and external forces of the un-augmented model remain the same. The Coriolis term will be affected when n = n(q j ). 2014 4 / 19
Study: Prosthetic knee with DC gearmotor and leadscrew actuator From the previous study, knee velocity q 3 and actuator extension L are related by L = bd 1cos(q 3 +a) q 3 L with b 2 = d 2 2 +H2, H tan(a) = d 2, and L 2 = d 2 1 +b2 2d 1 bsin(q 3 +a). The kinematics of the leadscrew are lw = L Combining 1 : (aim to relate w to q 3 ): ( ) bd1 cos(q 3 +a) w = q 3 = n(q 3 ) q 3 ll 1 We are allowing n(q3 ) < 0. It can be fixed definingl = l (thread orientation) 2014 5 / 19
Dynamics The DC motor is described by: ẇ + α2 RJ m w = ( α RJ m ) V j ( ) τf +τ L where τ L drives the leadscrew, described by: ( J1 +l 2 J 2 ) L = lτl lτ f1 l 2 F a l 2 τ f2 J m F a is the force, J 1 is the moment of inertia of the screw, J 2 is the linearly-moving mass, which can be neglected, as well as τ f2 : J 1 L = lτl lτ f1 l 2 F a 2014 6 / 19
Dynamics.. From the previous study, the moment produced by the actuator force is τ 3 = F a d 1 cos(q 3 +a δ) = F a bd 1 cos(q 3 +a)/l = F a ln(q 3 ) with sin(δ) = d 1 cos(q 3 +a)/l. The load torque to the motor is solved for from the motor dynamics: τ L = J m ẇ α2 R w+ α R V j τ f and the force is solved for from the leadscrew dynamics: F a = τ L l τ f1 l J 1 l 2 L 2014 7 / 19
Dynamics... Combine all (aim to express τ 3 as a function of V i and knee position, velocity and acceleration, eliminating all other variables): τ 3 = n(q 3 ) [ J m ẇ α2 R w+ α R V j τ f τ f1 J ] 1 l L Use w = n(q 3 ) q 3 and note that L = ln(q 3 ) q 3 to obtain: ẇ = n(q 3) q 3 2 +n(q 3 ) q 3 q 3 ( ) n(q3 ) L = l q 3 2 q +n(q 3) q 3 3 2014 8 / 19
Dynamics... Substiting and rearranging terms; τ 3 = n 2 (q 3 )(J m +J 1 ) q 3 n(q 3 ) n(q 3) q 3 (J m +J 1 ) q 2 3 α2 R w +n(q 3 ) α R V j n(q 3 )(τ f +τ f1 ) To simplify notation, let n = n(q 3 ), n = n(q3) q 3, J t = J m +J 1, τ ft = τ f +τ f1 and u j = n(q 3 ) α R V j: τ 3 = n 2 J t q 3 nn J t q 2 3 (αn)2 R q 3 +u j nτ ft 2014 9 / 19
Augmented model Suppose that the knee is the third link of a larger prosthetic testing robot (CSU s hip robot). When the final expression for τ 3 is substituted into the linkage model, the following happens: Term n 2 J t q 3 moves to the left hand side. The 3rd element of the augmented mass matrix is M a (3,3) = M(3,3)+n(q 3 ) 2 J t Term (nα)2 R q 3 moves to the left hand side. The 3rd element of the dissipation matrix is R a (3,3) = R(3,3)+ (n(q3)α)2 R q 3. The friction terms can be combined with the dissipation matrix or treated as disturbances for control purposes. The control term remains on the right hand side as u 3 = n(q3)α R V 3. Positive V 3 produces knee extension. Term nn J t q 2 3 moves to the left hand side, and the factor nn q 3 enters the Coriolis matrix. M a (q) q +C a (q, q)+g a (q)+r a (q)+f e (q) = u THe gravity and external force terms of the un-augmented model remain the same. 2014 10 / 19
Property preservation and observations Friction torque appears on the r.h.s. as nτ ft. With either sign of q 3, the friction term should contribute to an acceleration of the opposite sign. We verify this in class. It can be shown that positive-definiteness of M a and skew-symmetry of Ṁ a 2C a are maintained (if M and C satisfy these properties in the first place). (Homework) Compare the expression for τ 3 here with the previous DC gearmotor example. Althoughτ j must be obtained in a case-by-case basis, results will be similar for general mechanical actuators (even involving hydraulics, pneumatics). The same properties will hold for the augmented model. The control term containsn(q 3), which acts as a static input nonlinearity (nonlinear function of the state). Since kinematics are accurately known, we can regardu 3 as a virtual control and design a control law u = u d (q, q,t). If n(q 3) 0, we can solve for V 3. Obtaining an augmented model retaining basic properties of robotic models allows us to use a variety of well-established control techniques without having to obtain small-signal linearized models, which are totally inadequate for most motion control objectives. 2014 11 / 19
Current-driven DC motors Designers have the option of using voltage-mode servo drives or current-mode (also called torque-mode) servo drives. If a current-mode servo is used, armature current (and therefore induced torque) can be commanded directly. Care must be exercised when designing controllers and working with real systems, because mechanical systems driven from torque (or force) are unstable (unbounded velocity). When i is directly commanded as a control, the electrical half of the DC motor is bypassed. The dynamics of the motor simplify to: ẇ = α J m i τ f +τ L J m The process followed to obtainτ 3 in the prosthetic knee study is the same, we only need to use the appropriate motor dynamics equation (Homework). 2014 12 / 19
Pulse-Width Modulation (PWM) Understanding PWM is crucial when designing embedded systems, as many small microprocessor-based controllers are unable to produce analog (continuous) control signals. A PWM signal is a rectangular pulse with fixed frequency and amplitude but adjustable duty cycle (ratio of on-time to period) p(t) T A A 4 0 t T 4 If the duty ratio is x (1/4 in the figure), the mean value is p = 1 T T 0 p(t)dt = Ax This means we can carry mean amplitude information via duty ratio. 2014 13 / 19
Fourier expansion of PWM signal Consider the decomposition p(t) = 1 2 a 0 + a n cos(nt)+ b n sin(nt) n=1 The bias term matches the mean value Ax. If the harmonic terms are small, the approximation p(t) 1 2 a 0 = Ax will be good and we can use the PWM signal instead of the desired analog control input: u(t) = Ax, so we just use x = u(t) A. How do we make the harmonics small? -By keeping on times very small, which means using high carrier frequencies (homework) Also, the decomposition holds for constant x, but x will be changing at each control update. We must keep control bandwidth well below carrier frequency (more later). n=1 2014 14 / 19
PWM Servo Amplifiers Carrier Reference PWM Amplifier Driven Device (from controller) http://www.adafruit.com/product/815, $14.95 2014 15 / 19
PWM signals from scratch h X Carrier Reference T t A t Pulse t A triangle wave with fixed frequency and amplitude can be generated cheaply with an oscillator and an integrating circuit (op-amps). The pwm signal is obtained cheaply with a comparator circuit. The duty cycle x varies linearly with the location of the reference: x = 1 r/h = X/h. 2014 16 / 19
Generating PWM signals Objective: at instant t, the desired control input u(t) must become the mean value of the pwm signal. The sign of u is treated separately. We use p = u to find the duty cycle. The pwm signal will be low-power, used to control power supply switching. Let p 0 be the low-power signal and p = U max p 0 the input to be applied to the motor. The mean value of the amplified pwm signal is p = U max hx, and x = 1 r/h Solving for r: r = h u U max 2014 17 / 19
Simulation example: open-loop control of motor pulse0 To Workspace5 carrier To Workspace3 h Constant1 1 s pulse Pulse Generator Integrator Switch To Workspace2 0 2*h/T Constant4 h-abs(u/umax) Fcn Constant2 v -1 Constant3 1 Constant5 Switch1 Sign Product Umax Power Stage Kt J.s Transfer Fcn 1 s Integrator1 Velocity y Position pwm_signal To Workspace4 t Clock To Workspace1 2014 18 / 19
Simulation example: closed-loop control of motor In1 Out1 pwm_signal Clock t To Workspace1 PWM Amplifier To Workspace3 v To Workspace6 0.5 Setpoint PID Position Loop PID Current Loop Manual Switch 1 L.s+R Windings Kt J.s Transfer Fcn 1 s Integrator1 y To Workspace u To Workspace7 Kt Gain i To Workspace2 2014 19 / 19