Latest News
March 1, 2010
By Peter Varhol
If a lot of your engineering work involves solving sets of equations involving calculus, differential equations, Laplace transforms, Fast Fourier transforms, and the like, you probably use one of the symbolic mathematics engines available on the market. One of the first of these, Maple, came out of the University of Waterloo in Canada. Today, in its 13th major release, Maple remains a standard for working with symbolic, as opposed to numeric, equations.
The Lorenz Attractor, created with MapleSim’s signal blocks, is used for modeling chaotic systems such as climate or weather prediction. |
Further, Maple 13 works with an intriguing modeling and simulation tool, MapleSim 3. MapleSim provides a drag-and-drop block-diagram modeling environment that enables engineers to build a simulation manually or using equations from Maple. It includes templates for control analysis, creating custom components from mathematical equations, generating data sets, equation generation and manipulation, optimization, Monte-Carlo Simulation, and sensitivity analysis.
I installed Maple 13 and the new MapleSim 3 on an HP mid-range Z600 workstation with dual 64-bit Intel cores running at 2.8GHz with 12GB of memory. This fast system ran both Maple and MapleSim well, with even complex calculations completed and displayed within a second or two.
Maple 13: Analytical Foundation
To call Maple 13 a symbolic math engine only describes part of the story. You can do symbolic calculations; that is, calculations with variables rather than numeric values. But you can also create complex 2D and 3D graphs of those equations, modify the graphs by changing the equations, and animate the graphs. Further, you can create custom “fly-throughs” of these animations, giving you a continuous view as you traverse the graph from one end to the other.
If you want to create formal documentation of your analysis, Maple provides tools that enable you to clean up your calculations and results, and render them in a format for others to read. You can document designs, the analyses that went in to optimizing those designs, and have unambiguous records of them so they can be modified or enhanced in the future.
Maple includes a large set of pre-defined functions and components, as well as the ability to complete many standard equations. It also provides graphical controls to build rudimentary user interfaces on analyses so others can run them, even using different input values. You can also animate the analysis by creating the equations and entering starting values for the variables.
MapleSim enables engineers to create a mechanical design based on calculations from Maple, then execute the design to simulate how it might work once manufactured. |
MapleSim 3 Adds Modeling
MapleSim 3 works with the Maple symbolic math engine to take the results of analyses and create a functional and working model from the equations. Further, you can simulate the operation of these models, both examining the model visually and producing data that can then be evaluated separately.
You can create abstract or realistic models. The block diagrams used by MapleSim can create abstract linear, nonlinear, discrete-time, or continuous-time models. By wiring together components, you can create a flow of data that simulates the passing of information and control from one component to the next. These components can use standard engineering or mathematical functions, or be based on symbolic equations.
More realistic models can be created using drawings or images of the system or subsystem being modeled with the mathematical functions within the diagram. The model can be purely functional or it can be as realistic in appearance as you want to make it. By connecting each of the subsystems or components with lines on the worksheet, you can indicate the flow of data between the components.
You can then execute these models in a simulation, showing how they might function. Further, you can also collect data to evaluate them. These models are functional representations of the system or product being designed. Each component in a model provides a number of parameters that you can set as initial values, as well as how those values might change over time or in response to changes in other parameters.
To run the simulation, you can set up specific input parameters, use real-life data from measurements, or apply MapleSim’s random number generator. If you are doing sensitivity testing of your model, you may want to apply all three and see how it behaves under different circumstances.
You can also build visual representations of your designs. You can generate 2D and 3D plots, and import CAD models to make the simulations more lifelike. Components within models can even be shown in motion during the simulation run, if of course the system being modeled has moving parts. This enables engineers to observe motion to make sure it conforms to what is expected under the range of execution of the simulation.
Roundtrip to Maple
Once you have created a model in MapleSim and run the necessary set of simulations, you can go back to Maple for analysis and documentation. For example, you can run a simulation and take the results to Maple to see how well the results fit the equations that helped create it. By using Maple’s documentation tools, you can make sure that your model includes the documentation necessary to justify the design as well as ensure that engineers in the future understand and can make modifications to it.
MapleSim can be used to model movement, such as the friction generated by sliding along a linear surface. |
A real strength of MapleSim is multibody dynamics and simulation. These are mechanical systems with frames that are connected to other bodies via beams or other flexible structures. Automobiles and other vehicles are typical examples; in fact, Maplesoft tells me that the automotive industry is the largest user of the product. The beams, joints, and other components respond to forces that are defined by equations and input values.
You can use your components, as well as those provided by MapleSim, to create custom libraries of subsystems that you commonly use. This lets you simply pick and choose from your own library to create modifications and enhancements to existing designs. You can also use one or more of the templates to quick-start any analysis.
Last, MapleSim can generate C code for its models, making it possible to more easily move from model to implementation if the implementation has a software component. This is especially appropriate for real-time systems design, because the tight performance requirements of such systems can be modeled successfully, and the resulting code reflects that model. From a software standpoint, at least, engineers could go directly from simulation to implementation.
MapleSim 3 Adds Ease of Use
The additional features in the new MapleSim 3 add to the ease of use of the simulation environment. MapleSim 3 incorporates a project manager that enables an engineer to keep track of the progress and various pieces of a simulation project. In addition, it provides a way to nest models, so that complex models can be more easily developed and viewed. Nesting also makes navigating through the model easier and more straightforward. The help system was also improved, including the use of “tool tips,” short instructions on the use of a feature displayed when you hover over its icon.
One of the most powerful features of MapleSim is its ability to run a simulation as a part of a “hardware in the loop” prototype. In this configuration, you can have a device generate inputs to a simulation similar to what it might receive as a real product, and collect data on how the simulation performs. For design engineers this can save the time and expense of building a system prototype to do the same kind of analysis.
Maple 13 and MapleSim 3 form a powerful combination of analysis, modeling, and simulation tools that can aid engineers with front-end work leading to optimal designs. The only caveat is that it is a complex software suite. MapleSoft does a good job of enabling scientists and engineers to be productive very quickly, but it still comes with a learning curve. You can use it for years and continue to discover new capabilities. However, thanks to a broad array of examples, tutorials, pre-defined equations, and other features, technical professionals should be able to make use of it immediately and expand their skill sets as they use it. You do not need experience in formal mathematical analyses to find its value.
Virtually all design engineers can benefit from this environment, but it is especially appropriate for those of you who have a mathematical bent and use formal equations in your initial analysis and design work. Maple and MapleSim can take you from concept exploration almost to the production line in a significantly shorter period of time than any manual method. And that alone makes these products worth their weight in gold.
More Info:
Maplesoft
Contributing Editor Peter Varhol covers the HPC and IT beat for DE. His expertise is software development, math systems, and systems management. You can reach him at [email protected].
Subscribe to our FREE magazine,
FREE email newsletters or both!Latest News
About the Author
Peter VarholContributing Editor Peter Varhol covers the HPC and IT beat for Digital Engineering. His expertise is software development, math systems, and systems management. You can reach him at [email protected].
Follow DE