Lab 4
Lab 4
Lab 4
DATE OF
: 31 st Oct, 2022
EXPERIMENT
Lab Number : 4
ROLL NO : __200401074____
__200401033____
__200401024____
Objective:
In this lab, we will learn to conduct simulation in Simulink/MATLAB to understand
the concepts of:
1. Correlation and its applications in communication systems.
2. Orthogonality and its application in communication systems.
Introduction:
Correlation of Signals
Correlation between signals indicates the measure up to which the given signal resembles
another signal. In other words, if we want to know how much similarity exists between the
signal 1 and signal 2, then we need to find out the correlation of signal 1 with respect to signal
2 or vice versa. Mathematically, correlation values lie between −1 and +1 where +1 is for
maximum correlation.
In autocorrelation, the given signal is correlated with itself, usually the time-shifted version
of itself. Mathematical expression for the autocorrelation of continuous time signal 𝑥(𝑡) is
given by
𝑅𝑥𝑥 (𝜏 ) = ∞
∫ 𝑥(𝑡)𝑥 ∗ (𝑡 − 𝜏)𝑑𝑡 ,
−∞
where ∗ denotes the complex conjugate.
In cross-correlation, the signal in-hand is correlated with another signal to know how much
resemblance exists between them. Mathematical expression for the cross-correlation of
continuous time signals 𝑥(𝑡) and 𝑦(𝑡) is given by:
∞
𝑅𝑥𝑦 (𝜏 ) = ∫ 𝑥 (𝑡)𝑦 ∗ (𝑡 − 𝜏 )𝑑𝑡 .
−∞
• Orthogonality of Signals:
Two signals are orthogonal to each other when their inner product (also called the dot
product) is zero. Mathematically two continuous time signals 𝑥(𝑡) and 𝑦(𝑡) are orthogonal
when:
∞
∫ 𝑥(𝑡) 𝑦(𝑡)𝑑𝑡 = 0,
−∞
A close resemblance can be observed between correlation equations and orthogonality
conditions Thus, signals that are orthogonal are uncorrelated and vice versa. An
important characteristic of signals that are orthogonal (i.e., uncorrelated) is that when they are
combined or added together, they do not interact with one another. Orthogonality is not
limited to just two signals. Whole families exist where each signal is orthogonal to all other
members in the family. Such families of orthogonal signals are called “orthogonal sets”.
Lab Performance:
Task 1:
In this task, you will test two applications of correlation in a RADAR communication system
that works by transmitting a signal from its transmitting antenna. The radio waves travel
outward from the antenna and keep going until they hit something. Then some of these waves
bounce back toward the antenna in a beam of reflected radio waves. At RADAR, the
transmitted and reflected waves are compared (CORRELATED) to compute distance between
transmitter and receiver.
Communication Systems Lab Page 2
______________________________________________________________________
• Results:
Here we can see auto and cross correlation. The time can be determined as
100 units.
Recovering a Noisy Signal:
clc
clear all
close all
% Transmitted Signal
t=1:400;
x_t=[ones(1,100),zeros(1,50),-
1*ones(1,100),zeros(1,150)];
plot(t,x_t), grid on
% Received Signal
noise=awgn(x_t,10);
x_r=x_t+noise;
figure(1)
subplot(2,1,1)
plot(t,x_r), grid on
% Auto and cross-correlations
[crossCorr_x_tx_r,lag12]=xcorr(x_t,x_r);
% Correlation plots
subplot(2,1,2);
plot(lag12,crossCorr_x_tx_r);
% Received Signal
noise1=awgn(x_t,5);
x_r1=x_t+noise1;
figure(2)
subplot(2,1,1)
plot(t,x_r1), grid on
% Auto and cross-correlations
[crossCorr_x_tx_r1,lag12]=xcorr(x_t,x_r1);
% Correlation plots
subplot(2,1,2);
plot(lag12,crossCorr_x_tx_r1);
% Received Signal
noise2=awgn(x_t,1);
x_r2=x_t+noise2;
figure(3)
subplot(2,1,1)
plot(t,x_r2), grid on
% Auto and cross-correlations
[crossCorr_x_tx_r2,lag12]=xcorr(x_t,x_r2);
% Correlation plots
subplot(2,1,2);
plot(lag12,crossCorr_x_tx_r2);
SNR=10
SNR=5
SNR=1
Task 2:
Experiments:
Observations:
When plotting the random noise signal, we observed that every time we run the code random
N noise signals are generated between 0 to 100 with mean 0 and variance 16.5. By using
Communication Systems Lab Page 7
______________________________________________________________________
variance output returns an array of local k -point variance values, where each variance is
calculated over a sliding window of length k across neighboring elements of A.
1. For the model developed in tutorial #4.4, add Band-limited White Noise to the symbols-to-be-
transmitted (i.e. after the symbols get multiplied with their respective orthogonal signal). Set the
noise power to be 0.01 to 0.5 in 10 steps and your transmitted symbols to be [𝑠 0 − 𝑠]. Further,
set the Sample time: 1e-2 and Seed: 0. Record your results (received symbols) versus noise
power in tabular form. (Set 𝑠 to be the sum of last two digits of your registration number.)
S=3+3=6
Observations:
Conclusions:
From this lab report we conclude that with the help of MATLAB, we can correlate the
signals (auto and cross). We have analyzed the concept of orthogonality by applying
them on certain signals using Simulink.