Sherra
Member level 3
Hi all,
I would like to write my own code for creating a multipath rayleigh channel in matlab, the eason why i do not want to use teh code in teh communication toolbox is taht i would like to b able to create for different channels taht is h11, h12, h21, h22 and tehn 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 and inject tehm in H , i cannot do further operations on that H because the four h11, h12, h21, h22 are of type "struct".
Please help me with any directions.
I want to start simple, like each channel has three paths.
check the code below that i wrote and tahat 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
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 eason why i do not want to use teh code in teh communication toolbox is taht i would like to b able to create for different channels taht is h11, h12, h21, h22 and tehn 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 and inject tehm in H , i cannot do further operations on that H because the four h11, h12, h21, h22 are of type "struct".
Please help me with any directions.
I want to start simple, like each channel has three paths.
check the code below that i wrote and tahat 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
ANY KIND OF HELP WOULD BE GREATLY APPRECIATED!!!