Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

CONVOLUTION: Digital Signal Processing: National Semiconductor Application Note 237 January 1980

Download as pdf or txt
Download as pdf or txt
You are on page 1of 8

CONVOLUTION: Digital Signal Processing

National Semiconductor
CONVOLUTION: Digital Application Note 237
Signal Processing January 1980

Introduction
As digital signal processing continues to emerge as a major Decreasing the pulse width while increasing the pulse
discipline in the field of electrical engineering, an even height to allow the area under the pulse to remain constant,
greater demand has evolved to understand the basic theo- Figure 1c , shows from eq(1) and eq(2) the bandwidth or
retical concepts involved in the development of varied and spectral-frequency content of the pulse to have increased,
diverse signal processing systems. The most fundamental Figure 1d .
concepts employed are (not necessarily listed in the order Further altering the pulse to that of Figure 1e provides for an
of importance) the sampling theorem [1] , Fourier transforms even broader bandwidth, Figure 1f . If the pulse is finally al-
[2] [3] , convolution, covariance, etc.
tered to the limit, i.e., the pulsewidth being infinitely narrow
The intent of this article will be to address the concept of and its amplitude adjusted to still maintain an area of unity
convolution and to present it in an introductory manner under the pulse, it is found in 1g and 1h the unit impulse
hopefully easily understood by those entering the field of produces a constant, or ‘‘flat’’ spectrum equal to 1 at all
digital signal processing. frequencies. Note that if AT e 1 (unit area), we get, by defini-
It may be appropriate to note that this article is Part II (Part I tion, the unit impulse function in time.
is titled ‘‘An Introduction to the Sampling Theorem’’) of a Since this time function contains equal frequency compo-
series of articles to be written that deal with the fundamental nents at all frequencies, applying it or a good approximation
concepts of digital signal processing. of it to the input of a linear network would be the equivalent
Let us proceed . . . . of simultaneously impressing upon the system an array of
oscillators inclusive of all possible frequencies, all of equal
Part II Convolution amplitude and phase. The frequencies could thus be deter-
Perhaps the easiest way to understand the concept of con- mined from this one input time function. Again, variations in
volution would be an approach that initially clarifies a sub- amplitude and phase at the system output would be due to
ject relating to the frequency spectrum of linear networks. the system itself.
Determining the frequency spectrum or frequency transfer Empirically speaking the frequency spectrum or the network
function of a linear network provides one with the knowl- frequency transfer function can thus be determined by ap-
edge of how a network will respond to or alter an input plying an impulse at the input and using, for example, a
signal. Conventional methods used to determine this entail spectrum analyzer at the network output. At this point, it is
the use of spectrum analyzers which use either sweep gen- important to emphasize that the above discussion holds
erators or variable-frequency oscillators to impress upon a true for only linear networks or systems since the superposi-
network all possible frequencies of equal amplitude and tion principle (The response to a sum of excitations is equal
equal phase. to the sum of the responses to the excitations acting sepa-
The response of a network to all frequencies can thus be rately), and its analytical techniques break down in non-lin-
determined. Any amplitude and phase variations at the out- ear networks.
put of a network are due to the network itself and as a result Since an impulse response provides information of a net-
define the frequency transfer function. work frequency spectrum or transfer function, it additionally
Another means of obtaining this same information would be provides a means of determining the network response to
to apply an impulse function to the input of a network and any other time function input. This will become evident in
then analyze the network impulse-response for its spectual- the following development.
frequency content. Comparison of the network-frequency If the input to a network, Figure 2 , having a transfer function
transfer function obtained by the two techniques would yield H(0) is an impulse function e(t) at t e 0, its Fourier transform
the same information. using eq(1) can be found to be F(0) e 1.
This is found to be easily understood (without elaborate ex- The output of the network G(0) is therefore
perimentation) if the implications of the impulse function are
initially clarified. G(0) e H(0) # F(0)
If the pulse of Figure 1a is examined, using the Fourier inte- G(0) e H(0)
gral, its frequency spectrum is found to be
The inverse transform is
%
F(0) e
# b%
f(t) f bj0t dt (1) g(t) e h(t)
and h(T) is defined as the impulse response of the network
T/2 as a result of being excited by a unit impulse time function at
e
# b T/2
A f bj0t dt (2) t e 0.
Extending this train of thought further, the response of a
0T network to any input excitation can be determined using the

F(0) e AT
sin
#2J same technique.

0T
% #2J –
AN-237

as shown in Figure 1b .

C1995 National Semiconductor Corporation TL/H/5621 RRD-B30M115/Printed in U. S. A.


TL/H/5621 – 1
FIGURE 1. Development of a unit impulse;
(a) (c) (e) (g) its time function
(b) (d) (f) (h) its frequency spectrum

