Plot Bit error rate for DWT based OFDM

16 ビュー (過去 30 日間)
Chaitanya
Chaitanya 2014 年 6 月 29 日
コメント済み: André Marantes 2022 年 11 月 6 日
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
Priyadharshini Arumugam 2020 年 10 月 31 日
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 Center および File ExchangeModulation についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by