Plot Bit error rate for DWT based OFDM

2 次查看(过去 30 天)
I ve been trying to plot the Bit error rate vs Eb/No for DWT based ofdm but What i get is a straight line which of course means that the error rate does not change over the course of the signal strength which obviously should not be so.I am quiet sure I m wrong somewhere in the code. Here is the code snippet for IDWT at transmission side:
%%Setup
% Define parameters.
M = 4; % Size of signal constellation
k = log2(M); % Number of bits per symbol
n = 10000; % Number of bits to process
nsamp = 1; % Oversampling rate
nFFT = 64; % fft size
nDSC = 32; % number of data subcarriers
nQAMsymPerOFDMSym = 32; % number of QAM symboles per OFDM symbol (same as the number of subcarriers)
EbNo = [-3:20]; % multiple Eb/N0 values
for ii = 1:length(EbNo)
%%Signal Source
% Create a binary data stream as a column vector.
x = randint(nQAMsymPerOFDMSym*n,1); % Random binary data stream
%%Bit-to-Symbol Mapping
% Convert the bits in x into k-bit symbols.
xsym = bi2de(reshape(x,k,length(x)/k).','left-msb');
%%Modulation
% Modulate using 16-QAM.
y = modulate(modem.qammod(M),xsym);
xF = reshape(y,k,length(y)/k).';% grouping into multiple symbol
xF1=zeros(size(xF));
xt = (idwt(xF,xF1,'haar')).';
%%Transmitted Signal
%%Channel
% Send signal over an AWGN channel.
%%Received Signal
[yF1,yF2] =dwt(xt,'haar');
S=[yF1,yF2];
%%Demodulation
% Demodulate signal using 16-QAM.
zsym = demodulate(modem.qamdemod(M),S);
zsym1=zsym.';
%%Symbol-to-Bit Mapping
% Undo the bit-to-symbol mapping performed earlier.
z1 = de2bi(zsym1,'left-msb'); % Convert integers to bits.
% Convert z from a matrix to a vector.
z = reshape(z1.',prod(size(z1)),1);
%%BER Computation
% Compare x and z to obtain the number of errors and
% the bit error rate.
[number_of_errors(ii),bit_error_rate(ii)] = biterr(x,z);
end
theoryBer = (1/2)*erfc(sqrt(10.^(EbNo/10)));
close all; figure
semilogy(EbNo,theoryBer,'bs-','LineWidth',2);
hold on
semilogy(EbNo,bit_error_rate,'mx-','LineWidth',2);
axis([-3 15 10^-5 1])
grid on
legend('Theory', 'Simulation');
xlabel('Eb/No, dB')
ylabel('Bit Error Rate')
title('Bit error probability curve for M-QAM using DWT based OFDM system in AWGN channel')
Here is the O/P (which i think is wrong/unexpected):
I am so confused...Wonder where I m wrong.
  1 个评论
André Marantes
André Marantes 2022-11-6
I am also trying to do OFDM with wavelet, can you explain what the modem means here?y = modulate(modem.qammod(M),xsym); and zsym = demodulate(modem.qamdemod(M),S);

请先登录,再进行评论。

回答(4 个)

Michael Martin
Michael Martin 2014-7-6
I don't have the answer, but would like to try out your code. I may be able to figure it out. Can you share the entire M code with us please?
Mike
  4 个评论
ai sha
ai sha 2016-9-5
hello.....i am also doing wavelet transform in OFDM. I make a ofdm and dwt-ofdm model in simulink. so pls send me a model at sofi2255@live.fr
Priyadharshini Arumugam
Can you please send me a bit error matlab code for DFT based and wavelet based it will be very useful for me right now.. Kindly help me... Please mail to kavipriya031299@gmail.com

请先登录,再进行评论。


Montadar Taher
Montadar Taher 2017-7-17
First of all, you do not have the AWGN channel being used inside the loop, second, you have to prepare your data as yF1 only must be used for data recovery, where yF2 must be discarded.
  1 个评论
ABDUL
ABDUL 2020-9-16
hello sir ... i am working on wavelet ofdm technique can you guide me how do i prepare the data for the recovery and how to discard the data which is not required at the receiver for the above code.

请先登录,再进行评论。


ABDUL
ABDUL 2020-9-8
hi....
i am working on Wavelets OFDM technique did you figure out the error in your code . if so can you share me the corrected code to me to my mail id abdul.abdulazeez@gmail.com. it will be of great help to me from your side.
Regards
Abdul Azeez

Wonjae Ryu
Wonjae Ryu 2020-9-22
Regardless of the results, I'm curious about that this code works.
I'm also trying to implement wavelet-based OFDM in Matlab, however, IDWT doesn't work due to the reason of complex values.
The input cannot include complex values, therefore, my code doesn't work and only showed error message.
Is there any way to use idwt for modulated data including complex value???
  2 个评论
ABDUL
ABDUL 2020-9-22
you can implement it by using the complex values too by taking the modulated signal and splitting it up the coefficients
deepa abraham
deepa abraham 2021-8-17
I am also facing the same problem with idwt fucntion on complex values.
Do I need to separate the real and complex values of modulated symbols and and take idwt separately for these values?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Discrete Multiresolution Analysis 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by