Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ask questions about datasets. #3

Open
zhangwb227 opened this issue Feb 4, 2024 · 12 comments
Open

Ask questions about datasets. #3

zhangwb227 opened this issue Feb 4, 2024 · 12 comments

Comments

@zhangwb227
Copy link

I'm sorry to bother you, but I also recently enjoyed the research on CSI feedback overhead in massive MIMO systems, and I'm glad to find your contribution here. However, I have encountered difficulties in using QuaDRiGa for dataset generation, I would appreciate it if you could share your dataset generation source code with me. Please contact me at zhangwb227@126.com. Thank you very much!

@SeokhyunJeong
Copy link
Owner

SeokhyunJeong commented Feb 5, 2024 via email

@FardadAnsari
Copy link

Thanks for the code, may i ask you something about the data you employed for CSInet_pytorch repository, it is indoor or outdoor and which frequesncy 300MHz or 5.3GHz ?
Warm Regards

@zhangwb227
Copy link
Author

zhangwb227 commented May 21, 2024 via email

@FardadAnsari
Copy link

Thanks for the replay , since we had generated data as csv file in @SeokhyunJeong seokhyunjeong repositories

@SeokhyunJeong
Copy link
Owner

SeokhyunJeong commented May 23, 2024

Thanks for the code, may i ask you something about the data you employed for CSInet_pytorch repository, it is indoor or outdoor and which frequesncy 300MHz or 5.3GHz ? Warm Regards

Thank you for your comment.
In the original CsiNet paper, data include outdoor 300MHz and indoor 5.3GHz.
In our dataset, for the validation in mmWave frequency band, we employed 28GHz outdoor: 3GPP_38.901_UMa_NLOS.

@SecretGuy
Copy link

Thanks a lot for you sharing the code of generating CSI, but i meet a question when i runned the code.
I copied the code and runned it, the result doesn't like the data_large or the data_online dataset shareing in your google driver. The result runned the code show only 200 column datas, but the data_large or the data_online includes 2048 column in one row.
So, May i ask you some questions ?
1.How should I adjust the code to generate the dataset like the data_large or the data_online, and save it?
2.In fact, I need to generate more than 32 antennas dataset, like 48, 64 and more. Should I change the parameter N_ver to 48, 64?
I feel so sorry to bother you.
Best wishes !!!

@SeokhyunJeong
Copy link
Owner

Thanks a lot for you sharing the code of generating CSI, but i meet a question when i runned the code. I copied the code and runned it, the result doesn't like the data_large or the data_online dataset shareing in your google driver. The result runned the code show only 200 column datas, but the data_large or the data_online includes 2048 column in one row. So, May i ask you some questions ? 1.How should I adjust the code to generate the dataset like the data_large or the data_online, and save it? 2.In fact, I need to generate more than 32 antennas dataset, like 48, 64 and more. Should I change the parameter N_ver to 48, 64? I feel so sorry to bother you. Best wishes !!!

Thank you for your comment.
You can adjust N_ver or N_hor to generate the channel dataset with more than 32 antennas.
Then, you can modify N_t in model.py file.

@SecretGuy
Copy link

Thanks a lot for you sharing the code of generating CSI, but i meet a question when i runned the code. I copied the code and runned it, the result doesn't like the data_large or the data_online dataset shareing in your google driver. The result runned the code show only 200 column datas, but the data_large or the data_online includes 2048 column in one row. So, May i ask you some questions ? 1.How should I adjust the code to generate the dataset like the data_large or the data_online, and save it? 2.In fact, I need to generate more than 32 antennas dataset, like 48, 64 and more. Should I change the parameter N_ver to 48, 64? I feel so sorry to bother you. Best wishes !!!

Thank you for your comment. You can adjust N_ver or N_hor to generate the channel dataset with more than 32 antennas. Then, you can modify N_t in model.py file.

Thanks for your reply. I ran the code you provided once and performed a 2D discrete Fourier transform and truncation on the generated data, but the data visualisation I generated myself is not the same as the data_large data visualisation you provided, as shown in the figure below:
1.data_large's data visualisation(you provided)
image
2.my dataset's data visualisation(runned the code by myself)
image
I would like to ask what should be done to the generated data to generate a dataset with a similar distribution as the data_large dataset? Thanks a lot!
Best wishes!

