Sherra
Member level 3
Hi all,
I would like to write my own code for creating a multipath rayleigh channel in matlab, the reason why i do not want to use the code provided in the communication toolbox is that i would like to be able to create four different channels (h11, h12, h21, h22) and then feed them into a 2x2 MIMO matrix. that way i can be able to do operations with the matrix H=[h11 12; h21 h22]. right now when i create four channels separately(using rayleighchan) and inject them in H , i cannot do further operations on that H because the four channels (h11, h12, h21, h22) are of type "struct".
Please help me with any directions.
I want to start simple, first consider a single path scenario then use the same method for all other paths.
check the code below that i wrote and that does not work:
P=3; % total number of paths
bitrate=10000000;
ts=k/bitrate; % ts is the sample time of the input signal, in seconds (bit rate is 10Mbps)
fd=5; % fd is the maximum Doppler shift, in Hertz
delay11=sort(randint(1,P,[0 511]))*ts; %tau is a vector of path delays, each specified in seconds
path_power_dB_11=[-1 11 -21];
h11 = rayleighchan(ts,fd,delay11,path_power_dB_11);% Create Rayleigh fading channel object
h11.ResetBeforeFiltering=0;
delay12=sort(randint(1,P,[0 511]))*ts; %tau is a vector of path delays, each specified in seconds
path_power_dB_12=[ -2 -12 -22];
h12 = rayleighchan(ts,fd,delay12,path_power_dB_12);% Create Rayleigh fading channel object
h12.ResetBeforeFiltering=0;
delay21=sort(randint(1,P,[0 511]))*ts; %tau is a vector of path delays, each specified in seconds
path_power_dB_21=[ -3 -13 -23];
h21 = rayleighchan(ts,fd,delay21,path_power_dB_21);% Create Rayleigh fading channel object
h21.ResetBeforeFiltering=0;
delay22=sort(randint(1,P,[0 511]))*ts; %tau is a vector of path delays, each specified in seconds
path_power_dB_22=[ -4 -14 -24];
h22 = rayleighchan(ts,fd,delay22,path_power_dB_22);% Create Rayleigh fading channel object
h22.ResetBeforeFiltering=0;
H=[h11 h12; h21 h22];
Receiv_corr=mean(H*H'); %receive correlation matrix
Transmit_corr=mean(H'*H); % transmit correlation matrix
i would like to be able to do this : Receiv_corr * H * Transmit_corr;
but it does not work because to be able to do the following multiplication "Receiv_corr * H * Transmit_corr"; The elements in H should be in time domain and not of the "struct" type that rayleighchan gives them.
ANY KIND OF HELP WOULD BE GREATLY APPRECIATED!!!
I would like to write my own code for creating a multipath rayleigh channel in matlab, the reason why i do not want to use the code provided in the communication toolbox is that i would like to be able to create four different channels (h11, h12, h21, h22) and then feed them into a 2x2 MIMO matrix. that way i can be able to do operations with the matrix H=[h11 12; h21 h22]. right now when i create four channels separately(using rayleighchan) and inject them in H , i cannot do further operations on that H because the four channels (h11, h12, h21, h22) are of type "struct".
Please help me with any directions.
I want to start simple, first consider a single path scenario then use the same method for all other paths.
check the code below that i wrote and that does not work:
P=3; % total number of paths
bitrate=10000000;
ts=k/bitrate; % ts is the sample time of the input signal, in seconds (bit rate is 10Mbps)
fd=5; % fd is the maximum Doppler shift, in Hertz
delay11=sort(randint(1,P,[0 511]))*ts; %tau is a vector of path delays, each specified in seconds
path_power_dB_11=[-1 11 -21];
h11 = rayleighchan(ts,fd,delay11,path_power_dB_11);% Create Rayleigh fading channel object
h11.ResetBeforeFiltering=0;
delay12=sort(randint(1,P,[0 511]))*ts; %tau is a vector of path delays, each specified in seconds
path_power_dB_12=[ -2 -12 -22];
h12 = rayleighchan(ts,fd,delay12,path_power_dB_12);% Create Rayleigh fading channel object
h12.ResetBeforeFiltering=0;
delay21=sort(randint(1,P,[0 511]))*ts; %tau is a vector of path delays, each specified in seconds
path_power_dB_21=[ -3 -13 -23];
h21 = rayleighchan(ts,fd,delay21,path_power_dB_21);% Create Rayleigh fading channel object
h21.ResetBeforeFiltering=0;
delay22=sort(randint(1,P,[0 511]))*ts; %tau is a vector of path delays, each specified in seconds
path_power_dB_22=[ -4 -14 -24];
h22 = rayleighchan(ts,fd,delay22,path_power_dB_22);% Create Rayleigh fading channel object
h22.ResetBeforeFiltering=0;
H=[h11 h12; h21 h22];
Receiv_corr=mean(H*H'); %receive correlation matrix
Transmit_corr=mean(H'*H); % transmit correlation matrix
i would like to be able to do this : Receiv_corr * H * Transmit_corr;
but it does not work because to be able to do the following multiplication "Receiv_corr * H * Transmit_corr"; The elements in H should be in time domain and not of the "struct" type that rayleighchan gives them.
ANY KIND OF HELP WOULD BE GREATLY APPRECIATED!!!