Modeling Mechanical, Electric, and Hydraulic Systems in Simulink 2006 The MathWorks, Inc. Terry Denery, Ph.D. Physics-Based Modeling Tools
Physics-Based Modeling Methods Improve Control System Design u + Controller Actuators Electrical Mechanical Device Plant Sensors y Multidomain systems (mechanical, electrical, hydraulic, chemical,...) Successful controller development requires thorough and accurate understanding of plant 2
Important Physical Domains Actuators Electrical Mechanical Device Plant Sensors Mechanical -3D Multi-Body Dynamics -Driveline Mechanics SimMechanics SimDriveline 3
Important Physical Domains Actuators Electrical Mechanical Device Plant Sensors Electrical -Circuits SimPowerSystems -Motors and Actuators -Power Systems 4
Important Physical Domains Actuators Electrical Mechanical Device Plant Sensors Hydraulics SimHydraulics -Circuits -Motors and Actuators -Power Systems 5
u + Controller Actuators Electrical Mechanical Device Control System Plant Sensors y 6
Control System 7
Power Delivery Electrical Power Network Hydraulic Power Network Mechanical Driveline Power Network 8
Electrical Mechanical Electrical Power Network Device Hydraulic Power Network Mechanical Driveline Power Network 9
Control Systems within Control Systems u + Controller Actuators Electrical Mechanical Device Plant Sensors y 10
Biggest Benefit Delivered Through Simulink Rich Modeling Environment Physical Behavioral Data-Driven Control System Development Tool One environment for controller and plant Code generation that enables HIL testing Easy access to control tools 11
Why did we build SimHydraulics? Hydraulics is widely used in motion actuation systems Customer Feedback Extend benefits of Model-Based Design to hydraulic system design Develop better plant models for better controller development Co simulation with other products is difficult and impractical 12
Pros and Cons for Hydraulics Pros: High power density Straight-line actuators are simple, efficient and reliable Variable speed is easily obtained Simple, efficient, and centralized control Overload protection Cons: High cost Complex and costly maintenance Extremely vulnerable to dirt and contamination Possible leaks Noise and vibrations Fire hazards Design Trend is Electro-Hydraulics: Transmit power electrically, but deliver through local hydraulic networks 13
Hydraulic System Schematic Diagram 14
15 Block Diagrams ( ) ( ).,,,,, ), ( 2 1 1 1 2 1 1 T A A P T P O O A O P A A T A O A P O p p p p p p p p q q q q q dt dp K qa p p K q p p K q t p p + = = = = = = =
Physical System Diagrams Hydraulic Schematic SimHydraulics Model 16
Demonstrations 17
Building Blocks Mechanical Mechanical Signal Hydraulic Hydraulic 18
Actuation 19
Multidomain with SimMechanics 20
Two Approaches to Modeling Dynamic Systems First-Principles Modeling Use an understanding of the system s physics to derive a mathematical representation & α = L 2 sin( α ) + nw 2 2 ( sin( α γ ))sin( γ ) ne( sin( α γ )) cos( α γ ) & α 2 1 ne sin ( α γ ) n cos( α γ ) & γ 2 dγ 21
Two Approaches to Modeling Dynamic Systems First-Principles Modeling Data-Driven Modeling Use an understanding of the system s physics to derive a mathematical representation Use system test data to derive a mathematical representation s+ 1 3 L sin( 2 α 2 ) + + & α = s 3s 2 H( s) = 2 s + 3 2 s + s+ 1 + nw 2 2 ( sin( α γ ))sin( γ ) ne( sin( α γ )) cos( α γ ) & α 2 1 ne sin ( α γ ) n cos( α γ ) & γ 2 dγ 22
Each Approach Has Its Merits First-Principles Modeling Data-Driven Modeling Advantages: Provides insight into the system s underlying behavior Enables performance prediction for unbuilt systems Disadvantages: Effects like friction and turbulence are difficult to characterize May be time consuming to develop Advantages: Can be a fast method for developing an accurate model Instills confidence because it uses data from an actual system Disadvantages: Requires a physical system to acquire test data Lacks description of physics of the system May need multiple data sets to cover range of system operation 23
Tools that Span Both Modeling Approaches Complete Modeling Environment First-Principles Simulink SimHydraulics SimMechanics SimDriveline SimPowerSystems Simulink Parameter Estimation Data-Driven System Identification Toolbox Neural Network Toolbox Fuzzy Logic Toolbox 24
Inform Model with Test Data Simulink Parameter Estimation Data fitting and optimization techniques Sets parameters defined by physics-based modeling tools 25
Code Generation with Real-Time Workshop Generate ANSI C code Hardware-in-the-loop (HIL) simulations S-functions In-house code 26
General Engineering Simulation MATH MATLAB & Simulink Domain Knowledge Programming Effort Engineering Simulation Flexibility of mathematical modeling enables you to simulate almost anything. 27
Hydraulic Engineering Simulation MATLAB & Simulink Domain Knowledge Programming Effort MATH SimHydraulics Dom. Know. Prog. Effort Hydraulic Simulation SimHydraulics brings you further by reducing your requirements for hydraulic domain knowledge and programming effort. 28
Multidomain Simulation MATH MATLAB &Simulink DK PE SimMechanics DK. PE SimPowerSystems DK. PE SimDriveline DK. PE SimHydraulics DK. PE Controls Tools DK PE Multidomain Simulation Real Time Workshop DK. PE Parameter Estimation DK. PE The MathWorks provides the best combination of tools for multidomain simulations. 29