自学内容网 自学内容网

(11)MATLAB莱斯(Rician)衰落信道仿真2


前言

首先给出莱斯衰落信道仿真模型,该模型由直射路径分量和反射路径分量组成,其中反射路径分量由瑞利衰落信道模型构成,该模型可以很方便地建立瑞利衰落信道的仿真。给出莱斯衰落信道的MATLAB仿真代码,并对比了莱斯衰落信道和瑞利衰落信道,揭示了两者之间的内在关系。


一、莱斯衰落信道仿真模型

根据《(10)MATLAB莱斯(Rician)衰落信道仿真1》知道,在莱斯衰落信道中,接收信号为直射路径信号和反射路径信号之和,而莱斯因子K正是直射路径与反射路径信号的相对功率。

若K>>1,则信道趋近于直射路径(高斯信道);若K<<1,则信道趋近于瑞利衰落。

在莱斯衰落信道仿真模型中,一般使用直射路径部分和瑞利衰落部分是分开的方法,仿真模型如下图所示:

莱斯衰落信道仿真模型

其中,
在这里插入图片描述

由图1可写出莱斯衰落信道模型的表示式:

在这里插入图片描述

下面使用该仿真模型,给出莱斯衰落信道的MATLAB仿真代码。

二、仿真代码与结果

1.仿真代码

首先,建立瑞利衰落信道仿真函数:

function Rayleigh_ch = Rayleigh_channel(nSamples)
% Rayleigh Channel Model
% Input : nSamples    - number of channel samples
% Output: Rayleigh_ch - complex channel vector
    sigma = sqrt(0.5);
    Rayleigh_ch = sigma*(randn(1,nSamples) + 1j*randn(1,nSamples));
end

注:该代码详细说明请参考:(9)MATLAB瑞利衰落信道仿真2

其次,使用瑞利衰落信道函数,建立莱斯衰落信道仿真函数:

function Rician_ch = Rician_channel(K_dB, nSamples)
% Rician Channel Model
% Input : K_dB      - K factor in dB
%         nSamples  - number of channel  samples
% Output: Rician_ch - complex channel vector
K = 10^(K_dB/10);
Rician_ch = sqrt(K/(K+1)) + sqrt(1/(K+1))*Rayleigh_channel(nSamples);

最后,给出莱斯衰落信道仿真模型

close all
clear all
clc

samples_number = 1e5;
bins_number = 50;                                      % number of bins in the histogram

% Rayleigh channel model
Rayleigh_ch = Rayleigh_channel(samples_number);

[elements_number,x] = hist(abs(Rayleigh_ch),bins_number);
px = elements_number/samples_number/mean(diff(x));
figure()
plot(x,px,'r-','LineWidth',1.5)
hold on
grid on


% Rician channel model
K_dB = [-50, 15];                                       % K in dB
Rician_ch = zeros(2,samples_number);
color = ['b','m'];
line = ['-','--'];
marker = ['o','*'];
for i=1:length(K_dB)
    Rician_ch(i,:) = Rician_channel(K_dB(i),samples_number);
    [elements_number,x] = hist(abs(Rician_ch(i,:)),bins_number);
    px = elements_number/samples_number/mean(diff(x));
    plot(x, px, [color(i),line(i),marker(i)],'LineWidth',1.5);
end

title('The PDF of Rayleigh fading channel and Rician fading channel')
xlabel('x')
ylabel('Occurance of x: px')                            % Occurance rate
legend('Rayleigh','Rician, K=-50dB','Rician, K=15dB')

2.仿真结果画图

仿真代码运行结果画图如下:

在这里插入图片描述

从仿真图中可以看到,若K>>1,则莱斯衰落信道趋近于高斯信道;若K<<1,则信道趋近于瑞利衰落信道。该仿真结果与理论分析一致。

三、后续:

下一篇文章将会给出莱斯随机变量的概率密度函数的MATLAB代码。

四、参考文献:

Michel C. Jeruchim, Philip Balaban, and K. Sam Shanmugan , Simulation of Communication Systems, Second Edition : Methodology, Modeling, and Techniques



原文地址:https://blog.csdn.net/weixin_45333185/article/details/142664190

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!