@SeokhyunJeong
Copy link
Owner

SeokhyunJeong commented Aug 8, 2024

Thanks a lot for you sharing the code of generating CSI, but i meet a question when i runned the code. I copied the code and runned it, the result doesn't like the data_large or the data_online dataset shareing in your google driver. The result runned the code show only 200 column datas, but the data_large or the data_online includes 2048 column in one row. So, May i ask you some questions ? 1.How should I adjust the code to generate the dataset like the data_large or the data_online, and save it? 2.In fact, I need to generate more than 32 antennas dataset, like 48, 64 and more. Should I change the parameter N_ver to 48, 64? I feel so sorry to bother you. Best wishes !!!

Thank you for your comment. You can adjust N_ver or N_hor to generate the channel dataset with more than 32 antennas. Then, you can modify N_t in model.py file.

Thanks for your reply. I ran the code you provided once and performed a 2D discrete Fourier transform and truncation on the generated data, but the data visualisation I generated myself is not the same as the data_large data visualisation you provided, as shown in the figure below: 1.data_large's data visualisation(you provided) image 2.my dataset's data visualisation(runned the code by myself) image I would like to ask what should be done to the generated data to generate a dataset with a similar distribution as the data_large dataset? Thanks a lot! Best wishes!

The sparsity can be depend on the simulation environment.
However, I think your data is too much not sparse.
I re-ran the MATLAB code and obtained the following channel (row: subcarrier dimension, column: antenna dimension):

mld

