Giter VIP home page Giter VIP logo

huhujiajia1 / fmcw_radar_target_simulator Goto Github PK

View Code? Open in Web Editor NEW

This project forked from thomaswengerter/fmcw_radar_target_simulator

0.0 0.0 0.0 21.71 MB

This Matlab code simulates FMCW radar baseband signals for measurements in urban traffic scenarios with multiple targets (bicycles, pedestrians and cars). The output can be used as labelled, COCO formated input for deep learning radar target detection.

License: MIT License

Python 14.64% MATLAB 85.36%

fmcw_radar_target_simulator's Introduction

FMCW Radar Target Simulator

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.

MultiTargetRDmap

Getting Started

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:

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.

Prerequisites

  • MATLAB version >= 2020
  • MATLAB's phased array toolbox

Deployment

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.

Conversion to COCO annotation format

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.

Hints

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.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • MATLAB's work on the phased array toolbox
  • Support from the High Frequency Department at the Technical University of Munich

fmcw_radar_target_simulator's People

Contributors

thomaswengerter avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.