25.08.2021 Views

082-Engineering-Mathematics-Anthony-Croft-Robert-Davison-Martin-Hargreaves-James-Flint-Edisi-5-2017

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

24.15 Discrete convolution and correlation 811

of the two − 1. So in the simple example, both signals start with length 3, and after

padding they musthave a length of 3 +3−1 = 5.The padded signals are

f ′ [n] =9,−1,3,0,0

g ′ [n] = 7, 2, −4, 0, 0

The calculation of the first term in the output signal is shown graphically in Figure

24.29.

7

n = 0

0

–1

9

0

2

0

3 0

–4

Figure24.29

The padded signals f ′ [m] (inner circle)andg ′ [m] (outer

circle).

The first element ofh[n] is (9)(7) = 63. Notice how the padding is sufficient to

ensurethatallofthevaluesinthelinearconvolutioncanbeproducedwithoutoverlap.

In this position all of the other terms are multiplied by 0 and hence can be removed

from the calculation. By rotating the outer circle anticlockwise four more times the

other values can be calculated. It can be seen that this method is exactly equivalent

tocarrying out the linear convolution.

Hence wecan usethe convolution theoremon thepadded signals f ′ [n],g ′ [n]and

f ○∗ g= D −1 {D{f ′ [n]} · D{g ′ [n]}}

Thismethodissometimespreferredbecausethed.f.t.valuesofthesignalsarereadily

and quickly calculated on a computer.

The signals may be padded with additional zeros if desired with no effect on the

result. In order to optimize the computation speed for the d.f.t. it is often desirable

to use the f.f.t. algorithm mentioned earlier. One restriction of the f.f.t. is that the

numberofsamplesintheinputsignalmustbeapowerof2,soithastocontain2,4,

8,16,32,... samples.Sincepaddingispossiblewithoutaffectingtheresultthenthe

f.f.t.can be used.

As an example we consider adding reverb to a signalg[n], which is a 30 second

duration piece of music played on an electric guitar. The signalg[n] is very ‘clean’,

obtained bypluggingtheguitardirectlyintotherecording equipment. Asaresult,it

contains no reverberant room effects that would have been present if a microphone

andamplifierhadbeenusedinstead.Animpulseresponse f[n]isobtainedbybursting

a balloon in an environment to be simulated. The two signals prior to introducing

padding areshown inFigure 24.30.

The two padded Fourier transformed signals are multiplied together and the inversed.f.t.takentoproducethesignalinFigure24.31.Thesignalh[n]hasaduration

of 32 s due to the effects of linear convolution. When the signal is played through

speakersithasadistinctiveechoorreverbeffectthatisnotpresenting[n].Thereare

visible differences inthe signalifitis examined carefully.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!