DeepMIMO Forum
[Solved] Error in DeepMIMO_Dataset_Generator
I am in my first steps to simulate channel mapping codes in my laptop but I have faced a problem in the 2nd step in this requirement:
Reproducing The Figure:
1- Generate a dataset for scenario I1_2p4 using the settings in the table above--number of paths should be 1.
2- Organize the data into a MATLAB structure named "rawData" with the following fields: channel and userLoc. "channel" is a 3D array with dimensions: # of antennas X # of sub-carriers X # of users while "userLoc" is a 2D array with dimensions: 3 X # of users.
3- Save the data structure into a .mat file.
4- In the file main, set the option: options.rawDataFile1 to point to the .mat file.
5- Run main.m
I have also faced the below error
DeepMIMO_Dataset_Generator
DeepMIMO Dataset Generation started
Reading the channel parameters of the ray-tracing scenario I1_2p4 - Percent done: 0.0Error using read_raytracing
Too many input arguments.
Error in DeepMIMO_generator (line 37)
[TX{t}.channel_params]=read_raytracing(filename_DoD,filename_DoA,filename_CIR,filename_Loc,params.num_paths,user_first,user_last);
Error in DeepMIMO_Dataset_Generator (line 35)
[DeepMIMO_dataset,params]=DeepMIMO_generator(params);
I hope you could guide me through this error. Thanking you in advance!
Please use the following code to organize the data and save it for step 3.
%% % ----------------- Add the path of DeepMIMO function --------------------% addpath('DeepMIMO_functions') %% % -------------------- DeepMIMO Dataset Generation -----------------------% % Load Dataset Parameters dataset_params = read_params('parameters.m'); [DeepMIMO_dataset, dataset_params] = DeepMIMO_generator(dataset_params); %% Create the structure and save the dataset num_antennas = length(dataset_params.active_BS); num_OFDM_subc = size(DeepMIMO_dataset{1}.user{1}.channel, 3); num_users = length(DeepMIMO_dataset{1}.user); channel = zeros(num_antennas, num_OFDM_subc, num_users); userLoc = zeros(3, num_users); for j = 1:num_antennas for i = 1:num_users channel(j, :, i) = DeepMIMO_dataset{j}.user{i}.channel(1, 1, :); userLoc(:, i) = DeepMIMO_dataset{j}.user{i}.loc; end end rawData.channel = channel; rawData.userLoc = userLoc; % The saved file is ready for running the channel mapping main script. save('DeepMIMO_dataset/channelmapping_singlepath.mat', 'rawData', '-v7.3');
For this code, the "parameters.m" file should be set as follows:
%%%% DeepMIMO parameters set %%%% % A detailed description of the parameters is available on DeepMIMO.net %Ray-tracing scenario params.scenario = 'I1_2p4'; % The adopted ray tracing scenario [check the available scenarios at http://44.228.171.44/scenarios/] %Dynamic Scenario Scenes [only for dynamic (multiple-scene) scenarios] params.scene_first = 1; params.scene_last = 1; % Active base stations params.active_BS = [1:64]; % Includes the numbers of the active BSs (values from 1-18 for 'O1')(check the scenario description at http://44.228.171.44/scenarios/ for the BS numbers) % Active users params.active_user_first = 1; % The first row of the considered user section (check the scenario description for the user row map) params.active_user_last = 502; % The last row of the considered user section (check the scenario description for the user row map) % Subsampling of active users %--> Setting both subsampling parameters to 1 activate all the users indicated previously params.row_subsampling = 1; % Randomly select round(row_subsampling*(active_user_last-params.active_user_first)) rows params.user_subsampling = 1; % Randomly select round(user_subsampling*number_of_users_in_row) users in each row % Antenna array dimensions params.num_ant_BS = [1, 1, 1]; % Number of antenna elements for the BS arrays in the x,y,z-axes % By defauly, all BSs will have the same array sizes % To define different array sizes for the selected active BSs, you can add multiple rows. % Example: For two active BSs with a 8x4 y-z UPA in the first BS and 4x4 % x-z UPA for the second BS, you write % params.num_ant_BS = [[1, 8, 4]; [1, 4, 4]]; params.num_ant_UE = [1, 1, 1]; % Number of antenna elements for the user arrays in the x,y,z-axes % Antenna array orientations params.activate_array_rotation = 0; % 0 -> no array rotation - 1 -> apply the array rotation defined in params.array_rotation_BS and params.array_rotation_UE params.array_rotation_BS = [5, 10, 20]; % 3D rotation angles in degrees around the x,y,z axes respectively % The origin of these rotations is the position of the first BS antenna element % The rotation sequence applied: (a) rotate around z-axis, then (b) rotate around y-axis, then (c) rotate around x-axis. % To define different orientations for the active BSs, add multiple rows.. % Example: For two active BSs with different array orientations, you can define % params.array_rotation_BS = [[10, 30, 45]; [0, 30, 0]]; params.array_rotation_UE = [0, 30, 0]; % User antenna orientation settings % For uniform random selection in % [x_min, x_max], [y_min, y_max], [z_min, z_max] % set [[x_min, x_max]; [y_min, y_max]; [z_min, z_max]] % params.array_rotation_UE = [[0, 30]; [30, 60]; [60, 90]]; params.enable_BS2BSchannels = 0; % Enable generating BS to BS channel (could be useful for IAB, RIS, repeaters, etc.) % Antenna array spacing params.ant_spacing_BS = .5; % ratio of the wavelength; for half wavelength enter .5 params.ant_spacing_UE = .5; % ratio of the wavelength; for half wavelength enter .5 % Antenna element radiation pattern params.radiation_pattern = 0; % 0: Isotropic and % 1: Half-wave dipole % System parameters params.bandwidth = 0.02; % The bandwidth in GHz params.activate_RX_filter = 0; % 0 No RX filter % 1 Apply RX low-pass filter (ideal: Sinc in the time domain) % Channel parameters # Activate OFDM params.generate_OFDM_channels = 1; % 1: activate frequency domain (FD) channel generation for OFDM systems % 0: activate instead time domain (TD) channel impulse response generation params.num_paths = 1; % Maximum number of paths to be considered (a value between 1 and 25), e.g., choose 1 if you are only interested in the strongest path % OFDM parameters params.num_OFDM = 64; % Number of OFDM subcarriers params.OFDM_sampling_factor = 1; % The constructed channels will be calculated only at the sampled subcarriers (to reduce the size of the dataset) params.OFDM_limit = 16; % Only the first params.OFDM_limit subcarriers will be considered params.saveDataset = 0; % 0: Will return the dataset without saving it (highly recommended!)
Hi, during the running of the code of (main), I have gotten this error :
Arrays have incompatible sizes for this operation.
Error in dataPrep (line 91)
X1 = mask.*x(:,1:options.numOfSub,2);
Error in main (line 55)
[dataset,options] = dataPrep(rawData.channel, options);
Hi Osos,
Can you make sure you are running the exact code downloaded from Github repository? At line 91, instead of
X1 = mask.*x(:,1:options.numOfSub,2);
we have the following.
X1 = mask.*x(:,1:options.numOfSub,:);
Regards,
Umut
Leave a reply
Latest Post: Another way for installing DeepMIMO when "pip install DeepMIMO" fails. Our newest member: RickyRix Recent Posts Unread Posts Tags
Forum Icons: Forum contains no unread posts Forum contains unread posts
Topic Icons: Not Replied Replied Active Hot Sticky Unapproved Solved Private Closed