— electronic,mechanical, photocopying,recording,or otherwise.Informationin thisdocumentis subjecttochange
without notice and does not represent a commitment on the part of the vendor. The software described in this
document isfurnished underalicense agreementandmay beusedor copiedonlyin accordancewiththe agreement.
It is against the law to copy the software on any medium except as specically allowed in the agreement.
Java and all Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United
States and other countries. Maplesoft is independent of Sun Microsystems, Inc.
Linux is a registered trademark of Linus Torvalds.
Macintosh is a trademark of Apple Inc., registered in the U.S. and other countries.
Microsoft, Excel, and Windows are registered trademarks of Microsoft Corporation.
Modelica is a registered trademark of the Modelica Association.
All other trademarks are the property of their respective owners.
This document was produced using a special version of Maple and DocBook.
Printed in Canada
ISBN 978-1-897310-90-8
Contents
Introduction .................................................................................................. vii
1 Getting Started with MapleSim ........................................................................ 1
1.1 Physical Modeling in MapleSim ................................................................ 1
Acausal and Causal Modeling ................................................................... 2
1.2 The MapleSim Window ........................................................................... 5
1.3 Basic Tutorial: Modeling an RLC Circuit and DC Motor ................................ 7
Building an RLC Circuit Model .................................................................. 7
Index ......................................................................................................... 133
vi • Contents
Introduction
MapleSim Overview
MapleSimTMis amodeling environment forcreating andsimulating complexmulti-domain
physical systems.It allowsyou tobuild component diagrams that represent physical systems
in a graphicalform. Usingboth symbolic andnumeric approaches,MapleSim automatically
generates model equations from a component diagram and runs high-delity simulations.
Build Complex Multi-domain Models
You can use MapleSimto buildmodels thatintegrate componentsfrom variousengineering
elds intoa completesystem. MapleSimfeatures alibrary ofover 300modeling components,
including electrical, hydraulic, mechanical, and thermal devices; sensors and sources; and
signal blocks.You can also createcustom componentsto suityour modelingand simulation
needs.
Advanced Symbolic and Numeric Capabilities
MapleSim uses the advanced symbolic and numeric capabilities of MapleTMto generate
the mathematicalmodels thatsimulate thebehavior ofa physical system. Youcan, therefore,
apply simplication techniques to equations to create concise and numerically efcient
models.
Pre-built Analysis Tools and Templates
MapleSim providesvarious pre-builttemplates inthe formof Mapleworksheets for viewing
model equations and performing advanced analysis tasks, such as parameter optimization.
To analyze your model and present your simulation results in an interactive format, you
can useMaple featuressuch asembedded components,plotting tools,and documentcreation
tools. You can also translate your models into C code and work with them in other applications and tools, including applications that allow you to perform real-time simulation.
Interactive 3-D Visualization Tools
The MapleSim 3-D visualization environment allows you to build and animate 3-D graphical representations of your multibody mechanical system models. You can use this environment to validate the 3-D conguration of your model and visually analyze the behavior
of your system under different conditions.
vii
viii • Introduction
Related Products
MapleSim requires the latest version of Maple 14.
MaplesoftTMalso offers a suite of toolboxes, add-ons, and other applications that extend
the capabilities of Maple and MapleSim for engineering design projects.
For a complete list of products, visit http://www.maplesoft.com/products.
Related Resources
DescriptionResource
MapleSim Installation
Guide
MapleSim Help System
System requirements and installation instructionsfor MapleSim.
The MapleSimInstallation Guide is available inthe Install.html
le on your MapleSim installation DVD.
Provides the following information:
• MapleSim User's Guide: conceptual information about
MapleSim, an overview of MapleSim features, and tutorials
to help you get started.
• Using MapleSim: help topics for model building, simulation,
and analysis tasks.
• MapleSim Library Reference Guide: descriptions of the
are available in the Examples palette in theLibraries tab on the
left side of the MapleSim window.
Training webinars, product demonstrations, videos, sample applications, and more.
For more information, visit
http://www.maplesoft.com/products/maplesim.
A collectionofsample models,customcomponents, andanalysis
templates that youcan download anduse in your MapleSimprojects.
For more information, visit
http://www.maplesoft.com/applications/maplesim.
For additional resources, visit http://www.maplesoft.com/site_resources.
Introduction • ix
Getting Help
To requestcustomer supportor technicalsupport, visithttp://www.maplesoft.com/support.
Customer Feedback
Maplesoft welcomes your feedback. For comments related to the MapleSim product documentation, contact doc@maplesoft.com.
x • Introduction
1 Getting Started with MapleSim
In this chapter:
• Physical Modeling in MapleSim (page 1)
• The MapleSim Window (page 5)
• Basic Tutorial: Modeling an RLC Circuit and DC Motor (page 7)
1.1 Physical Modeling in MapleSim
Physical modeling,or physics-basedmodeling, incorporatesmathematics andphysical laws
to describe the behavior of an engineering component or a system of interconnected components. Sincemost engineeringsystems haveassociated dynamics,the behavioris typically
dened with ordinary differential equations (ODEs).
To help youdevelop models quicklyand easily, MapleSim providesthe following features:
Topological or “Acausal” System Representation
The signal-ow approach used by traditional modeling tools requires system inputs and
outputs to be dened explicitly. In contrast, MapleSim allows you to use a topological
representation to connect interrelated components without having to consider how signals
ow between them.
Mathematical Model Formulation and Simplification
A topological representation maps readily to its mathematical representation and the symbolic capability of MapleSim automates the generation of system equations.
When MapleSimformulates thesystem equations,several mathematicalsimplication tools
are applied to remove any redundant equations and multiplication by zero or one.The simplication tools then combine and reduce the expressions to get a minimal set of equations
required to represent a system without losing delity.
Advanced Differential Algebraic Equation Solvers
Algebraic constraints areintroduced in the topologicalapproach to model denition.Problems that combine ODEs with these algebraic constraints are called Differential Algebraic
Equations (DAEs).Depending onthe natureof theseconstraints, the complexity of the DAE
problem can vary. An index of the DAEs provides a measure of the complexity of the
problem. Complexity increases with the index of the DAEs.
The development ofgeneralized solvers for complex DAEs is the subject of much research
in the symbolic computation eld. With Maple as its computation engine, MapleSim uses
1
2 • 1 Getting Started with MapleSim
advanced DAE solvers that incorporate leading-edge symbolic and numeric techniques for
solving high-index DAEs.
Acausal and Causal Modeling
Real engineered assemblies, such as motors and powertrains, consist of a network of interacting physical components. They are commonly modeled in software by block diagrams.
The lines connecting two blocks indicate that they are coupled by physical laws.
When simulatedby software,block diagramscan eitherbe causalor acausal.Many simulation
tools arerestricted tocausal (or signal-ow) modeling. Inthese tools,a unidirectionalsignal,
which is essentially a time-varying number, ows into a block. The block then performs a
well-dened mathematicaloperation on the signal andthe resultows out of the otherside.
This approach is useful for modeling systems that are dened purely by signals that ow
in a single direction, such as control systems and digital lters.
This approach isanalogous to an assignment,where a calculation isperformed on a known
variable orset ofvariables on the right handside andthe result is assigned toanother variable
on the left:
Modeling how real physical components interact requires a different approach. In acausal
modeling, a signalfrom two connected blocks travels in both directions. The programming
analogy would be a simple equality statement:
The signalincludes informationabout whichphysical quantities(for example,energy, current,
torque, heat and mass ows) must be conserved. The blocks contain information about
which physical laws(represented by equations) they must obey and, hence, which physical
quantities must be conserved.
1.1 Physical Modeling in MapleSim • 3
MapleSim allows you to use both approaches. You can simulate a physical system (with
acausal modeling)together with the associated logic or controlloop (with causal modeling)
in a manner that suits either task best.
Through and Across Variables
When using the acausal modeling approach, it is useful to identify the through and across
variables ofthe componentyou aremodeling. In general terms, anacross variablerepresents
the driving force in a system and a through variable represents the ow of a conserved
quantity:
For example, in an electrical circuit, the through variable, i, is the current and the across
variable, V, is the voltage drop:
The following table lists some examples of through and across variablesfor other domains:
AcrossThroughDomain
Electrical
Mechanical (transla-
tional)
Mechanical (rotation-
al)
Hydraulic
Heat ow
Voltage (V)Current (A)
Velocity (m/s)Force (N)
Angular Velocity (rad/s)Torque (N.m)
Pressure (N/)Flow (/s)
Temperature (K)Heat ow (W)
As a simple example, the form of the governing equation for a resistor is
This equation,in conjunctionwith Kirchhoff’sconservation ofcurrent law,allows acomplete
representation of a circuit.
and
4 • 1 Getting Started with MapleSim
To extend this example, the following schematic diagram describes an RLC circuit, an
electrical circuit consisting of a resistor, inductor, and a capacitor connected in series:
If you wanted to model this circuit manually, it can be represented with the following
characteristic equations for the resistor, inductor, and capacitor respectively:
By applying Kirchhoff's current law, the following conservation equations are at points a,
b, and c:
These equations, along with a denition of the input voltage (dened as a transient going
from 0 to 1 volt, 1 second after the simulation starts)
provide enough information to dene the model and solve for the voltages and currents
through the circuit.
In MapleSim, all of these calculations are performed automatically; you only need to draw
the circuit and provide the component parameters. These principles can be applied equally
1.2 The MapleSim Window • 5
to allengineering domainsin MapleSimand allowyou toconnect componentsin onedomain
with components in others easily.
In the Basic Tutorial: Modeling an RLC Circuit and DC Motor (page 7) section of this
chapter, you will model the RLC circuit described above. The following image shows how
the RLC circuit diagram appears when it is built in MapleSim.
1.2 The MapleSim Window
In the default view, the MapleSim window contains the following panes and components:
6 • 1 Getting Started with MapleSim
DescriptionComponent
Contains tools for running a simulation, attaching
1. Main toolbar
2. Navigation toolbar
3. Model workspace toolbar
4. Palettes pane
MapleSim analysistemplates toyour model, and performing other common tasks.
Contains tools for browsing your model and subsystems
hierarchically, and changing the model view.
Contains tools for laying out and selecting objects, and
adding elements such as annotations and probes.
Contains expandable menus withtools that you can use to
build a model and manage your MapleSim project. This
pane contains two tabs:
lation graphs and plot windows.
The contentsof thispane changedepending onyour selec-
tion in the model workspace.
MapleSim alsoprovides a3-D workspacethat youcan use to build, animate,and manipulate
3-D multibodymodels. Formore information,see Visualizinga Multibody Model (page 78)
in Chapter 4.
1.3 Basic Tutorial: Modeling an RLC Circuit and DC Motor • 7
1.3 Basic Tutorial: Modeling an RLC Circuit and DC
Motor
This tutorial introduces you to the modeling components and basic tools in MapleSim. It
illustrates the ability to mix causal models with acausal models.
In this tutorial, you will perform the following tasks:
1. Build an RLC circuit model.
2. Set parameter values to specify component properties.
3. Add probes to identify values of interest for the simulation.
4. Simulate the RLC circuit model.
5. Modify the RLC circuit diagram to create a simple DC motor model.
6. Simulate the DC motor model using different parameters.
Building an RLC Circuit Model
To buildthe RLC circuitdiagram, youadd componentsin the modelworkspace andconnect
them ina system.In this example, the RLCcircuit modelcontains ground,resistor, inductor,
capacitor, and signal voltage source components from the Electrical component library. It
also contains a step input source, which is a signal generator that drives the input voltage
level in the circuit.
8 • 1 Getting Started with MapleSim
1. Inthe Librariestab at theleft ofthe modelworkspace, click the triangle besideElectrical
to expand the palette. In the same way, expand the Analog menu, and then expand the
Passive submenu.
2. From the Electrical → Analog → Passive menu, drag the Ground component to the
model workspace.
3. Add the remaining electrical components to the model workspace.
1.3 Basic Tutorial: Modeling an RLC Circuit and DC Motor • 9
• From the Electrical → Analog → Passive→ Resistors menu, addthe Resistorcompon-
ent.
• From the Electrical → Analog → Passive → Inductors menu, add the Inductor com-
ponent.
• From the Electrical → Analog → Passive → Capacitors menu, add the Capacitor
component.
• From the Electrical → Analog → Sources → Voltage menu, add the Signal Voltage
component.
4. Drag the components in the arrangement shown below.
5. To rotate the Signal Voltage component clockwise, right-click (Control-click for
Macintosh®) the Signal Voltage component in the model workspace and select RotateClockwise.
6. To ip the component horizontally, right-click (Control-click for Macintosh) the component again and select Flip Horizontal. Make sure that the positive (blue) port is at the
top.
7. Torotate theCapacitor component clockwise,right-click (Control-click forMacintosh)
the Capacitor icon in the model workspace and select Rotate Clockwise.
You can now connect the modeling components to dene interactions in your system.
8. Hover your mouse pointer over the Ground component port. The port is highlighted in
green.
10 • 1 Getting Started with MapleSim
9. Click the Ground input port to start the connection line.
10. Hover your mouse pointer over the negative port of the Signal Voltage component.
11. Click the port once. The Ground component is connected to the Signal Voltage com-
ponent.
12. Connect the remaining components in the arrangement shown below.
You can now add a source to your model.
13. Expand theSignal Blocks palette. Expand theSources menu and then expand the Real
submenu.
14. From the palette, drag the Step source and place it to the left of the Signal Voltage
component in the model workspace.
The step source has a specic signal ow, which is represented by the arrows on the connections. This ow causes the circuit to respond to the input signal.
15. Connect the Step source to the Signal Voltage component. The complete RLC circuit
model is displayed below.
1.3 Basic Tutorial: Modeling an RLC Circuit and DC Motor • 11
Specifying Component Properties
To specify component properties, you can set parameter values for components in your
model.
1. In the model workspace, click the Resistor component. The Inspector tab at the right of
the model workspace displays the name and parameter values of the resistor.
2. In the R eld, enter 24, and press Enter. The resistance is changed to 24
3. Specify the following parameter values for the other components. You can specify units
for a parameter by selecting a value from the drop-down menu found beside the parameter
value eld.
• For the Inductor, specify an inductance of.
• For the Capacitor, specify a capacitance of 200
• For the Step source, specify avalue of 0.1 s.
Adding a Probe
To specify data values for a simulation, you must attach probes to lines or ports to the
model. In this example, you will measure the voltage of the RLC circuit.
1. In the model workspace toolbar, click the probe button ().
2. Hover your mouse pointer over the line that connects the Inductor and Capacitor
components. The line is highlighted.
3. Left-click the line once. The probe is displayed in the model workspace.
4. Drag the probe to position it and then click the probe once to place it on the line.
5. Select the probe. The probe properties are displayed in the Inspector tab at the right of
the model workspace.
6. Select the Voltage check box to include the voltage quantity in the simulation graph.
7. To display a custom name for this quantity in the model workspace, enter Voltage as
shown below and press Enter.
12 • 1 Getting Started with MapleSim
The probe is added to the connection line.
Simulating the RLC Circuit Model
Before simulatingyour model,you canspecify theduration for which to run the simulation.
1. Click a blank area in the model workspace.
2. Inthe Inspector tab at theright of the model workspace,set the simulation end time()
to 0.5 seconds and press Enter.
3. Click the simulation button ( ) in the main toolbar. MapleSim generates the system
equations and simulates the response to the step input.
1.3 Basic Tutorial: Modeling an RLC Circuit and DC Motor • 13
When the simulation is complete, the voltage response is plotted in a graph.
4. Save the modelas RLC_Circuit1.msim. The probes and modied parameter values are
saved as part of the model.
Building a Simple DC Motor Model
You will now add an electromotive force (EMF) component and a mechanical inertia
component to the RLC circuit modelto create a DC motor model. Inthis example, you will
add components to the RLC circuit model using the search feature.
1. In the Libraries tab, in the Search eld located above the palettes, type EMF. A drop-
down list displays your search results.
14 • 1 Getting Started with MapleSim
2. Select Rotational EMF from the drop-down list. The Rotational EMF component is
displayed in the square beside the search eld.
3. From the square beside the search eld, drag the Rotational EMF component to the
modeling workspace and place it to the right of the Capacitor component.
4. In the search pane, search for Inertia.
5. Add theInertia component to the model workspace and placeit to the right of the Rota-tional EMF component.
6. Connect the components as shown below.
Note: To connect the positive blue port of the Rotational EMF component, click the port
once, drag your mouse pointer to the line connecting the capacitor and inductor, and click
the line.
7. In the model workspace, click the Rotational EMF component.
8. In the Inspectortab, change the value of the transformation coefcient (k) to 10.
9. Click the Step component and change the value of the parameter,, to 1.
1.3 Basic Tutorial: Modeling an RLC Circuit and DC Motor • 15
Simulating the DC Motor Model
1. In the model workspace, delete Probe1.
2. In the model workspace toolbar, click the probe button ().
3. Hover your mouse pointer over the line that connects the Rotational EMF and Inertia
components.
4. Left-click the line and then left-click the probe once to position it.
5. Select the probe.
6. In the Inspectortab, selectthe Speedand Torque check boxes.The probe,with anarrow
indicating the direction of the conserved quantity ow, is added to the model.
7. Click a blank area in the model workspace.
8. In the Inspectortab, setthe simulationend time ()to 5 seconds and clickthe simulation
button ( ) in the main toolbar.
The following graphs are displayed.
9. Save the model as DC_Motor1.msim.
16 • 1 Getting Started with MapleSim
2 Building a Model
In this chapter:
• The MapleSim Component Library (page 17)
• Browsing a Model (page 18)
• Dening How Components Interact in a System (page 20)
• Specifying Component Properties (page 21)
• Creating and Managing Subsystems (page 23)
• Global and Subsystem Parameters (page 34)
• Attaching Files to a Model (page 42)
• Creating and Managing Custom Libraries (page 43)
• Annotating a Model (page 45)
• Entering Text in 2-D Math Notation (page 47)
• Creating a Data Set for an Interpolation Table Component (page 48)
• Best Practices: Building a Model (page 49)
2.1 The MapleSim Component Library
The MapleSim component library contains over 300 components that you can use to build
models. All of thesecomponents are organized in palettes according to their respective domains: electrical, hydraulic, 1-D and multibody mechanical, thermal, and signal blocks.
Most of these components are based on the Modelica® Standard Library.
DescriptionLibrary
Electrical
Hydraulic
1-D Mechanical
Multibody Mechanical
Signal Blocks
Components to modelelectrical analog circuits,singlephase and multiphase systems, and electric machines.
Components to model hydraulic systems such as uid
power systems, cylinders, and actuators.
Components to model 1-D translational and rotational
systems.
Components to model multibody mechanical systems,
including force, motion, and joint components.
Components to model heat ow and heat transfer.Thermal
The library also contains sample models that you can view and simulate, for example,
complete electrical circuits and lters. For more information about the MapleSim library
17
18 • 2 Building a Model
structure and modeling components, see the MapleSim Library Reference Guide in the
MapleSim help system.
To extendthe defaultlibrary,you cancreate acustom modelingcomponent froma mathematical model and add it to a custom library. For more information, see Creating CustomModeling Components (page 55).
Viewing Help Topics for Components
In thehelp panebelow themodel workspace,you canview thehelp topic for each component
from the MapleSimcomponent library. To display the help pane, click the help pane button
() at the bottom of the MapleSim window. You can then select a component that you
have addedto the modelworkspace toview itshelp topic.Alternatively, toview help topics,
you can perform one of the following tasks:
• Right-click (Control-clickfor Macintosh®)a modelingcomponent in any of thepalettes
and select Help from the context menu.
• Search for the help pages for components in the MapleSim help system.
2.2 Browsing a Model
Using the Model Tree palette or model navigation controls, you can browse your model to
view hierarchical levels of components in the modelworkspace. You can browse to the top
level for an overall view of your system. The top level is the highest level of your model:
it represents the complete system, which can include individual modeling components and
subsystem blocks that represent groups of components. You can also browse to sublevels
in your model to view the contents of individual subsystems or components.
Model Tree
To browse your model, you can use the Model Tree palette in the Project tab located on
the left side of the MapleSim window. Each node in the model tree represents a modeling
2.2 Browsing a Model• 19
component, subsystem, or connection port in your model. For example, the model tree of
a DC motor is shown below.
To browse your model and view the parameters associated with a component or subsystem,
expand and double-click the nodes in the model tree. You can double-click the Main node
to viewthe top levelof your model and thechild nodes to view thecontents of a component
or subsystem.
Model Navigation Controls
Alternatively, youcan usethe model navigation controls located above the model workspace
toolbar to browse between modeling components, subsystems, and hierarchical levels in a
diagram displayed in the model workspace.
From the drop-down menu, select the name of the subsystem or modeling component that
you want to view in the model workspace. You can click the Main button to browse to the
top level of your model. You can also browse directly to subsystems in your model. For
example, by clicking thebutton in the example shown above, you can view the
DC motor subsystem contents in the model workspace.
20 • 2 Building a Model
2.3 Defining How Components Interact in a System
To dene interactions between modelingcomponents, you connectthem in a system. In the
model workspace, you can draw a connection line between two connection ports.
You can also draw a connection line between a port and another connection line.
MapleSim permits connections between compatible domains only. By default, each line
type is displayed in a domain-specic color.
Line ColorDomain
BlackMechanical 1-D rotational
GreenMechanical 1-D translational
BlackMechanical multibody
BlueElectrical analog
BlueElectrical multiphase
PurpleDigital logic
PinkBoolean signal
Navy blueCausal signal
OrangeInteger signal
RedThermal
The connection ports for each domain are also displayed in specic colors and shapes. For
more information about connection ports, see the MapleSim Library Reference → Con-nectors Overview topic in the MapleSim help system.
Loading...
+ 114 hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.