You are on page 1of 12

This article was downloaded by: [Fudan University]

On: 30 April 2015, At: 17:04


Publisher: Taylor & Francis
Informa Ltd Registered in England and Wales Registered Number: 1072954 Registered
office: Mortimer House, 37-41 Mortimer Street, London W1T 3JH, UK

International Journal of Mathematical


Education in Science and Technology
Publication details, including instructions for authors and
subscription information:
http://www.tandfonline.com/loi/tmes20

An introduction to Walsh functions


and their applications
a
A. C. Grove
a
Department of Mathematics, Statistics and Operational
Research , Trent Polytechnic , Nottingham, England
Published online: 09 Jul 2006.

To cite this article: A. C. Grove (1983) An introduction to Walsh functions and their applications,
International Journal of Mathematical Education in Science and Technology, 14:1, 43-53, DOI:
10.1080/0020739830140107

To link to this article: http://dx.doi.org/10.1080/0020739830140107

PLEASE SCROLL DOWN FOR ARTICLE

Taylor & Francis makes every effort to ensure the accuracy of all the information (the
“Content”) contained in the publications on our platform. However, Taylor & Francis,
our agents, and our licensors make no representations or warranties whatsoever as to
the accuracy, completeness, or suitability for any purpose of the Content. Any opinions
and views expressed in this publication are the opinions and views of the authors,
and are not the views of or endorsed by Taylor & Francis. The accuracy of the Content
should not be relied upon and should be independently verified with primary sources
of information. Taylor and Francis shall not be liable for any losses, actions, claims,
proceedings, demands, costs, expenses, damages, and other liabilities whatsoever
or howsoever caused arising directly or indirectly in connection with, in relation to or
arising out of the use of the Content.

This article may be used for research, teaching, and private study purposes. Any
substantial or systematic reproduction, redistribution, reselling, loan, sub-licensing,
systematic supply, or distribution in any form to anyone is expressly forbidden. Terms
& Conditions of access and use can be found at http://www.tandfonline.com/page/
terms-and-conditions
INT. J. MATH. EDUC. SCI. TECHNOL., 1983, VOL. 14, NO. 1, 43-53

An introduction to Walsh functions and their applications

by A. C. GROVE
Department of Mathematics, Statistics and Operational Research,
Trent Polytechnic, Nottingham, England

(Received 20 October 1981)

The interest in applying Walsh functions in electrical and electronic


engineering has resulted in a proliferation of notations and definitions. This paper
is an attempt to summarize some of the features and applications of these
functions as an aid to staff and students.
Downloaded by [Fudan University] at 17:04 30 April 2015

In 1922 J. L. Walsh [1] proposed a closed set of normal orthogonal functions.


About the same time, Rademacher [2] presented a system of functions which were
later shown to be a subset of the Walsh system. A set of functions constructed by
Haar is also a subset of the Walsh system.
The chief interest in the Walsh functions lies in their similarity to the usual sine,
cosine sets of orthogonal functions, sharing many of the familiar properties, e.g. each
function is either odd or even with respect to the mid-point of the interval, no
function vanishes identically on any sub-interval, and the entire set is uniformly
bounded.
Walsh [1] proposed the following set

4>0(x)= 1

= -1
)= 1
= -1

k= 1,2, 3,..., 2" l, « = 1 , 2 , 3 , . . ,oo

The functions are defined at points of discontinuity to have the average of the limits
approached on the two sides of the discontinuity. If it is required to develop periodic
functions then the above definitions at x = 0 and x—\ may be changed to that for
0020-739x/83/140l 0043 $03.00 © 1983 Taylor & Francis Ltd
44 A. C. Grove

