资源简介
使用matlab对瑞丽衰落信道进行仿真,信道建模
代码片段和文件信息
%16QAM-OFDM system;
clear all;
clear all;
N = 1024; %the total number of all subcarriers
Np = 128; %the number of pilot carriers
B = 2e6; %bandwidth 2MHz
T = 1/B;
Ng = 256; %the length of Guard Interval
Xp = 3 + 1.0*j ; %pilot value
t= 0; % erro code number
for u = 1:20 % run 20 times
%-------------------------------------Data generator--------------------------------------------------
xr1 = rand(1N-Np);
Xre = (-3) * (xr1 < 0.25) + (-1) * (0.25 <= xr1 & xr1 < 0.5)...
+ (0.5 <= xr1 & xr1 < 0.75) + 3 * (0.75 <= xr1 & xr1 < 1);
xr2 = rand(1N-Np);
Xim = (-3) * (xr2< 0.25) + (-1) * (0.25 <= xr2 & xr2 < 0.5)...
+ (0.5 <= xr2 & xr2 < 0.75) + 3 * (0.75 <= xr2 & xr2 < 1);
X = complex(XreXim); %16QAM
% Xre = (-1) * (xr1 < 0.5) + 1 * (0.5 <= xr1 & xr1 < 1);
% xr2 = rand(1N-Np);
% Xim = (-1) * (xr2< 0.5) + 1 * (0.5 <= xr2 & xr2 < 1);
% X = complex(XreXim); %QPSK
%---------------------------------- insert pilot in carriers -------------------------------------
% pilots locate at 8*i + 3;
Xc = zeros(1N); %the carrier value
m = 0;
for i = 1 : N
if(mod(i8) == 3)
Xc(i) = Xp;
m = m + 1;
else
Xc(i) = X(i - m);
end
end
%----------------------------------OFDM modulation-------------------------------------------------------
Ym = ifft(XcN);
%----------------------------------Insert GI CP---------------------------------------------------------
Y = [Ym(769:N)Ym];
%----------------------------------pass channel-----------------------------------------------------------
Yc = ray_channel(YT);
%---------------------------------add noice -------------------------------------------------------------
SNR = 40;
% for S=1:21
%SNR= 10log10(Es/N0)
% N0 = var(Yc)/(10^(SNR/10));
% sgma = sqrt(N0/2);
% Yawgn=Yc+sgma*randn(1length(Yc))+sgma*randn(1length(Yc))*j;
Yawgn = awgn(YcSNR‘measured‘);
%-------------------------------------------------------------------------------------------------------
% ----------------------------------------------OFDM RECEIVER-------------------------------------------
%----------------------------------------------OFDM demodulation----------------------------------------
Yr = fft(YawgnN);
%-----------------------------------------------Pilot signal Extraction---------------------------------
c = 1;
for i = 3:8:N
Yp(c) = Yr(i);
c = c + 1;
end
%----------------------------------- Pilot signal Estimation with LS Algorithm -------------------------
Hp = Yp ./ Xp;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4558 2005-09-12 18:55 朱志敏\OFDM_LS_directly.m
文件 657 2005-09-12 18:52 朱志敏\ray_channell.m
目录 0 2006-02-24 19:53 朱志敏
----------- --------- ---------- ----- ----
5433 4
相关资源
- meanshift的matlab实现及2维图演示代码
- 均匀球体与长方体重力异常正演模拟
- 小波降噪软硬阈值改进阈值matlab代码
- matlab处理Adams仿真KC结果生产报告的程
- 图像的面积计算
- 三电平逆变器
- matlab数据预测模型算法.rar
- 惯导IMU初始姿态解算粗对准MATLAB
- emd分解matlab程序172943
- 小波神经网络MATLAB代码.zip
- 现代控制系统第十二版配套matlab
- 三周期极小曲面建模代码
- 直方图均衡化Matlab源代码
- 基本Snake活动轮廓模型
-
simli
nk仿真交流调压电路 - 汽车动力模型 发动机模型matlab/simul
-
VSG控制simuli
nk仿真 - 光伏电池仿真模型及PV仿真曲线
- 人造地震动matlab源代码
- 坐标轮换法
- 一维搜索——外推法
-
基于simuli
nk的三相逆变器的仿真设计 - 复杂网络最短路径matlab
- INS/GPS matlab仿真程序
- 8PSK理论误码率及误比特率
- 基于MATLAB GUI 界面设计解线性方程组
- 最小二乘影像匹配程序matlab
- 高光谱异常探测算法RXD的matlab实现
- 一维非稳态导热热传导Matlab程序
-
三相整流电路simuli
nk仿真
评论
共有 条评论