Haar Wavelet Method For Solving Lumped and Distributed-Parameter Systems
Haar Wavelet Method For Solving Lumped and Distributed-Parameter Systems
distributed-parameter systems
C.F.Chen
C.H.Hsiao
Lhg(t)l to 0 1 -11
U The Haar coefficient ci can be obtained by applying
Fig.5 Fgth Haar function and corresponding integral eqn. 5 directly; however, it is more convenient to evalu-
ate it by matrix inversion.
Ct = y(t)HL1 = [ 3 2 4 11 (9)
1 2
U
Fig. 6 Sixth H a m function and corresponding integral
L1 -1 0 -21
Eqn. 9 is called the forward transform, which turns the
time function y ( t ) into the coefficient vector ct, and
eqn. 7 is known as the inverse transform, which recov-
ers y(t) from et. Since H and N-l contain many zeros,
U this phenomenon makes the Haar transform much
Fig.7 Seventh Haar function and corresponding integral faster than the Fourier transform, and it is even faster
than the Walsh transform.
rt
2 integration of Haar wavelets
In studying differential equation models of dynamic
U
systems, it is frequently needed to perform integrations
Fig.8 Eighth Haar function and corresponding integral in order to get the dynamic problem solved. The new
approach we are developing is also using the integra-
tion technique.
This orthogonal basis is not a recent invention [SI. It Let us consider a 4th-order system. The integrals of
is a reminiscent of the Walsh basis [l], in which each the first four Haar wavelets can be expressed as:
Walsh function contains many wavelets to fill the inter-
val (0, 1) complelely, and to form a global basis. While l h n ( t ) d t = t , o < t < l = -1 [ l 3 5 71 (11)
each Haar function contains just one wavelet during 8
some subinterval of time, and remains zero elsewhere; 1
the Haar set forms a local basis.
We have noticed that all the Haar wavelets are
1 t
hl(t)dt=
t, o < t < -
1-t,
1
-<t<l
]+,l 3 3 11
orthogonal to each other: 2-
(12)
ci = 2 j 1 1
y(t)h$)dt (5)
88 IEE Proc -Control Theory Appl., Vol. 144, No. 1, January 1997
Writing eqns. 11 to 14 together, we obtain All these matrices P2, P4, P8 satisfy eqn. 19. Of course,
rl 3 5 71 we should have a general and more rigorous proof in
addition to the numerical check. Let us partition P,
into four submatrices:
0 1 11 Lo (23)
Let the integrals be expanded into Haar series. Thus,
Eqn. 19 consists of the following four equations:
H4(t)dt = I 3 4 H 4 ( t ) (16) pma = pm/2 (24a)
1
r 4 -2 -1 -11 Pmb = -- Hm/2
2m
1
P,, = -H-l
2m
Pmd = null matrix
Following the same procedures,-the integration matrix
We now offer the general proof.
P8 can be obtained as follows:
Proof 2.1: Choose m = 4 for illustration. As shown in
eqn. 15, J,j H4 (z)dz contains four integrals. By defini-
tions of eqns. 21 and 23, Pda is the transform of the
first two integrals into the first two Haar functions
ho(t) and hl(t). On the other hand, P2 of eqn. 22 is also
the transform of these two integrals into ho(t) and h,(t).
Therefore they should be equal and eqn. 24a should
hold, although eqn. 17 is evaluated with four subinter-
In general for an mth-order system with m = 2j, j is a vals while eqn. 22 is evaluated with two subintervals.
positive integer, the P, is given as That makes no difference.
Proof 2.2: By definition, P4b is the transform of the
integrals ho(t) and hl(t) into series of h2(t)and h3(t).
To prove matrix eqn. 19 we verify it numerically first.
For an mth-order system the Haar matrix H, is
defined with m Haar functions in row vector form as which shows that the integral of ho(t) is a ramp
for matrix eqn. 8. In other words, function, and the integral of hl(t) is a triangular
function consisting of a rising ramp and a falling ramp.
It is noted that the absolute value of the slopes of these
ramps is the same.
The transform is carried out with H c l . As shown in
eqn. 10, the third column of Hcl has 2 and -2 in its (1,
3), (2, 3) entries. When eqn. 25 is postmultiplied with
this column, the second column of eqn. 25 is sub-
stracted from its first column, and the difference is
divided by 2. That means we are calculating the nega-
tive slope of J; ho(z)dzand Jot hl(z)dz.Namely, we are
The integrals of Haar functions are triangular func- taking the negative derivatives of these integrals. The
tions, as explained earlier. The operation matrix P, is same situation occurs when eqn. 25 is postmultiplied
the Haar transform coefficient matrix of these integrals with the fourth column of H r l . Because integration
as defined by eqn. 16: and differentiation cancel each other, we have P4b
equals -(1/2m)H2.
L U -1A
r8 -4 -2 -2
1
p4 = 16 1 1 0 0
Proof2.3: When the integrals of h2(t)and h3(t)are mul-
.1 -1 0 0
tiplied by the first two columns of Hcl, this results in
32 -16 -8 -8 -4 -4 -4 -4 P4c.That means P4cis the transform of the integrals of
-16 0 -8 8 -4 -4 4 4 h2(t) and h3(t)into series of ho(t)and h,(t). These inte-
4 4 0 0 - 4 4 0 0 grals are triangular functions which span the first and
the second half intervals. In numerical expression, the
1 4 - 4 0 0 0 0 - 4 4 averaged values are taken to represent these triangular
Pa = -
64 1 1 2 0 0 0 0 0 functions.
1 1 - 2 0 0 0 0 0
1 - 1 0 2 0 0 0 0
- 1 -1 0 -2 0 0 0 0
IEE Proc.-Control Theory Appl., Vol. 144, No. 1, January 1997 89
Comparing the first two columns of H c l and H y l , we The Kronecker product A 0 Pt is defined as [131
find that the former is just a dilation of the latter. This -j P l l A P2d . . . Pm1A1
means that the second and the fourth rows of the first
two columns of H L ~are the same as the first and the
third rows there. Therefore,
A8Pt= I . p2:A :* 'mZA 1 (36)
rl 1i LPIiA P z ~ A PmiAj ..:
After F is obtained, it can be used in eqn. 32 to find
x(t), which can be entered into eqn. 29 to calculate y ( t )
=&
1 1 01] [: 3=p;' 1
with only a few matrix operations.
The above derivations illustrate that solving the
dynamic equation via the Haar wavelets approach is
remarkably feasible. In practical calculation, one
Proof 2.4: By definition, Pdd is the transform of the should study the property of P and H closely to choose
integrals of h,(t) and h3(t).As shown in eqn. 27 its each the most effective calculating subroutines. Zeros
row contains two equal positive entries, while each col-
involved in H and P will greatly simplify the solution
umn of the last half of Hcl contains two entries of 22.
procedures. Alternatively, eqn. 34 can be rewritten as
Therefore these rows and columns are orthogonal to
each other, and Pddis a null matrix. A-'F - F P = A-'GL (37)
To make the above analyses and proofs clear and for nonsingular A , this is a Lyapunov matrix equation
compact, m = 4 has been used. In general, the above [14], which arises in several areas of control including
proofs can be applied for any m. stability theory, and the study of the RMS behaviour
This completes the proof of eqn. 19.
of systems. The subroutine lyup (A-l, -P, A-'GI) of
3 Analysis of lumped-parameter systems via MATLAB, or the subroutine srhw of the Appendix
Haar wavelets may be applied directly to obtain F with A and G1
being given.
A lumped-parameter linear system with n states x(t), p
inputs u(t), and 4 outputs y ( t ) is usually described by low-pass PI motor and
the state equation and the output equation with prop- filter controller bad
[fo)fi,...,fm-l]
-A[f~,f~,-.-,fm-,]P
-
[go)g l , . . . gm-11
- ) (34)
whereA and g, are the (i + 1)st columns of F and GI,
respectively. Since the unknown matrix F in eqn. 34 is
premultiplied by A and postmultiplied by P , it should
be solved with Kronecker product as 0.2 -
I
space distance. The x in a(x) will be dropped to
simplify the notation.
-
I (x.t) RAx/2 LAx12 I(x +Ax, t )
I 1 1 - I
where al and a2 are two constant vectors to satisfy the
boundary conditions. The voltage y(x, t ) must be finite
when x + CO. It is necessary that a2 = 0,
v(x,t ) = a4 exp(-Mz)P2H(t) (49)
Lax12 RAx12
When a unit step voltage is applied at x = 0, it means
Y ( 0 , t ) = 1:
Ax
Fig. 13 Elementary length of a transmission line v(0,t ) = at,P2H(t)= [I,1,... ,I]
IEE Proc.-Control Theory Appl., Vol. 144, No. 1, January 1997 91
a For leakage-free noninductive cable G = 0, L = 0,
a:P2 = [ I , o , .. . ,o]= ai (50) eqns. 38 and 40 are reduced to the following forms
at = [I,0 , . . . , I ] P - ~
= aiPp2 (50a) Ri = - ~ L J / ~ x (58)
Applying the Haar transform to eqn. 38 at the driving
point, namely x = 0 d2v/dx2= RCdv/dt (59)
Eqn. 59 is known as a diffusion equation. It is well
di(0,t)/dt = btH(t) (51) known that the diffusion of a liquid in a homogeneous
medium, the transmission of heat through a slab of
i(0,t) = dt + i(0,O) = b t P H ( t ) (52) uniform thickness and the distribution of alternating
current in a homogeneous plane conductor can all be
Substituting eqns. 49, 51 and 52 into eqn. 38 with x = described with the same form of partial differential
0, we have equations.
+
b t [ R P L I ] = a4MP2 Haar wavelets are introduced to solve these partial
differential equations.
bt = a i M ( R P +LI)-lP2 Solution: In the Haar domain, let us assume a d a t can
= m a : [ ( G / C ) P+ 1 ] 9 [ ( R / L ) +
P I]-3P (53) be expanded in a Haar series as
where the cummutative property has been applied. av/dt = at ( x ) H ( t ) (60)
Finally, we have Integrating eqn. 60 and applying the integration matrix
P of Section 2, we have
z(0,t) = m a h [ ( G / C ) P + I]i[(R/L)P
+Ilp+H(t)
where a. is defined by eqn. 50.
(54) Y(Z,t ) = at
si H ( t ) d t = atPPH(t)
Entering eqns. 60 and 61 into eqn. 59 yields,
(61)
6 05-
Q
0 04-
c
? 03-
L
U 02- --
0 11 where erfc (.) denotes the complementary error func-
0 5 10 15 20 25 tion.
time,ms The Haar solution and the Fourier solution have
Fig. 14 Huur and Bessel solutions of transmission line current been drawn together in Fig. 15 for comparison. It
shows that the Haar approach provides excellent
results in numerical evaluation, even if a small number
Example 3: Consider a unit step voltage is applied to a m is used. In both examples, we let m = 16. The evalu-
leakage-free noninductive cable. The voltage v(x, t ) and ated curves will be closer and closer to the real values,
the current i(x, t ) are required to be found. if a larger m is assigned.
92 IEE Proc -Control Theory A p p l , Vol 144, No I , January 1997
9 DAUBECHIES, I.: ‘The wavelet transform, time-frequency local-
ization and signal analysis’, ZEEE Trans. Znfor. Theory, 1990, 36,
0.61 pp. 961-1005
10 STRANG, G.: ‘Wavelet transforms versus Fourier transforms’.
Research notes, MIT, 1992, pp. 1-18
11 STRANG, G.: ‘Wavelet and dilation equations a brief introduc-
“1y
tion’, S I A M Rev.,1989, 31, pp. 614-627
12 PENTHLAND, A.P.: ‘Interpolation using wavelet bases’, IEEE
Trans. Pattern Analysis & Machine Intelligence, 1994, 16, (4), pp.
410414
13 REGALIA, P.A., and MITRA, S.K.: ‘Kronecker products, uni-
, , , , tary matrices and signal processing applications’, S I A M Rev.,
0.1
0’
0 0.1 0.2 0.3 0.4 0.5
2
0.6 0.7 0.8 0.9
- 1.0
1989, 31, (4), pp. 586-613
14 BARTLS, R.H., and STEWART, G.W.: ‘Solution of the matrix
AX + XB = C’, Commun. A C M , 1972, 15,
15 HSIAO, C.H.: ‘The design and manufacturing of a secant correc-
tor for some tracking equipments’. Third conference on Science
time,lt/x RC is normalised t o 1 and technology of national defense, Chung Cheng Institute of Sci-
Fig. 15 Haar and erfc solutions of transmission line problem ence and Technology, Tao-Yuan, Taiwan, ROC, 15 October
1994, pp. 951-957
16 VIADYANATHAN, P.P.: ‘Multirate system and filter banks’
5 Conclusions (Prentice-Hall, Englewood cliffs, NJ, 1993)
17 CHANG, F.Y.: ‘Waveform relaxation analysis of RLCG trans-
mission lines’, IEEE Trans. Circuits Syst., 1990, 37, pp, 1 3 9 4
The Haar wavelet orthogonal functions and their inte- 1415
gration matrices have been introduced to solve the 18 CHANG, F.Y.: ‘Transient analysis of lossy transmission lines
lumped and the distributed-parameter systems. For the with arbitrary initial potential and current distributions’, , 1992,
39. DV. 180-198
lumped case, the Kronecker product with some existing 19 CHENG, D.K.: ‘Analysis of linear systems’ (Addison-Wesley,
subroutines may be applied to solve for F in eqn. 34. New York, 1961)
For the distributed case, the involved equations are
usually irrational and solved by the transform method 8 Appendix: Algorithms to solve eqn. 34
followed by the classic approach. The universal tool is Eqn. 34 is given as
the operational matrix P for the integrals of the Haar
wavelets, which is positive definite for any order of m. F - A F P = GI (72)
Therefore, its inverse and square root exist. where the unknown n x m matrix F is required to be
The theoretical elegance of the Haar approach can be solved. As we explained before, either the Kronecker
appreciated from the simple mathematical relations and product or the subroutine lyap (A-’, --P, A-’G1) may be
their compact derivations and proofs. The accurate and applied to evaluate F. Studying the subroutine Zyap in
fast capabilities of the method have been demonstrated MATLAB, we find it is also based on the Kronecker
with numerical examples. Among the well known product. As shown in eqn. 35, A 0 Pt is dimensioned
wavelets, the Haar wavelet is the simplest one. This as nm x nm square matrix. When m or n, or the prod-
new approach, formulated for the Haar wavelet, can uct nm is large, the calculation of the inverse of an nm-
also be extended to other wavelets. Compared with the square matrix is a big task even for the modern com-
Fourier method, the Haar wavelet approach apparently puters.
has two advantages: (i) it is particularly suitable for In this Appendix, we are trying to take advantage of
analysing systems involving abruptly varying functions, using the particular property of P to avoid the inver-
and (ii) it is a computer-oriented method, because no sion of a big nm-square matrix directly.
imaginary numbers are involved in the calculation. As shown in eqn. 24, the m-square matrix P, may be
divided in four submatrices.
6 Acknowledgment
+ A3Gbm/2Pcm/2 (S4)
A3 = [I +(A~/vI)~]-'A~ (85)
The above steps can be repeated with the following
recursive formulae:
Fb(2m/2c) = G b ( 2 m / z 2 )f A z F ~ ( 2 m / Z ~ ) P b ( 2 m / 2 ~ )
2 = 1 , z . . . , ( J - 1) (86)