A Study in Simulation Lacey Duckworth, University of Southern

advertisement
A Study in Simulation
Lacey Duckworth, University of Southern Mississippi, Lacey.Duckworth@usm.edu
Introduction
Simulation is a one of the key components to in assuring that hypothesized models work accurately before they
are developed. This saves businesses both time and money when trying to develop new products. For example,
GMC, a car company simulates all vehicles in virtual reality before creating them a reality. By simulating
products engineers can manipulate the input variables or characteristics of the product, and analyze its behavior
before spending time to assemble the product as well as the cost associated with each component. This paper
gives an overview of three different software packages engineers use to develop simulations including LabVIEW,
OMNNeT++, and Simulink.
LabVIEW
LabVIEW, the Laboratory Virtual Instrumentation Engineering Workbench, is a graphical language developed by
National Instruments. It is a unique language because it allows software to be created using a data flow approach
rather than a text based approach. In order to create LabVIEW simulations, engineers develop design a graphical
user interface with controls, to allow input, and indicators, to provide the output using a function box, tools box
and a workbench as seen in figure 1.
Figure 1 – Example of LabVIEW workbench, with
function box (left), and tools box (right).
When representing code in LabVIEW, the engineer selects an object from the functions box, which in code
represents a for loop, a numerical, Boolean, or character value, an array, case structures, and various other
elements. When dragging these objects to the workbench, the engineer specifies the attributes of the functions.
For example, when dragging a for loop to the workbench, the engineer is asked for the value the for loop should
start at and the value that should cause it terminate. Once all objects are on the workbench, the engineer needs to
connect depending objects together. In order to do this, the wiring tool from the tools box is used which provides
objects to be indicated as dependent or values to be displayed to the user. An example of a LabVIEW program
can be seen in figure 2.
Figure 2 – Example of LabVIEW program.
In addition to creating objects to communicate within the LabVIEW environment, objects can communicate with
hardware and web applications, which allows for various types of input and output. For example, instead of
keyed in data, a mouse, joystick, streaming data, or various other data input devices can be used. Just as data is
entered into the simulation through various resources, it can also be extrapolated to various devices such as the
web, database, etc.
LabVIEW is available for various types of operating systems including: Windows 9x/2000/NT/XP, Apple
Macintosh (including X), and Linux and costs around $1249 to $4699 dollars
LabVIEW is a very useful simulation environment that provides engineers the ability to program simulations
using a method similar to flow charting. This allows the engineers an easy way to manipulate the design inputs
and obtain the outputs without having to worry about understanding the code running behind the scenes.
OMNNeT++
OMNeT++ is another simulation environment available to engineers for simulating various designs. Like
LabVIEW, it is a GUI driven language eliminating an in-depth understanding of code. OMNeT++ is a discrete
event simulation environment where modules are created using C++, then assembled into larger components and
models using a high-level language. A visual of OMNeT++ programming environment can be seen in figure 3.
Figure 3 – Visual of OMNeT++ programming environment
OMNeT++ can run on Linux, or other Unix-like systems, and Windows (XP, Win2K) and unlike LabVIEW is
free for academic and non-profit use. However, for commercial use, its business alias, OMNEST is required to
be purchased for some disclosed price. Some of the applications included in the OMNEST package include
network simulation, discrete event simulation, and embedding.
In the network simulation package, primarily used for research and development type network simulations,
contains several open-source network simulation models and model frameworks. Some network simulations
include queuing networks, business processes, and high-level architectures. The embedding package contains
OMNeT++ is more complicated simulation software than LabVIEW because it requires more knowledge in
programming. By requiring knowledge of C++, LabVIEW is a better choice for users without programming back
grounds to develop simulation environments. In addition to LabVIEW and OMNeT++, Simulink is another
possible simulation software is.
Simulink
Like the other two simulation software packages, Simulink is an interactive graphical environment. Like
LabVIEW, Simulink has a customable set of block libraries that allow the user to design various simulations
without complete knowledge of programming. A neat feature about Simulink that sets it apart from the other two
simulations software packages is its integration with MATLAB which extends the algorithm possibilities.
When developing the simulation, models are dragged and dropped from a library browser and added to the
graphical editor as seen in figure 4. Only when Integrating algorithms and/or functions from MATLAB is the
user required to have programming knowledge. In addition to MATLAB, other programming languages,
including Fortran, C, and ADA can be directly associate with a model, again requiring syntax comprehension.
Figure 4 – Example of models in Simulink
The Simulink software runs on operating systems such as Linux, Windows, Mac and various others. There are
several different packages which are fre]e for test base kits and increasing in price depending on package features.
Conclusion
LabVIEW, OMNeT++, and Simulink are three software packages for programming simulations. Although each
software package supports the same operating systems they vary in cost. While OMNeT++ is free software, it
requires a good understanding of C programming. LabVIEW and Simulunk both have trial versions for free, but
increase in cost depending on the programmer needs. All three software packages are sufficient to develop
simulations, but when deciding which one to use, the purchaser needs to know what they desire to pay, what
components they desire the software package to contain, and the skills of the person developing the simulation.
By answering these three questions, an efficient purchase can be made.
References
OMNeT++ Discrete Event Simulation System. 2009. http://www.omnetpp.org/
OMNEST. OMNEST Simulation Environment. 2008. http://www.omnest.com/
LabVIEW Wiki. LabVIEW. May 26, 2008. http://wiki.lavag.org/LabVIEW
LabVIEW. NI LabVIEW. 2009. http://www.ni.com/labview/
The Math Works. Simulink Simulation and Model Based Design. 2009.
http://www.mathworks.com/products/simulink/
The Math Works. Simulink Product Description. 2009.
http://www.mathworks.com/products/simulink/description1.html
Download