Hence, finding the Fourier transform of the input excitation, As a proof using eq(1) let
F(0), multiplying it by the transfer function transform H(0)
% t

Ð ( # Ð# (
(or the transform of time domain network impulse response) F f(t) * h(t) e f b j0t f(u) h(t b u) du dt (5)
and inverse transforming to find the output g(t) as a function 0 0
of time.
Defined by the shifted step function
By definition the convolution integral1
u(t b u) e 1 for u s t (6a)
t
f(t) * h(t) e
# 0
f(u) h(t b u) du (3) and

u(t b u) e 0 for u l t (6b)


(where * denotes the convolution operation, h(t) denotes
the impulse response function described above and both f(t) Footnote:
and h(t) are zero for tk0. Note that the meaning of the 1. It is important to note that the convolution integral is com-
variables t and u will be clarified, later in the article) makes mutative. This implies the reversability of the f(t) and h(t)
the same claim but in the realm of the time domain alone. terms in the definition.
If this is true then the Fourier transform of the convolution %
integral eq(3) should have the following equivalence b g(t) e
# b%
f(u) h(t b u) du e Fb1 [F(0) # H(0)]

Ð # f(u) h(t (
%
F
0
b u) du e F(0) # H(0) (4)
# b%
f(t b u) h(u) du e Fb1 [H(0) # F(0)]

2
put excitation function, multiplying the two transforms and
finally computing the inverse FFT of the product.
Moving averages and smoothing operations can further be
TL/H/5621 – 2
characterized as lowpass filtering functions and can addi-
tionally be implemented using convolution. The above are
H(0) e Ha(0) # Hb(0)
just a few of the many operations convolution performs and
G(0)
e H(0) the remainder of this discussion will focus on how convolu-
F(0)
tion is realized.
FIGURE 2. Block diagram of a network transfer function To start with, an illustrative analysis will be performed as-
suming continuous functions followed by one performed in
the following identity can be made discrete form similar to that realized in computer aided sam-
t %

# #
pled-data systems techniques.
f(u) h(t b u) du e f(u) h(t b u) u(t b u) du (7)
0 0 As an example, if it were desired to determine the response
of a network to the excitation pulse f(t) shown in Figure 3a ,
Rewriting eq(5) as
knowing the network impulse he(t), Figure 3b , the impulse
% % response of an RC network, would allow one to determine
F[f(t) * h(t)] e
# 0
f b j0t
#
0
f(u) h(t b u) u(t b u) dudt (8) the output g(t) using the convolution integral, eq(3).
The convolution of f(t) and he(t)
and letting x e t b u so that
f(t) e 10[u(t)b(u(tbTo)] (13)
f bj0t e f bj0(x a u) (9) he(t) e f bat

eq(8) finally becomes could be obtained by first substituting the dummy variable
% % t b u for t in he(t) so that
F[f(t) * h(t)] e
# # f(u) h(x) u(x)
0 0
f b j0tf b j0x dudx
he(tb u) e f ba(tb u) (15)
% %
e
# h(x) u(x) *f dx #
0
b j0x
0
f(u) f bj0u du By definition g(t) e f(t) * he(t) thus becomes
t t
F[f(t)*h(t)] e H(0) # F(0) (10)
# f(u)h (t
0
e b u)du e
# 10[u(t)
0
b u(t b To)]f b a(t b u) du (16)

which is the equivalent of eq(4).


In essence the above proof describes one of the most im-
portant and powerful tools used in signal processing . . . .
the convolution theorm. In words,
Convolution Theorem:
The convolution theorem allows one to mathemati-
cally convolve in the time domain by simply multi-
plying in the frequency domain. That is, if f(t) has
the Fourier transform F(0) and x(t) has the Fourier TL/H/5621 – 3
transform X(0), then the convolution f(t) * x(t) has
the Fourier transform F(0) # X(0). f(t) e 10[u(t) b u(t b To)]
(a)
For the time convolution
f(t) * x(t) wx F(0) # X(0) (11)
and the dual frequency convolution is
f(t) # x(t) wx F(0) * X(0) (12)
Convolutions are fundamental to time series sampled data
analysis. First of all, as described earlier all linear networks
can be completely characterized by their impulse response
functions and furthermore the response to any input is given
by its (the input function) convolution with the network im-
pulse response function. Digit filters being linear systems TL/H/5621 – 4
accomplish the filtering task using convolutions. A network
or filter transfer function for example can be represented by he(t) e f bat

its inpulse response in the form of a Fourier series. A filtered (b)


input excitation response can then be found by convolving
FIGURE 3. (a) rectangular pulse excitation
the input time function with the network Fourier series or
(b) impulse response of a single RC network
impulse response. With the aid of a high speed computer
the same result could be obtained by storing the FFT (Fast
Fourier Transform) of the network impulse response into
memory, performing an FFT on the sampled continuous in-

3
TL/H/5621 – 5
(c)

FIGURE 3. (c) output or convolution of the network (b) excited by (a)

Since the piecewise nature of the excitation makes it conve- defines the graphical procedure. Using the same example
nient to calculate the response in corresponding pieces the depicted in Figure 3 the excitation and impulse response
output is found to be functions replaced with the dummy variable is defined as
past data or historical information to be used in a convolu-
tion process. Thus
0 k t s To
t

#
f(u) e 10[u(u)bu(u bTo)] (19)
g(t) e f(t) he(t) e 10f ba(t b u) du
0
and
e 10(1 b f b at) (17)
he(u) e f b au (20)
t t To
are shown in Figure 4a and b . Figure 4c, he(b u), represents
To

#
the impulse response folded over [mirror image of he(u)]
g(t) e f(t)*he(t) e 10f ba(t b u) du
0 about the ordinate and Figure 4d , he(tb u), is simply the
function he(b u) time shifted by the quantity t.
e 10f b at (f a uo b 1) (18)
Evaluation of the convolution integral is performed by multi-
plying f(u) by each incremental shift in he(tb u). It is under-
The output response g(t) is plotted in Figure 3c and is clear- stood in Figure 4e that a negative value of bt produces no
ly what might be expected from a simple RC network excit- output. For t l O however as the present time t varies, the
ed by a rectangular pulse. impulse response he(tb u) scans the excitation function f(u),
Though simplistic in its nature, the analysis of the above always producing a weighted sum of past inputs and weigh-
example quickly becomes unrealistically cumbersome when ing most heavily those values of f(u) closet to the present.
complex excitation and impulse response functions are As seen in Figures 4e through 4n , the response or output of
used. Turning to a numerical evaluation of the convolution the network at anytime t is the integral of the functions or
integral may perhaps be the most desirable method of real- calculated shaded area under the curves. In terms of the
ization. Prior to a numerical development however, an intui- superposition principle the filter response g(t) may be inter-
tive graphical illustration of convolution will be presented preted as being the weighted superposition of past input f(u)
which should make discrete numeric convolution easily un- values weighted or multiplied by he(tb u).
derstood. An extension of the continuous convolution to its numerical
The convolution integral Ð discrete form is made and shown in Figure 5 . Again the
excitation and impulse response of Figure 3 are used and
t are further represented as two finite duration sequences f(n)
# 0
f(u) he(t b u) du
IMPULSE RESPONSE EXCITATION

TL/H/5621 – 6
FIGURE 4. a) he(u): network impulse response
b) f(u): excitation function

