Plot Bit error rate for DWT based OFDM

15 visualizzazioni (ultimi 30 giorni)
Chaitanya
Chaitanya il 29 Giu 2014
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 Commento
André Marantes
André Marantes il 6 Nov 2022
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);

Accedi per commentare.

Risposte (4)

Michael Martin
Michael Martin il 6 Lug 2014
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 Commenti
ai sha
ai sha il 5 Set 2016
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
Priyadharshini Arumugam il 31 Ott 2020
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

Accedi per commentare.


Montadar Taher
Montadar Taher il 17 Lug 2017
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 Commento
ABDUL
ABDUL il 16 Set 2020
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.

Accedi per commentare.


ABDUL
ABDUL il 8 Set 2020
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 il 22 Set 2020
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 Commenti
ABDUL
ABDUL il 22 Set 2020
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 il 17 Ago 2021
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?

Accedi per commentare.

Prodotti

Community Treasure Hunt

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

Start Hunting!

Translated by