points of discontinuity. The function <(> kn is odd or even with respect to the point x = \
according as k is even or odd. The functions (/>0, (j)1, (f>\, <j>\ have 0, 1, 2, 3 zeros (sign
changes) respectively interior to the interval (0,1). The function (/>£ has (2"~1 + k — 1)
zeros; a formula which holds for n = 2 and follows for the general case by induction.
Note that the zeros of these functions increase in number in exactly the same way as
the zeros of the classical sets of functions. A suitable single subscript notation for
these functions is (f>0, <j>lt <f>2, .. .,(f>r,... where r denotes the number of zeros interior
to the interval.

Theorem
Let the function F(x) be of limited variation in the interval 0 ^ # < l . Then the
series

IJo F(y)4> (y)dy


l
Downloaded by [Fudan University] at 17:04 30 April 2015

F(y)<t>Xy)dy+....
o
converges to the value F(x) at every point at which F(a + 0) = F(a — 0) and at every
point at which x = a is dyadically rational. This convergence is uniform in the
neighbourhood of x = a in each of these cases if F(x) is continuous in two intervals
extending from a, one in each direction.
Note the similarity with the more familiar Fourier series.
If in the binary expansion of #

there exists aj^0,j>n or if x is a binary irrational the following formulae hold for

00=1 </>i=(-ir

A general expression for <fyx) when x is a binary rational may be computed using the
values of (/>* for neighbouring larger and smaller values of the argument *.
Interest in the engineering applications of Walsh functions was renewed when an
article by Harmuth [3] was published in 1968. The idea that many tasks, previously
the domain of sinusoidal functions, could be replaced by a binary function which is
Walsh functions and their applications 45

Will 10 61 1

I n l 11 81
1
CnlM,6]

<;nl|9,«l 1

rnl|7,81

<-n . .^ p j

fnl (l.fll

^n | (A fl) j
Downloaded by [Fudan University] at 17:04 30 April 2015

-\ -\ -\ -\
Figure 1. Walsh functions (Harmuth).

easily manipulated and generated, was a contributing factor. Several international


conferences have since taken place, six between April 1970 and June 1973. The
ensuing interest resulting in a proliferation of notations and definitions; some of
which it is proposed to summarize.
Figure 1 shows the first eight Walsh functions for which the normalized
time 9 = t/T is the variable. The notations sal (i, 6), cal (j, 0) are used here; the letters s
and c allude to the symmetry of the functions and the letters al are derived from the
name Walsh. The functions assume the values + 1 and — 1 only—a useful feature if
circuits are to be constructed with binary digital components.
The parameter i in the functions sinHnQ, cos2in6, gives the number of
oscillations in the interval —j^0<^ (i.e. the normalized frequency i=fT). It may
also be interpreted as 'one half the number of zero crossings per unit time', the zero
crossing at 6= —\ but not that at 6= +j being counted for sine functions.
The parameter i also equals one half the number of zero crossings in the interval
—^<0<2 for Walsh functions. In contrast to sine/cosine functions, however, the
sign changes are not equidistant. If, unlike the figure, i is not an integer, then it equals
'one half the average number of zero crossings per unit time'. The term 'normalized
sequency' has been introduced for i and <f> = i/T the nonnormalized sequency.
The general form of a sine function Vsin(2nft+tx) contains the parameters
amplitude V, frequency/and phase angle a. The general form of a Walsh function

contains the parameters amplitude V, sequency (j), delay t0 and time base T. The
normalized delay, to/T, corresponds to the phase angle. The time base T is an
additional parameter and it causes a major part of the differences in the applications
of sine/cosine and Walsh functions.
So far, Walsh functions are the only known functions with desirable features
comparable to sine/cosine functions for use in communications. They are closely
related to Hadamard matrices. These matrices are orthogonal, consisting of square
46 A.C. Grove

arrays of plus and minus ones and of order 2". Generally speaking, the transition
from sine/cosine functions to other complete systems of orthogonal functions means
a transition from linear, time-invariant components and equipment to linear, time-
variable components and equipment which constitute a much larger class.
The mathematical theory of Walsh-Fourier analysis corresponds to the Fourier
analysis used for sine/cosine functions.
Sine and cosine transforms of a function F(9) are

F(6)j2sin2niidd8
00

a'c(n)= F(8)J2cos2nn6d6
J -00

The corresponding sal and cal transforms of Walsh-Fourier analysis are


Downloaded by [Fudan University] at 17:04 30 April 2015

f + CO
« c (/i)= F(
J -CO

F(9) = rCC{a
J -CO

where
and 6 =
Note that the parameter i is an integer and the functions in figure 1 are defined in a
finite interval but may be continued periodically to infinity. The functions used for
the Fourier and Walsh-Fourier transforms are defined in the infinite interval and the
parameter \x is a real variable.
The similarity of Walsh functions to sine/cosine functions may be further
extended to multiplication theorems. The product of two sine/cosine functions
always yields a sum of two functions, the lower and upper components produced by
amplitude modulation. The multiplication theorems for Walsh functions are
cal (6,0) cal (?,0) = cal{&©?",0}
sal(*,0)cal(f,0) = sal {[i©(*-1)] +1,0}
cal(ft,0)sal(*,0) = sal {[&©(£-l)] + l f 0}
sal(M)sal(?,0) = cal{(fc-l)ffi(i-l),0}
cal (0,0) = wal(O,0).
The symbol © indicates an addition modulo 2; the numbers are written in binary
form and added according to the rules 1©O = O©1 = 1, 0©0 = l © l = 0 (no carry).
This paper [3] then discusses typical applications to
(1) the design of sequency-bandpass filters in voice analysers and synthesizers,
(2) signal multiplexing,
(3) digital filtering and multiplexing,
(4) electromagnetic waves in radio communication.
Walsh function s and their applications 47

Wal (0,8! I

Wal (1,6) Said,8)


i
Wal (2.8) 1 Cain.ei

WalO.ei Sal(2,6)
1
WalH.91 I Cal(2,8l

Wal (5,6) Sall3,6)


i
Wal (6,6) i Cal (3.81

Waltte) Sal (4,8)


i
Wal (8,6)
Downloaded by [Fudan University] at 17:04 30 April 2015

Wall96) 1 Sal 15,6)


i
L_
Wal (10,61
r-i
p Call5,6)

Waim.ei 1 Sall6,6)
_i
LJ |—
Wal (12.6) n n n Cal 16,8)

1 I1 _ i •"

Wal (13,6)
~~i n n LJ[—LJ
i i—i
1 n Sal (7,6)

LJ _J LJ
WallK.ei
~i n n n n n n n Cal 17,6!

LJ LJ LJ J L LJ
Wal 115,6] nL JnL n n n n n n
J L J L J L J L J U L J
Sal (8,61

o v8 \ \ \ \ \ \ t
Figure 2. Walsh functions (Walmsley).
Walmsley [4] uses the notation wal («, 9) for the Walsh functions defined over the
unit interval, 9 = (0,1) where n, the order, is the number of zero crossings interior to
the interval or 'sequency' of the function; the first sixteen functions are shown in
figure 2. Note that functions with odd sequency are asymmetric about the point
0 = 0-5, and the remainder are symmetric about the same point. Hence the notation
sal and cal also shown in figure 2; wal (0,9) being a special case. The analogy with
Fourier series thus continues in that sal/cal functions are used in the same way that
sine/cosine functions are used in preference to the complex exponential functions.
The Rademacher functions are the more familiar square waves wal 1, 3, 7,15
referred to elsewhere as Ro, Rit R2, and R3 respectively. These Rademacher
functions may be defined by
Rn(9) = sign [sin (2n2"9)]
where
sign [/(*)]=+1 if /(*)>0
= - 1 if /(*)<0.
48 A. C. Grove

An important property of both Rademacher and Walsh functions is that the


maximum number of excursions the function may make over 6 is always restricted to
an integer power of two.
The Rademacher functions may be easily generated using a binary counter; the
remaining Walsh functions then generated using exclusive OR gates.
For example, to generate wal (K, 6)

(i) write K in binary notation


(ii) convert K to Gray code
(iii) multiply together the Rademacher functions corresponding to the appear-
ance of the 1 -bits in the Gray code expansion of K.
K=9
(i) (9) = 1 0 0 1
(ii) Gray code 1 0 0 1
Downloaded by [Fudan University] at 17:04 30 April 2015

1 1 0 1
no carry.
(iii) Compare the Rademacher functions with this code word
D D D D
rC-i K2 fit i<o

This is illustrated in figure 3.


The multiplication of the Rademacher functions may be accomplished using
exclusive OR gates. Since the wave forms are either +1 or — 1 let logic '0' represent
+ 1 and logic '1' represent — 1; then the multiplication corresponds to the exclusive
OR truth table

X +1 -1 © 0 1
+1 +1 -1 0 0 1
-1 -1 +1 1 1 0

R,(8]

R3(«)

Woi(9,ei

\> \ % \ \ \ x
Figure 3. Rademacher functions.
Walsh functions and their applications 49

The representation of a function/(0), where 0 is the normalized time t/T, by a Walsh


series follows the same pattern as for a Fourier series
i.e.

or

sal (1,0) +b2 sal (2,6) + ....


where
« 0 = \f(6)d6

«„= /(0) cal (n, 6) d6


Downloaded by [Fudan University] at 17:04 30 April 2015

bn= \ f(6) sal (n, 6) d9.

Definitions of discrete and fast Walsh transforms also follow.

The discrete Walsh transform


The Walsh functions may be written in matrix notation or defined by, a
Kronecker-ordered, Hadamard matrix of plus and minus ones; each row represent-
ing a particular Walsh function and a column the value of each function for a chosen
value of 0 interior to the interval (0,1). In the examples given these values of 0 are
chosen to avoid any discontinuities, but one author [7] suggests the use of the right-
hand limiting value at a point of discontinuity.
For example
~+l +1 +1 +1
+ 1 +1 -1 -1
+ 1 -1 -1 +1
+ 1 -1 +1 -1
i.e., the first four Walsh functions at four equidistant interior points
„ 13 5 .7

The discrete Walsh transform of a signal represented by a series of samples


contained in an array \_S\ would be

where [C] is the array of Walsh coefficients. Two examples are given in the Appendix
to illustrate this procedure. The attraction in using a Walsh transform is that the
transformation requires only addition and subtraction whereas the Fourier trans-
formation requires complex multiplications. The speed of the discrete Walsh
50 A. C. Grove
SIGNAL WALSH
SAMPLES COEFFS.
Downloaded by [Fudan University] at 17:04 30 April 2015

Figure 4. Flow diagram for discrete Walsh transform coefficients.


Time domain Walsh domain
W|f (1)1= 0-61.sal(1,6l-O-27sal 13,8)-0 05sal (5,81-0 125sal 17,8)
f[tl=sm|2rr(,()

"I
3Z. 51, K.

-005 -0-127

Fourier domain
F[0-6;sal(1,6)] Fl-0-27snll3,BI] F[-0O5sm(5,9H F[-0-125saU7.8IJ

f. - 0-137 0-0035

-0-016 •3f. —0-27 — -0-27 0031

4'.

5f. -0-16 -OH -0-01,3

V. -0-114 002 -0-016

Figure 5. Walsh-Fourier transform. F[/(t)] = 0-98sin(27t/o0-OO16sin(67i/o0 +


00039 sin (IOTT/OO+00039 sin (Hnfot).
Walsh functions and their applications 51

transform may be increased by the use of a suitable algorithm, e.g. a Cooley-Tukey


type. A typical example is shown in figure 4. The same author [5] has also described
an application in which the Walsh transform is used as an intermediate step in the
computation of the Fourier coefficients of a periodic signal; illustrated in figure 5.
A similar binary approach to the generation of the Walsh functions yn{i),
n= 1, 2, 3 , . . . is mentioned by Whelchel and Guinn [6]. These functions, shown in
figure 6, are defined over the interval (0,1) as the successive modulation in various
combinations of a set of square waves i//p(t), p = 2r, r = 0,1, 2 , . . . where p designates
the number of periods in the interval. For n = 0, I/>0(;) = 1 .
Replacing n by its equivalent binary number, the waveform of a particular Walsh
function is specified as the product of those Walsh functions represented by each ' 1 '
in its binary subscript.

n—0 Wo = Wooo
Downloaded by [Fudan University] at 17:04 30 April 2015

r=\ Wi = Woio

t = VlOO

= "Ain ="Aioo x "Aoio x "A001


i = VlOOO

These functions are simply the previous Walsh functions in a different order. A more
complete discussion of sequency-ordered, binary-ordered and Kronecker

TJUinjuTimj
Figure 6. Walsh functions (Whelchel and Guinn).
52 A. C. Grove

(Hadamard)-ordered Walsh functions and their mutual mappings is given by


Kremer [7].
In conclusion, Walsh functions can offer an alternative to the more familiar
sinusoidal functions in applications such as coding, multiplexing, signal processing,
filtering, speech analysis, spectroscopy, biological and medical systems, holography,
seismography, statistical analysis and number theory.

APPENDIX

Calculation of discrete Walsh transform by matrix methods


[C]
Downloaded by [Fudan University] at 17:04 30 April 2015

where
[C] = array of Walsh coefficients
IS] = array of signal samples
[PFn] = matrix notation of first n Walsh functions.

Ex. 1. Sampling sinf at 8 equi-spaced points in the interval 0 to 2n.

n 3n 5n In 9n lln 13n \5n


O O O O O O O

[5] = [0-3827, 0-9239, 0-9239, 0-3827, -0-3827, -0-9239, -0-9239, -0-3827]

4' 1
1
1
1
1
1
1
1
1
-1
1
-1
1
-1
1
-1
1 1 -1 -1 -1 -1 1 1
1 1 -1 -1 1 1 -1 -1
1 -1 -1 1 1 -1 -1 1
1 -1 -1 1 -1 1 1 -1
1 -1 1 -1 -1 1 -1 1
1 1 -1 1 -1 1 -1

= - [ 0 , 5-226, 0, 0, 0, -2-165, 0, 0]

« = 0-653wal(l,—)-0-271 waif 5,—


\ 271/ \ 2TC
Walsh functions and their applications 53

Ex. 2. Sampling sint at 16 equi-spaced points in the interval 0 to 271.


n 2n 5n 29n 31n

0, 10-25, 0, 0, 0, -4-246, 0, 0, 0, -0-8448, 0, 0, 0, -2-039, 0, 0]


16

sin < = 0-6406 w a l f l , — )-°' 2 654wal( 5 , —


2n 2n
V J \
-0-0528 wal( 9,-H-°" 1 2 7 5 w a l ( 1 3 >—-
\ 2nJ \ <
The resultant waveforms are shown in figure 7.
Downloaded by [Fudan University] at 17:04 30 April 2015

• 8 point function

- 16 point function

Figure 7. Walsh function representation of sin t.

References
[1] WALSH, J. L., 1923, Am, J. Math., 45, 5.
[2] RADEMACHER, H., 1922, Math. Annalen, 87, 112.
[3] HARMUTH, H. F., 1969, I.E.E.E. Spectrum (Nov.).
[4] WALMSLEY, W. M., 1974, Electronic Engn (June).
[5] WALMSLEY, W. M., and EVANS, W. A., 1973, A Walsh analyser for phase and amplitude
measurements in networks and systems. I .E.E. Conference on Digital Instrumentation,
November.
[6] WHELCHEL, J. E., and GUINN, D. F., 1968, Eascon Record, 561.
[7] KREMER, H., 1973, Representations and mutual relations of the different systems of Walsh
functions. Symposium on Theory and Applications of Walsh and other non-sinusoidal
functions. Hatfield Polytechnic, June.

You might also like