Cae PDF
Cae PDF
ABSTRACT: Hydraulic and pneumatic networks are highly nonlinear and difficult to
analyze. This study presents a software application designed to help students, visualize and
understand fluid systems’ dynamic behaviors. The application uses a combined bond graph
and singular perturbation approach for system equation formulation. A standard iterative and
adaptive integrator provides online numerical solutions to the system equations. Coupled to
the integrator’s output are a graphical animation subsystem and an instrumentation
subsystem. The animation subsystem is responsible for rendering movable components on
screen, at every simulation time-step, creating the illusion of continuous movement. The
instrumentation subsystem collects and displays numerical data in numerical and graphical
forms. An interesting contribution of this fluid system analyzer is its ‘‘user-in-the-loop’’
feature. This feature allows students to become active participants by enabling them
to interact with network components while a simulation run is in progress. ß 2005 Wiley
Periodicals, Inc. Comput Appl Eng Educ 13: 169180, 2005; Published online in Wiley InterScience
(www.interscience.wiley.com); DOI 10.1002/cae.20037
INTRODUCTION
169
170 WONG, BIGRAS, AND CERVERA
displacements, and nonnegligible static and dynamic mechanics. Their studies involved groups of technical
frictions. Pneumatic network nonlinearity is even college students and first-year university engineering
stronger because of air compressibility. It is always a students. It was shown that most students exhibit
challenge to explain the effects of these nonlinear confused reasoning when asked to explain simple
phenomena on the overall network behavior. This observations. Below is an extract of some answers
study presents a software application designed to help taken from Cervera’s student survey [2]. Authors’
students, understand these complex phenomena with- commentary is shown in bold characters enclosed
out resorting to sophisticated finite element analysis. within parenthesis.
In order to achieve this goal, the proposed appli- ‘‘Pressure is itself a material entity (false). A
cation translates the hydraulic and pneumatic net- pump produces it (false). We can circulate, manip-
works into state-space form. The networks under ulate the pressure or use it to move a cylinder (false).
study are obtained from a graphical editor that acts as Pressure is a function of the fluid’s flow rate
the main user interface of the software application. (partially true). The smaller the pipe the faster is
The state-space translation step involves the use of a the flow and the pressure is higher (partially true).
bond graph causality assignment technique to deter- Thus, a cylinder’s strength depends on the size of the
mine the proper input-output relationships of the fluid pipe (false).’’
systems. Most hydraulic and pneumatic components The students perceive the ‘‘pressure’’ not as an
do not have fixed input-output assignments and they explanatory concept but as a real physical object. For
have to be determined according to network topology. them, pressure as a physical object, can be moved
An adaptive numerical integrator then solves the re- around within the system. And it is this physical
sulting system equations. At constant time interval, object that acts on the cylinder’s piston and thus
the computed outputs are forwarded to the software making it moves. Also, they consider a proportional
application’s animation and instrumentation sub- relationship between the pressure and flow rate. By a
systems. The animation subsystem is responsible for similar deduction process, they conclude that the force
online graphical rendering of dynamic variables, produced by a cylinder is a function of the size of the
while the instrumentation subsystem is responsible connecting pipe.
for data collection and display.
To further enhance the visualization and under-
standing process, the software application also in-
cludes a special subsystem that permits in-simulation
Example of Nonlinearities
interactions. This important feature allows students to We believe that one of the factors contributing to these
change the states of most fluid system components misconceptions is the nonlinear relationship govern-
while a simulation is in progress. It is thus easy for ing the pressure and the flow rate in fluid systems [4].
instructors to design what-if scenarios and help Students tend to relate quantities in linear or pro-
students to test their hypothesis and assumptions. portional terms. Their faulty representation is often
Therefore, the students are not passive spectators but the result of the general application of an idea, which
active participants in the learning process. states that linear behaviors can approximate nonlinear
behaviors when the variations are small. As we will
show, this is not always true in fluid systems even in
PROBLEM IDENTIFICATION very simple cases.
Consider a simple hydraulic setting with a single
It has been noticed that students having learning dif- restriction and the fluid is assumed to be noncom-
ficulties can not explain or resolve apparently simple pressible. This setting is illustrated in Figure 1.
problematic situations. Even when the solution to We shall neglect the effects of gravity and assume
these problems does not involve any calculation, but the velocity of the fluid at point 1 as negligible com-
simple qualitative description of the observed phe- pared to that at point 2. Using Bernoulli’s equation,
nomenon. These students were unable to establish a we have according to Reference [5]
correct relationship between: (i) the situation con-
1
fronting them; (ii) the phenomenon observed; (iii) the P1 ¼ P2 þ rV22 ð1Þ
concepts implied. This inability to formulate a correct 2
tripartite relationship is the result of misconception where Pi is the pressure at point i, Vi is the velocity of
[1]. the fluid and r its density. If we consider that the
In Cervera [2] and in Youssef [3], the idea of opening surface at point 2 is A then the relation be-
misconception was explored in the field of fluid tween the flow rate Q and the pressure difference at
SOFTWARE APPLICATION FOR HYDRAULIC AND PNEUMATIC NETWORKS 171
point 2 is described by
rffiffiffiffiffiffiffiffiffiffiffisffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
ðk1Þ=k
ffi
pffiffiffiffiffiffiffiffi 2k P2
Q2 ¼ A RT1 1 ð7Þ
k1 P1
which is a highly nonlinear function of P1 and P2. To
further complicate the situation, the flow rate is dif-
ferent at point 1 and point 2 since gas is compressible.
Most students will at first be confused by this
Figure 1 One-dimensional fluid flow with single
phenomenon. To bypass this difficulty, we can instead
restriction.
use the mass flow m_ . Because of mass conservation,
mass flow is invariant along a pipe. The mass flow is
related to fluid flow by
R
Capacitor eðtÞ ¼ fC1 iðtÞdt
iðtÞ ¼ fC deðtÞ=dt
R
Inertia iðtÞ ¼ fL1 eðtÞdt
eðtÞ ¼ fL diðtÞ=dt
Transformer e1 ¼ m e2
i2 ¼ m i1
i1 ¼ m1 i2
e2 ¼ m1 e1
Gyrator e1 ¼ r i2
e2 ¼ r i1
i1 ¼ r 1 e2
i2 ¼ r 1 e1
0-junction e1 ¼ ¼ en1 ¼ en
i1 þ þ in1 þ in ¼ 0
1-junction i1 ¼ . . . ¼ in1 ¼ in
e1 þ þ en1 þ en ¼ 0
The 1-port sources Se and Sf represent the in- sets. There exist four types of causal constraints in
teraction of a system with its environment. In fluid bond graphs. Mandatory causality—The constitutive
systems, they may represent pressure and flow laws allow only one of the two port variables to be the
sources. The 1-port resistive element R, capacitor output. Sources Se and Sf have mandatory causality.
element C, and Inertia element L act as power dis- Preferred causality—For the storage elements C and
sipation and storage elements. The 2-port transformer L, there can be time derivative causality or time
and gyrator are power continuous elements (no power integral causality. The preferred causality here refers
storage and no power dissipation). The n-port junction to the integral causality of these elements. Constrain-
elements are also power continuous. The constitutive ed causality—For TF, GY, 0- and 1-junction there are
laws of a 0-junction are analogous to the Kirchoff’s relations between the causality of the different ports
current law. The constitutive laws of a 1-junction are of the element. The relations are causal constraints
analogous to the Kirchoff’s voltage law. because the causality of a particular port imposes the
In bond graphs, the inputs and outputs are charac- causality of the other ports. Indifferent causality—
terized by the effort causality and flow causality. Thus, Indifferent causality means there is no causal
causality assignment is a process by which the bond constraints. The linear resistor element R exhibits
variables e(t) and i(t) are partitioned into input-output indifferent causality since both power variables e(t),
174 WONG, BIGRAS, AND CERVERA
i(t) can be made member of the input and output 1971), it is possible to obtain a global state-space re-
sets. presentation of the system. Figure 3 depicts this parti-
Most traditional causality assignment procedures tioning scheme graphically.
use a local constraint propagation scheme to label In this scheme the set of transformer, gyrator, and
bond causality. From some starting point, usually one n-port junction elements are grouped together forming
of the source elements, bond causality is assigned a so-called junction structure. The Se and Sf elements
sequentially, according to the multi-port connected to are inputs to the junction structure. While the C, L, and
the bond, until all element ports are labeled. These R elements have input-output relationships with the
causality assignment procedures must also satisfy the junction structure. Using the computational causality
four causality types and the fundamental causal con- assigned to each element port, it is easy to determine
straint. the input bond variables and the output bond
The sequential causality assignment procedure or variables. We then write the set of equations
SCAP is an example of causal labeling by local representing the partitioned bond graph. For the re-
propagation [9]. The following pseudocode describes sistive elements, we have
the causality assignment procedure.
v ¼ RðwÞ ð15Þ
Procedure SCAP: input(BG), output(BG)
where w, v are the input and output variable vectors
P M
while (j P j > 0) { and R is the impedance functions vector. Similarly for
the storage elements we have
x m, where I(m) ¼ SE _ I(m) ¼ SF
if ({x} ¼ ¼ Ø) z ¼ SðxÞ ð16Þ
x m, where I(m) ¼ C _ I(m) ¼ L
if ({x} ¼ ¼ Ø) where S is a function vector and x is called the energy
x m, where I(m) ¼ R variable vector or simply state vector. The set of
P¼P{ m } equations governing the junction structure is
2 3
assign(x, lx)
z
If conflict(BG) abort x_ J J2 J3 4 5
¼ 1 v ð17Þ
If complete(BG) return BG w J4 J5 J6
u
}
The assign(x, lx) procedure selects the appro- where u is the source vector and Ji are matrices re-
priate mandatory, preferred, or constrained causality presenting the constraints imposed by the junction
(shown in Table 1) for multi-port x. It also attempts to structures to the set of element ports. By substituting
assign causality to transformer, gyrator, and n-port Equations (15) and (16) into Equation (17) we obtain
junction elements that are connected to x by using the x_ ¼ J1 SðxÞ þ J2 RðwÞ þ J3 u
set of bonds lx. After the assign procedure, a check is ð18Þ
w ¼ J4 SðxÞ þ J5 RðwÞ þ J6 u
made to ensure that no causal conflict exists in the
bond graph. Otherwise, the procedure will abort. Thus, without loss of generality, the system model
Normally a causal conflict indicates the presence of comprising all network components is
topological loops (differential/algebraic loops), de-
x_ ¼ HðxÞ þ Bðx; uÞ
pendent storage elements, or simply design errors. ð19Þ
y ¼ GðxÞ þ Dðx; uÞ
Such degenerated networks produce a set of differ-
ential algebraic equations and its solution is often where x is the state vector, y is the outputs vector, and
time consuming. More details on causality assignment u is the inputs vector of the system. The input-output
techniques can be found in References [9,10].
State-Space Formulation
For each causality, the numerical model of the i-th
component is a nonlinear ODE system of form
x_ i ¼ hi ðxi Þ þ bi ðxi ; ui Þ
ð14Þ
yi ¼ gi ðxi Þ þ di ðxi ; ui Þ
where xi is the state vector, yi is the outputs vector and
ui is the inputs of the i-th component. Using the par- Figure 3 Partition of a bond graph based on the
titioning scheme given in Reference [11] (Rosenberg input-output sets of multi-port elements.
SOFTWARE APPLICATION FOR HYDRAULIC AND PNEUMATIC NETWORKS 175
coupling between network components can be model- approach allows us to have a larger time-step since
ed as only the slow subsystem must be integrated. However,
because the latter is iterative in nature, it is not
u ¼ Cy ð20Þ
possible to guarantee hard real-time performance.
Finally, the global model of all interconnected com-
ponents is obtained by substituting Equation (20) into
Equation (19). Since there is no algebraic loop, the DESIGN AND IMPLEMENTATION
model can then be written as follows:
In the proposed software application, the process of
x_ ¼ HðxÞ ð21aÞ
construction, simulation and data display is a set of
simple tasks. In the construction task, hydraulic,
y ¼ GðxÞ ð21bÞ pneumatic, and mechanical components are selected
We can consider the system equations as an from the component palettes. Using hydraulic (pneu-
assembly of two coupled subsystems: one depicting matic) links and connecting them to component ports,
one can create component interconnections to form a
the slow-varying part and the other depicting the fast-
network. Each network component contains a numer-
varying part of the system. In physical terms, the
ical model whose parameters are adjustable via the
slow-varying part represents the mechanical interac-
user interface. A student can accept the default values,
tions and the elasticity of the pneumatic fluid. Using
use specific settings given by instructor or specify
similar reasoning, the fast-varying part represents the
values directly from manufacturer’s data sheets. For
elasticity of the hydraulic fluid. By applying the
singular perturbation approach [12], the global model the simulation task, numerical simulation is perform-
can then be rewritten as: ed in either continuous mode or step-by-step mode. In
continuous mode, system equations solution and
x_ s ¼ Hs ðxs ; xf Þ ð22aÞ graphical animation updates are continuously execut-
ed every time-step. In step-by-step mode, the student
ex_ f ¼ Hf ðxs ; xf Þ ð22bÞ is responsible for time-step increment (by depressing
a key or a mouse click) so that it is possible to slow
y ¼ Gðxs ; xf Þ ð22cÞ down or speed up the simulation process. Finally, the
data display task consists of data collection using
where xs and xf are the vectors of the state variables measurement components. Data are displayed syn-
associated to the slow and fast subsystems and e is a chronously with the simulator output in both numer-
small positive parameter associated to the time con- ical and graphical forms. Data collected are persistent
stant of the fast subsystem. Since the parameter e is until the next simulation run. The measurement com-
close to zero, a good approximation solution of the ponents can also perform formatted storage opera-
slow subsystem can be obtained by posing e ¼ 0. The tions. This enables extensive post-simulation analysis
global model is then given by using external data analysis tools.
x_ s ¼ Hs ðxs ; xf Þ ð23aÞ The above-described tasks are best realized
by the use of object-oriented technologies. In the
0 ¼ Hf ðxs ; xf Þ ð23bÞ
y ¼ Gðxs ; xf Þ ð23cÞ
In this model, the set of nonlinear differential
equations of the fast varying part is transformed into
a set of nonlinear algebraic equation [12]. This result
greatly facilitates the construction of the numerical
integrator that can operate in quasi real-time. An
adaptive integrator, part of the software application
subsystems, is used to ensure the accuracy of the
solution at each time-step. Note that the global model
includes a static part (23b) and a dynamic part (23a).
The integrator with adaptive time-steps is based on
multiple evaluations of the model. At each model Figure 4 Simplified application objects relation-
evaluation, the static part must be solved. This ships.
176 WONG, BIGRAS, AND CERVERA
APPLICATIONS
Figure 7 Components are interconnected by the use
of links.
The fluid system construction makes use of a set of
component palettes. Some of these component pal-
ettes are shown in Figure 6.
preprocessed in the causality analysis phase so that By using the ‘‘drag and drop’’ technique, the
no negative impact can affect the overall simulation student can lay out components on the workspace. In
time. order to create a useful hydraulic or pneumatic sys-
The Animator object uses a color-coded scheme tem, one has to connect together the appropriate
to represent state changes in transient regime and component ports. This task is shown in Figure 7.
Figure 8 Typical two-speed hydraulic system with instrumentation and grapher output.
178 WONG, BIGRAS, AND CERVERA
A typical two-speed hydraulic network provides Also in Figure 8 is a grapher object, which shows
different forward and backward cylinder speeds. The the cylinder position as a function of simulation time-
user can control cylinder’s forward and backward steps.
motion by activating the distributor pistons. This The simulator also allows hydraulic and pneu-
typical network is shown in Figure 8. matic system coupling at mechanical contact points.
This capability permits the study of different system has been awarded the Québec Education Minister’s
dynamics and their interplay. In Figure 9, the mech- Award for ‘‘best educational software’’ in the year
anical contact point is the interface between the 2000.
pneumatic and hydraulic cylinders. This hybrid net-
work shows an interesting application where a pneu-
matic cylinder, driven by its compressor group, is the REFERENCES
prime moving force.
The hydraulic cylinder, which is coupled to the [1] D. Cervera, Élaboration d’un environnement d’expéri-
pneumatic one, acts as a retaining force on behalf of mentation en simulation, incluant un cadre théorique
the load. Note that this hybrid configuration offers pour l’apprentissage de l’énergie des fluides. Ph.D.
different retaining force for forward and backward Dissertation, faculté des sciences de l’éducation,
cylinder motions since there is two flow controls Université de Montréal, 1998.
installed on the hydraulic cylinder. Again, the student [2] D. Cervera and A. Métioui, Énergie des fluides:
can control forward or backward motion by activating Analyse conceptuelle et représentation des élèves,
technical report (PAREA), Collège de Valleyfield,
the distributor pistons or by dragging one of the
Québec, 1993.
cylinder’s pistons. [3] A. Youssef, A. Métioui, P. Bigras, and D. Cervera, Les
As indicated earlier every hydraulic, pneumatic, représentations des étudiants du collégial profession-
and mechanical component possesses a numerical nel à l’égard des principes de fonctionnement des
model that is fully adjustable. Figure 10 shows a circuits hydrauliques, technical report, École de tech-
typical component dialog box for parameter input. In nologie supérieure, University of Québec, 1991.
most cases, non-ideal component characteristics are [4] T. Wong, P. Bigras, and D. Cervera, A software tool for
possible. For example, Figure 10 depicts an input understanding nonlinear phenomena in hydraulic and
dialog box for a double acting cylinder. The student pneumatic systems, Proceedings of the American
can select from several joint leak degrees (negligible, Society of Engineering Education Conference, session
low, medium, and high) to obtain non-ideal character- 2220, paper 514, 2002.
[5] R. R. Munson, D. F. Young, and T. H. Okiishi,
istics caused by aging and wears of the component.
Fundamentals of fluid mechanics, Wiley, New York,
1998.
[6] B. W. Andersen, The analysis and design of pneumatic
CONCLUSIONS systems, Wiley, New York, 1967.
[7] A. Mukherjee and R. Karmakar, Modeling and simu-
This study presented the motivation and the design of lation of engineering systems through bondgraphs,
a software application for visualizing and under- CRC Press LLC, Boca Raton, FL, 2000.
standing hydraulic and pneumatic networks. The [8] D. C. Karnopp, D. L. Margolis, and R. C. Rosenberg,
intent is to help students analyze fluid system behav- System dynamics: A unified approach, Wiley,
iors. This application is suitable for small-to-medium New York, 1990.
scale fluid system analysis. It uses a combined bond [9] J. D. Dijk, On the role of bond graph causality in
modelling mechatronic systems. Ph.D. Dissertation,
graph and singular perturbation approach for system
University of Twente, CIP-Gegevens, 1994.
equation formulation. A standard adaptive integrator [10] T. Wong, P. Bigras, and K. Khayati, Causality assign-
solves the system equations that are divided into a ment using multi-objective evolutionary algorithms,
slow-varying part and a fast-varying part. The logical IEEE Int Conf Syst, Man and Cybern 4 (2002), 3641.
interface of the integrator output and the graphical [11] R. C. Rosenberg, State-space formulation for bond
animation and instrumentation subsystems are also graph models of multi-port systems, Transactions of
detailed in the study. The graphical animation sub- the ASME, J Dyn Syst Meas Control 93 (1971),
system is responsible for updating color changes and 123125.
rendering of moving parts on behalf of network [12] H. K. Khalil, Nonlinear systems, Macmillan,
components. An important feature of this computer New York, 1992.
application is its ability to permit in-simulation in- [13] J. Rumbaugh, M. Blaha, W. Premerlani, F. Eddy, and
W. Lorensen, Object-oriented modeling and design,
teractions. It allows the students to manipulate
Prentice Hall, Englewood Cliffs, NJ, 1991.
network components while a simulation run is in [14] R. Allen, A formal approach to software architecture.
progress. This feature should facilitate hydraulic Ph.D. Dissertation, Carnegie Mellon University,
and pneumatic network understanding by putting 1997.
the students in the simulation loop. Finally, this [15] A. Shalloway and R. Trott, Design patterns explained:
software application is in use in number of univer- A new perspective on object-oriented design, Addison-
sities and technical colleges throughout Québec. It Wesley, New York, 2001.
180 WONG, BIGRAS, AND CERVERA
BIOGRAPHIES
Tony Wong holds BEng and MEng degrees Daniel Cervera holds his PhD degree in
in electrical engineering from the École de education sciences from Université de
Technologie Supérieure. He received his Montréal. Dr. Cervera has taught at Collège
PhD in computer engineering from École de Valleyfield for the past 30 years. His
Polytechnique de Montréal. Dr. Wong is a current research interests are in the field of
professional engineer and chair of the abstract representations of technical and
automated manufacturing engineering scientific knowledge.
department, École de Technologie Supér-
ieure. His current research interests are
multiobjective optimization using evolutionary algorithms and its
parallel implementations.