Interactive Modeling, Simulation, Animation, and Real-Time Control (MoSART) Flexible Inverted Pendulum Environment Jose I. Hernandez Richard P. Metzger Jr. Chen-I Lim Armando A. Rodriguez Ack : White House, NSF, WAESO/CIMD, Boeing, Intel, Microsoft, CADSI, Knowledge Revolution, MathWorks, Lego, Xilinx, Honeywell, National Instruments, Integrated Systems, ASU CIEE. ASEE Pacific Southwest Meeting `99 Saturday, March 20 th 1999 Harrah’s Hotel Las Vegas, Nevada
Motivation Flexible Inverted Pendulum (FIP) System Dynamics: Model & Control Laws Description of Interactive MoSART FIP Environment Utility of Environment Summary and Future Directions Outline
Advanced visualization tools are needed for system analysis and design. Research/education can be enhanced with interactive multimedia environments. PC platforms now offer substantial computing power for engineering design. Motivation
New Technologies Affordable High Performance Computing Hi-fidelity Simulation Capability –Simulink / MATLAB, etc… –Visual C++ PC Animation Creation / Manipulation Technologies –3D Modeling Software (e.g. 3D Studio, RPM D3D toolbox, etc.) –Microsoft DirectX (provides: 3D-animation, sound, video, user-input, etc.) Object Oriented Programming (OOP) Framework –ActiveX / OLE New Technologies
Accelerated-time simulation Alter model/controller: –structure –parameters (on-the-fly) Advanced visualization: –real-time graphics –visual indicators/aids –3D animation models Direct user input via joystick, mouse, etc. Integration with MATLAB and Simulink Key Environment Features
System-specific interactive MoSART environments High performance: Windows/ C++ Advanced visualization tools: Direct-3D Extensible: integration with MATLAB User friendly Contributions of Work
11 22 l m b f x k t 1 2 h c in 1 c l m b d l c 1 m 2 2 b Flexible Inverted Pendulum (FIP) System
Controls and Outputs xpxp Inputs, u p Outputs, y p x = Cart Position (m) 1 = Link 1 Angle (rad)
States, x p
FIP Linear Model
Unstable pole Plant Analysis
Classical Pole Placement LQG/LTR H (1) H (2) Control Laws
Pentium PC Windows ’95/’98/NT System Requirements: Pentium PC running Windows 95/NT. 32 MB RAM. Direct-3D 3.0. Recommended: Pentium II 266 w/ MMX running Windows NT MB RAM. Direct-3D 3.0. Visual C++/ MFC Direct-3D v3.0 MATLAB Engine v5.0 About the Program
Communication Module (COM) Program User Interface (PUI) Simulation Module (SIM) Graphical Animation Module (GAM) Help/Instruct Module (HIM) Physical SystemSimulinkMATLABInternet Other Applications Interactive Environment Application ActiveX Interactive MoSART Environment Modules
(PUI) User Friendly Windows ’95/NT Interface Menus Multiple windows Program control toolbars Interactive System Diagram Block diagram representation of system Point-and-click access Program User Interface
(SIM) Numerical Simulation On-the-Fly Parameter Editing Fast compiled C++: >3000 Hz / 266MHz PII Better than real-time simulation Plant models Controller parameters Reference Commands, Disturbances, Noise, etc. Integration methods: Euler, Runge-Kutta 4, etc. Extensibility Simulation Module
(GAM) 3D Animation Direct-3D Texture-mapped, light-shaded polygons Wireframe copters from previous simulations Real-Time Variable Display Window 2D Animation Window: pitch indicator Real-time multiple-graph plotting Visualization Tools & Indicators (SMAC) Extensibility Graphical Animation Module
(HIM) On-line Help Instructions on using the environment Program reference HTML / PDF Documents Model documentation/ references Interactive tutorials Help-Instruct Module
Cart Position Link 1 Angle Link 1 Angle Cart Velocity Link 1 Angular Vel Link 1 Angular Vel Toolbar and Menu Initial Conditions Menu 3-D Animation Window System Block Diagram Variables Window Real Time Plots Simulation Parameters MoSART Flexible Inverted Pendulum (FIP) Environment
Plant modal analysis Plant flexibility analysis H Controller design Comparison of controllers Utility of the Environment
Toppling Unstable Mode Flexible Mode Link Damping Mode Modal Analysis
Visual animation of The Flexible Mode Selecting To Work Open-Loop, No Controller,No Input Plotting Cart Position and Link 1 and Link 2 Angles Variable Values Cart Position Link 1 Angle Link 1 Angle Cart Velocity Link 1 Angular Vel Link 1 Angular Vel Visualization of Flexible Mode
M x f in m l 11 22 l m b f x k t 1 2 h c in 1 c l m b d l c 1 m 2 2 b Rigid Inverted Pendulum Flexible Inverted Pendulum Plant Rigidity Analysis
As b 2 Increases, Flexible Mode Damping Increases As k t Increases, Natural Bending Frequency Increases Rigidity Analysis: Pole Locations Varying b 2 and k t
f in M x m l s=0,0, Inputs, u p Outputs, y p = Link Angle (rad) x = Cart Position (m) States, x p = Link angle (rad) d = Link angular velocity (rad/sec) x = Cart position (m) dx = Cart speed (m/sec) Rigidity Analysis: Rigid Inverted Pendulum Linear Model
Flexible Inverted Pendulum Plant High Frequency Peak Due to the Imaginary Poles Rigid Inverted Pendulum Plant Low Frequency Poles of Both Systems Are the Same Rigidity Analysis: Transfer function comparison: Rigid vs Flexible Pendulums
r eu didi dodo K P n y Controller Plant Design K based on model P o s.t. nominal CLS exhibits: –Stability –Good Command Following –Good Disturbance Rejection –Good Noise Attenuation –Robust Performance H Controller design
w1w1 w2w2 H Controller Design
Small Overshoot No Steady State Error Small Oscillations 1 22 Fast Response Sensitivity Complementary SensitivitySmall Control Force Good Low Frequency Command Following H Design
Classical LQG/LTR Pole Placement H (design 1) H (design 2) Command Following (Cart Position) for a Unit Step Input Controller Comparison
Sensitivity Transfer Functions (S) Complementary Sensitivity Transfer Functions (T) Control Force Command Following (Link 1 Angle) for a Unit Step Input Controller Comparison
ktkt Varying k t a Little Would Result in an Unstable Closed Loop System, for the H Controller kt Controller Comparison: Robustness to Flexibility Uncertainty. Varying k t
b2b2 When Using H (2) Controller, b 2 Can Be Increased 3000% From Its Nominal Value Before Getting The System Unstable b2 Controller Comparison: Robustness to Flexibility Uncertainty. Varying b 2
Closing the Loop and Selecting the LQG/LTR Controller Selecting a Unit Step Command Input to The System The MoSART FIP Environment Plots Agree With The MATLAB Plots Simulation of Closed-Loop System Response for a Step Command Input (LQG/LTR Controller)
Controller Comparison
Versatile system-specific interactive MoSART environments Windows / C++ / Direct-X / MATLAB User friendly: accessible & intuitive User can alter model structures & parameters (on-the-fly) Highly extensible: ability to incorporate new simulation/animation models Summary
Future Directions … development of Facility VISIT: -More visual indicators -Advanced SIM and GAM (e.g. TLHS) -Expanded HIM: web support, multimedia -Develop Model Documentation Feature -Enhanced integration with MATLAB / SIMULINK LABVIEW / Excel….all are ActiveX Compatible -Integrated design & analysis environment -Develop Additional Environments