Adding cyclic prefix in clipped ofdm

2 visualizaciones (últimos 30 días)
Dipsikha Roy
Dipsikha Roy el 2 de Feb. de 2021
clc
close
M =8; %here we initialize the number of constellation point of qam
no_of_data_points = 1024;
Fm=10^6;%Max freq
data_source= abs(round(randn(1,8)));%here we take random normal function
figure(1);
x=1:M;
stem (x*(1/Fm),data_source);
grid minor;
xlabel('time(Microsecond)','Fontsize',14);
ylabel('amplitude','Fontsize',14);
title('Transmitted Data','Fontsize',14);%here we plot that transmitted data
qam_modulated_data = qammod(data_source, M);%here we perform 8bit qam on the random normal function
data = 0:M-1;
scatterplot(qam_modulated_data,1,0,'r*');
grid minor
for k=1:M
text(real(qam_modulated_data(k))-0.4,imag(qam_modulated_data(k))+0.4,num2str(data(k)));
end
axis([-4 4 -2 2])
qm = abs(qam_modulated_data);
figure(3);
stem(qm)
title('MODULATED TRANSMITTED DATA','Fontsize',14);%here we plot those constellation point
y=ifft(qam_modulated_data);
figure(4);
x=1:M;
stem(x*Fm,abs(y));
grid minor;
xlabel('freq(Mhz)');
ylabel('amplitude of ifft');
title('without hermitian ifft','Fontsize',14);
qam_modulated_data1(1:(M/2))=qam_modulated_data(1:(M/2)); %here we introduce another array named qam_modulated_data1 where first four element is first four constellation point
qam_modulated_data1(((M/2)+1):M)=qam_modulated_data(1:(M/2));% in my qam_modulated_data1 array last four point is Hermitian of first four point
figure(5);
x=1:M;
stem (x*Fm,abs(qam_modulated_data1));
grid minor;
xlabel('frequency(MHZ)','Fontsize',14);
ylabel('amplitude','Fontsize',14);
title('Hermitian symmetry','Fontsize',14);
y1=ifft(qam_modulated_data1); %here we apply fast Fourier transform on the data of qam_modulated_data1 array
figure(6);
x=1:M;
stem(x*Fm,abs(y1)); %here we plot that fft result
grid minor;
xlabel('Freq(Mhz)','Fontsize',14);
ylabel('amplitude','Fontsize',14);
title('even frequency suppressed output','Fontsize',14);
y1c=conj(y1);
real_y1=y1.*y1c ;
figure(7);
x=1:M;
stem(x*Fm,real_y1);
grid on;
xlabel('Freq(Mhz)','Fontsize',14);
ylabel('amplitude of real values of ifft','Fontsize',14);
title('real value of ifft','Fontsize',14);
z=fft(y1);
figure(8);
x=1:M;
stem(x*Fm,abs(z)); %here we plot that fft result
grid minor;
xlabel('frequency(MHZ)','Fontsize',14);
ylabel('amplitude','Fontsize',14);
title('fft output','Fontsize',14);
qam_modulated_data2(1:(M/2))=z(1:(M/2));
qam_modulated_data2(((M/2)+1):M)=qam_modulated_data(((M/2)+1):M);
figure(9);
x=1:M;
stem(x*Fm,abs(qam_modulated_data2));
xlabel('frequency(MHZ)','Fontsize',14);
ylabel('amplitude','Fontsize',14);
title('reverse Hermitian symmetry','Fontsize',14);
receieved_data=qamdemod(qam_modulated_data2,M);
figure(10)
x=1:M;
stem(x*(1/Fm),receieved_data); %here we plot that fft result
grid minor;
xlabel('time(Microsec)','Fontsize',14);
ylabel('amplitude','Fontsize',14);
title('received data','Fontsize',14);
Here I have written a piece of code to generate even freq clipped ofdm,now I want to add cp on the ifft output y1 then transmit it through AWGN channel and then at the receiver remove the cp,how to do that,I am absolutely clueless.

Respuestas (0)

Comunidades de usuarios

Más respuestas en  Power Electronics Control

Categorías

Más información sobre Propagation and Channel Models en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by