0% found this document useful (0 votes)
24 views

Student Id:202015005 Date:23-Mar-21 Name: Anand Therattil

1. A MATLAB code was written to test the orthogonality of time-limited sinusoidal signals by calculating the inner product of the signals. Orthogonality was observed for the first 4 signals but not the remaining signals due to a discontinuity. 2. Circular convolution was converted to linear convolution by padding one signal with zeros to make it the same length as the sum of the two original signals. This allowed the use of linear convolution which produces an output of the same length as the sum of the input lengths. 3. The linear convolution and inverse FFT of the multiplied FFTs of the padded signals were plotted and showed good agreement, validating the conversion of circular to linear convolution.

Uploaded by

kngngn bfbfdbf
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
24 views

Student Id:202015005 Date:23-Mar-21 Name: Anand Therattil

1. A MATLAB code was written to test the orthogonality of time-limited sinusoidal signals by calculating the inner product of the signals. Orthogonality was observed for the first 4 signals but not the remaining signals due to a discontinuity. 2. Circular convolution was converted to linear convolution by padding one signal with zeros to make it the same length as the sum of the two original signals. This allowed the use of linear convolution which produces an output of the same length as the sum of the input lengths. 3. The linear convolution and inverse FFT of the multiplied FFTs of the padded signals were plotted and showed good agreement, validating the conversion of circular to linear convolution.

Uploaded by

kngngn bfbfdbf
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

Lab 3:

Student Id:202015005 Date:23-Mar-21


Name: Anand Therattil
1. Study the orthogonality of time-limited sinusoidal signals from section
4.2.1.1 in [1] and write a MATLAB code to test the same. For a ready
reference, see program 4.1, given in the same section.

clear, clc;
T=1.6; ND=1000; nn=0:ND; ts=0.002; tt=nn*ts; % Time interval
Ts = 0.1; M = round(Ts/ts); % Sampling period in continuous/discrete-time
nns = [1:M:ND+1]; tts = (nns-1)*ts; % Sampling indices and times
ks = [1:4 3.9 4]; tds = [0 0 0.1 0.1 0 0.15]; % Frequencies and delays
K = length(ks);
for i=1:K
k=ks(i); td=tds(i); x(i,:) = exp(j*2*pi*k*(tt-td)/T);
if i==K, x(K,:) = [x(K,[302:end]) x(K-3,[1:301])]; end
subplot(K,2,2*i-1), plot(tt,real(x(i,:))),
hold on, plot(tt([1 end]),[0 0],"k"), stem(tts,real(x(i,nns)),'.')
end
N = round(T/Ts); xn = x(:,nns(1:N));
xn*xn'/N % check orthogonality
Xk = fft(xn.').'; kk = 0:N-1;
for i=1:K,
k=ks(i); td=tds(i); subplot(K,2,2*i), stem(kk,abs(Xk(i,:)),'.');
end
2. Study circular convolution of two discrete N length sequences and the discrete Fourier
transform of the product. Write a MATLAB code to implement circular convolution
through the linear convolution. In order to do so, circularly augment one of the
sequences. This exercise will elucidate the concept of cyclic prefix used in OFDM
system.

clc;clear;
n = -2:0.01:2;
x1 = sinc(n*pi);
x2 = sinc(2*n*pi);
X1 = fft(x1);
X2 = fft(x2);
x1pad = x1;
x2pad = [x2,zeros(1,length(x1)-length(x2))];
C = ifft(fft(x1pad).*fft(x2pad));
C_1 =conv(x1,x2);
plot(x1);hold on;grid on;
plot(x2);
xlabel("Time");
ylabel("Amplitude");
legend("Signal 1","Signal 2");
hold off;
figure(2);
plot(C,"b");hold on;
plot(C_1,"r.");
grid on;
hold off;
legend("IFFT","Convolution");
Inference:
The orthogonality between the signals is observed through the inner product. The
Matrix is the observed where the first 4 signal are orthogonal l and then the rest of the
signals are not orthogonal as there is discontinuity in the signal x5 and x6. Linear
convolution “convolves” two independent signals and comes up with a signal, the
length of which is different from the length of the two input signals. The Conversion of
the Circular Convolution to Linear Convolution is done by padding of the zeros to the
signal as the Circular Convolution is for periodic signals.

You might also like