Académique Documents
Professionnel Documents
Culture Documents
To cite this article: D. Antic & B. Vidojkovic (2001) Obtaining System Block Diagrams based on
Bond Graph Models and Application of Bondsim Tools, International Journal of Modelling and
Simulation, 21:4, 257-262
Article views: 22
Download by: [Istanbul Technical University] Date: 12 October 2017, At: 04:45
International Journal of Modelling and Simulation, Vol. 21, No.4, 2001
The state-space models, derived from bond graph mod- Figure 1. The electrical circuit.
els, can be represented easily using Matlab/Simulink [8]
wherein if a nonlinear model is derived, the full block The bond graph model for obtaining the state-space
presentation or S-function can be used. If obtained state- equations of the given example is shown in Fig. 2.
space model is linear, the state-space Simulink block can
be used, too. R: l/R,
Downloaded by [Istanbul Technical University] at 04:45 12 October 2017
fF~"'l-
The S-functions can be used for modelling specific
problems and denoted in block diagrams using the S-
function Simulink block. S-function behaves like any other
f,=u f,=nx; fll=x, f l1 =x,
Matlab function. It has the calling syntax: SF : u=! I e -x;>" 0 _ . :> I TF --'-'--:::>".fl 1 :> I I: L
sys=model(t, x, u, flag) ,- 2 e,-x, n e ll =nx, e,,=nx,-R,x,
where model is the model name, t is the current value of
the time, x is the instantaneous value of the state variable,
"'" J fFll<",-x,iR, e"=R,, J f,,='
u is the current value of the input, and flag controls the C:C R:R,
information returned in sys. Setting the flag to various val-
ues causes the S-function to behave in completely different
ways, depending on what is required at the time. The flag Figure 2. The bond graph model for obtaining the state-
options available in Simulink are given in Table 1. space equations.
If the state-space model is linear, that is, if it can be and for the 1-junction are:
given by:
x=Ax+Bu
y = Cx+Du (1)
A:
11-50,19.63;-5592.5926.-33.048433)
B:
110;2.8490028)
Y2 = X2 (4)
c:
block diagram of the electrical circuit example, shown Figure 4. Dialog box of Simulink state-space block.
in Fig. 3, is directly derived from the state-space equa-
tions (4). Fig. 5 shows the Simulink block diagram of the given
linear system, which uses the previous state-space block.
To Workspace2
2
To Workspace1
(,9----J1o[=r:::J
Clock To Workspace2
Gain: nIL
Figure 5. The use of the state-space block.
Gain:n/C
Constant: utC
The state-space model (4) can be written in the form
of the following S-function:
function[sys,xO]=ha(t,x,u,flag,L,R2,n,C,R1,xi)
if abs(flag)==l,
sys(1)=(1/L)*(-R2*x(1)+n*x(2));
sys(2)=(1/C)*(-n*x(1)-x(2)/R1+u);
(9----..!., I elseif flag==3,
sys(1)=x(1) ;
Clock To Workspace
sys(2)=x(2);
elseif flag==O,
Figure 3. The full block presentation.
sys=[2;0;2;1;0;0];
xO=xi;
The state-space model (4) can be written in the matrix else
form (1), where the matrices A, B, C, and D are given sys=[] ;
with: end;
end;
A= [ -R2/ L niL
-n/C -1/(CR1 )
1 =[ 1
,B
0
l/C '
This S-function can be built in block diagram (Fig. 6)
using S-function block, the Dialog box for which is shown
in Fig. 7.
(5) ha
Constant: S-Function
u=9S0 ~mux
To Workspace1
Equations (1) and (5) can be modelled in Simulink C9---+C:IJ
Clock To Workspace2
using the State-space block, the Dialog box for which is
shown in Fig. 4. Figure 6. Use of S-function block.
259
S-Funchon ~ 2. All elements are expanded into "computational blocks"
that represent the constitutive relations of the bond
I Block name: S-Function
graph elements (Fig. 8(b)).
i! Block type: S-Function
3. Every junction is represented by a node and a sum-
Ii Subsystem:
sys=fun(t.x.uJlag,param1 ...)
mation, wherein the constitutive relations of the junc-
! tion have to be satisfied in the proper causal form
l_.__~_.___...._~ . _. __.__....__._ (Fig. 8(b)).
Subsystem function name: The block diagram, shown in Fig. 8(b), is implemented
easily in Simulink (Fig. 9).
Function parameters:
1100,5000,1963,0.351.1 11 1.6,(0;011
To Workspace1
;
the owner bond of junction, and having the N - 1 IL-__________________________ ~
,~Jj\!ij~
All external and internal bonds of the owner block are
taken on the next Bondsim elements representing the other
junctions of the bond graph.
o} b)
Conductance
To Worksp.",,2
.1 Figure 13. Simulation results of electrical circuit shown in
Fig. 1.
Figure 11. Bondsim simulation model of considered exam-
ple. 5. Conclusion
The causal bond graph model, shown in Fig. 10, con- A method for direct transformation of bond graph models
sists of two junctions. of dynamic systems into models in the form of block dia-
Junction number 1 has four bonds. It is a a-junction grams is introduced. The application of this method en-
(common effort junction). The owner bond is the number ables simple modelling and simulation of dynamic systems
2 connected with C bond graph element and requires using program packages oriented on block diagrams that
C Bondsim element placed behind O-junction Bondsim are accessible frequently. Obtaining simulation models in
element in the block diagram given in Fig. 11. The bond the form of block diagrams is done directly from bond
number 3 linked to R bond graph element is an internal graph models. Explicitly written equations are not neces-
bond and requires a local feedback loop with G Bondsim sary because the use of Bondsim elements directly realized
element in the block diagram. The bond number 1 (flow the constitutive relations of the bond graph elements and
source, SF bond graph element) and number 4 are external junctions, that is, constitutive blocks and owner blocks
(no local feedbacks). The external bond number 4 is linked of junctions. Fakri transformation is convenient for di-
to TF bond graph element presented by RTF Bondsim rect application of Bondsim elements to optimize Simulink
element in the block diagram. The Dialog box of RTF is blocks. Using the Bondsim library, a visually more dis-
given in Fig. 12. The owner block of junction number 1 tinct simulation model is obtained that enables simpler
261
manipulation of elements of the simulation model. The Biographies
application of Bondsim library retained the computational
as well as the topological structure of the system. A simple Dragan Antic received the B.Sc.,
application of the proposed method is illustrated using a M.Sc., and Ph.D. degrees from
concrete example of modelling and simulation. This paper the Faculty of Electronic Engi-
has demonstrated how the S-functions may be used with neering, University of Nis, Yu-
bond graph modelling and simulation of dynamic systems. goslavia, in 1987, 1991, and 1994,
respectively. He is now Associate
References Professor at that faculty, where
he teaches courses in modelling
[1] P.J. Gawthrop & L. Smith, Metamodelling: Bond gmphs and and simulation and control sys-
dynamic systems (London: Prentice Hall, 1996).
[2] J.U. Thoma, Simulation by bond gmphs: Introduction to a
tem theory. He is the author and
gmphical method (Berlin: Springer, 1990). coauthor of a large number of pa-
[3] J. Thoma & B. Ould Bouamama, Modelling and simulation pers. His research interests are
in thermal and chemical engineering: A bond gmph approach modelling and simulation, variable structure systems, fuzzy
(Berlin: Springer, 2000).
[4] J. Thoma, Introduction to bondgmphs and their applications
sliding mode control, control of electric drives, and indus-
(Oxford: Pergamon, 1975). trial processes.
[5] P.C. Breedveld, Systematic procedures to derive block dia-
Downloaded by [Istanbul Technical University] at 04:45 12 October 2017
262