Convolution
The convolution of two signals and
in
may be
denoted ``
'' and defined by

Cyclic convolution can be expressed in terms of previously defined operators as




Commutativity of Convolution
Convolution (cyclic or acyclic) is commutative, i.e.,

Proof:

In the first step we made the change of summation variable
, and in the second step, we made use of the fact
that any sum over all
terms is equivalent to a sum from 0 to
.
Convolution as a Filtering Operation
In a convolution of two signals
, where both
and
are signals of length
(real or complex), we may interpret either
or
as a filter that operates on the other signal
which is in turn interpreted as the filter's ``input signal''.7.5 Let
denote a length
signal that is interpreted
as a filter. Then given any input signal
, the filter output
signal
may be defined as the cyclic convolution of
and
:







![$ \delta\isdeftext [1,0,\ldots,0]\in{\bf R}^N$](http://www.dsprelated.com/josimages_new/mdft/img1169.png)
![$\displaystyle \delta(n) = \left\{\begin{array}{ll}
1, & n=0\;\mbox{(mod $N$)} \\ [5pt]
0, & n\ne 0\;\mbox{(mod $N$)}. \\
\end{array} \right.
$](http://www.dsprelated.com/josimages_new/mdft/img1170.png)







![$\displaystyle \delta(n) \isdef \left\{\begin{array}{ll}
1, & n=0 \\ [5pt]
0, & n\ne 0 \\
\end{array} \right.
$](http://www.dsprelated.com/josimages_new/mdft/img1172.png)
As discussed below (§7.2.7), one may embed acyclic convolution within a larger cyclic convolution. In this way, real-world systems may be simulated using fast DFT convolutions (see Appendix A for more on fast convolution algorithms).
Note that only linear, time-invariant (LTI) filters can be completely represented by their impulse response (the filter output in response to an impulse at time 0). The convolution representation of LTI digital filters is fully discussed in Book II [68] of the music signal processing book series (in which this is Book I).
Convolution Example 1: Smoothing a Rectangular Pulse
![]()
Filter
input signal ![]() ![]()
Filter impulse response ![]() ![]()
Filter output signal ![]() |
Figure 7.3 illustrates convolution of
![$\displaystyle x = [ 0, 0, 0,0,1,1,1,1,1,1,0,0,0,0]
$](http://www.dsprelated.com/josimages_new/mdft/img1176.png)
![$\displaystyle h = \left[\frac{1}{3},\frac{1}{3},\frac{1}{3},0,0,0,0,0,0,0,0,0,0,0\right]
$](http://www.dsprelated.com/josimages_new/mdft/img1177.png)
as graphed in Fig.7.3(c). In this case,

![$\displaystyle h=\left[\frac{1}{3},\frac{1}{3},0,0,0,0,0,0,0,0,0,0,\frac{1}{3}\right]
$](http://www.dsprelated.com/josimages_new/mdft/img1179.png)


Convolution Example 2: ADSR Envelope
![]() ![]()
Filter impulse response ![]() ![]()
Filter output signal ![]() |
In this example, the input signal is a sequence of two rectangular pulses, creating a piecewise constant function, depicted in Fig.7.4(a). The filter impulse response, shown in Fig.7.4(b), is a truncated exponential.7.6
In this example, is again a causal smoothing-filter impulse
response, and we could call it a ``moving weighted average'', in which
the weighting is exponential into the past. The discontinuous steps
in the input become exponential ``asymptotes'' in the output which are
approached exponentially. The overall appearance of the output signal
resembles what is called an attack, decay, release, and sustain
envelope, or ADSR envelope for short. In a practical ADSR
envelope, the time-constants for attack, decay, and release may be set
independently. In this example, there is only one time constant, that
of
. The two constant levels in the input signal may be called the
attack level and the sustain level, respectively. Thus,
the envelope approaches the attack level at the attack rate (where the
``rate'' may be defined as the reciprocal of the time constant), it
next approaches the sustain level at the ``decay rate'', and finally,
it approaches zero at the ``release rate''. These envelope parameters
are commonly used in analog synthesizers and their digital
descendants, so-called virtual analog synthesizers. Such an
ADSR envelope is typically used to multiply the output of a waveform
oscillator such as a sawtooth or pulse-train oscillator. For more on
virtual analog synthesis, see, for example,
[78,77].
Convolution Example 3: Matched Filtering
Figure 7.5 illustrates convolution of
![\begin{eqnarray*}
y&=&[1,1,1,1,0,0,0,0] \\
h&=&[1,0,0,0,0,1,1,1]
\end{eqnarray*}](http://www.dsprelated.com/josimages_new/mdft/img1186.png)
to get
For example,


![$\displaystyle \hbox{\sc Flip}(h) = [1,1,1,1,0,0,0,0]
$](http://www.dsprelated.com/josimages_new/mdft/img1188.png)







![$ [-1,1]$](http://www.dsprelated.com/josimages_new/mdft/img1190.png)
Graphical Convolution
As mentioned above, cyclic convolution can be written as















Polynomial Multiplication
Note that when you multiply two polynomials together, their
coefficients are convolved. To see this, let denote the
th-order polynomial







Denoting by



where and
are doubly infinite sequences, defined as
zero for
and
, respectively.
Multiplication of Decimal Numbers
Since decimal numbers are implicitly just polynomials in the powers of 10, e.g.,

Next Section:
Correlation
Previous Section:
Shift Operator