我理解接收信号方程表示y=hx+n
。我有一个在 MCCDMA Rayleigh 和 AWGN 通道中从发送方到接收方的传输脚本。从某个论坛上查找,我发现距离和路径损耗指数可以包含在信道增益中h = h* d^(-v/2)
:
其中d
= 距离和v
= 路径损耗指数
下面是我的 MATLAB 代码的一半,其中我在瑞利通道中包含了距离和路径损耗指数:
Taps=4; % Number of Taps
p1=0.5/2.3; % Power of Tap1
p2=0.9/2.3; % Power of Tap2
p3=0.7/2.3; % Power of Tap3
p4=0.2/2.3;
gain1=sqrt(p1/2)*[randn(1,N) + j*randn(1,N)]; % Gain for Tap1
gain2=sqrt(p2/2)*[randn(1,N) + j*randn(1,N)]; % Gain for Tap2
gain3=sqrt(p3/2)*[randn(1,N) + j*randn(1,N)]; % Gain for Tap3
gain4=sqrt(p4/2)*[randn(1,N) + j*randn(1,N)]; % Gain for Tap4
% dist = distance between sender and transmitter ; -pathLossExp = path loss exponent
gain1=gain1*dist^(-pathLossExp/2); % Path Loss for gain1
gain2=gain2*dist^(-pathLossExp/2); % Path Loss for gain2
gain3=gain3*dist^(-pathLossExp/2);
gain4=gain4*dist^(-pathLossExp/2);
x11=x(:);
x12=reshape(x11,1,length(x11));
i=1:length(x12);
delay1=1;
for i=delay1+1:length(x12) % Producing one sample delay in Tap2 w.r.t. Tap1
x13(i)=x(i-delay1);
end
delay2=2;
for i=delay2+1:length(x12) % Producing two sample delay in Tap2 w.r.t. Tap1
x14(i)=x(i-delay2);
end
delay3=3;
for i=delay3+1:length(x12) % Producing three sample delay in Tap2 w.r.t. Tap1
x15(i)=x(i-delay3);
end
x1=reshape(x13,(n+3),length(x13)/(n+3));
x2=reshape(x14,(n+3),length(x14)/(n+3));
x3=reshape(x15,(n+3),length(x15)/(n+3));
ch1=repmat(gain1,(n+3),1);
ch2=repmat(gain2,(n+3),1);
ch3=repmat(gain3,(n+3),1);
ch4=repmat(gain4,(n+3),1);
data_channel=x.*ch1+x1.*ch2+x2.*ch3+x3.*ch4; % Passing data through channel
但是,我需要一些帮助来验证所包含的路径损耗 Ii 是否正确。