main_code.mlx (Setting simulation parameters)
Adjusting the carrier frequency of the wireless channel is possible with param.freq_carr. The speed of light is a physical constant, and the wavelength is determined by the carrier frequency. The sampling rate of the wireless communication system is determined with param.freq_band, which defines the time difference between consecutive channel snapshots. The channel snapshot is the smallest unit of channel data in WiThRay.
The channel path between the transmitter and receiver can undergo multiple numbers of reflections and diffractions, but the developed RT algorithm only finds the channel paths under the defined numbers of reflections and diffractions. The permitted numbers of reflections and diffractions are param.num_reflect and param.num_difrct. The RT algorithm of WiThRay theoretically has no limit on the numbers of reflections and diffractions, but increasing param.num_reflct and param.num_difrct can significantly increase the simulation runtime.
WiThRay supports generating the scattering paths based on the modified PG method. To implement the scattering, the modified PG method casts the grid points around the reflecting and diffracting points. The scattering area is the area with the scattering grid points, which is determined by param.sctt_area. The interval of grid points in the scattering area is param.sctt_grid. As param.sctt_grid decreases, the resolution of scattering evaluation is enhanced, but the simulation complexity increases. WiThRay adopts the directive scattering model for the reflecting evaluation, where the lobe width is determined by param.itg_lobe.
simulset.num_bs, simulset.num_irs, simulset.num_ue, and simulset.num_vehc determine the numbers of BSs/IRSs/UEs/VEHs imported from map_0000.xlsx. Please remember that, if simulset.num_bs=4, there should be four or more BSs in map_0000.xlsx. It is the same for simulset.num_irs, simulset.num_ue, and simulset.num_vehc.
There are two types of UE position settings, i.e., (i) grid-type and (ii) trajectory-type. simulset.experiment is to choose the UE position setting; "grid" and "traj." More details of UE position settings are explained here. The grid-type UE positions are determined by simulset.x_range, simulset.y_range, and simulset.num_grid. The trajectory-type UE positions are deteremined by simulset.num_subcar, simulset.num_cycprf, simulset.num_blck, simulset.tot_samp, and simulset.period_samp.