多载波瑞利信道matlab,瑞利信道仿真matlab.doc
瑞利信道仿真matlab.doc
實驗一 瑞利信道的仿真
一 引言:瑞利信道介紹
瑞利衰落信道(Rayleigh fading channel)是一種無線電信號傳播環境的統計模型。這種模型假設信號通過無線信道之后,其信號幅度是隨機的,即“衰落”,并且其包絡服從。一個隨機二維向量的兩個分量呈獨立的、有著相同的方差的正態分布時,這個向量的模呈瑞利分布兩個正交高斯噪聲信號之和的包絡服從瑞利分布。運用公式驗證瑞利信道是符合瑞利分布的。
2、程序框圖
3、源程序代碼
% parameters setting
clc;
n 0:0.1:10;
sigma 1;
N 100000;
x randn 1,N ;
y randn 1,N ;
M x+j*y;
r sqrt sigma* x.^2+y.^2 ;
% q 1-exp - x.^2+y.^2 / 2*sigma*sigma ;
% step 0.1;
%range 0:step:3;
h hist r,n ;
fr_approx h/ 0.1*sum h ;
pijun sum r /N;
junfanghe r-pijun .^2;
junfang sum junfanghe /N;
u 0;
% w hist q,n ;
% fr_approx1 -w/ 0.1*sum w ;
% Calculate the CDF &Drawing
cdf raylcdf n,sigma ;
subplot 3,1,1 ;
plot n,cdf ;
% hold on;
% plot n,fr_approx1,'ko' ;
% Calculate the PDF & Drawing
title 'Normal cumulative distribution' ;
pdf raylpdf n,sigma ;
subplot 3,1,2 ;
plot n,pdf ;
title 'Normal probability density' ;
hold on;
plot n,fr_approx,'ko' ;
axis [0 8 0 1]
wucha fr_approx-pdf;
subplot 3,1,3 ;
plot n,wucha ;
title 'wucha' ;
% Generate the randoms & Calculate the mean, covariance
R raylrnd sigma,1,1000 ;
% subplot 3,1,3 ;
% plot n,R ;
% hole on;
E mean R ;
D cov R ;
四 實驗結果與分析
N 10000時 N 1000時
瑞利數據的均值為:1.2547. 瑞利數據的均值為:1.2933.
方差為: 0.3924 方差為: 0.4617
瑞利分布的均值為:1.2353 瑞利分布的均值為:1.2288
方差為: 0.3924 方差為: 0.4215
均值和方差比較
仿真結果圖像:
由圖中可見,實際的概率密度函數在接近1處達到最高點,與理論圖像相符,但由于模擬點數有限,實際的包絡概率函數與理論的圖像并不嚴格相像。
五 參考文獻:
[1] /view/935573.htm
[2] /content/11/0214/20/座機電話號碼_座機電話號碼.shtml
總結
以上是生活随笔為你收集整理的多载波瑞利信道matlab,瑞利信道仿真matlab.doc的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 面试宝典1
- 下一篇: DNF自动获取C语言,VC++开发硬件D