to plot BER curve for IDWT

조회 수: 2 (최근 30일)
ABDUL
ABDUL 2020년 10월 16일
편집: ABDUL 2020년 10월 16일
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
Raymond Norris
Raymond Norris 2020년 10월 16일
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 2020년 10월 16일
편집: ABDUL 2020년 10월 16일
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

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 Propagation and Channel Models에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by