to plot BER curve for IDWT

2 vues (au cours des 30 derniers jours)
ABDUL
ABDUL le 16 Oct 2020
Modifié(e) : ABDUL le 16 Oct 2020
i am not able to plot the proper ber curve .this is my piece of code which is attached for your reference
clc;
clear all;
close all;
PSK = 4; SNR = -5;
M_rx = 1; % No. of Rx antennas
SNRs = -50:20; % signal-to-noise ratios: -10dB … 20dB
bit_errors = zeros(length(SNRs), 1); % BER with respect to SNR
%implementation of the The transmitter
data = randi([0 PSK-1],64,1000);
symbol = pskmod(data, PSK, 0, 'Gray');
% symbol = qammod(data, PSK, 0, 'Gray');
%to Perform parallel to serial conversion
pstx=reshape(symbol,1,[]);
%to perform IDWT operation
AC =pstx; %% approximation coefficients
DC = zeros(size(pstx));%% detailed (wavelet) coefficients
IDWT=idwt(AC,DC,'haar').';% IDWT process
%implementation of the receiver
for SNR_idx = 1:length(SNRs)
received_symbol = awgn(IDWT, SNRs(SNR_idx)).';
[ca cd]=dwt(received_symbol,'haar' );
%to perform parallel to serial conversion
psrx=reshape(ca,64,1000);
estimated_data = pskdemod(psrx, PSK, 0, 'Gray');
% estimated_data = qamdemod(received_symbol, PSK, 0, 'Gray');
[no_of_error(SNR_idx), bit_errors(SNR_idx)]=biterr(data,estimated_data);
end
semilogy(SNRs , bit_errors); % plot with logarithmic y-axis
grid on; % show a grid
xlabel('SNR [dB]');
ylabel('BER'); % label x- and y-axis
  2 commentaires
Raymond Norris
Raymond Norris le 16 Oct 2020
Hi,
I would suggest posting a bit more detail about what you mean by "not able to plot the proper BER curve." Are you getting errors or the curve doesn't look right? For starters, AC appears to be complex and not real, which is causing problems with your call to idwt.
Raymond
ABDUL
ABDUL le 16 Oct 2020
Modifié(e) : ABDUL le 16 Oct 2020
hi raymond ... i am not getting the graph correctly ..
this is the graph what i am getting it ... is there any possible way to plot the graph correctly

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Propagation and Channel Models dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by