ALAMOUTI effectue simulation de Monte-Carlo et les estimations de taux d'erreurs binaires (BER) de Alamouti Scheme [1] sur canal de Rayleigh. Ce régime suppose 2 Transmit (Tx) et nombre arbitraire de réception (Rx) éléments. Si Rx = 1 (un élément de recevoir) les ALAMOUTI est transformé à l'ordre 2 de transmettre régime de la diversité avec Maximum Ratio Combiner (MRC). Le format de modulation est MPSK avec un ordre arbitraire M, qui peut être contrôlé par l'utilisateur.
Les paramètres de simulation sont entrés en utilisant l'interface intégrée utilisateur graphique (GUI) et contient:
1. Nombre de symboles paire de deux éléments Tx à transmettre: N. Ce nombre devrait être d'au moins 10 fois plus que le 1/BER devrait fournir erreur de l'estimation basse.
2. MPSK ordonnance M, doit être une puissance de 2.
3. Rapport signal / bruit (SNR) en dB en tant que ratio de la moyenne de puissance reçue à une Rx élément sur la puissance du bruit à cet élément.
4. Nombre de transmettre les éléments Tx = 2 qui ne peut être changée par l'utilisateur.
5. Nombre de recevoir des éléments de Rx, peut être arbitraire.
Le programme ne vérifie pas le format des paramètres d'alimentation et ne produit pas d'alerte au sujet des valeurs incorrectes!
Bouton poussoir 'Start' lance la simulation avec les paramètres désirés et les parcelles du REC estimé et SNR.
En appuyant sur 'Help' dans le menu Aide affichera un bloc-notes avec les informations d'aide ci-dessus.
Pour permettre efficace vecteur de programmation ALAMOUTI est un équivalent Alamouti Scheme [1] une simulation à-dire le temps où les époques sont masqués.
___________________________________*******************________________________
% Alamouti Code to achieve diversity without channel knowledg at the
% transmitter
% It is assumed that system contains 2 transmit antennas and one receive
% antenna. At the transmitter the data of a two consecutive slots will be
% considered. At the odd time slots, the first antenna transmit
% symbol 1 (s1) and the second ones will transmit symbol 2 (s2)
% simoltaneously. At the even time slots the -s2* and s1* will be transmited
% from the first and second antenna respectively. Study "WIRELESS
% COMMUNICATIONS" by Goldsmith for further information.
% By Hamid Ramezani 01-Apr-2008
% Initialization
clear
clc
% Setting parameters
numOfBlk = 1e6; % number of blocks of data to be transmitted
qamOrder = 16; % the QAM modulation order 4,16,64
SNRdB = 6:1:30;
linColor = 'b'; % graph color 'b','r','k',... see the help of plot function
linSym = 'o'; % graph Symbol 'o','>','<',... see the help of plotf unction
% Memory allocation
errRate = zeros(size(SNRdB));
%% AlamoutiSpace Time Code
for i = 1 : length(SNRdB)
% Main Program
% generating the data
txData = randint(numOfBlk*2,1,qamOrder);
% splitting the data into two vectors (first transmition, second
% transmition in time);
temp = reshape(txData,numOfBlk,2);
% QAM Modulation of transmite data
temp = qammod(temp,qamOrder);
% 2 transmite antenna and 1 receive antena channel gain, the channel
% varinance is set to unity and a rayleigh flat fading channel in each
% path is assumed
H = 1/sqrt(2) * (randn(numOfBlk,2) + sqrt(-1)*randn(numOfBlk,2));
% transmitted data through channel
% in each transmite antenna half of the power will be sent
% 1/sqrt(2) is to represent the half of the power on each antenna
txMod(:,1) = H(:,1).* 1/sqrt(2).*temp(:,1) + H(:,2).* 1/sqrt(2).*temp(:,2) ;
txMod(:,2) = -H(:,1).*(1/sqrt(2).*temp(:,2)').' + H(:,2).*(1/sqrt(2).*temp(:,1)').' ;
% adding noise
txMod = awgn(txMod,SNRdB(i),'measured');
% receiving the data
% sqrt(2) is used for normalization
temp(:,1) = sqrt(2)*(H(:,1)'.' .* txMod(:,1) + H(:,2) .* txMod(:,2)'.')./(abs(H(:,1)).^2 + abs(H(:,2)).^2);
temp(:,2) = sqrt(2)*(H(:,2)'.' .* txMod(:,1) - H(:,1) .* txMod(:,2)'.')./(abs(H(:,1)).^2 + abs(H(:,2)).^2);
rxData(:,1) = qamdemod(temp(:,1),qamOrder);
rxData(:,2) = qamdemod(temp(:,2),qamOrder);
[numErr errRate(i)] = symerr(rxData,reshape(txData,numOfBlk,2));
end
% graphical observation
f1 = figure(1);
semilogy(SNRdB,errRate,[linColor,'-',linSym]);
xlabel('SNR in dB');
ylabel('Symbol Error Rate');
%% No space time coding
for i = 1 : length(SNRdB)
% txData is set in the Alamouti Code
temp = qammod(txData,qamOrder);
% Channel Definition
H = 1/sqrt(2) * (randn(numOfBlk*2,1) + sqrt(-1)*randn(numOfBlk*2,1));
% passing through channel
txMod = H.*temp;
% adding noise
txMod = awgn(txMod,SNRdB(i),'measured');
% decoding
temp = txMod./H;
rxData = qamdemod(temp,qamOrder);
[numErr errRate(i)] = symerr(rxData,txData);
end
% graphical observation
figure(1);
hold on
semilogy(SNRdB,errRate,[linColor,':',linSym]);
xlabel('SNR in dB');
ylabel('Symbol Error Rate');
title(['SER evaluation of ', num2str(qamOrder),'QAM Modulation based on Alamouti STC'])
legend('With Alamouti Code 2x1 chann','No STC 1x1 chann')
grid on