没有合适的资源?快使用搜索试试~ 我知道了~
Matlab\Rayleigh Fading Channel Simulation.txt
4星 · 超过85%的资源 需积分: 10 58 下载量 6 浏览量
2009-04-17
23:43:46
上传
评论 1
收藏 2KB TXT 举报
温馨提示
试读
2页
Matlab\Rayleigh Fading Channel Simulation.txt
资源推荐
资源详情
资源评论
% Program to simulate Rayleigh fading using a p-th order autoregressive model AR(p) according to
% Baddour's work: "Autoregressive modeling for fading channel simulation", IEEE Transaction on Wireless Communications, July 2005.
function [chann]=Rayleigh_fading(P,M,fm,fs,epselonn)
% P: AR model order
% M: number of samples
% fd: maximum doppler frequency in Hz
% fs: Symbol frequency in ksps
% epselonn: added bias
% useage: Rayleigh_fading(100,10000,150,3,0.00000001)
%-------------------------------------------------------------------------------------------------------------------------
for p=1:P+1
vector_corr(p)=besselj(0,2*pi*fm*(p-1)/(fs*1000)); % Bessel autocorrelation function according to Jakes' model
end
auto_correaltion_matrix=toeplitz(vector_corr(1:P))+eye(P)*epselonn;
% adding a small bias, epselonn, to the autocorrelation matrix to overcome the ill conditioning of Yule-Walker equations
AR_parameters=-inv(auto_correaltion_matrix)*vector_corr(2:P+1)';
% Solving the Yule-Walker equations to obtain the model parameters
segma_u=auto_correaltion_matrix(1,1)+vector_corr(2:P+1)*AR_parameters;
KKK=2000;
h=filter(1,[1 AR_parameters.'],wgn(M+KKK,1,10*log10(segma_u),'complex'));
% Use the function Filter to generate the channel coefficients
chann=h(KKK+1:end,:);
% Baddour's work: "Autoregressive modeling for fading channel simulation", IEEE Transaction on Wireless Communications, July 2005.
function [chann]=Rayleigh_fading(P,M,fm,fs,epselonn)
% P: AR model order
% M: number of samples
% fd: maximum doppler frequency in Hz
% fs: Symbol frequency in ksps
% epselonn: added bias
% useage: Rayleigh_fading(100,10000,150,3,0.00000001)
%-------------------------------------------------------------------------------------------------------------------------
for p=1:P+1
vector_corr(p)=besselj(0,2*pi*fm*(p-1)/(fs*1000)); % Bessel autocorrelation function according to Jakes' model
end
auto_correaltion_matrix=toeplitz(vector_corr(1:P))+eye(P)*epselonn;
% adding a small bias, epselonn, to the autocorrelation matrix to overcome the ill conditioning of Yule-Walker equations
AR_parameters=-inv(auto_correaltion_matrix)*vector_corr(2:P+1)';
% Solving the Yule-Walker equations to obtain the model parameters
segma_u=auto_correaltion_matrix(1,1)+vector_corr(2:P+1)*AR_parameters;
KKK=2000;
h=filter(1,[1 AR_parameters.'],wgn(M+KKK,1,10*log10(segma_u),'complex'));
% Use the function Filter to generate the channel coefficients
chann=h(KKK+1:end,:);
资源评论
- hardcoding2016-01-05不错,可以跑 用来对付作业了
- pozando2014-03-16很好!用在matlab的时候, 很好用
- plbb128782012-06-29用了几个matlab自带的函数,集成度高。所以关于瑞利信道是怎么产生的说得不太清楚
- 墨_隐2013-03-21很好 当时帮了很大忙 现在才来评论 对不住
- lidongming9862017-01-23有用 但是格式不对
jingyilin2008
- 粉丝: 4
- 资源: 13
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功