Robust Nonlinear Observer for a Non-collocated Flexible System Mohsin Waqar M.S.Thesis Presentation Friday, March 28, 2008 Intelligent Machine Dynamics Lab Georgia Institute of Technology Agenda 1. •Background: Problem Statement Non-collocation and Non-minimum Phase Behavior Observer and Controller Overview Test-bed Overview Plant Model 2. •Optimal Observer – The Kalman Filter 3. •Robust Observer – Sliding Mode 4. •Results: Simulation Studies Experimental Studies 5. •Conclusions 2 Problem Statement •Examine the usefulness of the Sliding Mode Observer as part of a closed-loop system in the presence of non-collocation and model uncertainty. 3 Non-Minimum Phase Behavior Causes: Combination of non-collocation of actuators and sensors and the flexible nature of robot links Detection: •System transfer function has positive zeros. Effects: •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. •Limited gain margin (limited robustness of closed-loop system) •Model inaccuracy (parameter variation) becomes more troubling. 4 Control Overview Noise V + Commanded Tip Position u Feedforward Gain F Linear Motor F Flexible Link δ y Sensors - Feedback Gain K Control objective: x̂ Observer Accuracy, repeatability and steadiness of the link tip. 5 Test-Bed Overview R PCB 352a Accelerometer PCB Power Supply Anorad Encoder Readhead Anorad Interface Module LV Real Time 8.5 Target PC w/ NI-6052E DAQ Board C LS7084 Quadrature Clock Converter NI SCB-68 Terminal Board + + - Anorad DC Servo 160VDC Amplifier PWM Linear Motor -10 to +10VDC 6 Flexible Link Modeling – Assumed Modes Method c E, I, ρ, A, L m F w(x,t) x A Few Key Assumptions: •3 flexible modes + 1 rigid-body mode •Undergoes flexure only (no axial or torsional displacement) •Horizontal Plane (zero g) •Light damping (ζ << 1) •Only viscous friction at slider 7 Flexible Link 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 8 Flexible Link Model vs Experimental Experimental Data AMM Model Data Tip Mass (kg) 0.110 0.25 Length (m) 0.32 0.48 Width (m) 0.035 (1 3/8”) 0.04 Thickness (m) .003175 (1/8”) 0.0024 Material AISI 1018 Steel Not Applicable Density (kg/m3) 7870 9838 Young’s Modulus (GPa) 205 205 First Mode (Hz) 5.5 5.7 Second Mode (Hz) 49.5 49.0 Third Mode (Hz) 130.5 219.3 9 Flexible Link Modeling – Lumped Parameter Model 0 k m x 1 0 3k m2 c m2 1 0 c m1 k m1 0 0 3c m2 3k m2 0 0 c 0 m1 x 0 F 1 3 3c m2 m2 m1 J2 F Model Data k y2 y1 Tip Mass (kg) 0.110 Base Mass (kg) 20 Stiffness (N/m) 131.4 Damping (N-s/m) 0.04 Resulting First Mode (Hz) 5.5 Resulting Positive Zero 3.06e3 10 Agenda 1. •Background: Problem Statement Non-collocation and Non-minimum Phase Behavior Observer and Controller Overview Test-bed Overview Plant Model 2. •Optimal Observer – The Kalman Filter 3. •Robust Observer – Sliding Mode 4. •Results: Simulation Studies Experimental Studies 5. •Conclusions 11 Steady State Kalman Filter - Overview 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: •Optimal estimates (Minimizes mean square estimate error) •Predictor-Corrector Nature •Designed off-line (constant gain matrix) and reduced computational burden •Design is well-known and systematic 12 SteadyHow Stateit Kalman works - Kalman Filter – How Filterit works 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. 13 Steady State Kalman Filter – How it works r u F - x B + Filter Design: 1/s y v + C A 1. Find R and Q 1a) For each measurement, find μ and σ2 to get R + K - 1b) Set Q small, non-zero 2. Find P using Matlab CARE fcn 3. Find K=P*C'*inv(R) 4. Observer poles given by eig(~A-LC) 5. Tune Q as needed x̂ + B + 1/s ŷ C ~A Kc 14 Steady State Kalman Filter – How it works r Observer dynamic equation: ˆ ˆ Bu K ( yˆ y ) xˆ Ax F - u B + 1/s xC v y + A L B + + 1/s x̂ C ŷ ~A K Closed-loop system with observer: xˆ A BK C KC BK C x u KC yˆ C DK C y DKC KC xˆ BK C A x BK C 0 KC ˆ x 0 DKC x DKC C K r 0 v 0 r 0 v I 15 + - Steady State Kalman Filter – A Limitation Example: Given a second order dynamic system with a single measurement, x1 x2 x f 2 y x1 Then the Kalman filter in presence of parametric uncertainty is given by xˆ1 xˆ2 K1 x1 ˆ xˆ2 f K 2 x1 And the observer error dynamics are given by x1 x2 K1 x1 f K x x 2 1 2 f f fˆ 16 Agenda 1. •Background: Problem Statement Non-collocation and Non-minimum Phase Behavior Observer and Controller Overview Test-bed Overview Plant Model 2. •Optimal Observer – The Kalman Filter 3. •Robust Observer – Sliding Mode 4. •Results: Simulation Studies Experimental Studies 5. •Conclusions 17 Sliding Mode Observer – Lit. Review •Walcott and Zak (1986) and Slotine et al. (1987) – Suggest a general design procedure based on variable structure systems (VSS) theory approach. Simulations show superior robustness properties. •Chalhoub and Kfoury (2004) – Use VSS theory approach. Simulations of a single flexible link with observer in closed-loop show superior robustness properties. •Kim and Inman (2001) – Use Lyapunov equation approach. Superior robustness properties shown by simulations and experimental results of closed-loop active vibration suppression of cantilevered beam (not a motion system). •Zaki et al. (2003) – Use Lyapunov approach. Experimental results. 18 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. 19 Sliding Mode Observer – Overview Example: n 2, y x1 Sliding Surface If Single Sliding Surface: Error Vector Trajectory s1 xˆ1 x1 x Then Dynamics on Sliding Surface: x x 0, 0 x Sliding Condition: s1s1 s1 x (0,0) 20 Sliding Mode Observer – Form xˆ Axˆ Bu K L ( y yˆ ) K s (sgn( y yˆ )) Example: Given a second order dynamics system with a single measurement, x1 x2 x f 2 y x1 The error dynamics in the presence of parametric uncertainty are given by x1 x2 L1 x1 k1 sgn( x1 ) f L x k sgn( x ) x 2 1 2 1 2 f f fˆ 21 Sliding Mode Observer – VSS Theory Approach Notable Aspects: •Sliding mode gains are selected individually one gain at a time. •Gains are dependent on one another. •Must select upper bounds on parametric uncertainties. •Must select upper bounds on estimate errors. Limitations: •As number of measurements increase, higher likelihood of more unknowns than constraint equations. Some gains must be set to zero. •If measurements are not directly states, approach becomes unmanageable. •Sliding mode gain Ks is time-varying. 22 Sliding Mode Observer – Lyapunov Approach Given the SMO error dynamics x ( A K LC) x Ks (sgn( y yˆ )) Ax Walcott and Zak show that the following implementation assures stable error dynamics: K s P 1C T ( A K LC) P P( A K LC )T Qp Depends on Ax Formally, the Lyapunov function candidate V e Pe can be used to show that V is negative definite and so error dynamics are stable. T 23 Boundary Layer Sliding Mode Observer P 1C T sgn( y yˆ ) S y yˆ 1 T P C IF y yˆ y yˆ Notable Aspects: •As width of B.L. decreases, BLSMO becomes SMO. •As estimate error tends to zero, so does S. 24 Agenda 1. •Background: Problem Statement Non-collocation and Non-minimum Phase Behavior Observer and Controller Overview Test-bed Overview Plant Model 2. •Optimal Observer – The Kalman Filter 3. •Robust Observer – Sliding Mode 4. •Results: Simulation Studies Experimental Studies 5. •Conclusions 25 Simulation Studies - Overview w G v + D r u F + B + - + x C y •Noise statistics inherited from experimental test-bed. •Feedback gain designed to keep control signal u < 62 N. A ρ ε Ks + KL + B + + A x̂ ŷ C + Parameter Variation Studies: •Vary tip mass. •Observer design parameters: ρ, Qp , and λ. •Parameter variation from +60% to -60%. KC D 26 Simulation Studies - Overview w G Performance Metric: v + D (For lumped-parameter models) •Position Mean Square Estimate Error: Norm of vector MSE ( x1 ) MSE ( x ) 3 r u F B - + + + x C y A ρ ε Ks + KL B + + + - x̂ ŷ C + A KC •Velocity Mean Square Estimate Error: Norm of vector D MSE ( x2 ) MSE ( x ) 4 Similar approach for assumed modes method model. 27 Simulation Studies – Results •Sliding mode behavior seen in error space. •SMO (Qp = 4, ρ = 1) and BLSMO (Qp = 4, ρ = 1, λ = 0.005). 28 Simulation Studies – Results •Discontinuous state function for SMO. •Smoothed state function for BLSMO. 29 Simulation Studies – Results Tip Position: •Kalman Filter vs. BLSMO (Qp = 2.2e3, ρ = 2.5, λ = 150) •30% parameter variation. •Lumped parameter model. Tip Velocity: •Result: Reduced error estimates from BLSMO. 30 Simulation Studies – Results •Lumped parameter model. •Result: Position Mean Square Estimate Error (m) Larger variation in performance between different SMO designs. BLSMO (roe=1,Q=4,lambda=0.005) BLSMO (roe=1,Q=7.5,lambda=0.003) BLSMO (roe=1,Q=19,lambda=0.001) Kalman Filter Little variation in performance between different BLSMO designs. BLSMO estimate errors are lower than SMO. 1.E-04 1.E-05 BLSMO estimate errors are lower than Kalman filter. 1.E-06 1.E-07 1.E-08 1.E-09 -60 -40 -20 0 Parameter Variation (%) 20 40 60 31 Velocity Mean Square Estimate Error (m/s) Simulation Studies – Results 3.5E-05 3.0E-05 2.5E-05 2.0E-05 1.5E-05 1.0E-05 5.0E-06 BLSMO Kalman Filter 1.0E-08 -60 -40 -20 0 20 40 60 Parameter Variation (%) •Lumped parameter model. •Result: With Gaussian white measurement noise, BLSMO (Qp = 2.2e3, ρ = 0.01, λ = 5) outperforms Kalman filter. 32 Simulation Studies – Results •Modified inertia lumped parameter model. •Result: Unstable error dynamics for Kalman filter in presence of 21% parameter variation. Stable error dynamics for BLSMO (Qp = 3.65e6, ρ = 60, λ = 1) under same conditions, up to 32% parameter variation. 33 Simulation Studies – Results Closed-Loop Tip Response: •Lumped parameter model with 30% parameter variation. •BLSMO (Qp = 2e3, ρ = 2.5, λ = 150). •Result: Due to improved estimation, commanded tip excitation decreases. •Modified inertia lumped parameter model with 25% parameter variation. •BLSMO (Qp = 3.65e6, ρ = 60, λ = 1). •Result: Due to improved estimation, Unstable tip response is stabilized. 34 Simulation Studies – Results •Assumed modes method model. •Result: BLSMO (Qp = 2.5e11, ρ = 5, λ = 37) offers no estimation advantage. Closed-loop tip response could not be improved. •Why? -No state directly measured. -Parameter variation effects A, B, C and D. -According to Matlab, observability depends on link parameters. 35 Simulation Studies – Summary of Results The Good: •SMO estimates are superior to Kalman filter. •BLSMO estimates are superior to SMO. •In presence of Gaussian white noise, BLSMO estimates remain superior to Kalman filter. •Improved estimation can stabilize an unstable tip response or at the very least reduce closedloop tip tracking error. 36 Simulation Studies – Summary of Results The Bad: •Robust observer with assumed mode method model not any more robust than Kalman filter. •Anomaly at +60% parameter variation in many results. •All parameters selected by trial and error manner. 37 Agenda 1. •Background: Problem Statement Non-collocation and Non-minimum Phase Behavior Observer and Controller Overview Test-bed Overview Plant Model 2. •Optimal Observer – The Kalman Filter 3. •Robust Observer – Sliding Mode 4. •Results: Simulation Studies Experimental Studies 5. •Conclusions 38 Experimental Studies – Overview •Controller and observer based on lumped parameter model. •Model outputs tip acceleration. (accelerometer signal not integrated) •Noise covariance matrix for Kalman filter reflects: A standard deviation of 1.97e-5 meters in the position measurement. A standard deviation of 0.0161 m/s2 in the acceleration measurement. •Tip position is commanded in closed-loop control by penalizing state x1 in the method of symmetric root locus and in design of the feed-forward gain F. 39 Experimental Studies – Overview LabVIEW GUI •Allows direct control over hardware at runtime. •Relays status information to developer. •Updates at 10hz to minimize overhead. 40 Experimental Studies – Results Tip Acceleration: •Loop rate 1khz. •Kalman filter. Base Position: •First mode suppressed by state-feedback in 1.5 seconds. •A filtered square wave trajectory is tracked by link tip. 41 Experimental Studies – Results •Tip acceleration displayed. •Loop rate 1khz. •Tracking filtered square wave. Tip mass increased by 426% Tip mass decreased by 70% 42 Experimental Studies – Results •Link base position displayed. •Tracking filtered square wave trajectory for link tip. •Parameter variation of 91% in link length. •SMO (Qp=1.5e7, ρ=10) shows estimate chatter. •BLSMO (Qp=1.5e7, ρ=10, λ=5) shows no estimate chatter. •Damping effect on base motion apparent. 43 Experimental Studies – Results •Link tip acceleration displayed. •Tracking filtered square wave trajectory for link tip. •Parameter variation of 91% in link length. •SMO (Qp=1.5e7, ρ=10) shows estimate chatter. •BLSMO (Qp=1.5e7, ρ=10, λ=5) shows no estimate chatter. •Damping effect on tip motion 44 apparent. Experimental Studies – Results •Control signal is displayed. •Tracking filtered square wave trajectory for link tip. •Parameter variation of 91% in link length. •SMO (Qp=1.5e7, ρ=10) shows very high control activity. •BLSMO (Qp=1.5e7, ρ=10, λ=5) shows reduced control activity. 45 Experimental Studies – Results Base Position: •Studies could not be completed because of restrictive bounds placed on observer design parameters ρ and λ. •The structure of the output matrix C in combination with large sliding mode gain Ks and large feedback gain Kc can lead to discontinuities in the estimates which can cause discontinuities in the control signal: For ρ > 50 For λ < 1 46 Experimental Studies – Summary of Results •Robust observer parameter Qp fixed off-line while ρ and λ can be tuned on-line. •Small computational over-head. •SMO and BLSMO have an apparent damping effect on motor when tracking a time-varying reference signal in presence of parametric uncertainty. •Kalman filter is surprisingly robust to parameter variation. Although room for estimate improvement does exist. •Marginal stability resulting for parameter variation appears to be caused more by degraded performance of controller than of the Kalman filter. •Estimation chatter lead to chatter in control signal and overheated motor. 47 Agenda 1. •Background: Problem Statement Non-collocation and Non-minimum Phase Behavior Observer and Controller Overview Test-bed Overview Plant Model 2. •Optimal Observer – The Kalman Filter 3. •Robust Observer – Sliding Mode 4. •Results: Simulation Studies Experimental Studies 5. •Conclusions 48 Scoring the Sliding Mode Observer What is a useful observer anyway? •Robust (works most of the time) •Accuracy not far off from optimal estimates •Not computationally intensive •Straightforward design •Straightforward implementation 49 Scoring the Sliding Mode Observer Strong points: •Simulations indicate optimality is not sacrificed for robustness. •Simulations show that improving estimates alone can improve closed-loop tip tracking errors significantly. •On physical system, operates at fast control rates and is applicable to real-time control of fast motion systems. •On physical system, offers high tunability at run-time. (can even revert to Kalman filter on-the-fly) •In simulations and on physical system, easy to design. 50 Scoring the Sliding Mode Observer Weak points: •In simulations and on physical system, more particular about linear system model than Kalman filter. •On physical system, more difficult to implement than Kalman filter. Significantly more trial and error tuning needed. •On physical system, without boundary layer, can harm hardware. 51 Robust Nonlinear Observer for a Non-collocated Flexible System Mohsin Waqar M.S.Thesis Presentation Friday, March 28, 2008 Intelligent Machine Dynamics Lab Georgia Institute of Technology u Fr K c xˆ F = 2.24e4 Kc 1.01e4 0.056e4 3.25e6 0.066e4 0.34 1.2e 4 3.2e 8 4.5e 5 Ks 2.8e 4 0.48 1.1e 7 1.9e 4 xˆ Axˆ Bu K L ( y yˆ ) K s (sgn( y yˆ )) 528 0.863 713 0.184 KL 1.08e3 0.983 1.06e3 0.965 0 0 1 0 C 1.195e3 0.391 1.195e3 0.391 53