Computer Programs in Biomedicine 8 (1978) 165-170 © Elsevier/North-Holland Biomedical Press
BOND GRAPHS AND THE EXPLOITATION OF POWER CONSERVING TRANSFORMATIONS Donald L. MARGOLIS Department of Mechanical Engineering, University of California, Davis, CA 95616, USA
Use is made of the guaranteed energy conservation property of any bond graph model (presuming that conistent energy variables are used). Thus power transformations are power conserving, and this property is exploited with respect to multiport transformers where many effort and flow variables may be involved. In these cases the relationship among the effort (flow) variables across the transformer may be easier to derive than the relationship among the flows (efforts). The power conserving nature of the transformer permits immediate derivation of the alternate variable relationship. This formulation procedure is applied to the reflex reaction of the arm. Multiport transformations
Arm reflex reaction
Bond graphs
1. Introduction
el
Bond graphs are a pictorial representation of the energy flow, storage, and dissipation mechanisms of interacting dynamic systems. They have numerous properties that aid in all aspects of the modeling process from reticulation of a physical model to the setup of nonlinear governing state space equations [1]. The particular property discussed in this paper deals with the power conserving transformation. If the physics o f a problem permits the derivation of the constitutive relationship between the effort variables across some energy domain, then the flow variable relationship is automatically dictated, and vice versa. This fact has some very useful applications when multiport transformations are involved. In what follows, some simple examples of power transduction are presented and then multiport transformers are introduced. Use is then made of the above-mentioned transformation relationships in deriving the constitutive laws for nonlinear ideal power transformations. An example of the reflex reaction of the arm is presented where the model permits large angular displacements of the arm segments.
fl
m
e2 f2
Fig. 1. Simple 2-port transformer. effort and flow variables el, f l and from the right by effort and flow variables e2, f2- According to bond graph convention, the product e I • f t equals power as does the product e 2 • f2- Since the element is an ideal transformer, the output power (indicated by the half arrow on the bond end) e2" f2 instantaneously equals the input power, el • f l . Thus: elf1 = ezf2
(1)
The causality shown in fig. 1 (indicated by the perpendicular strokes on the bond ends) indicates that el is an output signal and is 'caused' by e 2 through the relationship: el = rne2
(2)
where m is the transformer modulus. Substituting eq. (2) into eq. (1) dictates that:
2. Power conserving transformers
f2 = m f l
Figure 1 shows a simple 2-port transformer in bond graph form. It is addressed from the left by
Thus the effort relationship dictates the flow relationship, and vice versa. 165
(3)
166
D.L. Margolis, Bond graphs and power conserving transformations
F1 I.
Vll
t-
F2 a
,,~-
b
I
.A
~1
!t
v2
f f f f f f f f
Fig. 2. Mechanical lever as a bond graph transformer.
A simple physical example of the transformer is the mechanical lever shown in fig, 2. The effort (or force) relationship across the transformer for the assumed massless lever is:
x:Rcos0+Lcosq;
R sin 0 = L sin ff
(8)
therefore R sin ~b = - - sin 0 = ~/1 - cos2~ L
or
b Fl =-- F2 a
(5)
b :
--
a
Equation (6) may be easily derived from the kinematics of the device. The 2-port transformer in fig. 3 is chosen to illustrate the ease of finding an effort relationship once a flow relationship is known. This slider-crank mechanism is found in virtually all internal combustion engines. Assuming massless components, the input power F" o is instantaneously converted into power
x=RcosO
sin20
(10)
+L
l-
sin20
(11)
Differentiating once with respect to time and noting that u = -5c yields: v:
IR
L(R/L)2 sin 0 cos 0
sin 0 + {i ~ ( R ~ n ~ 0 ) - Y / 2 J
-] 0
(12)
The term in brackets [] is the modulus, m(0), for the slider-crank mechanism. The effort relationship for the transformer is dictated to be: 7- re(O). F =
r~
1-
and using eq. (10) in eq. (7) yields: (6)
V1
(9)
therefore cos ~ =
Thus, without further derivation, the flows (or velocities vl and v2) are given by the expression: 02
(7)
and
(4)
Fla = F 2b
7- • t~. The bond graph representation is a modulated transformer (-+MTF-+) where the transformer modulus, m, is not constant but instead varies with angle, O. This variable m in no way affects the power conserving property of the element. It is reasonably straightforward to derive the relationship between piston velocity, V, and crank angular velocity, O. Thus:
(13)
L
m(O) ~; MTF Fig. 3. Slider-crank mechanism.
--~
Deriving the effort relationship directly involves resolving the force, F, into components at the pinned joints and then further resolving the resulting components into components perpendicular to the crank radius. This procedure is at best tedious and, in the authors opinion, much more difficult than first deriving the v - 6 relationship and then utilizing the power conserving property of transformers (eq. 1) to find the relationship between flows.
D.L. Margolis, Bond graphs and power conserving transformations In the next section the multiport transformer is introduced. The concept of bilateral relationships among effort and flow variables across the ideal power transformation is extended to allow many effort and many flow variables to be transformed simultaneously•
or t
•
t
einfin = eoutfou t
Mfin
(16)
3. The m u l t i p o r t t r a n s f o r m e r
Using (16) in (15) yields:
The multiport transformer receives input power from many different ports, performs some internal power transformation, and then directs power to several different output ports. This device is shown in fig. 4. Like its 2-port counterpart, this device also instantaneously conserves power. Using the following definitions:
einfi n -
t
'1 i f i n =
fl i
'2 i
f2i i
(15)
But the output flows,four, are related to input flows, fin, via a modulus matrix, M. Thus: fout =
Cin =
167
_
t eoutMfin
(17)
Transposing both sides of (17) yields: flnein = ftnMteout
(18)
or, finally: ein =Mteout
(19)
Thus knowledge of the flow relationship across the transformer (eq. (16)) dictates the effort relationship (eq. (19)) through a simple matrix transposition. The utility of this property is demonstrated in the following section for the case of reflex reaction of the
e o u t = l C l 0 - JeOtlt =
•
arm.
f'i
'hi.
(14)
we can write:
4. Reflex r e a c t i o n o f the arm
Power IN = Power OUT
IN el i
OUT e"
el o
Soechting et al• [2] have developed a biceps and triceps muscle model which they use to simulate the reflex reaction of the forearm to a sudden change in force at the wrist• Their physical model for this simulation is shown in fig. 5. The muscle model consists of a viscoelastic spring coupled with a state con-
e
fl i
fl o e2
• Biceps
Foreman ~ ~
A . / )---~-r (t)
F2 ( 8 , 8 ) Force Generator
f2 i
MTF
&
,
en•
•
em
t.~ ~ J
"s 1
F 1 ( O, O) Force Generatort
In i
•
•
lm o
Fig. 4. Multiport transformer.
Triceps Fig. 5• Physical model for arm reflex simulation f r o m [2]•
168
D.L. Margolis, Bond graphs and power conserving transformations
v ( 8 , t~)
input Forces
Velocity or Flow Source
I Fyi
y
,,o.s
1
-
kp
z
iv3
Fig. 6. Modified muscle model.
~ b3~ ks ~ % 3 Vl bl
~'
~
X
Triceps
trolled force generator. The control modulators are the angular displacement and velocity of the forearm. These authors performed reflex experiments with human subjects and then used the experimental data to determine the feedback gains for the control force. The study [2] is chosen as it describes a system which serves as a basis for demonstration of the utility of power conserving transformations. The reflex model is modified here to include interaction at the shoulder and introduce a modified muscle model. (The intent of these modifications is to illustrate use of power transformation in a fairly complex
I • m1
Coupling Springs R
C
i
FyLI
MTF,
Shoulder
FXR2 :XRI $ FxL2 .le--" XR2SEX . ~ 11"- 0 .,~ XR! XL2 MTF .--I lzri ~ MTF
7:471
MTF
1~
I=m2
R ,'---~ It--,,. C"
I" J1 •Jr~I
C
biological system and not to critically evaluate the relative physiological merits of various models.) In the modified muscle model shown in fig. 6 the active element is assumed to be a velocity source (or flow generator) rather than the force source used by Soechting et al. [2]. In this way, power is dissipated during an isometric contraction (which is not the case in the model from [2]).
Coupling Springs
,,-.111-.=, I" mI
FxLI
Fig. 7. Physical model of arm incorporating modified muscle model.
.
I--J2 !
FyR1 YRI
~r~2 / 1 ~--- i
FyL2 T yL2
.z-=" IP'-- 0 . . ~
1 P"~ C I R I,-- 0 I--~ C
FyR2 YR2Ey
I~--S
Input Forces
Biceps and Triceps
1 SF2 Fig. 8. Bond graph model of fig. 7.
D.L. Margolis,Bond graphsand power conserving transformations The complete physical model for arm reflex simulation and the associated bond graph are shown in fig. 7 and 8. The corresponding dynamic elements and some of the important variables are pointed out in the figures. Basically, from fig. 7, the arm is divided into 2 segments. Link 1 is the upper arm and link 2 is the forearm. The 2 links are joined at the 'elbow' by coupling springs which represent the inherent joint stiffness. The biceps and triceps models also join the 2 links at the elbow. The 'upper arm' (link 1) is connected to the 'shoulder' with coupling springs as well as another active muscle device. The forces, Fxi and Fy i, at the 'wrist' are the inputs to this system and can be any force-time history desired. The modulated flow sources (SFp SF2 in fig. 8) are assumed to be:
using eq. (19), without further derivation we know:
= 0 a 1 sin 01
0
X
(o,- o,)dt
t -C33 f (o2 - o,
-
0Srel) dt
(21)
where Os[ is the set point angle for link 1 and 0Srel is the relative set point angle between links 1 and 2. The purpose of this example is to show the use of multiport transformers. The velocity state of the center of gravity of the links is transformed into the x and y velocities at the link ends. These velocities are needed as inputs to the stiffness elements which generate forces at the link ends which are, in turn, transformed into appropriate forcing of and about the links centers of gravity. Looking, for instance, at link 1, it is a simple matter to obtain the x, y velocity components at the two ends directly from the motion of the center of gravity. Thus:
a 1 sin 01
1
- a l cos O1
- b l sin O]
bl cosO]
(23)
FyL2
0,1 TIME, sac. 0 ..m -0.1
<~, i
0'2
\
0'3
A'-7,
/ \
I
,;
-0.2
\
/
4
\!
Suddllniy
-0.3
F ll
II;~:! 0 1 - a I cos 01 ~g [::::1 = 1 0 -bisinOl ;gt io
0
Since FXL through a r e determined from the coupling springs, the proper forcing of link 1 (exclusive of the active muscles) has been determined from initial knowledge of only the velocity transformation. If one were to derive these force components directly from the kinematics of the problem, one would find eq. (23) indeed to be true. A similar argument exists for link 2. Using these transformation properties and other
el:
0
1
FYL2]
i
1
o
I
1
o
1
Fxr 2
(20)
SF2 =-C21(02 -- 01 -- 0Srel) --C22(02 -- 01)
G | ! [
o
GLI] FyL]
t SF1 :-C11(01 - OSl) - C210 1 - C31 f
169
1 blCOSO, ] P , /
-0.4
-0.5
(22)
Fig. 9. Angular displacement of the 'forearm' for wrist force suddenly applied.
D.L. Margolis, Bond graphs and power conserving transformations
170
0.6
response similar to [2]. When the 'forearm' (link 2) again attained its initial position (02 = 90°), the 'muscles' were now flexed. Starting with this nonzero initial condition, the input force was suddenly relaxed and the resulting motion-time history is shown in fig. 10. Comparing these calculated results with [2] one finds the responses are very similar.
+
02 --z,-- F (t)
0.5f
Suddenly Relaxed
II t
0.4 0.3 0.2
5. Conclusion
0.1 0 -0.1
I
.
.
.
.
0.4
~'~0.6
0.7
TIME, se¢.
Fig. I0. Angular displacement of the 'forearm' for wrist force suddenly relaxed.
techniques described in [I], the governing nonlinear state equations were derived directly from the bond graph of fig. 8. These equations were solved numerically on a digital computer for several different initial conditions and input force-time histories. The results presented here are for an upper arm set point angle of 0 ° (horizontal) and a relative set point between the upper arm and forearm of 90 ° (forearm vertical). These calculations are similar to experimental results [2], i.e., the reflex tends to maintain the 'arm' in its initial configuration. In fig. 9, the 'forearm' motion-time history is plotted for an initially relaxed arm (0 initial conditions) upon which a sudden horizontal force is applied at the 'wrist'. The feedback gains were determined through a parameter search to produce a
The bond graph 2-port transformer was introduced and its power-conserving property discussed. The real virtue of such a transformer is that only the 'flow' relationship or 'effort' relationship across the transformer need be derived and the other constitutive law is automatically dictated. This property was extended to multiport transformers in which many effort and flow variables are simultaneously involved. This time the transformation laws involve matrices rather than scalars. The multiport transformer was used in an armmuscle model capable of simulating the reflex reaction of the arm. A muscle model was presented which predicts realistic power dissipation during isometric conditions. The overall response was shown to be similar to results presented in the literature.
References [1] D.C. Karnopp and R.C. Rosenberg, System Dynamics: A Unified Approach (Wiley and Sons, New York, 1975). [2] J.F. Soechting, P.A. Stewart, R.H. Hawley, P.R. Paslay and J. Duffy, Evaluation of neuromuscular parameters describing human reflex motion. Trans. ASME, J. Dyn. Syst. Meas. Cont. 93 (1971) 221-226.