You are on page 1of 5

When I started studying signals and signal processing for marks and for concept in B.

Tech, I
wondered what and how signals getting tuned to an output based on some input and some system
behavior. I always wondered how a system gets some typical characteristics (though such a
doubt on input signal was not there). I have studied only basic mathematical operations like
addition, subtraction, multiplication and division till my SSLC and mathematical superiors like
integration and differentiation till my intermediate studies and of course, some transforms like
Fourier, Z and Laplace etc till my B. Tech 1 st year. Though I was good in mathematics, I dont
like to love mathematics because I realized that it is only a tool and I always want to love its
master called Engineering. Mathematics and Physics are only slaves to its master called
Engineering (whatever be the trade). They are nowhere required, only its applications are
required for implementation and for daily use. No need to explain much on this controversy.

What I learned from mathematics was only comparison (technically speaking we call it as
relation) between two things. In signals context too, there is some comparison between two
signals-input and output. But, what is the difference between the comparison I studied in
mathematics and convolution (filtering) I studied in signals and systems. Is it only a combination
of operations like multiplication, addition and shifting between some limit. If yes, how is a
comparison activity taking place there. Why I cant combine some other mathematical operations
like dividing, shifting and adding though it may also converge on processing?

Now, I can introduce a term called CORRELATION instead of comparison. So, I was in search
of correlation and convolution could be matched. What is percentage of similarities between the
action and results of correlation and convolution? Are they same? Are they dual of each other?
Are they inverse to each other? But, I was sure that both are close friends. They are not enemies.

In the search of answers, I started using MATLAB & SIMULINK - giant software, for a small
answer and large doubt. Let me conclude to the definitions I obtained after that activity.
CORRELATION is the process of passing the mask (one signal) by the signal array (other
signal). CONVOLUTION is the same process, except that the mask (one signal) is rotated by
180 degrees prior to passing it by the signal array (other signal).

I took two signals x1[n] = {1, 2, 3, 2, 0} and an impulse signal x2[n] = {0, 0, 0, 1, 0, 0, 0, 0}. The
origin of x2[n] is the left most point. To perform the correlation of two signals, x1[n] is moved so
that its rightmost point coincides with the origin of x2[n]. There are points between two signals
which dont overlap.
0 0 0 1 0 0 0 0

1 2 3 2 0

It is easy to overcome this issue by padding with zeros to guarantee all points in x1[n] have one
in x2[n].

0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0

1 2 3 2 0

So, the process of correlation starts here. The first value of correlation is the sum of products of
the two signals in the above position. The sum of products is zero. The position after first shift is
given below.

0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0

1 2 3 2 0

After four shifts, the first non zero value of the correlation 2x1=2 is encountered. It is shown
below.

0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0

1 2 3 2 0
The final position is shown below.

0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0

1 2 3 2 0

The set of correlation values in the result is given below.

full correlation result

000023210000

same correlation result

00232100

full is a flag to indicate correlation using padded signal and other signal. same is the flag that
produces a correlation that is of the same size of the first signal. As one of the signal is an
impulse (unity at a point here), we should get the output signal same as the input signal. But
here, the output is a mirror inverted version of input (1, 2, 3, 2, 0).

To perform convolution, the signal x1[n] is rotated by 180 degrees and place the rightmost point
at the origin of x2[n]. The same operation did at correlation is repeated here too.

0 0 0 1 0 0 0 0

0 2 3 2 1

0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0
0 2 3 2 1

0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0

0 2 3 2 1

0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0

0 2 3 2 1

0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0

0 2 3 2 1

The set of convolution values in the result is given below.

full correlation result

000123200000

same correlation result

01232000
Convolution with an impulse just copies the signal x1[n] at the location of the impulse. This
copying property (technically shifting property) is a fundamental concept in linear system and it
is the reason why one of the signals is always rotated by 180 degrees in convolution. Other
important derived conclusion is that if the signal being shifted is symmetric (like {1, 2, 3, 2, 1}),
convolution and correlation yield same results.

CONVOLUTION IS NOTHING MORE THAN CORRELATION WITH A


ROTATED FILTER MASK.

You might also like