An Open-Source Modelica Library of Fluid Power Models

In this paper, a new open-source library of fluid power models is introduced. The intent of the library is to formally collect knowledge about fluid power components and systems, and to share and communicate this knowledge openly among the members of the fluid power community. The library takes advantage of the object-oriented features of the Modelica language to formulate the models in a formal, modular and reusable fashion. The models range from low-level fluid models and models for physical flow phenomena to models for specific fluid power components and systems. In this paper, the key features of the library are highlighted and illustrated with examples. 1. WHY ANOTHER FLUID POWER MODELING TOOL? Over the last several decades, system designers have recognized that the use of modeling and simulation can significantly reduce the resources necessary for exploring and analyzing the space of system alternatives. As a result, modeling and simulation of fluid power systems also has grown significantly in popularity and capability. Several dynamic simulation tools for fluid power systems have been developed both in academia (10, 17) and commercially (4, 9, 11, 13) (see http://fluid.power.net/fpn/docs/software.php3 for a comprehensive list of fluid power simulation tools). Although these tools provide more than adequate support for the analysis of simple hydraulic circuits, they often come up short when a higher level of accuracy is required or when applications outside the traditional scope of fluid power systems are explored. For instance, in very high pressure applications, the fluid viscosity depends strongly on the pressure, requiring the use of more detailed fluid models; or in electro-hydraulics, the bandwidth of the dynamic response of components often needs to be considered. Rather than developing a completely new set of models and a corresponding simulation tool for each of these application domains, it is desirable to have a library of simulation models that is modular and extensible so that it can be easily adapted to new needs. In this paper, such a library of fluid power models is introduced. The library has been designed with the following five primary goals in mind: 1. Integration with other disciplinary domains. The main purpose of fluid power systems is to transfer energy in a compact fashion. But this energy transfer is more and more often controlled using electronic interfaces, and, ultimately, this transferred energy is converted into mechanical energy so that the dynamics of the electronic, the control and the mechanical system also need to be considered. When analyzing fluid power systems, it is therefore crucial that fluid power models be seamlessly integrated with models for these other disciplinary domains. 2. Modular model architecture. Fluid power systems are almost always designed as a configuration of commercial-off-the-shelf components. This modularity in the physical system should also be reflected in the fluid power model library. Modularity in the models allows the user to model an almost infinite number of system configurations from a small number of basic models, and can drastically reduce the effort needed to extend, improve and maintain the library. 3. Efficient simulation. Although modularity in the models reduces the modeling effort, it may also increase the computational cost of the resulting simulations. When using simulations to support design, repeated analyses of fluid power systems are typically required with different parameter values or circuit topologies. A good balance must be established between ease of modeling and efficiency of simulation. 4. Expressive model semantics. The dynamic modeling of fluid power systems requires that the modeling language be able to capture both differential and algebraic equations. In addition, the structure of the model equations often changes at discrete moments in time (e.g., when a valve opens or a cylinder reaches its end of travel). For fluid power systems, it is therefore desirable to use a modeling language that can express differential algebraic equations combined with discrete events. 5. Open and sharable. Models are formal expressions of our knowledge about a particular domain or phenomenon. To promote the exchange of knowledge about fluid power systems, it is important that the models be fully accessible to all stakeholders in the community. This means that the models are expressed formally without ambiguity, and that the full model equations can be viewed, critiqued and, if necessary, updated by the members of the community. Currently, there is not a single model library or simulation tool that excels at all of these criteria. In the remainder of this paper, the basic structure and philosophy of a new library is described which provides a better trade-off between these sometimes conflicting criteria. The library accomplishes this by taking advantage of the Modelica language with its formal, equation-based semantics that enable symbolic manipulation during compilation and efficient solving of the resulting differential algebraic equations. 2. SCOPE AND ARCHITECTURE OF THE MODEL LIBRARY 2.1 Scope of the model library The scope of the library is the dynamic behavior of fluid power systems. It is assumed that the components and physical phenomena can be adequately approximated using lumped parameter models described in Differential Algebraic Equations systems or DAEs (as opposed to distributed parameter models described in Partial Differential Equations). DAEs are commonly used for system-level modeling where the system dynamics result from the exchange of energy or signals between subsystems or components. This is an appropriate modeling paradigm when these interactions occur at well-defined interfaces or ports. Similar to the electrical and, to some extent, the mechanical and thermal domains, the fluidpower domain shares this systems-oriented approach: fluid power systems are composed from modular components connected to each other through standardized ports. At this point, the library is limited to hydraulic components, but it is the intent to expand the library in the future to include pneumatic components also. Even in the hydraulic domain, the library does not include models for all commercially available components. However, it does include most of the key building blocks from which these additional models can be defined. The intent has been to provide a well thought-out structure that can then be further developed in an open-source effort. 2.2 The Modelica modeling language Modelica (12) is a formal, object-oriented language geared towards the lumped-parameter modeling of system behavior resulting from the exchange of energy and signals between subsystems or components. The language provides an ideal platform for addressing all five criteria listed in Section 1: 1) The new fluid power library is seamlessly integrated with the open-source Modelica Standard Library which includes several domains: electrical (analog, digital, and multiphase), signals and controls (continuous, discrete, and state graphs), mechanical (translational, rotational, and 3D rigid-body dynamics), thermal and fluids. 2) Modelica is an object-oriented, noncausal, equation-based language that supports the development of modular, reusable models. The models have a well-defined, port-based interface so that they can be composed into larger systems using a graphical editor. 3) By taking advantage of the equation-based nature of Modelica, a solver can symbolically manipulate the equations and compile them into an executable that is commonly an order of magnitude faster than comparable procedural solvers (3). In addition, symbolic manipulation allows for the solution of structurally singular systems, i.e., with a DAE perturbation index larger than one (1). 4) Modelica has a broad, flexible set of modeling constructs for defining differential equations, algebraic equations, conditional equations, and discrete event handling. 5) Modelica is quickly becoming a de-facto standard for differential algebraic equation modeling. Modelica is supported by several simulation solvers including an open-source solver developed as part of the OpenModelica Project (16) (See http://www.modelica.org for a complete list of solvers). 2.3 Over view and general characteristics The fluid power library is developed in a modular fashion, in three layers. First, there is a layer (the package BasicModels) with models of basic physical phenomena such as the flow through an orifice, or an ideal lossless exchange between hydraulic and mechanical translational energy. In the second layer (the package Components), these basic models are combined into models for generic fluid-power components, such as servo valves, cylinders, or pumps. The third layer is strictly speaking not part of the library; it contains models for very specific components, such as pump ABC from company XYZ. In this layer, the generic models from the second layer are instantiated with specific values for all the model parameters reflecting the particular flow characteristics of a specific component. This layer should be structured by component vendor (e.g., a separate library, called XYZComponents, for components produced by vendor XYZ). The fluid power library also contains a package with models for fluids. The fluid models are completely separate from the component models so that a component can be modeled once and then used with a variety of fluids. The interface to the fluid model only assumes that the fluid properties depend on the local state: the pressure and temperature. Since the library deals with fluids, it has been based on the Modelica.Fluids library developed by Casella et al. (2) and on the Modelica.Media library developed by Elmqvist et al. (6). The fluid power library further extends these libraries by including phenomena, technologies and components that are specific to the fluid-power domain. 3. THE