This repository is developed to simulate automotive FMCW radar signals urban traffic scenarios with pedestrians, bicyclists and cars. Multiple targets are placed and moved arbitrarily in a simulated noisy radar environment. A baseband signal is calculated for each target reflector point in the model and the signals are added at the output to simulate the radar's baseband signal by superposition. Random static clutter and noise are added for realistic results. From the baseband signal, the 3D radar cube can be displayed. With its corresponding labels, the data can be utilized for detection algorithm validation or the training of deep learning radar detection algorithms. For more information about the developed models, read my IEEE paper.
Download this repository to your local machine and run MATLAB in the unzipped folder. Make sure that you have installed a MATLAB version from 2020 or later. If you want to run the software on GNU Octave, navigate to the Octave branch. The Phased Array Toolbox is required for this simulation. Download it from MATLAB's built-in toolbox archive.
The main funtion which needs to be run to initiate the simulation is SimulateTargetList.m to generate a sequence of multi-target scenarios. Alternatively, TargetSimulation.m generates a single measurement of one target. Simulation options are:
- No targets (outputs noisy spectrum with static targets)
- Pedestrian with MATLAB's backscatterPedestrian
- Manned bicycle from class Bicyclist.m
- Car from class Car.m
- Single point reflectors from function simulateSignal.m (only in TargetSimulation.m)
Initialize the desired target list in the main function and use the random initializations for positions, velocities and specific target properties or set them manually. If you desire to simulate targets for your own radar device, change the radar properties in the class FMCWradar.m. If targets need to follow certain paths, initialize your own trajectories as in TrajectoryPlanner.m.
- MATLAB version >= 2020
- MATLAB's phased array toolbox
Let's illustrate the functionality of the programm in a small example. After the repository download the file and unzip it to a local folder.
Open FMCWradar.m to check the radar settings. All parameters like operating frequency, chirp shape and antenna characteristics are initialized in the properties. If you desire to print information about the added gaussian noise level and SNRs, you can set the variable printNoiseCharacteristics to true.
-
Single Target Measurement: Open TargetSimulation.m. All available target types are listed at the start of the function. Change the number of desired targets/measurements to create a training dataset. The generator initializes random positions and velocities for each target within the radars field of view. However, specific positions can simply be set for each target type to generate special szenarios of interest. If you want to output a plot of the RDmap, add the index of one or more RX antennas in the variable plotAntennas. The simulation saves the generated 3D range-doppler-azimuth radar cubes inSimulationData/TARGETNAME/TARGETNAME_X and the labels in SimulationData/Szenario123/Szenario123_Label_X.mat, where X denotes the measurement cycle. Target labels have the following format: [Range, velocity, azimuth, RadarVelocity, xPosition, yPosition, width, height, heading]
-
Multi-Target Szenario: Open SimulateTargetList.m. All available target types are listed at the first for loop. Change the rand sampling parameters to set the probability for the individual targets occuring randomly in the measurements. The generator initializes random positions, headings and velocities for each target within the radars field of view. After every measurement, the targets are moved one step along the generated trajectory. To setup special szenarios of interest, the trajectory has to be initialized in the TrajectoryPlanner.m. If you want to output a plot of the RDmap, add the index of one or more RX antennas in the variable plotAntennas. The simulation saves the generated 3D range-doppler-azimuth radar cubes inSimulationData/Szenario123/Szenario123_X.mat and the labels in SimulationData/Szenario123/Szenario123_Label_X.mat, where X denotes the measurement cycle. Target labels have the following format: [Range, velocity, azimuth, RadarVelocity, xPosition, yPosition, width, height, heading, obstruction]
The origin of the coordinate system is always with the radar device in (0,0,0), looking in direction of the x-axis. The simulated radar cubes are saved in decibel.
To use the simulated data for training or testing of neural networks, the conversion to the COCO annotation format might be helpful. The python function JSONCoco.py generates the json annotation format from simulated scenarios. To match the annotation format of images, the azimuth dimension is reduced to the maximum over all azimuth channels. Thus, the COCO annotations can be used to train a radar target detection network on range-Doppler maps.
Before running the code, set the correct path to a ./SimulationData folder and define if the dataset is saved as the training set with name trainvalname='train2017' or validation set with trainvalname='val2017'.
To feed sequences of 3 radar measurements as one input image to the network, JSONCoco_3SeqRGB.py overlays 3 measurements in the RGB channels and every 3rd label to the json file.
For the final training data generation, a GPU can be utilized to accelerate the simulation process. In SimulateTargetList.m, GPU acceleration is already integrated with parfor in line 234. To use GPU accelerated processing in TargetSimulation.m, change the expressions for target = 1:Pedestrians ... end to parfor target = 1:Pedestrians ... end.
- Thomas Wengerter - Initial work - thomaswengerter
See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details
- MATLAB's work on the phased array toolbox
- Support from the High Frequency Department at the Technical University of Munich