资源简介
Alamouti.zip
代码片段和文件信息
function ber_ml=Alamoudi(snrsoglia);
%This function simulates a Alamouti scheme. The input variables are soglia and snr.
%Soglia: is the number of errors after which the iterations stop. For better results put high value of soglia but
%the simulation is longer.
%snr: the signal to noise ratio (if u don‘t know what is a signal to noise ratio well come back to your high school!).
%
%
%Note: U should use this function with a main function in wich u chose different value of snr. That‘s because this
%function work just with one value of snr.
%
%If u have problem with this code write me at m.allegritti@email.it.
%
%Take care!
%
%
%Max
%clc;
S_ML=zeros(14);
X_dec=zeros(12);
Nt=2; %Number of TX Antennas
Nr=2; %Number of RX Antennas
dec=zeros(12);
no_bit_sym=1; %Number of bit per symbol
no_it_x_SNR=10000; %Number of iteration per simulation
iter=0; %Setting up the variables
err = 0;
tot_err_h = 0;
tot_err_ml = 0; %Number of total errors
while tot_err_ml
iter=iter+1; %Counting the iterations
for i=1:no_it_x_SNR %Starting the simulation
Data=(2*round(rand(Nt1))-1)/(sqrt(Nt)); %Creating random data
%Building the Rayleigh Channel
H=rey(22);
%H=ones(22); %If u want a AWGN channel use this!
sig = sqrt(0.5/(10^(snr/10))); %Noise variance
n = sig * (randn(NrNt) + j*randn(NrNt)); %Noise
%Encoder.We code the data in an Alamouti Matrix
X=[Data(1) -conj(Data(2)); Data(2) conj(Data(1))]; %Coded data
R=H*X + n ; %Received matrix
%Combiner
s0=conj(H(11))*R(11)+H(12)*conj(R(12))+conj(H(21))*R(21)+H(22)*conj(R(22)); %As Alamouti says
s1=conj(H(12))*R(11)-H(11)*conj(R(12))+conj(H(22))*R(21)-H(21)*conj(R(22));
%S = kron(Rones(12^(2*no_bit_sym)));
S=[s0 s1];
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Decoding %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
dh = sqrt(2)*[1 -1]/2;
%C
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4763 2005-12-31 10:49 Alamoudi.m
文件 624 2005-12-31 10:53 rey.m
相关资源
- sunnyman2008_10945697.ap14
- sRGBColorCheckerBoundary.jpg
- 深入性能测试:LoadRunner性能测试、流
- Zookeeper学习.txt
- s.exe
- 编译好的opencv_conrib库.txt
- dr.com5.2.zip
- 新建文本文档.rar
- z6x36z.doc
- tech_video.zip
- 基于UDP的局域网聊天系统.doc
- office密码破解工具OPRTbox绿色注册版
- dhe0ug.rar
- 88npkv.doc
- 前端跳槽面试必备技巧.docx
- license_quartus8.1.rar
- B-Human添加module与representation.pdf
- B-Human校准命令.pdf
- B-Human命令总结.pdf
- permutationentropy.rar
- 百度云盘.txt
- VoiceRecorder.rar
- ws.zip
- 4360GoogleAVA数据集百度云地址及相关介
- arithmetic.rar
- 省市区商圈数据库.rar
- 多目标跟踪MOT_2DMOT2015数据集.txt
- 王者荣耀资源.txt
- licenceForVivado.7z
- Shapes.rar
评论
共有 条评论