Академический Документы
Профессиональный Документы
Культура Документы
ASSP-22,
NO.
Fast One-Dimensional
Digital Convolution
by Multidimensional
Techniques
1 , FEBRUARY 1974
for doing fast digital convolution. The caseof sequences of different lengths and the case where only
part of the output sequence is desired are covered as
special cases ofthe general problem.
II. Two-Dimensional Convolution Based on Overlap-Save
h(n) * x@) = y ( n ) .
This is defined by
N
(1)
-1
Abstract-Thispaperpresents
two formulations of multiy ( n )=
h(n - 4)x ( q )
dimensional digital signals from one-dimensional digital signals
q =o
so thatmultidimensional convolution willimplement onedimensional convolution of the originalsignals.This has ren = O , l , * . * N -1
ducedanimportantwordlengthrestrictionwhen
used with
the Fermat number transform. The formulation is very general where h(n) and x(n) are periodically extended
and includes block processing and sectioning as special cases their original domains of definition (or their
and, when used with various fast algorithms for short length evaluated modulo N ) .
convolutions, results in improved multiplicationefficiency.
(2)
outside
indices
I. Introduction
There are several advantages to formulating a onedimensional digital convolution as a two- or higher
dimensional problem. The first involves the Mersenne
and Fermat number transforms which have recently
been defined [l], [2] and which seem to have some
advantages over the discrete Fourier transform (DFT)
for implementing convolution on a digital computer.
They can be computationally faster thanthe fast
Fourier transform (FFT) implementation of the DFT
and result in no roundoff error. These transforms
have one limitation: the number of bits required for
each word in an implementation is proportional to
the length of the sequences t o be convolved [ 11 , [ 21.
It is the purpose of this paper to present a scheme
whereby long sequences can be convolved by a twodimensional convolution as mentioned by Rader [l] .
This two-dimensional convolution can be implemented by a twodimensional transform to allow a
high-speed error-free convolution with the word
length proportional t o the square root of the length
of the sequences.
This formulation also allowsuseofspecial
short
convolution algorithms similar to those proposed by
Pitassi [7] , Rayner [SI , Davis [9], and Allwright
[lo]. These can be extended and combined with
others to provide a very general and versatile format
= LM.
(3)
k , l = O , l , * - . L -1
n=l+mLl{
q = k + pp ,Lm = O , l , - - - M -
M-1
y ( +
~ mL) =
h ( l + mL - k
PL) x(k + p ~ ) .
k = O p=O
(4)
Define now a twodimensional L X M array 8 from
the original length N = LM signal, x(n), by
2(~
rn),= x ( j + m L )
(5)
ii(~,m ) = h ( l + mL)
(6)
?(Z,
M -1
L-1
p=O
k=O
m )=
k ( l -k , m - p ) 8 ( k , p ) (7)
5:
AND SIGNAL
PROCESSING,
FEBRUARY
1974
A
.&=
h(N - L + 1)
h(N - 2L + 1)
h ( N - 1)
h(L - 1)
h(0)
h ( L )*
h(1)
h ( L + 1)
h(L - 1)
h(N - L )
h ( N - 1)
(9)
If twodimensional cyclic convolution is carried out
we have
jL?j*$
(10)
5:
8(1,m )
T { 2 }= F ( j , k ) =
m=O
a;k
(11)
-m k
(12)
Z=O
M-1
2L-I
k=O
j=O
. F ( j , k ) a;:
aM
where aM is of an order M (i.e., M is the least positive integer such that (aM ) M = 1[2] ). Applying the
transform to (10) it can be shown that
I :
T{$?)=T{?j}T{2}
5:
x= x ( L - 1)
0
x ( N - 1)
(8)
(13)
@=T- [T{.&}T{$}].
(14)
= e-i2niM*
BURRUS:
AGARWAL AND CONVOLUTION
ONE-DIMENSIONAL
DIGITAL
e,
TABLEI
Sequence Length Restrictions for One- and Two-Dimensional
Implementation o f Noncyclic Convolution by the
Fermat Number Transform
Word Length Transform Maximum Sequence Length-N/2
1-D
2-0
Basis a
(Bits)
16
16
256
1024
32
16
32
1024
32
4096
64
32
64
2
4096
64
16
128
384
64
Jz
Jz
(15)
and with similar definitions for and and after augmentation t o prevent aliasing, ( 2 ) would become a
three-dimensional convolution.
We would then have onedimensional cyclic convolution of N-length sequences being carried out by threedimensional cyclic convolution with dimensions of
lengths 2L, 2M,and P . Use of orders higher than two
does not seem needed with the Fermat number transform at this time, but willbe exploited with other
schemes in the nextsections.
Stillanother variation would apply tothe case
where the filter is periodically time-varying. This,
when converted to a two-dimensional problem with
L equal the period of the filter, becomes timeinvariant along one dimension, m, and time-varying
along the other, 1 [ 5 ] . The DFT or Fermat transform
could be applied to the two-dimensional signal along
the time-invariant dimension and either direct calculation or another type transform applied to the other
dimension.
The inverse of the above problem can be considered
where one wishes to implement two-dimensional con-
V. M-Dimensional Convolution
W O
+h
g1
= hO@O -
g2
(h,
-lbl
x1 )
(20)
+ ho 1x0.
- -
Y(Z,m , p , - .. ) = c
1
cc
1
k=O j=O
-g(l--k , m
and
? cyclic convolu-
g=O
3M.
(22)
j , p - g , - . . ) z ( k , j , 4,.. ) (18)
for I, m , p , . . . = 0 , l .
Both .?? and are Md@ensional with each dimension of length two and H is also Mdimensional but
must be defined with dimensions of length three in
order to carry out (18). This is the same as was reR
quired in two dimensions where H was defined in (9).
Since the original convolution in (2) was defined as
cyclic, the convolution a l o g the last dimension in
(18) is also cyclic so that H need not be extended
along that dimension but can be evaluated for thisindex modulo 2.
This is an extremely general and versatile formulation for the original problem that can be used to improve computational efficiency. The convolution
along each dimension of length two can be written in
terms of scalar variables as
(x0 +
x1 )
X1
to give
Yo = f o
Y1
=fo
+ fl
- f l
which becomes
and because of its structure the operator is called a
constant diagonal convolution matrix. This requires
2 N - 1 values of h ( n ) from n = - N + 1 to n = N - 1
and N values of x ( n ) t o give N value of y(n).
The same approach that wasused for cyclic convolution is applicable here except the reduction described in (23) and (24) does not work since the Mdimensional formulation of (18)isnolonger cyclic
along any dimension. Therefore the number of multiplications necessary to implement a length-N constant
diagonal convolution is
F=3M
(27)
which is the same as obtained by Allwright [lo], using a matrix factorization approach.
Note that cyclic convolution in (2) can be viewed as
a special
case
of constant diagonal convolution.
Causal noncyclic convolution where h ( n ) is zero for
y1 < 0 is also a special case.
so = R o &
s1 =
$12,
+R-, x 1
+ 8, G I .
A
(32)
F=3M
(33)
which is the same as for the length-N constant diagonal convolution with a length-N output.
VII. Multidimensional Convolution Based on Overlap-Add
Another two-dimensional formulation canbe developed that is a generalization o,f the overlap-add algorithm [ 31 , [ 41 . In (7) the H function was augmented so that the desirehd output y(n) is in block?
Lh2 hl h o l Lx2-l L Y 2 1
that are the columns of Y.* For this formulation H
The most common form of convolution desired is will not be augmented but Y will be and the desired
causal noncyclic convolution where all of the output y(n) will e! obtained by adding the overlapped colsequence is obtainedratherthan
only the first N umns of Y. This formulation isbased on noncyclic
points as in (28).Forthis
case two length-N se- convolution given by
quences are convolved to give a length-(2N - 1)output. The transmission matrix formulation forN = 3 is
(34)
where h ( n ) and x ( n ) are sequences of length N and
y ( n ) of length 2N - 1 and all are defined to be zero
outside these lengths. The transmission matrix formuY3
lation for N = 3 is given by (29).
iY4i .
Using a similar factoring of N and change of variables
as was done in (3) and (5) we have (34)
To apply the results from cyclic convolution, all sebecoming
quences are extended with zeros t o length 2N. Cyclic
convolution then gives the desired output of (29)
and uses
p=O
k=O
F ~ 2 . 3 ~
(30)
multiplications.
A further reduction is possible by recognizing that
along the last dimension only one multiplication is
necessary ratherthantwoforthe
cyclic case that
gave (25) or three for the constant
diagonal noncyclic
case that gave (27). Consider the (M + 1)dimensional
convolution of (18)from the extended sequenceswith
all indices except the last one held constant. The resulting length-two scalar convolution is
Z=0,1;--2L-
m = 0 , 1 , - . . 2 M - 2.
(35)
IEEE TRANSACTIONS
ON
rn) + ?(I + L , rn - 1)
ACOUSTICS, SPEECH,
SIGNAL
AND
(36)
Y4 =
YZl
+Yo2
N
for
Ys =
I=O,l,-..L- 1
Y6 =
rn=0,1,-..2M- 1
and ?(Z,
YlZ
N
YZZ.
(41)
Along each dimension of (39) the matrix formulation of the length-two convolution is
I = 0 7 1 , * * * 2 L2rn=0,1;..2M-
(37)
2.
X(Z,rn,p,...)=x(Z+2rn+4p+...)
~ ( I , m , p ; . . ) = h ( Z + 2 m + 4 p + . - . ) (38)
(34) becomes
m
Y(I,rn,p,*..)=
Y 1 = ( h o +hl)@O+ x 1 ) - Yo - Y 1
Yz = hl x1
k, m - j,p
4,. .
(44)
. * *
k = O j = O g=O
-
Yo = ho x0
F=3M
E
.f i ( 2
)z(k,
j , 4,..
) (39)
Two modifications of the usual formulation of convolution are often desired. The first occurs when the
two sequences are significantly different in lengths
and the second whenone desires only a portion of the
output rather than all of it. Both cases can be formulated in terms of multidimensional convolutions and
computational savings can be realized.
If the h ( n ) is assumed to be the shorter sequence
and if its length can be expressed as L = 2' the length
of the longer sequence x ( n ) will be expressed as R =
Y(n)2' . M . It may be necessary to add zeros to both x
An example g r N = 4 would havea two-dimensional and h. The multidimensional signals are formed t o
three X three Y
give S length-two dimensions and the last dimension
r
1
of length MAIf rn is the index for thelength-M dimension, then H is formulated to be zero for all rn other
Yo0
Yo1
Yo2
Y = l Y l o Yl Y 1 Z
than m = 0. Therefore, if the fast algorithm of (20)
or (43) isusedalong the S length-two dimensions,
L Y Z O Y Z l YZZ]
there will be only M multiplications required along
the M dimension. The total number of multiplicaand y(n) would be found by
tions is then
N
Yo = Y o 0
F = 3' . M.
Y1 = L o
Yz = Y z o + Y o 1
N
Y3 =
Y11
(45)
E-DIMENSIONAL
BURRUS:
AGARWAL AND
DIGITAL CONVOLUTION
volution is desired, then a similar saving can be obtained. Assume that both h(n) and x ( n ) are of length
N = LM, witha noncyclic output y ( n ) of length
2N - 1. Out of this only a block of y ( n ) of length L
is desired. First, N extra zeros ire appended to both
the sequences and cyclic convolution of length 2 N is
formulated. This onedimensional cyclic convolution
is reformulated as a two-dimensional convolution as
in (5)-(7). The first dimension is of length L and the
convolution in this dimension is noncyclic and can be
carried out as cyclic convolution of length 2L - 1. In
the second dimension the convolution is cyclic and of
length 2M. Thetwodimensional arrays are formulated so that the des$ed length L block of y ( n ) appears as a column of Y in (6). Thus, P along the second dimension has to be computed only for one
index. This replaces cyclic convolution of length 2 M
with a summation of 2M terms along the second dimension. The desired output block can be written as
a summation of 2 M convolutions of length L, where
each convolution represents convolution of two sequences of lengths 2L - 1 and L, respectively, giving
a sequence of length L. Because zeros were appended
to both x ( n ) and h ( n ) ,out of these 2M convolutions,
between one and M convolutions woTld be nonzero,
depending on the second index of Y for which the
output is desired.
The convolutions along the first dimension of length
L can be carried out either by transform techniques
or multidimensional techniques discussed
in
this
paper. If the transform techniques are used, the
summation of convolutions can be carried out in the
transform domain, thus requiring only one inverse
transform to obtain the desired output. Rader [ll]
hasdiscussed a similar technique for the particular
case of estimation of autocorrelation function forthe
first few lagvalues. If L = 2' and the multidimensional methods are used, the number of multiplications are at most the same as given in(45).
The formulation just discussed can be extended for
the situation where sampled output is desired, sampled at every Lth value. In this case for the twodimensional formulation, the output appears as a row
of P, and as before, the twodimensional convolution
again reduces to a summation of convolutions. If the
output y ( n ) is a narrow-band signal as compared to
the sampling frequency, to reconstruct the analog signal, the samples of y ( n ) at a lower sampling rate are
sufficient. In this situation the formulation discussed
here can result in computational savings.
If a multidimensional formulation is considered, we
can obtain partial outputs as combinations of blocks
and samples.
put sequence y ( n ) also of length N . Logical convolution is defined similar to the cyclic convolution of (2),
but the addition and subtraction of indices is done
differently. All indices are represented in the binary
form as an M-bit index. When indices have to be added
or subtracted, theyare added or subtracted bit by bit,
modulo 2. Note that in logical convolution, addition
and subtraction of indices are equivalent. We can
convert this onedimensional logical convolution problem to an Mdimensional convolution as in (17) and
(18). Along any dimension, convolution appears as in
(19), but since logical convolution is desired, h(- 1)=
h(1). Therefore, if (18) is implemented as length-two
cyclic convolutions along all the dimensions, y ( n ) thus
obtained is logical convolution of x ( n ) and h ( n ) . Alternatively, if (18) is implemented as a noncyclic convolution alongall the dimensions, we obtainnoncyclic convolution of x ( n ) and h(n)as in (26).
Length-two cyclic convolution can be implemented
using just two multiplications as in (24), which is a
length-two DFT implementation. Thus (18) canbe
implemented as an Mdimension$ cyclk convolution
using Mdimensional DFT's of X and H , where each
dimension isof length two. Alternatively length-N
logical convolution can also be implemented using
length-NWalsh transforms of x ( n ) and h(n) [12]. The
preceding development shows that length-(N = 2M)
Walsh transform is equivalent to the Mdimensional
DFT. Thus the Mdimensional approach establishes
the logical convolution theorem for the Walsh transforms and it also establishes the fast Walsh transform
algorithm as an Mdimensional DFT. These facts have
been noted before in the literature.
For a particular formulation of (20), Pittasi [ 71 and
Davis [9] have shown that some of the intermediate
products correspond to multiplication of the Walsh
transforms of the twosequences.
X. Generalizations and Applications
E].
Y4
go = ho x 0
g3
= (ho + h l
1 (x0 + x1
g1 = hl x1
g4
= ( h + h2
1 (x1 "I-xz)
g2
=hzxz
g5 =(h2
+ h 0 ) @ 2 +x01
In these equations, each summation represents cyclic convolution of length 4b , which can be carried
out by Fermat transforms. Taking length 4 b Fermat
(47) transforms of all the sequences in (51), we obtain
T { P(0, I ) ) = T { A ( O ,I ) } T { 2 ( O ,I ) }
4- T { A ( - l I, ) } T { 2 ( 1 ,l ) }
Yo
=go
Y1
=g3 -
Yz
=g5
+g,
y3
=g4
Y4
=g2
go -
gl
g,
go
- g
2
+ T { a ( O ,I ) ) T { 8 ( 1 ,E ) } .
g2
(52)
r u m
-'
TABLE I1
A Comparison,of Multiplication Efficiencies for Three
Implementationsof Length-N Convolution
Fo = t N .
2
4
8
16
32
64
128
256
512
1024
If the FFTis used in anefficient way, taking advantage of the fact that the data
are real andusing a
mixed radix algorithm (2, 4, and 8), the number of
multiplications necessary per output pointcan be calculated as described by Singleton [13] and is denoted F , .
Using the Mdimensional formulation with the fast
algorithm of (33) or (44) gives for themultiplications
per output
F2
1
2N
N
14
1
2
4
8
16
32
64
128
256
512
1.5
2.25
4.12
5.06
6.03
8.01
9.00
10.00
12.00
13.00
0.75
1.12
1.70
2.53
3.80
5.70
8.54
12.81
19.22
28.83
TABLE I11
A Comparison of Multiplication Efficiencies for Three
Implementations of Block Recursive Filters of Order N
~ - 3 ~ .
4.5
2
4
8
16
32
45
64
128
58
FO
8
16
32
~64
128
256
Fl
F2
21
31
38
6.7
10.1
15.2
22.8
34.2
51.2
~~
53
XI. Conclusions
This paper has presented two formulations of convolution in terms of multidimensional convolutionone based ona generalization of the overlap-save
algorithm for sectioning and the other on the
overlapadd algorithm. The first proved to be well suited for
cyclic and constantdiagonal convolution and thesecond for noncyclic convolution. Fast algorithms were
developedbased onlength-two and -three convolution that lead to an improvement in multiplication
efficiency. Thereductioninrequired word lengths
proved to be a valuable feature when used with the
Fermat number transform. The formulation
proved
to be well suited for the special cases where unequallength sequences were convolved or where only a portion of the output was desired. It was further shown
that various mixtures of algorithms could beused
F o = 2N.
along the different dimensions to achieve certain adUsing efficient FFT algorithms, the results given by vantages or to fitparticular requirements. Finally, exthe methods in [3] are denoted F1. Using three con- amples were presented to compare the multiplication
volutions by (33) or (44) to implement the block re- efficiencies of a few implementations.
The formulation is so general that a complete and
cursive filter with the block length equal the order,
systematic
investigation of all possible applications is
gives as the multiplications per output point
difficult. The main ideas and relations to otherworks
that we know of have been presented here. The investigation of word length and storage requirements
and a more complete consideration of recursive imTable I11 compares these multiplication efficiencies plementations is still to be made.
for orders up to 128. Note the multidimensional approach is more efficient than the direct for orders
Acknowledgment
above three and more efficient than the FFT for orders up to about 256. This is yet to be explored in
The authors would like to thank R. A. Meyer for
detail.
valuable discussions.
10
IEEE TRANSACTIONS
ON
ACOUSTICS,
SPEECH,
AND SIGNAL
PROCESSING,
VOL.
ASSP-22,
References
[l] C.M. Rader Discrete convolutions via Mersenne transforms, IEdETrans.Comput.,
vol. C-21, pp.12691273, Dec. 1972.
[ 2 ] R. C. Agarwal and C. S. Burru,s,.!Fast digitalconvolutions using Fermattransforms.
In Southwestern IEEE
Con6 R e c , Houston, Tex., Apr: 1973, pp. 538-543.
[ 3 ] C. S. Burrus, Block realization of digital filters, IEEE
Trans. Audio Electroacoust., vol. AU-20, pp. 239-235,
Oct. 1972.
[4 J B. Gold and C.M. Rader, Digital Processing o f Signals.
New York: McGraw-Hill, 1969, py; 208-211.
[ 5 ] R. A. Meyer and C. S. Burrus,Certain
properties pf
periodically time-varying digitalfilters, in Southwestern
IEEE Conf. Rec., Houston, Tex., Apr. 1973, pp. 529535.
[ 6 ] D. P. MacAdam, Image restoration by constrained deconvolution, J. Opt. SOC. Amer., vol. 6O;pp. 16171627, Dec. 1970.
[ 7 ] D. A. Pitassi, Fast convolution using the Walsh trans-
[8 J
[9]
[lo]
[11 ]
[12 J
[13]
forms,in
Proc. Conf.Applicationsof
Walsh Functions, Washington, D.C., Apr. 1971, pp. 130-133.
P. J. W. Rayner, A fast cyclic convolution algorithm,
presentedatSymp.
Digital Filtering,Imperial College,
London, England, Aug. 1971.
W. F. ,Davis A class of efficient convolution algorithms, in &roc. Symp.Applications o f Walsh Functions, Washington, D.C., Mar. 1972, pp. 318-329.
J. C. Allwright, Realfactorization of noncyclic convolutionoperatorswithapplications
to fast convolution, Electron. Lett.,vol. 7, pp. 718-719, Dec. 1971.
C. M. Rader,An improvedalgorithm for high speed
to spectralestimaautocorrelationwithapplications
tion, IEEETrans.AudioElectroacoust.,
vol. AU-18,
pp. 439-441, Dec. 1970.
G. S. Robinson, Logical convolutionanddiscrete
Walsh and Fourier power spectra, IEEE Trans. Audio
Electroacoust., vol. AU-20, pp. 271-280, Oct. 1972.
R. C. Singleton, Analgorithm for computing the mixed
radix fast Fourier transform, IEEE Trans. Audio Electroacoust., vol. AU-17, pp. 93-103, June 1969.
- aly(h -
1)- a z y ( k
- 2)
- . . . - a,y(h
m)
-
n ) (1)
A frequently occurring linear data filtering applica- where u ( h ) and y ( h ) denote the values of the filters
tion occwfs whenone wishes to process a signal of the inputandoutput
signals,respectively, atthehth
form
iteration. A procedure for selecting the coefficients
aiand b iwhereby the filters gain factor-frequency beu( t ) = s( t ) + A sin wot
havior will be similar to that shown in Fig. l will be
so as t o remove the additive sinusoidal component, shortly given. One must realize, however, that since
A sin m o t , without seriously distorting the desired the filter is digital, its frequency behaviorwillbe
signal s(t). The situation in which a 60-Hz sinusoidal periodic with period 2 x / T (e.g., [l,p. 2971 ) and will
pickup corrupts a desired measurement signal nicely appear as shown in Fig. 2.
illustrates how such problems can arise in practice.
The selection of the sampling period T t o be used is
of great importancefrom a number of viewpoints.
Most importantly, it must be chosen small enough so
that little distortion results from the analog-to-digital
conversion of the desired signal s ( t ) . Quantitatively,