150 likes | 361 Views
Multi-Domain Modeling. Issue: Simulating Networks In Simulink. Simulink in barebones form not-well suited for simulating networks/nodal systems 1) No sense of bi-directionality 2) No notion of ‘nodes’
E N D
Issue: Simulating Networks In Simulink • Simulink in barebones form not-well suited for simulating networks/nodal systems • 1) No sense of bi-directionality • 2) No notion of ‘nodes’ • 3) Energy conservation has to be maintained via algebraic constraint blocks in each sub-unit • Can be done….but very messy, difficult to expand
Option #1: Custom Matrix Solver • Approach • Solve network state in one custom block • Pros • Better understood on how to get the correct solution • Cons • Not well-suited for ‘group’ approach • Code interface to solver block could get messy fast • Hard to expand to new sub-systems
Option #2: Simscape • Approach • Use Simulink ‘Simscape’ Libraries • Pros • Let Simulink do the book-keeping for energy conservation, flows, network state, time etc • Graphical components for building networks • Cons • Built-inHydraulic domain assumes constant temperature • New thermo/hydraulic domain (and accompanying components) have to be written/re-written
What is Simscape? • A simulink package to model physical domains and networks • Based off of ‘Bond-Graph’ Theory • Physical dynamic systems can be abstracted into networks in which: • 1) There exists “Flow” variables • 2) There exists “Effort” variables • 3) Energy is conserved
Plan of Attack • How to write a domain that couples hydraulic and thermal behavior? • Learn the mechanics of ‘Simscape’ Language (structure, syntax, etc) • Test with a sample, energy conserving networks • How to modify that domain to accurately model our system? • Mass flow rate, pressure, enthalpy, momentum, etc. • Build a source, flowing into a simple network of pipes
Writing New Multi-Domain Models Electro-Hydraulic Servo valve Example
Initial ‘Toy’ Thermal/Hydraulic Domain • 2 ‘Effort’ (across) variables • Temperature and Pressure drops • 2 Corresponding ‘FLOW’ variables • Power = Flow*Effort • Energy conserving variables noted • Default values assigned (but are over-written in each model)
Writing Thermo/Hydraulic Components At,p + qf qt Bt,p - Component Template
“Toy” Thermo-hydraulic Pipe Model • Includes both domains, but not coupled • Units matter!! Constraints, not assignments!
Writing Thermo/Hydraulic Components Reference node
Moving on to the next step… • What are our effort variables and units? • What are our flow variables and units? • What are the governing network equations, in nodal form? • What are the domain coupling expressions/constraints between the two domains?