资源简介
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
相关资源
- PID_AutoTune_v0.rar
- vspd7.2.308.zip
- 价值2k的H漫画小说系统
- Pythonamp;课堂amp;笔记(高淇amp;400;集第
- ddos压力测试工具99657
- UML建模大全
- 开源1A锂电池充电板TP4056原理图+PCB
- m1卡 ic卡可选择扇区初始化加密软件
- TSCC.exe
- FTP课程设计(服务端+客户端)
- 计算机图形学 边填充算法实现代码
- 电力系统潮流计算程序集合
- oracle数据迁移项目实施方案
- Web Api 通过文件流 文件到本地
- Visio图标-最新最全的网络通信图标库
- Spire API文档
- OpenGL参考手册
- Python中Numpy库最新教程
- SPD博士V5.3.exe
- 直流无刷电机方波驱动 stm32 例程代码
- layui后台管理模板
- 仿知乎界面小程序源代码
- 云平台-阿里云详细介绍
- photoshop经典1000例
- scratch垃圾分类源码(最终版本).sb
- IAR ARM 7.8破解
- TI CCS V5.4 安装步骤及破解文件
- 松下plc FP-XH的驱动
- 局域网硬件信息收集工具
- 加快Windows XP操作系统开机速度
评论
共有 条评论