Hi everyone,

I would like to show my Matlab simulation code for a SISO MQAM system in Rayleigh frequency-flat fading with AWGN:

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% MQAM over fading channel

clc;

clear variables;

%% Parameters

M = 16; % QAM Modulation Order

data = 0:M-1;

QAMSET = qammod(data, M);

E = sum(abs(QAMSET).^2)/M; %Expectation operation

m = log2(M);

snr = 0; % Signal-to-Noise Ratio

snrlin = 10.^(snr/10);

bit_errors = zeros(length(snrlin), 1);

BER = zeros(length(snrlin), 1);

frames = zeros(length(snrlin), 1);

Num = 1000;

%% Simulate over range of SNR

for bb = 1:length(snrlin) % Compute BER over SNR range

%% SNR

rho = snrlin(bb)/E;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

while (bit_errors(bb)

Similar questions and discussions