BER Fixed Not Degreading

Hello there,
writen below  matlab code for 16-QAM/16-PSK over AWGN channel with non-linearity (AM/AM and AM/PM
conversions). I tried to optmize the code by adding SQRT raised cosine filtter to minimize the BER but no success,
it is still fixed and high while it should be degrading.
So, could you please help me how can I debug it .

Thanks in advance
% Define parameters.
clear all; clc
M = 16;                 % Size of signal constellation
k = log2(M);            % Number of bits per symbol
n = 3e5;                % Number of bits to process
nsamp = 4;              % Oversampling rate
BO = 20;                % Back-off
J = sqrt(-1);

x = randint(n,1);       % Random binary data stream

% Modulation PSK or QAM
Type = 'PSK';
switch Type
    case 'QAM'
        modObj = modem.qammod(M);           % QAM modulator object
        demodObj = modem.qamdemod(M);       % QAM modulator object
    case 'PSK'
        modObj = modem.pskmod(M);           % PSK modulator object
        demodObj = modem.pskdemod(M);       % PSK modulator object
        disp('wrong modulation type, Please entre QAM or PSK')
Tx = modulate(modObj,x);
% Define filter-related parameters.
filtorder = 40;                     % Filter order
delay = filtorder/(nsamp*2);        % Group delay (# of input samples)
rolloff = 0.2;                      % Rolloff factor

% Create a square root raised cosine filter.
rrcfilter = rcosine(1,nsamp,'fir/sqrt',rolloff,delay);

% Upsample and apply square root raised cosine filter.
filtSig = rcosflt(Tx,1,nsamp,'filter',rrcfilter);% Tx filter(Pulse shaping)

% Add non-linear conversion
A = abs(filtSig);   % Amplifier input signal amplitude
Phi = atan2(real(filtSig),imag(filtSig));
xSig = A.*exp(J*Phi);
% Coefficients of the model.
alpha_a = 1.1587; peta_a = 1.15;
alpha_b = 4; peta_b = 2.1;
Sp = alpha_a*A./(1+peta_a*A.^2);             % AM/AM
Sq = (pi/3)*(alpha_b*A.^2./(1+peta_b*A.^2)); % AM/PM
ySig = Sp.*exp(J*Phi).*exp(J*Sq);

% Send signal over an AWGN channel.
EbNo_dB = 0:12;              
SNR = EbNo_dB + 10*log10(k) - 10*log10(nsamp);
BER = [];
for ii = 1: length(SNR)
Rx_noisy = awgn(ySig,SNR(ii),'measured');

rxSig = rcosflt(Rx_noisy,1,nsamp,'Fs/filter',rrcfilter); % Rx Match Filter.
rxSig = downsample(rxSig,nsamp);            % Downsample.
rxSig = rxSig(2*delay+1:end-2*delay);       % Account for delay.

% Scatter Plot
h = scatterplot(sqrt(nsamp)*Rx_noisy(1:nsamp*5e3),nsamp,0,'g.');
hold on;
title('Received Signal, Before and After Filtering');
legend('Before Filtering','After Filtering');
axis([-5 5 -5 5]); % Set axis ranges.

Rxsym = demodulate(demodObj, rxSig);% Demodulate signal using 16-QAM.

% BER Computation
[n_Errors,BER(ii)] = biterr(x,Rxsym);
% Result plot
axis([0 max(SNR) 10^-5 1]);
grid on
% End of script file.

Open in new window

Who is Participating?
as i can see on your code you might need to try some equalization with the receive filter. and i'm not quit sure is pulse shaping should be after nonlinearity or not

hope is useful
obad62Author Commented:
you know how can I do that
obad62Author Commented:
is not good answer
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.