4
TL/H/5621 – 7
FIGURE 4. cont’d c) he(b u): he(u) folded about the ordinate
d) he(tb u): he(r) folded and shifted
e) through n) the output response g(t) of the network whose
impulse response he(u) is excited by a function f(u).
Or the convolution, f(u)*he(t), of f(t) with he(t).

5
IMPULSE RESPONSE EXCITATION

TL/H/5621 – 8
FIGURE 5. Illustrative description of discrete convolution

and he(n) respectively, Figures 5a and b . If f(n) and he(n) were next considered to be periodic se-
It is observed additionally that the duration of f(n) is Na e 7 quences and a convolution was desired using either shifting
samples [f(n) is nonzero for the interval 0 s n s Na b1 and techniques or performing an FFT on the excitation and im-
the duration of he(n) is Nb e 8 samples [he(n) is nonzero for pulse response sequences and finally inverse FFT trans-
the interval 0 s n s Nb b1]. The sequence g(n), a discrete forming to achieve the output response, some care must be
convolution, can thus be defined as taken when preparing the convolving sequences. From Fig-
n ure 5h it is observed that the convolution is completed in a

& f(x) h (n
Na a Nbb1 point sequence. To acquire the nonoverlapping
g(n) e e b x) (21)
or nondistorted periodic sequence of Figure 6c the convolu-
xe0 tion thus requires f(n) and he(n) to be Na a Nbb1 point se-
having a finite duration sequence of Na a Nbb1 samples, quences. This is achieved by appending the appropriate
Figure 5h . The convolution using numerical integration (area number of zero valued samples, also known as zero filling,
under the curve) can be defined as to f(n) and he(n) to make them both Na a Nbb1 point se-
n
quences. The undistorted and correct convolution can now
g(n)T e T
& f(x) h (n
xe0
e b x) (22) be performed using the zero filled sequences Figure 6a and
6b to achieve 6c .
where T is the sampling interval used to obtain the sampled
data sequences.

6
TL/H/5621 – 9
FIGURE 6. Linear periodic discrete convolution of f(n) and he(n), f(n)*he(n).
A Final Note
This article attempted to simplify the not-so-obvious con- Finally, two examples of discrete convolution were present-
cept of convolution by first developing the readers knowl- ed. The first example dealt with finite duration sequences
edge and feel for the implications of the impulse function and the second dealt with periodic sequences. Additionally,
and its effect upon linear networks. This was followed by a precautions in the selection on n-point sequences was dis-
short discussion of network transfer functions and their rela- cussed in the second example to alleviate distorting or
tive spectrum. Having set the stage, the convolution integral spectually overlapping the excitation and impulse response
and therorem were introduced and supported with an ana- functions during the convolution process.
lytical and illustrative example. This example showed how
the response of a simple RC network excited by a rectangu-
lar pulse could be determined using the convolution integral.

7
CONVOLUTION: Digital Signal Processing
Appendix A
1. Carson Chen, An Introduction to the Sampling Theorem, 12. S. A. Tretter, Introduction to Discrete-Time Signal Pro-
National Semiconductor Corporation. cessing, John-Wiley, 1976.
2. A. Papoulis, The Fourier Integral and Its Applications, 13. A. Papoulis, Signal Analysis, McGraw-Hill, 1977.
McGraw-Hill, 1962. 14. M. Schwartz, L. Shaw, Signal Processing: Discrete,
3. E. O. Brigham, The Fast Fourier Transform, Prentice-Hall, Spectral Analysis, Detection, and Estimation, McGraw-
1979. Hill, 1975.
4. L. Enochson, R. K. Otnes, Applied Time Series Analysis, 15. W. D. Stanley, Digital Signal Processing, 1975.
John Wiley, 1978. 16. D. F. Tuttle, Jr., Circuits, McGraw-Hill, 1977.
5. B. Gold, C. M. Rader, Digital Processing of Signals, 17. R. C. Agawal, C. S. Burrus, Number Theoretical Trans-
McGraw-Hill, 1969. forms to Implement Fast Digital Convolution, Proc.
6. F. F. Kuo, Network Analysis and Synthesis, John Wiley, IEEE, Vol. 63, pp. 550 – 560, April 1975.
1966. 18. J. W. Cooley, P. A. W. Lewis, P. D. Welch, Application of
7. R. W. Hamming, Digital Filters, Prentice-Hall, 1977. the Fast Fourier Transform to Computation of Fourier
8. B. Gold, L. R. Rabiner, Theory and Application of Digital Integrals, Fourier Series, and Convolution Integrals,
Signal Processing, Prentice-Hall, 1975. IEEE Trans, Audio Electroaccoustics, Vo. Au-15, pp.
79 – 84, June 1967.
9. M. Schwartz, Information Transmission, Modulation, and
Noise, McGraw-Hill, 1970. Acknowledgements
10. S. D. Stearns, Digital Signal Analysis, Haysen, 1975. The author wishes to thank James Moyer and Barry Siegel
11. E. Kreyszig, Advanced Engineering Mathematics, John- for their guidance and constructive criticisms.
Wiley, 1979.

LIFE SUPPORT POLICY

NATIONAL’S PRODUCTS ARE NOT AUTHORIZED FOR USE AS CRITICAL COMPONENTS IN LIFE SUPPORT
DEVICES OR SYSTEMS WITHOUT THE EXPRESS WRITTEN APPROVAL OF THE PRESIDENT OF NATIONAL
SEMICONDUCTOR CORPORATION. As used herein:

1. Life support devices or systems are devices or 2. A critical component is any component of a life
systems which, (a) are intended for surgical implant support device or system whose failure to perform can
into the body, or (b) support or sustain life, and whose be reasonably expected to cause the failure of the life
failure to perform, when properly used in accordance support device or system, or to affect its safety or
with instructions for use provided in the labeling, can effectiveness.
be reasonably expected to result in a significant injury
to the user.

National Semiconductor National Semiconductor National Semiconductor National Semiconductor


AN-237

Corporation Europe Hong Kong Ltd. Japan Ltd.


1111 West Bardin Road Fax: (a49) 0-180-530 85 86 13th Floor, Straight Block, Tel: 81-043-299-2309
Arlington, TX 76017 Email: cnjwge @ tevm2.nsc.com Ocean Centre, 5 Canton Rd. Fax: 81-043-299-2408
Tel: 1(800) 272-9959 Deutsch Tel: (a49) 0-180-530 85 85 Tsimshatsui, Kowloon
Fax: 1(800) 737-7018 English Tel: (a49) 0-180-532 78 32 Hong Kong
Fran3ais Tel: (a49) 0-180-532 93 58 Tel: (852) 2737-1600
Italiano Tel: (a49) 0-180-534 16 80 Fax: (852) 2736-9960

National does not assume any responsibility for use of any circuitry described, no circuit patent licenses are implied and National reserves the right at any time without notice to change said circuitry and specifications.

You might also like