Вы находитесь на странице: 1из 8

Department of Electronics and Communication Engineering

National Institute of Technology, Tiruchirappali – 620 015

ECLR15 Digital Signal Processing Laboratory


V-Semester -UG

Dr. M. Bhaskar, Professor, ECE, NIT, Trichy-15 1


First Cycle
MATLAB based experiments

Experiment No. 1: CORRELATION

Dr. M. Bhaskar, Professor, ECE, NIT, Trichy-15 2


Objective/Aim of the experiment

1. Generation of signals with different amplitude and


frequencies.
2. Generation of signals with multiple frequencies.
3. Performing auto and cross correlation of different
signals.
4. Finding the correlation coefficient.
5. Study of correlation coefficient relationship with
amplitude and frequencies.

DR. M. BHASKAR, PROFESSOR, ECE, NIT, TRICHY-15 3


Theory
What is Correlation?
• Correlation quantifies the ‘LINEAR’ relationship between two signals.
• For Example: If we transmit a square wave, the receiver should ideally
receive the same square wave. Practically, due to noise in the channel,
the received square wave will not be proper.
• The Receiver will have a ‘CORRELATOR’ block to compare the incoming
noisy-square wave with an ideal square wave to determine whether
the signal can be used for decoding or to discard the incoming signal.
• Another example is voice based security system. The recorded voice of
the security secrete code of the authorized people who can access the
system will be stored in the server. When the person wants to access
the system, the present voice will be correlated with the already
existing data base. If the correlation matches the system will open.

Dr. M. Bhaskar, Professor, ECE, NIT, Trichy-15 4


Correlation equations

Dr. M. Bhaskar, Professor, ECE, NIT, Trichy-15 5


Co-efficient of Correlation

• It is denoted by ‘r’
• If r = +1, it shows positive linear relationship
• If r = -1, it shows negative linear relationship
• If r= 0, there is no linear relationship
r Strength of
Correlation
0 < |r| < 0.3 Weak Correlation
0.3 < |r| < 0.7 Moderate Correlation
|r| > 0.7 Strong Correlation

How to calculate ‘r’ ?

Dr. M. Bhaskar, Professor, ECE, NIT, Trichy-15 6


References

• Press, William H. [et. al.], "Fourier and Spectral Applications", sec. 13, Numerical
Recipes in C, 2nd ed., Cambridge University Press, 1992.
• Press, William H. [et. al.], "Linear Correlation", sec. 14.5, Numerical Recipes in C, 2nd
ed., Cambridge University Press, 1992.
• http://www.sjsu.edu/faculty/gerstman/StatPrimer/correlation.pdf
• http://www.tutorialspoint.com/signals_and_systems/convolution_and_correlation.
htm
• http://www.ee.ic.ac.uk/hp/staff/dmb/courses/E1Fourier/00800_Correlation.pdf
• https://www.wavemetrics.com/products/igorpro/dataanalysis/signalprocessing/co
nvolution.htm

•Read the cited sources before you proceed to the lab work prescribed in next slide.
Dr. M. Bhaskar, Professor, ECE, NIT, Trichy-15 7
Laboratory Work

• Take two signals x1 and y1 of amplitude 1, having same sampling frequency of 1KHz with
base band frequency satisfying the Nyquist rate.
• Generate x1 and y1 using Mat lab and plot it.
• Find auto correlation Sxx, Syy and cross correlation Sxy and plot it.
• Compute the Pearson’s correlation coefficient ‘r’.
• Plot the variation of ‘r’ with respect to frequency ‘f’ by varying the frequency of any one
of the signal.
• Plot the variation of ‘r’ with respect to amplitude ‘a’ by varying the amplitude of any one
of the signal.
• Determine the strength of correlation in each of the above cases using the ‘display’
command.
• Repeat the above simulation steps by using a signal which has 2 or multiple frequencies
i.e f1,f2…etc either in x1 or x2.
• Finally write the inferences.

Dr. M. Bhaskar, Professor, ECE, NIT, Trichy-15 8

Вам также может понравиться