Software for Fluid Power Technology


From Editor

The purpose of the Software Review section of the Journal is to present information to the reader about engineering software, including simulation programs, to highlight their specific features and their "fitness to purpose" in the unique field of fluid power and motion control. It is, of course, impossible to establish evaluation criteria matching the needs of all readers, therefore readers should not look for absolute ratings but more or less "fuzzy" opinions of the reviewer. A software program is like a wrench, just a tool to solve problems. It is good to solve some problems and not so good for others and this depends on both the nature of the problem and the users' attitude - and generally when we review software we do not know either. A software tool can be highly specialised and great for a some applications but not so well suited for others, on the other hand another software tool can be more flexible and generally applicable but without outstanding features. It is impossible, and even misleading, to say which one is better. What we hope to accomplish is to give the reader information necessary to take his/her own decision.

Dymola and the component libraries HyLib and PneuLib


The purpose of this note is to describe the history of an object-oriented simulation software and current implementations of component libraries for the modelling of fluid power drive systems. This review reflects the experiences and personal views of the author.

History

History In 1992 the Swedish company Dynasim AB offereda new simulation package called Dymola. I became aware of this program in 1994 and was immediately convinced that their approach to modelling of dynamic systems was the right one to model hydraulic drives. They used “object oriented modelling” which could be described as: “ability of a computer program to represent a physical object regardless of the environment where that object is used.” This means that a model is not given as a sequence of assignment statements – as e.g. in then very popular simulation language ACSL – or a connection of signal processing blocks – as in the nowadays very often used Simulink – but described by equations (in the mathematical sense).
And the coupling of submodels is based on energy considerations. For a hydraulic pump follows that it has two hydraulic interfaces, called connectors, where the inport pressure and volume flow rate or the output pressure and flow rate are transmitted to the neighbouring component. The product of those two variables is the hydraulic power.
The second feature that convinced me was the handling of events. In the ACSL package that I used at that time, so called SCHEDULE statements were available that evaluated a switching function to detect events, e.g. the impact of a piston at the cylinder end. However, the programming of these switching functions was tedious and error prone. Dymola simply uses relations like “... if x >= x_max then ...” and that makes programming of models much easier and works flawlessly. These features are possible because Dymola doesn’t simply sort and convert programming statements into C code but – based on computer algebra – analyses the equations, rearranges and if possible simplifies them to finally generate C code for an executable exe file.
Last but not least, with Dymola I could build system models in a graphical way by just selecting components from a library and connecting them – nowadays this seems the natural way but in 1994 most simulation packages were purely text based.
In the beginning I used Dymola as a front end for ACSL, i.e. Dymola wrote the simulation model in a *.csl file using ACSL statements, and ACSL integrated and plotted the results. When studying the line dynamics in a piston of an axial piston pump I ended up with a model that was very hard to solve with ACSL and needed more than 3 hours. Almost desperate, I tried the Dymola integrator and was more than surprised that after less than a minute I had a solution. This high quality of numerical algorithms has been a trademark of Dymola since then.

Modelica

Beginning in 1996, the founder of Dynasim, Dr. Hilding Elmqvist, gathered a group of people around him who were interested in object oriented modelling; either from the computer science point, as users of simulation packages or as commercial tool suppliers. And they developed the object-oriented modelling language Modelica, starting with Modelica 1.0 in 1998 and now preparing Modelica 3.0 to be released at the next Modelica Conference in September 2006.
The claim of Modelica is: a unified object-oriented language for physical systems modelling. That means Modelica is intended to be a language for all engineering domains and this is reflected by the Modelica libraries. Right from the beginning there were libraries for block oriented signal processing – e.g. as Simulink, mechanics, multi body mechanics and simple electronics. Today the list is much longer and includes vehicle dynamics, air conditioning, powertrains, SPICE like electronics, thermal systems or some aspects of thermodynamics. There are two libraries for the fluid power domain: HyLib to model hydrostatic drives and PneuLib for pneumatic actuation systems.
One of the important features for users of the Modelica libraries is the fact that they are typically provided as source code. A beginner can pick and place components from the library to build his model and by inspecting the equations gain an insight into the modeling of that domain. An expert can use the library as a template for his own collection of models, e.g. by copying and modifying the library equations.
Simulation of a hydraulic system can often start at “zero”, i.e. all pressures are equal to the ambient pressure and all velocities are zero. This leads to a very simple initialisation of the simulation model because all state variables are zero. The situation is much more demanding for pneumatic systems. Here the gas mass in a lumped volume is a state variable and this is nonzero for atmospheric pressure. The situation becomes even more interesting for cylinder chambers where the volume depends on the stroke which is a state variable by itself. With Modelica 2.0 this initialisation problem can be solved very easily by setting up so called “initial equations” that are evaluated before the simulation run starts. A tedious and often almost impossible manual setting of initial values is therefore not necessary, but possible.

Dymola

The tool Dymola uses this language Modelica. Depending on preferences, the user can do all modelling in a textual or a graphical way. The first approach is typically used for basic models that can best be described by equations. It gives expert users very powerful features to describe their system.
The graphical approach helps to build system models that are composed of many components. The modeller sees the system structure with one glance and a pneumatics or hydraulics specialist also understands this simulation model because all components have the standard ISO icons.
The user has two main modes. One is used for modelling and the other for running simulation. All commands can be given via mouse or keyboard. All typical features for plotting or analysing (e.g. linearise, plot of Bode or root locus plots) are available. The output as ACSL model is no longer available but Simulink models can be generated as block.


