Professional Documents
Culture Documents
net/publication/230688277
CITATIONS READS
24 724
3 authors:
19 PUBLICATIONS 250 CITATIONS
Linköping University
24 PUBLICATIONS 79 CITATIONS
SEE PROFILE
SEE PROFILE
Petter Krus
Linköping University
286 PUBLICATIONS 1,258 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Peter Nordin on 12 May 2016.
Abstract: The Hopsan simulation package, used primarily for hydro-mechanical simulation,
was first released in 1977. Modeling in Hopsan is based on a method using transmission line
modeling, TLM. In TLM, component models are decoupled from each other through time delays.
As components are decoupled and use distributed solvers, the simulation environment is suitable
for distributed simulations. No numerical errors are introduced at simulation time when using
TLM; all errors are related to modeling errors. This yields robust and fast simulations where
the size of the time step does not have to be adjusted to achieve a numerically stable simulation.
The distributive nature of TLM makes it convenient for use in multi-core approaches and high
speed simulations. The latest version of Hopsan was released in August 2002, but now the next
generation of this simulation package is being developed. This paper presents the development
version of Hopsan NG and discusses some of its features and possible uses.
Hopsan has been successful ever since it was first released TLM, or bilateral delay line modeling as it was originally
in 1977. It has mainly served as a research tool at the referred to, can be traced back to the sixties, where it was
division of Fluid and Mechatronic Systems, but has also used for simulation of distributed systems, (Auslander,
been used by a number of companies for high performance 1968). One advantage of the method is that individual
? This work is partly funded by the Swedish Foundation for Strategic component models are isolated from each other so that
Research, ProViking program. their equations can be solved independently. Depending
on the types of the components, some are suitable to pressure transducer as illustrated in figure 2. The physical
be modeled as bilateral transmission line elements. These valve would have a high pressure input port and a low
elements are used to connect the other components and pressure port (to the oil tank). It would also be possible to
introduce a time delay that decouples them. The time attach a signal wire to the sensor to measure the pressure
delay is a multiple of the time step and is used to simu- in the valve. All of those connections are available in the
late wave propagation. One example of such a component Hopsan model and can be connected. For the simulation
is a long hydraulic pipe in which pressure waves travel to work, the hydraulic connections must have been made,
between the ends. Applications of TLM are modeling of but the use of the pressure sensor signal output is optional.
any kind of systems where time delays are present or
used to describe dynamics. TLM may not be suitable for
simulating systems of connected static components, for
instance electrical resistors. In these cases TLM introduce
unwanted dynamics through the time delays. Those sys-
tems are favourably modeled as lumped components that
are solved algebraically.
q1 Zc , T q2
p1 p2
Fig. 1. A hydraulic pipe with different pressures and flows Fig. 2. A pressure relief valve with an attached pressure
at each end describing a bilateral transmission line. transducer connected to a volume and pressure source
The properties of the pipe are parametrized by the at one end and a hydraulic tank at the other. For the
characteristic impedance, Zc , and the time delay, T . simulation to work the hydraulic connections must
exist, but the signal from the sensor is optional.
A bilateral transmission line element from the hydraulic
field is illustrated in figure 1. Such a line can be described To handle the decoupling feature inherent in TLM, com-
by a four pole equation, (Viersma, 1980). If friction is ig- ponents transferring power are separated into two types:
nored and the equations are described in the time domain, the transmission line element components (capacitive or
the relation between flow, q, pressure, p, characteristic inductive components) or lumped parameter components
impedance, Zc , and the time delay, T , can be described (describing flow and effort variables as functions of wave-
by equations 1 and 2, (Krus, 2005). and impedance variables). These types are called C-
p1 (t) = p2 (t − T ) + Zc q1 (t) + Zc q2 (t − T ) (1) and Q-components, respectively. TLM requires each Q-
p2 (t) = p1 (t − T ) + Zc q2 (t) + Zc q1 (t − T ) (2) component to be separated by a transmission line. That is,
a Q-component must be connected to C-components and
To collect the information that propagates from one end may not be directly connected to another Q-component.
to the other during each time step, the variables c1 and c2 There is a . . . C-Q-C-Q. . . pattern. To handle signals, (like
are introduced. These are called wave variables. With these the value from a sensor) a third component type, S-
variables, the pressure, flow, and characteristic impedance components, is introduced. These components can be con-
at each end can be described by equations 3 to 6. nected to each other or to other C- or Q-components and
c1 = p2 (t − T ) + Zc q2 (t − T ) (3) do not need to be separated by transmission line elements.
Typical S-components are signal generators, controllers,
c2 = p1 (t − T ) + Zc q1 (t − T ) (4)
sensors, signal constants or arithmetic operators like plus,
p1 (t) = c1 + Zc q1 (t) (5) minus or multiplication. The order in which the C- and
p2 (t) = c2 + Zc q2 (t) (6) Q-components are simulated is important. In every time
step, the C-components read the flow and effort variables
In models of systems where no real physical time delay from the previous time step and calculate the TLM spe-
exists, the time delay required by this method introduces cific wave variables and characteristic impedance. The Q-
a modeling error. This error is usually negligible if short components then calculate the new values for flow and ef-
time steps are used. Detailed explanations of TLM and fort variables based on the output from the C-components.
attached modeling errors can be found in, among other
works, (Johns and O’Brien, 1980; Allen et al., 1987; Krus Continuous transfer functions are converted to discrete
et al., 1994, 1990). filters at modeling time, before simulation starts, e.g. using
bilinear transform. Such transfer functions can be incorpo-
3. MODELING IN HOPSAN rated into component models. In this way, transformation
rather than a numerical solver is used to map dynamics
In the Hopsan package, TLM with isolated component from continuous time to discrete time.
models is handled in a intuitive way. Individual models
usually represent a specific real physical component, for 4. HOPSAN NG
example a hydraulic orifice or a mechanical spring. Com-
ponents in Hopsan are connected to each other in a way The development of the next Hopsan generation, Hop-
similar to how they are used in reality. As an example, san NG, is initially focused on re-implementation of basic
consider a hydraulic pressure relief valve with an attached Hopsan features, as well as some new additions. The
Hopsan NG package comprises a core library and a GUI
application. The Hopsan GUI links in the core library at
runtime and allows the user to graphically create models
in a way similar to most other modern modeling and
simulation tools. The core contains all of the model code,
handles the simulations, and stores the results. The GUI
application makes it easy to create and simulate large
models and to analyze simulation results. As the core is a
library, it can be used in any “main program”. This means
that it is possible to run simulation models created in the
GUI using only the core and a small dedicated application.
This may be useful for simulation in embedded systems
where a graphical environment may not be present. It also
means that the core can be included in other applications
to simulate Hopsan models.
Component Port
System Port
Data Node
REFERENCES
Allen, R., Mallik, A., and Johns, P. (1987). Numerical
results for the symmetrical condensed tlm node. Mi-
crowave Theory and Techniques, IEEE Transactions on,
35(4), 378 – 382.
Auslander, D.M. (1968). Distributed system simulation
with bilateral delay-line models. Journal of Basic
Engineering, 90, 195–200.
Burton, J.D., Edge, K.A., and Burrows, C.R. (1994).
Modeling requirements for the parallel simulation of
hydraulic systems. Journal of Dynamic Systems, Mea-
surement, and Control, 116, 137–145.
Jansson, A., Krus, P., and Palmberg, J.O. (1992). Variable
time step size applied to simulation of fluid power
systems using transmission line elements. In The Fifth
Bath International Fluid Power Workshop.
Johansson, B. and Krus, P. (2000). Modelica in a dis-
tributed environment using transmission line modelling.
In Modelica Workshop 2000 Proceedings, pp. 193–198.
Johns, P.B. and O’Brien, M. (1980). Use of the
transmission-line modelling (t.l.m.) method to solve
non- linear lumped networks. The Radio and Electronic
Engineer, 50, 59–70.
Krus, P. (2005). Robust system modelling using bi-lateral
deley lines. In Simsafe. Linköping, Sweden.
Krus, P., Jansson, A., Palmberg, J.O., and Weddfelt,
K. (1990). Distributed simulation of hydromechanical
systems. In Proceedings of the Third Bath International
Fluid Power Workshop.
Krus, P., Weddfelt, K., and Palmberg, J.O. (1994). Fast
pipeline models for simulation of hydraulic systems.
Journal of Dynamic Systems, Measurement and Con-
trol, 116, 132–136.
McDonnell Douglas Corporation (1977). Aircraft hy-
draulic system dynamic analysis. Technical report, Air
Force Aero Propulsion Laboratory, Ohio, USA.
Nokia Corporation (2010). Qt - Cross-platform application
and UI framework. URL http://qt.nokia.com/.