Please ensure that you change all dimensions of the channel from 32 to 48. For example, if you generated the channel with 48 subcarriers, after 2D FFT, it should reshape to (48, # of subcarriers) instead of (32, # of subcarriers).
If you don't mind, could you please show me the code you used to convert channel data into a sparse matrix?

If you have any questions, feel free to leave a comment here.

Thank you!

@SecretGuy
Copy link

SecretGuy commented Aug 11, 2024

Thanks a lot for you sharing the code of generating CSI, but i meet a question when i runned the code. I copied the code and runned it, the result doesn't like the data_large or the data_online dataset shareing in your google driver. The result runned the code show only 200 column datas, but the data_large or the data_online includes 2048 column in one row. So, May i ask you some questions ? 1.How should I adjust the code to generate the dataset like the data_large or the data_online, and save it? 2.In fact, I need to generate more than 32 antennas dataset, like 48, 64 and more. Should I change the parameter N_ver to 48, 64? I feel so sorry to bother you. Best wishes !!!

Thank you for your comment. You can adjust N_ver or N_hor to generate the channel dataset with more than 32 antennas. Then, you can modify N_t in model.py file.

Thanks for your reply. I ran the code you provided once and performed a 2D discrete Fourier transform and truncation on the generated data, but the data visualisation I generated myself is not the same as the data_large data visualisation you provided, as shown in the figure below: 1.data_large's data visualisation(you provided) image 2.my dataset's data visualisation(runned the code by myself) image I would like to ask what should be done to the generated data to generate a dataset with a similar distribution as the data_large dataset? Thanks a lot! Best wishes!

The sparsity can be depend on the simulation environment. However, I think your data is too much not sparse. I re-ran the MATLAB code and obtained the following channel (row: subcarrier dimension, column: antenna dimension):

mld

Please ensure that you change all dimensions of the channel from 32 to 48. For example, if you generated the channel with 48 subcarriers, after 2D FFT, it should reshape to (48, # of subcarriers) instead of (32, # of subcarriers). If you don't mind, could you please show me the code you used to convert channel data into a sparse matrix?

If you have any questions, feel free to leave a comment here.

Thank you!

Thanks for your reply. The code I wrote to convert the channel data to a sparse matrix may have some issues. I directly performed 2D-FFT, truncation and re-stitching of the real and virtual parts of the generated data.

Here's the code I worked on

`
clear all;
clc;

% Output h is a N_UE by N_BS by N_sc by N_time matrix
%
% Carrier Frequency and BandWidth
fc = 28e9;
BW = 1e8;
OFDM_size = 1024;

N_ver = 32; % Number of antenna in vertical array
N_hor = 1; % Number of antenna in Horizontal array
Downtilt_angle = 10; % in degree

% UE Mobility (UE is moving linearly to a random direction)
UE_Velocity_Kmh = 6; % in km/h
Channel_aging_period = 10^-3; % in s

% Get channel
h = mmWave_OFDM_TVchannel_generation(fc,BW,OFDM_size,N_ver,N_hor,Downtilt_angle,UE_Velocity_Kmh,Channel_aging_period);

% Channel data process
HT = [];
UE_antenna_idx = 1;
for idx_channel=1:200
a = h(UE_antenna_idx,:,:,idx_channel); % get a channel data
a = fft2(a); % 2D-FFT of the channel data
a = squeeze(a); % reshape 1×32×1024 to 32×1024
HT_a = a(:,1:32); % Capture the first 32 columns
ra = real(HT_a); % get the real value part
ia = imag(HT_a); % get the imaginary value part
ra_col = ra'
ia_col = ia';
HT_real = reshape(ra_col, 1, []); % reshape 32×32 to 1×1024
HT_imag = reshape(ia_col, 1, []);
for i=1:1024 % Stitch the real and imaginary data into a single row
HT(idx_channel,i) = HT_real(1,i);
HT(idx_channel,i+1024) = HT_imag(1,i);
end
end
save('dataset_32_32','HT'); % This is the final dataset generated.
disp('done!');
% plot(channel_magnitude);

% Inputs:
% fc : carrier frequency in Hz
% OFDM_size : FDD size
% N_ver : Number of antenna in vertical array
% N_hor : Number of antenna in Horizontal array
% Downtilt_angle : Antenna downtilt angle in degree
% UE_velocity_kmh : UE speed in km/h
% Channel_aging_period : Time varing channel aging in s

% Output:
% 4-D channel matrix( UE_antenna, BS_antenna, subcarrier, channel_idx )
% h : N_UE * N_BS * OFDM_size * 200

function h = mmWave_OFDM_TVchannel_generation(fc,BW,OFDM_size,N_ver,N_hor,Downtilt_angle,UE_velocity_kmh,Channel_aging_period);

% Simulation parameters setting
Par = qd_simulation_parameters;
Par.center_frequency = fc;
Par.sample_density = 2;
Par.use_3GPP_baseline = 1;

% Simulation track setting
Track = qd_track('linear',199UE_velocity_kmh/3.6Channel_aging_period,unifrnd(-pi, pi));
Track.initial_position = [unifrnd(50,100);unifrnd(50,100);1.7];
Track.scenario = '3GPP_38.901_UMa_NLOS';
Track.interpolate_positions(Par.samples_per_meter);

% Simulation layout
Layout = qd_layout(Par);
Layout.tx_array = qd_arrayant('3gpp-mmw',N_ver,N_hor,fc,1,Downtilt_angle,0.5,1,1,[],[]);
Layout.rx_array = qd_arrayant('dipole');
Layout.tx_position(3) = 25;
Layout.rx_track = Track;

% Get Channel
cn = Layout.get_channels;
Track.set_speed(UE_velocity_kmh/3.6);
dist = Track.interpolate_movement(Channel_aging_period);
ci = cn.interpolate(dist);
h = ci.fr(BW, OFDM_size);
size(h)
end
`

I don't know whether you handle the generated channel data like this, but I really want to address this question. I would appreciate it if you could share your channel data processed code with me. Thank you again!

Best wishes.

@SeokhyunJeong
Copy link
Owner

SeokhyunJeong commented Aug 12, 2024

Thanks a lot for you sharing the code of generating CSI, but i meet a question when i runned the code. I copied the code and runned it, the result doesn't like the data_large or the data_online dataset shareing in your google driver. The result runned the code show only 200 column datas, but the data_large or the data_online includes 2048 column in one row. So, May i ask you some questions ? 1.How should I adjust the code to generate the dataset like the data_large or the data_online, and save it? 2.In fact, I need to generate more than 32 antennas dataset, like 48, 64 and more. Should I change the parameter N_ver to 48, 64? I feel so sorry to bother you. Best wishes !!!

Thank you for your comment. You can adjust N_ver or N_hor to generate the channel dataset with more than 32 antennas. Then, you can modify N_t in model.py file.

Thanks for your reply. I ran the code you provided once and performed a 2D discrete Fourier transform and truncation on the generated data, but the data visualisation I generated myself is not the same as the data_large data visualisation you provided, as shown in the figure below: 1.data_large's data visualisation(you provided) image 2.my dataset's data visualisation(runned the code by myself) image I would like to ask what should be done to the generated data to generate a dataset with a similar distribution as the data_large dataset? Thanks a lot! Best wishes!

The sparsity can be depend on the simulation environment. However, I think your data is too much not sparse. I re-ran the MATLAB code and obtained the following channel (row: subcarrier dimension, column: antenna dimension):
mld
Please ensure that you change all dimensions of the channel from 32 to 48. For example, if you generated the channel with 48 subcarriers, after 2D FFT, it should reshape to (48, # of subcarriers) instead of (32, # of subcarriers). If you don't mind, could you please show me the code you used to convert channel data into a sparse matrix?
If you have any questions, feel free to leave a comment here.
Thank you!

Thanks for your reply. The code I wrote to convert the channel data to a sparse matrix may have some issues. I directly performed 2D-FFT, truncation and re-stitching of the real and virtual parts of the generated data.

Here's the code I worked on

` clear all; clc;

% Output h is a N_UE by N_BS by N_sc by N_time matrix % % Carrier Frequency and BandWidth fc = 28e9; BW = 1e8; OFDM_size = 1024;

N_ver = 32; % Number of antenna in vertical array N_hor = 1; % Number of antenna in Horizontal array Downtilt_angle = 10; % in degree

% UE Mobility (UE is moving linearly to a random direction) UE_Velocity_Kmh = 6; % in km/h Channel_aging_period = 10^-3; % in s

% Get channel h = mmWave_OFDM_TVchannel_generation(fc,BW,OFDM_size,N_ver,N_hor,Downtilt_angle,UE_Velocity_Kmh,Channel_aging_period);

% Channel data process HT = []; UE_antenna_idx = 1; for idx_channel=1:200 a = h(UE_antenna_idx,:,:,idx_channel); % get a channel data a = fft2(a); % 2D-FFT of the channel data a = squeeze(a); % reshape 1×32×1024 to 32×1024 HT_a = a(:,1:32); % Capture the first 32 columns ra = real(HT_a); % get the real value part ia = imag(HT_a); % get the imaginary value part ra_col = ra' ia_col = ia'; HT_real = reshape(ra_col, 1, []); % reshape 32×32 to 1×1024 HT_imag = reshape(ia_col, 1, []); for i=1:1024 % Stitch the real and imaginary data into a single row HT(idx_channel,i) = HT_real(1,i); HT(idx_channel,i+1024) = HT_imag(1,i); end end save('dataset_32_32','HT'); % This is the final dataset generated. disp('done!'); % plot(channel_magnitude);

% Inputs: % fc : carrier frequency in Hz % OFDM_size : FDD size % N_ver : Number of antenna in vertical array % N_hor : Number of antenna in Horizontal array % Downtilt_angle : Antenna downtilt angle in degree % UE_velocity_kmh : UE speed in km/h % Channel_aging_period : Time varing channel aging in s

% Output: % 4-D channel matrix( UE_antenna, BS_antenna, subcarrier, channel_idx ) % h : N_UE * N_BS * OFDM_size * 200

function h = mmWave_OFDM_TVchannel_generation(fc,BW,OFDM_size,N_ver,N_hor,Downtilt_angle,UE_velocity_kmh,Channel_aging_period);

% Simulation parameters setting Par = qd_simulation_parameters; Par.center_frequency = fc; Par.sample_density = 2; Par.use_3GPP_baseline = 1;

% Simulation track setting Track = qd_track('linear',199_UE_velocity_kmh/3.6_Channel_aging_period,unifrnd(-pi, pi)); Track.initial_position = [unifrnd(50,100);unifrnd(50,100);1.7]; Track.scenario = '3GPP_38.901_UMa_NLOS'; Track.interpolate_positions(Par.samples_per_meter);

% Simulation layout Layout = qd_layout(Par); Layout.tx_array = qd_arrayant('3gpp-mmw',N_ver,N_hor,fc,1,Downtilt_angle,0.5,1,1,[],[]); Layout.rx_array = qd_arrayant('dipole'); Layout.tx_position(3) = 25; Layout.rx_track = Track;

% Get Channel cn = Layout.get_channels; Track.set_speed(UE_velocity_kmh/3.6); dist = Track.interpolate_movement(Channel_aging_period); ci = cn.interpolate(dist); h = ci.fr(BW, OFDM_size); size(h) end `

I don't know whether you handle the generated channel data like this, but I really want to address this question. I would appreciate it if you could share your channel data processed code with me. Thank you again!

Best wishes.

Thank you for your response.
Your code for channel generation is excellent, but I found a minor issue that need fixing.

In your Matlab code,
(1) a = h(UE_antenna_idx,:,:,idx_channel); % get a channel data
(2) a = fft2(a); % 2D-FFT of the channel data
(3) a = squeeze(a); % reshape 1×32×1024 to 32×1024
(4) HT_a = a(:,1:32); % Capture the first 32 columns

variable a generated by the line (1) has a shape of (1, 32, 1024).
fft2 function performs a Fourier transform along the first two dimensions (in this case, 1 and 32).
This means that the Fourier transform is not applied along the subcarrier dimension (1024).
To address this, you can simply swap lines (2) and (3) to reshape a to (32, 1024) first, allowing the fft2 function to operate along the correct dimensions.
Also, you can capture last 32 columns in line (4) HT_z = a(:, 1024-31:1024) to get effective elements.

If you have any questions feel free to ask me.
Thank you very much!

@SecretGuy
Copy link

Thanks a lot for you sharing the code of generating CSI, but i meet a question when i runned the code. I copied the code and runned it, the result doesn't like the data_large or the data_online dataset shareing in your google driver. The result runned the code show only 200 column datas, but the data_large or the data_online includes 2048 column in one row. So, May i ask you some questions ? 1.How should I adjust the code to generate the dataset like the data_large or the data_online, and save it? 2.In fact, I need to generate more than 32 antennas dataset, like 48, 64 and more. Should I change the parameter N_ver to 48, 64? I feel so sorry to bother you. Best wishes !!!

Thank you for your comment. You can adjust N_ver or N_hor to generate the channel dataset with more than 32 antennas. Then, you can modify N_t in model.py file.

Thanks for your reply. I ran the code you provided once and performed a 2D discrete Fourier transform and truncation on the generated data, but the data visualisation I generated myself is not the same as the data_large data visualisation you provided, as shown in the figure below: 1.data_large's data visualisation(you provided) image 2.my dataset's data visualisation(runned the code by myself) image I would like to ask what should be done to the generated data to generate a dataset with a similar distribution as the data_large dataset? Thanks a lot! Best wishes!

The sparsity can be depend on the simulation environment. However, I think your data is too much not sparse. I re-ran the MATLAB code and obtained the following channel (row: subcarrier dimension, column: antenna dimension):
mld
Please ensure that you change all dimensions of the channel from 32 to 48. For example, if you generated the channel with 48 subcarriers, after 2D FFT, it should reshape to (48, # of subcarriers) instead of (32, # of subcarriers). If you don't mind, could you please show me the code you used to convert channel data into a sparse matrix?
If you have any questions, feel free to leave a comment here.
Thank you!

Thanks for your reply. The code I wrote to convert the channel data to a sparse matrix may have some issues. I directly performed 2D-FFT, truncation and re-stitching of the real and virtual parts of the generated data.
Here's the code I worked on
clear all; clc; % Output h is a N_UE by N_BS by N_sc by N_time matrix % % Carrier Frequency and BandWidth fc = 28e9; BW = 1e8; OFDM_size = 1024; N_ver = 32; % Number of antenna in vertical array N_hor = 1; % Number of antenna in Horizontal array Downtilt_angle = 10; % in degree % UE Mobility (UE is moving linearly to a random direction) UE_Velocity_Kmh = 6; % in km/h Channel_aging_period = 10^-3; % in s % Get channel h = mmWave_OFDM_TVchannel_generation(fc,BW,OFDM_size,N_ver,N_hor,Downtilt_angle,UE_Velocity_Kmh,Channel_aging_period); % Channel data process HT = []; UE_antenna_idx = 1; for idx_channel=1:200 a = h(UE_antenna_idx,:,:,idx_channel); % get a channel data a = fft2(a); % 2D-FFT of the channel data a = squeeze(a); % reshape 1×32×1024 to 32×1024 HT_a = a(:,1:32); % Capture the first 32 columns ra = real(HT_a); % get the real value part ia = imag(HT_a); % get the imaginary value part ra_col = ra' ia_col = ia'; HT_real = reshape(ra_col, 1, []); % reshape 32×32 to 1×1024 HT_imag = reshape(ia_col, 1, []); for i=1:1024 % Stitch the real and imaginary data into a single row HT(idx_channel,i) = HT_real(1,i); HT(idx_channel,i+1024) = HT_imag(1,i); end end save('dataset_32_32','HT'); % This is the final dataset generated. disp('done!'); % plot(channel_magnitude); % Inputs: % fc : carrier frequency in Hz % OFDM_size : FDD size % N_ver : Number of antenna in vertical array % N_hor : Number of antenna in Horizontal array % Downtilt_angle : Antenna downtilt angle in degree % UE_velocity_kmh : UE speed in km/h % Channel_aging_period : Time varing channel aging in s % Output: % 4-D channel matrix( UE_antenna, BS_antenna, subcarrier, channel_idx ) % h : N_UE * N_BS * OFDM_size * 200 function h = mmWave_OFDM_TVchannel_generation(fc,BW,OFDM_size,N_ver,N_hor,Downtilt_angle,UE_velocity_kmh,Channel_aging_period); % Simulation parameters setting Par = qd_simulation_parameters; Par.center_frequency = fc; Par.sample_density = 2; Par.use_3GPP_baseline = 1; % Simulation track setting Track = qd_track('linear',199_UE_velocity_kmh/3.6_Channel_aging_period,unifrnd(-pi, pi)); Track.initial_position = [unifrnd(50,100);unifrnd(50,100);1.7]; Track.scenario = '3GPP_38.901_UMa_NLOS'; Track.interpolate_positions(Par.samples_per_meter); % Simulation layout Layout = qd_layout(Par); Layout.tx_array = qd_arrayant('3gpp-mmw',N_ver,N_hor,fc,1,Downtilt_angle,0.5,1,1,[],[]); Layout.rx_array = qd_arrayant('dipole'); Layout.tx_position(3) = 25; Layout.rx_track = Track; % Get Channel cn = Layout.get_channels; Track.set_speed(UE_velocity_kmh/3.6); dist = Track.interpolate_movement(Channel_aging_period); ci = cn.interpolate(dist); h = ci.fr(BW, OFDM_size); size(h) end
I don't know whether you handle the generated channel data like this, but I really want to address this question. I would appreciate it if you could share your channel data processed code with me. Thank you again!
Best wishes.

Thank you for your response. Your code for channel generation is excellent, but I found a minor issue that need fixing.

In your Matlab code, (1) a = h(UE_antenna_idx,:,:,idx_channel); % get a channel data (2) a = fft2(a); % 2D-FFT of the channel data (3) a = squeeze(a); % reshape 1×32×1024 to 32×1024 (4) HT_a = a(:,1:32); % Capture the first 32 columns

variable a generated by the line (1) has a shape of (1, 32, 1024). fft2 function performs a Fourier transform along the first two dimensions (in this case, 1 and 32). This means that the Fourier transform is not applied along the subcarrier dimension (1024). To address this, you can simply swap lines (2) and (3) to reshape a to (32, 1024) first, allowing the fft2 function to operate along the correct dimensions. Also, you can capture last 32 columns in line (4) HT_z = a(:, 1024-31:1024) to get effective elements.

If you have any questions feel free to ask me. Thank you very much!

Thanks a lot for your advices! I made changes to the code as you suggested, and the resulting data matrix was able to remain sparstic.

image
image

Thank you again!

Best wishes!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants