Robust Non-Linear Observer for a Non-collocated Flexible System Mohsin Waqar Intelligent Machine Dynamics Lab Georgia Institute of Technology December 12, 2007 Agenda •Project Motivation and Goals •Non-collocated Flexible System and Non-minimum Phase Behavior •Control Overview •Test-bed Overview •Plant Model •Optimal Observer – The Kalman Filter •Robust Observer – Sliding Mode •Project Roadmap Motivation for Research – Flexible Robotic Arms 1) Manipulators with very large workspaces (long reach): Example - handling of nuclear waste. 2) Manipulators with constraint on mass: Example – space manipulators. Source: NASA.gov 3) Manipulators with constraint on cost: Example – Camotion Depalletizer 4) Manipulators with Actuator/Sensor Non-collocation: Collocation can be impossible. Source: camotion.com Problem Statement •Contribute to the field of active vibration suppression in motion systems •Examine the usefulness of the Sliding Mode Observer as part of a closed-loop system in the presence of non-collocation and model uncertainty. What is a Flexible Robotic Arm? Source: Shabana, A. A. Vibration of Discrete and Continuous Systems. 1997. •Robotic arm is subject to torsion, axial compression, bending. •Structural stiffness, natural damping, natural frequencies and boundary conditions are important to consider. Note: pole = eigenvalue = mode = natural frequency What is a Flexible Robotic Arm? - References W.J. Book, “Modeling, Design, and Control of Flexible Manipulator Arms: A Tutorial Review,” Proceedings of the 29th Conference on Decision and Control, Dec. 1990. W.J. Book, “Structural Flexibility of Motion Systems in Space Environment,” IEEE Transactions on Robotics and Automation, Vol. 9, No. 5, pp. 524-530, Oct. 1993. W.J. Book, “Flexible Robot Arms,” Robotics and Automation Handbook., pp. 24.1-24.44, CRC Press, Boca Raton, FL, 2005. Causes: Non-Minimum Phase Behavior (in continuous time system) Combination of non-collocation of actuators and sensors and the flexible nature of robot links Detection: •System transfer function has positive zeros. Source: Cannon, R.H. and Schmitz, E. “Initial Experiments on the Effects: End-Point Control of a Flexible One-Link Robot.” 1984. •Limited speed of response. •Initial undershoot (only if odd number of pos. zeros). •Multiple pos. zeros means multiple direction reversal in step response. •PID control based on tip position fails. Non-Minimum Phase Behavior (in continuous time system) Effects: •Limited gain margin (limited robustness of closed-loop system) •Model inaccuracy (parameter variation) becomes more troubling (Zeroflipping). Im X X X Re Non-Minimum Phase Behavior - References R.H. Cannon and D. E. Rosenthal, “Experiments in Control of Flexible Structures with Noncolocated Sensors and Actuators,” J. Guidance, Vol. 7, No. 5, Sept.-Oct. 1984. R.H. Cannon and E. Schmitz, “Initial Experiments on the End-Point Control of a Flexible One-Link Robot,” International Journal of Robotics Research, 1984. D.L. Girvin, “Numerical Analysis of Right-Half Plane Zeros for a Single-Link Manipulator,” M.S. Thesis, Georgia Institute of Technology, Mar. 1992. J.B. Hoagg and D.S. Bernstein, “Nonminimum-Phase Zeros,” IEEE Control Systems Magazine, June 2007. Control Overview Noise V + Commanded Tip Position u Feedforward Gain F Linear Motor F Flexible Arm δ y Sensors - Feedback Gain K x Observer Design objective: Accuracy, repeatability and steadiness of the beam end point. Test-Bed Overview R PCB 352a Accelerometer PCB Power Supply Anorad Encoder Readhead Anorad Interface Module LV Real Time 8.2 Target PC w/ NI-6052E DAQ Board C LS7084 Quadrature Clock Converter NI SCB-68 Terminal Board + + - Anorad DC Servo 160VDC Amplifier PWM -10 to +10VDC Linear Motor Test-Bed Rigid Sub-system ID Yb ( s) Km V ( s) Ms 2 bs Starting Parameters: Km=8.17; % overall motor gain [N/V] M=9.6; % base mass [kg] b=50; % track-base viscous damping [N*s/m] Using fmincon in Matlab with bounds: Km: +/- 25% M: +/- 10% b: (0,inf) Final Parameters with Step Input: [Km,M,b] = [6.9, 10.52, 38.97] With ramp input (0-5V over 2 sec): [Km,M,b] = [6.13, 10.56, 35.16] Agenda •Project Motivation and Goals •Non-collocated Flexible System and Non-minimum Phase Behavior •Control Overview •Test-bed Overview •Plant Model •Optimal Observer – The Kalman Filter •Robust Observer – Sliding Mode •Project Roadmap Flexible Arm Modeling Lumped Parameter System (or Discrete System) Mashner (2002) Beargie (2002) •Finite degrees of freedom. •Described by one second-order ODE per degree/order of the system. Distributed Parameter System (or Continuous System) •Symbolic form retains infinite degrees of freedom and non-minimum phase characteristics. •Describes rigid body motion of link and elastic deflection of link. •Described by second order PDE. Approaches: 1) Lagrangian: Obergfell (1999) 2) Newton Euler: Girvin (1992) Approximate methods: 3) Transfer Matrix Method: Krauss (2006), Girvin (1992) 4) Assumed Modes Method: Sangveraphunsiri (1984), Huggins (1988), Lane (1996) Flexible Arm Modeling – Assumed Modes Method E, I, ρ, A, L F m w(x,t) x Assumptions: •Uniform cross-section •3 flexible modes + 1 rigid-body mode •Undergoes flexure only (no axial or torsional displacement) •Linear elastic material behavior •Horizontal Plane (zero g) •No static/dynamic friction at slider •Light damping (ζ << 1) Flexible Arm Modeling – Assumed Modes Method E, I, ρ, A, L Geometric Boundary Conditions: i (0) 0 ' For i = 1 to 4 F m w(x,t) x Ritz Basis Functions: 1' ( x) 1 x 2 ( x) cos 2L x ' 3 ( x) cos L 3 x ' 4 ( x) cos 2L ' Source: J.H. Ginsberg, “Mechanical and Structural Vibrations,” 2001 Flexible Arm Modeling – Assumed Modes Method L 1 1 T Aw2 dx mw( xm , t ) 2 20 2 E, I, ρ, A, L m F L 1 V EIw2 dx 20 x 1 2 M AL 0 2 3 2 2w Pdis EI 2 dx x 0 L Pin Fw xF , t 1 1 QF 1 1 C K 2 0 1 2 2 3 2 3 1 2 6 5 0 0 4 0 32 EI K 3 3 L 0 6 0 0 0 0 3 6 4 2 27 3 10 Mq Cq Kq Q 2 3 1 0 0 m 1 6 5 0 1 2 0 0 3 27 10 81 4 32 0 1 0 0 0 1 0 0 0 0 0 0 w(x,t) Flexible Arm Modeling – Assumed Modes Method Mq Cq Kq Q E, I, ρ, A, L F K M 0 q T Q T C [diag ( 2 )] T w(x,t) x EI AL4 m M 1 2 x Ax Bu w( x 0, t ) y x Cx Du w( x L, t ) x1 1 x 2 2 x3 3 x4 4 x5 1 x6 2 x 7 3 x8 4 Flexible Arm Model vs Experimental AMM Model with Experimental Data AMM Model with Optimization Bounds: Optimization Bounds: (0,inf) Length and Tip Mass +/- 25% On All Parameters +/- 25% All Others Length (m) .32 Length (m) .4 Length (m) .707 Width (m) 0.035 (1 3/8”) Width (m) 0.0412 Width (m) 0.0262 Thickness (m) .003175 (1/8”) Thickness (m) .0024 Thickness (m) .0037 Material AISI 1018 Steel Material AISI 1018 Steel Material AISI 1018 Steel Density (kg/m^3) 7870 Density (kg/m^3) 9838 Density (kg/m^3) 5903 Young’s Modulus (GPa) 205 Young’s Modulus (GPa) 205 Young’s Modulus (GPa) 205 Tip Mass (kg) .110 Tip Mass (kg) .1375 Tip Mass (kg) 1.76 First Mode 5.5 hz First Mode 14.3 hz First Mode 5.83 hz Second Mode 49.5 hz Second Mode 81.5 hz Second Mode 45.2 hz Third Mode 130.5 hz Third Mode 331.4 hz Third Mode 186.5 hz Flexible Arm Model vs Experimental System ID setup: •Loop rate 1khz •Closed-loop PID •0-40hz Chirp Reference Signal with 0.1-0.5 cm p-p amplitude •15 data sets averaged atip ( s) F ( s) Flexible Arm Model – Root Locus atip ( s) F ( s) Agenda •Project Motivation and Goals •Non-collocated Flexible System and Non-minimum Phase Behavior •Control Overview •Test-bed Overview •Plant Model •Optimal Observer – The Kalman Filter •Robust Observer – Sliding Mode •Project Roadmap Performance Criteria for Observer Study What is a useful observer anyway? •Robust (works most of the time) •Accuracy not far off from optimal estimates •Not computationally intensive •Straightforward design •Uses simple rather than a complex plant model Estimate Mean Square Error (MSE) A Hypothesis for Observer Study WHOOPS…PARABOLAS SHOULD BE FACING UPPPP!!!!!!! SMO Kalman Filter (KF) -50% -25% 0 25% 50% % Deviation in some Beam Parameter Overview of Steady State Kalman Filter Why Use? •Needed when internal states are not measurable directly (or costly). •Sensors do not provide perfect and complete data due to noise. •No system model is perfect Notable Aspects: •Designed off-line (constant gain matrix) and reduced computational burden •Minimizes sum of squares of estimate error (optimal estimates) •Predictor-Corrector Nature Shortcomings: Limited robustness to model parameter variation Steady State KF gives sub-optimal estimates at best How it works - Kalman Filter Plant Dynamics Measurement & State Relationships Noise Statistics Kalman Filter State Estimates with minimum square of error Initial Conditions Filter Parameters: Noise Covariance Matrix Q – measure of uncertainty in plant. Directly tunable. Noise Covariance Matrix R – measure of uncertainty in measurements. Fixed. Error Covariance Matrix P – measure of uncertainty in state estimates. Depends on Q. Kalman Gain Matrix K – determines how much to weight model prediction and fresh measurement. Depends on P. How it works - Kalman Filter v r u F - x B + 1/s y + C Filter Design: A 1. Find R and Q 1a) For each measurement, find μ and σ2 to get R + 1b) Set Q small, non-zero L 2. Find P using Matlab CARE fcn 3. Find L=P*C'*inv(R) 4. Observer poles given by eig(~A-LC) x̂ + B + - 1/s ~A 5. Tune Q as needed K ŷ C How it works - Kalman Filter r F - u B ˆ ˆ Bu L( yˆ y ) xˆ Ax u K yˆ C DK y DK LC xˆ BK A x BK 0 K ˆ x 0 DK x DK C L r 0 v 0 r 0 v I xC v y + A L B xˆ ~ A BK LC BK x + 1/s + + 1/s ~A K x̂ C ŷ + - Kalman Filter – LabVIEW Simulation Observer model = Plant model Kalman Filter – LabVIEW Simulation Plant model: A + Δ A Δ A may be from system wear and tear or change in tip mass Kalman Filter – Testbed On-Line Estimation Tip Acceleration (m/s^2) Base Position (m) Mean -6.607491857 1.61682E-06 Variance 0.000259078 3.86945E-10 0 3.86945E-10 R 0 0.000259078 Note: Accelerometer DC Bias of -0.67 volts or -6.61 m/s^2 Measured Tip Accel. vs Estimated Measured Base Position vs Estimate (Q=2e-6) 0.03 6 0.02 2 0.01 0 -2 0 2 4 6 8 Measured Estimated -4 -6 10 Position (m) Acceleration (m/s^2) 4 0 0 2 4 6 8 -0.01 -0.02 -8 Measured Estimated -0.03 -10 -12 -0.04 Time (sec) Time (sec) 10 12 Agenda •Project Motivation and Goals •Non-collocated Flexible System and Non-minimum Phase Behavior •Control Overview •Test-bed Overview •Plant Model •Optimal Observer – The Kalman Filter •Robust Observer – Sliding Mode •Project Roadmap Sliding Mode Observer – Lit. Review •Slotine et al. (1987) – Suggests a general design procedure. Simulations shows superior robustness properties. •Chalhoub and Kfoury (2004) – 4th order observer with single measurement. Adapts Slotine’s design approach with modifications to observer structure. Presents a unique method for selecting switching gains. Simulations of a single flexible link with observer in closed-loop. Shows KF unstable in presence of uncontrolled modes while SMO remains stable. •Chalhoub and Kfoury (2006) – 6th order observer with 3 measurements. Same approach as earlier paper. Simulations of the rigid/flexible motion in IC engine. Sliding Mode Observer – Lit. Review Kim and Inman (2001) – SMO design based on Lyapunov equation. Unstable estimates by KF in presence of uncontrolled modes while SMO remains stable. Simulations and experimental results of closed-loop active vibration suppression of cantilevered beam (not a motion system). Zaki et al. (2003) – 14th order observer with 3 measurements, with design based on Lyapunov equation. Experimental results (including parameter variation studies) from three flexible link testbed with PD control. Observer in open loop. Elbeheiry and Elmaraghy (2003) – 8th order observer with two measurements, with design based on Lyapunov equation. Simulations and experimental results from 2 link flexible joint testbed with PI control. Observer in open loop. Sliding Mode Observer – Definitions • Sliding Surface – A line or hyperplane in state-space which is designed to accommodate a sliding motion. • Sliding Mode – The behavior of a dynamic system while confined to the sliding surface. 1 • Signum function (Sgn(s)) 1 s 0 if s 0 • Reaching phase – The initial phase of the closed loop behaviour of the state variables as they are being driven towards the surface. Sliding Mode Observer – 3 Basic Design Steps • Design a sliding surface. One surface per measurement. • Design a sliding condition to reach the sliding surface in finite time. • Design sliding observer gains to satisfy the sliding condition. Sliding Mode Observer – Overview Example: n 2, y x1 Single Sliding Surface Sliding Surface s1 xˆ1 x1 Error Vector Trajectory Dynamics on Sliding Surface x x 0, 0 Sliding Condition s1s1 s1 x ~ x (0,0) Sliding Mode Observer Form Example: n 2, y x1 x1 x2 x f , y x1 2 Luenberger Observer: xˆ1 xˆ2 L1 x1 ˆ xˆ2 f L2 x1 f Observer Error Dynamics: x1 x2 L1 x1 f L x 2 1 x2 Is due to model imperfection. Has potential to destabilize observer error dynamics. Sliding Mode Observer: x1 x2 L1 x1 k1 sgn( x1 ) f L x k sgn( x ) 2 1 2 1 x2 Sliding Mode Observer Form General Form: ˆ ˆ Bu L( yˆ y ) K (sgn( yˆ y )) xˆ Ax Error Dynamics: e(t ) ( A LC )e(t ) K (sgn( yˆ y )) + bounded nonlinear perturbations With proper selection of K which is based on some P, the Lyapunov function candidate V eT Pe can be used to show that V is negative definite and so error dynamics are stable. Sliding Mode Observer LabVIEW Simulation Simplified Flexible Arm Model: n=4, y=x1 (tip position) Plant zeros: -0.7+i1.3e7, -0.7-i1.3e7, 2.75 No K No L Simulation Parameters: Parameter Mismatch: 100% (spring constant) deltaF for SMO Design: 20% Eta for SMO Design: 0.05 Just L MSE: 0.00076 L+K MSE: 0.0001 Roadmap December 2007: Extend SMO to AMM Model and 2 measurements January 2008: SMO with Closed Loop Control Simulation KF with Closed Loop Control on Testbed SMO with Closed Loop Control on Testbed February 2008: Conduct Parameter Studies Roadmap December 2007: Extend SMO to AMM Model and 2 measurements January 2008: SMO with Closed Loop Control Simulation KF with Closed Loop Control on Testbed SMO with Closed Loop Control on Testbed February 2008: Conduct Parameter Studies Questions?