web123456

Simulation of multipath fading channels under Matlab

Fading channel parameters include multipath expansion and Doppler expansion. Time-invariant multipath expansion is equivalent to a delay tap filter, while Doppler expansion pays attention to the Doppler power spectrum density, usually using Jakes power spectrum, Gaussian, and uniform power spectrum.

Multipath fading channels are composed of single-path channels superimposed, and the most important one among single-path channels is the Rayleigh flat fading channel.

The implementation of the improved Jakes model of Rayleigh flat fading channel is given below:

function [h]=rayleigh(fd,t)
 % Improved Jakes model to produce single-path flat Rayleigh fading channel
 %Yahong and Chengshan Xiao "Improved Models for
 %the Generation of Multiple Uncorrelated Rayleigh Fading Waveforms"
 %IEEE Commu letters, Vol.6, NO.6, JUNE 2002
 %Input variable description:
 %fd: The maximum Doppler shift of the channel unit Hz
 %t: The sampling time series of signals, sampling interval unit s
 % h is the output Rayleigh channel function, which is a time function complex sequence

     %Assumed number of incident waves
     N=40;

     wm=2*pi*fd;
     %The number of incident waves per quadrant is the number of oscillators
     N0=N/4;
     The real part of the % channel function
     Tc=zeros(1,length(t));
     The virtual part of the % channel function
     Ts=zeros(1,length(t));
     %Normalized Power Coefficient
     P_nor=sqrt(1/N0);
     %Different uniformly distributed random phases of individual paths
     theta=2*pi*rand(1,1)-pi;
     for ii=1:N0
           %The incident angle of the i-th incident wave
             alfa(ii)=(2*pi*ii-pi+theta)/N;
             %Random phases evenly distributed between (-pi,pi) for each subcarrier
             fi_tc=2*pi*rand(1,1)-pi;
             fi_ts=2*pi*rand(1,1)-pi;
             % calculates the impulse response function
             Tc=Tc+cos(cos(alfa(ii))*wm*t+fi_tc);
             Ts=Ts+cos(sin(alfa(ii))*wm*t+fi_ts);
     end;
     % multiply the normalized power coefficient to obtain the transmission function
    h=P_nor*(Tc+j*Ts);

By changing fd, it can be observed that the signal power changes faster as fd increases.

You can also use Matlab built-in functions to implement:

chan=rayleighchan(ts,fd);
 y=filter(chan,x);%pass channel

This built-in function can directly generate a frequency-selected multipath fading channel, each diameter is a Rayleigh fading process.

chan=rayleighchan(ts,fd,tau,pdb);
 %tau is the relative delay vector per diameter
 %pdb is the relative gain per diameter