Double-click the images to enlarge them
and click once to make them thumbnail size again.




Fig. 1:Modelling window of Dymola. Library browser
upper left window, model browser lower left window, system model right window







Fig. 2:Simulation window of Dymola. Plotting variables browser left window, graphics window and command
line input at the bottom



Is Dymola therefore the perfect solution for all engineering tasks? From my point of view the concept used in Dymola is the best way to model fluid power drive systems. It is a very powerful tool, runs stable and very fast. However, as any program Dymola exhibit some idiosyncrasies: all equations are set up for SIunits, making modelling easy because no unit conversion is needed. During simulation an automatic scaling eases the burden for the numerical solver and an output in engineering units like l/min is possible. But the input data has to be in SI-units. A change of the graphical composition diagram is based on the Modelica syntax and requires the not completely intuitive mouse clicks “Edit/Attribute/Graphics”. And sometimes the rigorous computer science specification will appeal more to users of e.g. Mathematica than engineers who are used to the less formal MATLAB way of doing things, e.g. matrix manipulation. However, there is work going on to simplify the Modelica language and its specification to make it easier to learn and understand for the end user.
There are a number of courses teaching the use of Dymola and there are tutorials for beginners and advanced users at the Modelica conferences. A demo version is available.

HyLib

The first version of this library of hydraulic components had been written in an older object-oriented language and was converted to Modelica in 1999. The pressures in the systems are used as state variables and computed by integration of the volume flow rates into lumped volumes. There are several models for the oil compressibility the user can choose from.
HyLib is intended for simulation of hydrostatic drives, e.g. in vehicles, working machines or machine tools. Typical actuators like cylinders or motors are available as are valves or long lines, and all the required basic processes like throttling, pressure build up or flow forces.
A typical model, e.g. a constant displacement pump, is composed of an ideal hydraulic model, leakage paths, models for the oil at its ports and if applicable mechanical parts like shafts.





Double-click the images to enlarge them
and click once to make them thumbnail size again.




Fig. 3: Component ConPump as example of the composition of ideal models (ICP, Rotor) to a universal model, comments in italics and the basic models in Basic




The models can be connected in an arbitrary way to give the system model; splits and mergers are not necessary. This is possible because Dymola analyses all equations and can distinguish between flow variables and across variables at a node. The sum of all flow variables, i.e. the volume flow rates, add up to zero, while all across variables, i.e. the pressures, are identical at a node.


Fig. 4: Component library HyLib opened in library browser. Note the main models in package Pumps


The basic model, here the IdealConstantPump, is described by equations. The flow rate q is given by q = Dpump*w/(2*Modelica.Constants.pi)*factor.
This is the standard textbook equation but for the modification by factor, a variable that reduces the flow rate if the pressure at the inport falls below atmospheric pressure to describe the limited suction capability of a standard pump. This approach is typical for this library where always the most comprehensive models are used.

PneuLib

In the past, hydraulic components were quite often used to build pneumatic systems because dedicated pneumatic parts were not available. This approach does not work with simulation packages because the fundamental equations are completely different. PneuLib is based on the ideal gas law to describe the compressed air and the well-known thermodynamic principles. It is intended to simulate drives, e.g. in automation or vehicles. Typical actuators like cylinders, bellows, rotatory actuators or vane motors are available, as are directional control valves or long lines. And all the required basic processes like throttling or charging of a chamber.



Fig. 5: Component library PneuLib opened in library browser.

Multi-Domain Modelling

There are many dedicated packages for the simulation of hydraulic or pneumatic systems. However, Modelica claims to model the whole range of physical systems and there are some examples to prove that. A typical situation is that the hydraulic actuators drive a complex mechanism whose reaction varies with the operating point. Then it is not possible to approximate the load for the hydraulics by a simple inertia but a more complex model is required. An excavator is a typical example where the positions of the boom, arm and bucket can vary considerably and change the load for the cylinders from resistive to overrunning. Sometimes this kind of machine is simulated using two packages: one for the mechanics and one for the hydraulics. With Dymola the whole system can be simulated in one model thus avoiding problems like coupling of simulators or the need to obtain, learn and maintain several programs. This also holds for combinations of fluid power drives and analogue or digital electronics.

Summary

In summary, Dymola is a very advanced, fast and powerful tool for graphical modelling and subsequent time domain simulation of physical systems. The underlying modelling language Modelica permits a structured modelling and the model libraries cover a broad area of engineering disciplines. Using the dedicated fluid power libraries HyLib and PneuLib both beginners and experts can build quickly system models: the first is offered a set of standard components while the latter can inspect and modify the underlying equations to fit his own taste or build models that include several engineering domains.

Double-click the images to enlarge them
and click once to make them thumbnail size again.




Fig. 6:Composition diagram for the multi body mechanics and the hydraulic actuators of an excavator;
the control signals are coded as text

Further Reading

A lot of material can be found on the server of the Modelica association, especially the papers from the workshop 2000 and the conferences 2002 and 2003 (http://www.modelica.org/publications) with the combination of electronics and fluid power and the excavator model. Aspects of the pneumatic library are described in:
Beater, P. Modelling and control of pneumatic vane motors. International Journal of Fluid Power, Vol. 5 (2004), No. 1, pp 7 – 16


 

BACK



©2006 Fluid Power Net All rights reserved. Disclaimer