瑞利衰落信道(Rayleigh fading channel)是一种无线电信号传播环境的统计模型。这种模型假设信号通过无线信道之后,其信号幅度是随机的,即“衰落”,并且其包络服从瑞利分布。这一信道模型能够描述由电离层和对流层反射的短波信道,以及建筑物密集的城市环境。12瑞利衰落只适用于从发射机到接收机不存在直射信号(LoS,Line of Sight)的情况,否则应使用莱斯衰落信道作为信道模型。
%main.m
clc;
clear;
close all;
LengthOfSignal=10240; %信号长度(最好大于两倍fc)
fm=512; %最大多普勒频移
fc=5120; %载波频率
t=1:LengthOfSignal;
% SignalInput=sin(t/100);
SignalInput=sin(t/100)+cos(t/65); %信号输入
delay=[0 31 71 109 173 251];
power=[0 -1 -9 -10 -15 -20]; %dB
y_in=[zeros(1,delay(6)) SignalInput]; %为时移补零
y_out=zeros(1,LengthOfSignal); %用于信号输出
for i=1:6
Rayl;
y_out=y_out+r.*y_in(delay(6)+1-delay(i):delay(6)+LengthOfSignal-delay(i))*10^(power(i)/20);
end;
figure(1);
subplot(2,1,1);
plot(SignalInput(delay(6)+1:LengthOfSignal)); %去除时延造成的空白信号
title('Signal Input');
subplot(2,1,2);
plot(y_out(delay(6)+1:LengthOfSignal)); %去除时延造成的空白信号
title('Signal Output');
figure(2);
subplot(2,1,1);
hist(r,256);
title('Amplitude Distribution Of Rayleigh Signal')
subplot(2,1,2);
hist(angle(r0));
title('Angle Distribution Of Rayleigh Signal');
figure(3);
plot(Sf1);
title('The Frequency Response of Doppler Filter');