Generating state space equations from a bond graph with dependent storage elements using singular perturbation theory.
Krister Edstrom
Department of Electrical Engineering Linkoping University, S-581 83 Linkoping, Sweden
WWW: http://www.control.isy.liu.se
Email: edstrom@isy.liu.se
August 25, 1998
REGLERTEKNIK
AUTOMATIC CONTROL LINKÖPING
Report no.: LiTH-ISY-R-2050 Submitted to ICBGM'99
Technical reports from the Automatic Control group in Linkoping are available by anonymous ftp at the
Generating state space equations from a bond graph with dependent storage elements using singular perturbation theory.
Krister Edstrom
(edstrom@isy.liu.se) Dept. of Electrical Engineering
Linkopings Universitet SE-581 83 Linkoping, Sweden
1 Introduction
It is well known that when allowing derivative causality in a bond graph, the generated mathematical description will be a DAE 5] (Dierential Algebraic Equation) as a mathematical description. For simulation purposes this is in most cases a suitable description. There is however a well developed theory for ODE:s (Ordinary Dierential Equations) in state space form. The ODE:s can be used to, e.g., analyze, or construct a controller for, the system.
When generating a state space description from a bond graph without any derivative causality 5], algebraic loops or causal loops, the states have clear physical interpretations. For an I -element in the mechanical domain, the state is the momentum of the mass, and for a C -element in the electrical domain, the state is the charge of the capacitor.
When generating a state space description from a bond graph with derivative causality, there should still be a physical interpretation. When the derivative causality is generated by two masses that are stiy connected, the state variable in a generated state space description should be the total momentum of the two masses.
In this paper we will consider the derivative causality as a consequence of simplifying the model by neglecting energy dissipation. If the energy dissipation is small enough, it is a natural model simplication to remove it from the model. To allow generation of a state space description from a bond graph with connected storage elements, we will rst add the energy dissipation in the bond graph using a linear R -element. The dissipation will then be removed from the mathematical description by letting the value of the parameter in the constitutive relation of the R -element tend to zero.
There exist methods for generating a state space description from a bond graph 4]. The method presented
here have two properties that make it interesting: First there is a physical interpretation of the generated
states, and second it relies on an interpretation of the dependency of the storage elements as the connection
between the storage elements containing energy dissipation that tends to zero.
2 Singular perturbations
In a singular perturbation framework 3] it is possible to study a system where the dynamics have two dierent time scales. A linear systems that is singularly perturbed can be expressed in the following form:
_
(
t) _
x
(
t)
=
A11( )
A12( )
A
21
( )
A22( )
(
t)
x
(
t)
(1) When the value of the parameter becomes very small, the states in
will have a signicantly smaller time constant than the states in
x. By letting go to zero, the time constant of
will go to zero. When looking at the step response of the system,
will reach its steady state before
xchanges value, assuming that is very small.
The singular perturbed model is in standard form if det
A11(0)
6= 0. If the system is in standard form it can for = 0 be rewritten as:
_ 0
x
(
t)
=
A11(0)
A12(0)
A
21
(0)
A22(0)
0
x
(
t)
)
(
t) _
x
(
t)
= 0
;A;111(0)
A12(0) 0
A22(0)
;A21(0)
A;111(0)
A12(0)
(
t)
x
(
t)
(2)
By assigning = 0, the state space is reduced, and we get a DAE description of the system. As seen in Equation (2) it is possible to rewrite the equations in state space form with
as an output variable if det
A11(0)
6= 0.
3 Generating the state space description
The generation of a state space description is done in ve steps as shown below. The described procedure handles one C -element with derivative causality, denoted by
s1, but the method can be extended to hold for
I -elements, and for multiple elements with derivative causality.
The bond graph is assumed to be nice, meaning that it should include no other storage elements with derivative causality, no algebraic loops and no causal loops.
1. Start with the bond graph with dependent storage elements. Add an R -element to relax the derivative causality. If
s1is connected to a 0 -junction it is necessary to add a 1 -junction as well. When the derivative causality is relaxed, the number of states increases with one. Let the value of the parameter in the linear constitutive relation of the R -element be .
2. Derive a state space description using SCAP 2].
_
x
=
Ax+
BuThis is possible due to our assumption about a nice bond graph, since this assumptions implies that there are no zero-order causal paths (paths between storage elements or between R -elements or causal loops) or elements with derivative causality in the bond graph 5].
3. Generate a transformation matrix
Tfrom the bond graph with derivative causality:
=
TxT
is found using a standard bond graph equation generation algorithm along the causal paths be-
tween the storage element with derivative causality and other storage elements. The generation of the
4. Perform the change of basis of the state space description:
_
=
A+
Buwhere
A
=
TAT;1 B=
TBMultiply the rst row by . The resulting state space description will have the following form _
_
1
2:n
=
A11+
A11 A2:n1A
2:n1 A
2:n2:n
1
2:n
+
BB2:n1
u
where
A11is invertible, see Section 4:
5. Let
!0.
_ 0
2:n
=
AA2:n111 A2:n2:n0
1
2:n
+ 0
B2:n
u
Since
A11is invertible we can according to Equation (2) replace
1with 0 in the last
n;1 equations:
_
2:n
=
A2:n2:n2:n+
B2:nu(3) The resulting state space equations describe the dynamics of the bond graph with derivative causality.
4 Details and proofs
In this section some details in the algorithm are explored. A theorem and a lemma stating some the results are formulated, but the proofs are left out and can be found in 1].
4.1 Generation of a transformation matrix
Here we will take a closer look at step 3 in the algorithm in Section 3. To generate the
Tmatrix, we will use the bond graph in which the dependent storage elements are, i.e., the bond graph without the additional
R -element. We will assume that the number of storage elements in the bond graph is
n. An algorithm for generating
Twill look like this:
1. Propagate causality in the bond graph.
2. Find all storage elements that are connected to the storage element with derivative causality,
s1, by causal paths. Assume that there are
lsuch storage elements,
s1included. Consider only the part of the bond graph connecting these elements.
3. Derive an equation
x1=
a2x2+
:::+
alxl, where
x1is the state variable in the constitutive relation for
s
1
and
x2:::xlare state variables belonging to constitutive relations for the other storage elements.
Use a standard bond graph equation generation algorithm.
Rewrite the equation as:
x
1
;a
2 x
2
;:::;a
l x
l
= 0 (4)
4. Derive
l;1 equations relating the rates of the state variables: _
x1:::x_
l: _
x
j
=
j1x_
1 j= 2
:::l(5) This is also done with a standard bond graph equation generation algorithm.
Rewrite the equations as
_
x
j
;
j1x
_
1= 0
j= 2
:::l(6) and integrate:
x
j
;
j1 x
1
= 0
j= 2
:::l(7)
5. Let the coecients in left hand sides of Equations (4) and (8) form a matrix
T:
T
=
0
B
B
B
B
B
@
1
a2 a3 ::: al;
11
1 0
:::0
;
21
0 1
:::0 ... ... ... ... ...
;
l1
0 0
:::1
1
C
C
C
C
C
A
(8)
6. Extend
Twith an identity matrix to get a matrix
Tof dimension
n, the number of storage elements in the bond graph:
T
=
T0 0
I
(9) To show that
Tis of full rank we have the following lemma:
Lemma 1 If the bond graph has no algebraic loops, no causal loops and one storage element with derivative causality that is dependent of one or several other storage elements, then the following statement holds:
T
is invertible if we assume that at each C -element the energy half-arrow points towards the C -element.
Proof: See 1].
4.2 A state space form after the change of basis
After the change of basis with the transformation matrix it will be clear that the system is a singular perturbed system in standard form.
Theorem 1 Let the bond graph have no algebraic loops, no causal loops and one storage element with derivative causality that is dependent of one or several other storage elements.
Derive the state space description from the bond graph with the added R -element.
_
x
=
Ax+
Bu(10)
Derive the matrix
Tfrom the bond graph without the R -element. Perform the change of basis to get a new state space description:
_ = + where = (11)
Hence
A
=
TAT;1and
B=
TB(12)
If multiplying the rst row in Equation (11), the structure of the matrices
Aand
Bwill be the following:
A
=
A11+
A11 A2:n1A
2:n1 A
2:n2:n
and
B=
B1B
2:n
u
(13)
where
A116= 0.
Proof: See 1].
Since
A116= 0 it is clear that the system is singular perturbed and in standard form.
5 Example
We will derive a state space description from the bond graph in Figure 1.
Se
1R
1C
1
C
20 0 0 1
1 1
Figure 1: A bond graph example.
The rst step is to introduce an R -element according to Figure 2. Its constitutive relation is assumed to be linear with parameter .
Se
1R
1R
2C
1C
21 1 1 0
0 0 1
1 1
Figure 2: The bond graph with causality relaxed by an R -element.
Derive a state space description from the bond graph in Figure 2 using SCAP:
_
x
_
1 x2
=
;r1c1+r1 1 c21c
1
; 1
c
2
x
1
x
2
+
r10
1
u
x
1
and
x2are the states in the constitutive relations for the two C -elements and
uis the eort given by the
Se
1-element.
Derive equations in both directions along the causal path between the two C -elements in Figure 1.
x
2
=
c2c
1 x
1
_
x
1
=
;x_
2Introduce two new state variables using the derived equations.
1
=
c2c
1 x
1
;x
2
2
=
x1+
x2The transformation matrix is then:
T
=
cc21 ;1 1 1
Change the basis, and multiply the rst row with :
A
=
; c
2
2
+c 2
2 r
1 +2c
1 c
2 r
1 +c
2
1 r
1
c
1 c
2 (c
1 +c
2 )r
1
c2
c
1 (c
1 +c
2 )r
1
; 1
(c
1 +c
2 )r
1
; 1
(c
1 +c
2 )r
1
!
B
=
cc211r1r
1
Let
!0:
0 _
2
=
;c1+c2c1c20
; 1
(c
1 +c
2 )r
1
; 1
(c
1 +c
2 )r
1
1
2
+ 0
1r
1
u
The state space description is thus _
2
=
;1
(
c1+
c2)
r12+ 1
r
1 u