Get project files

Complete WF project with results (ZIP, 17.6 MB)

Get Simulate Linear Chirp script

WaveFarer script (XMACRO, 4.6 KB)

Get Matlab post processing script

Matlab script (M, 4.6 KB)


A radar drive test is simulated using a vehicle target and the results are post-processed in order to generate a range-Doppler plot.

This tutorial utilizes WaveFarer's library by importing both the vehicle target assembly and the asphalt material, which is used to define the ground's electromagnetic properties. A transceiver is then added, consisting of one transmitter with a 77 GHz sinusoid waveform and one receiver. Each transceiver component includes a 30 degree directional antenna.

The locations of the vehicle target and the radar are parameterized based on each object's starting point and velocity over a time frame of 0 to 9 seconds. Users can animate the geometry by writing and executing and a short script as confirmation that the time parameter will behave as expected. The simulation begins at 3 seconds and launches one frame of 51 chirps one time, with start and stop frequencies of 77 GHz and 81 GHz, respectively.

Users can export WaveFarer's results to a .mat file for post-processing in MATLAB that generates a range-Doppler plot at 3 seconds. This output displays the target's response to the radar as it moves according to the applied velocity parameter over the specified time period.

This tutorial utilizes the following skills:

Step 1: Add the Vehicle Target

The vehicle target is added to the project from the library, and then parameters are created to apply movement to the target.

First, add the vehicle target.

  1. Click on the Libraries button on the right side of the WaveFarer window to open the Libraries editor.
  2. In the Libraries section on the left side of the editor, select Automotive Radar.
  3. In the Filters section, select Parts.
  4. In the lower portion of the editor, click on Euro NCAP Vehicle Target and drag it to the Parts branch of the Project Tree.
  5. Click OK in the Material Assignments window to add the vehicle to the project.
  6. Close the Libraries window.

Verify that the vehicle geometry appears in the Parts branch of the Project Tree. Also, notice that the associated materials have been added to the Definitions branch of the Project Tree.

Next, create the parameters.

  1. Click the Parameters button on the right side of the WaveFarer window to open the Parameters window.
  2. Click the Add button button in the upper-left corner of the Parameters window.
  3. Enter the Name by typing targetVelocity into the highlighted field.
  4. Press Tab and type 10 m/s into the Formula field.
  5. Press Tab and type Velocity of vehicle target into the Description field.
  6. Press Tab to add a second parameter.
  7. Type startLocation into the Name field.
  8. Press Tab and type 100 m into the Formula field.
  9. Press Tab and type Separation between target and sensor at t=0 s into the Description field.
  10. Press Tab to add a third parameter.
  11. Type t into the Name field.
  12. Press Tab and type 0 s into the Formula field.
  13. Press Tab and type Time into the Description field.
  14. Press Tab to add a fourth parameter.
  15. Type targetLocation into the Name field.
  16. Press Tab and type startLocation + targetVelocity*t into the Formula field.
  17. Press Tab and type Location of target at time t into the Description field.
  18. Click Apply and close the Parameters window.

Then, apply the parameters to the project.

  1. Right-click on the Euro NCAP Vehicle Target assembly in the Project Tree, then select ModifySpecify Orientation.
  2. Click the Advanced Mode button on the right side of the editor.
  3. Select Anchor on the left side of the editor.
  4. In the Anchor: Fixed Position section, enter targetLocation as the U value.
  5. Click Done to close the editor.

View the vehicle target's new coordinates in the bounding box in the Geometry window by clicking the Zoom to Extents button and then clicking on the Euro NCAP Vehicle Target in the Project Tree. Verify that the target moved to 100 m.

Step 2: Create the Asphalt Ground

The ground is modeled as a sheet body, but is treated as a dielectric half-space by creating and assigning a material.

First, create the ground.

  1. Right-click on the Parts branch of the Project Tree and select Create New, then Sheet Body to open the editor.
  2. Change the view by clicking View from +Z (top) on the right-side of the Geometry window.
  3. Under the Edit Profile tab, use the drop-down arrow to select the Rectangle tool from the shapes toolbar.
  4. In the drawing window, click on -5, -10, 0 to select the geometry's first point.
  5. Press Tab and enter 200 m as the U′ value in the Specify Position window.
  6. Press Tab and enter 10 m as the V′ value.
  7. Click OK.
  8. Name the part by typing Ground into the Name field.
  9. Click Done to save the changes to the project.

Next, assign the material.

  1. Click the Libraries button on the right side of the WaveFarer window.
  2. In the window, change the Filters by clicking on Materials.
  3. Click on the Asphalt material in the lower portion of the window and drag it into the Materials node of the Project Tree.
  4. In the Definitions branch of the Project Tree, click on Asphalt and drag it to the Ground in the Parts branch.
  5. Close the Libraries window.

Then set the ground as environment.

  1. Right-click on Ground in the Project Tree and choose Set as Environment.

Verify that the parts are set properly by right-clicking on the Parts branch of the Project Tree and choosing View Parts List (All Parts) to open the window. Confirm that the second column indicates that all vehicle parts are set as scatterers and the ground is set as environment, and then close the window.

Step 3: Create and Parameterize Transceiver

The transceiver serves as the point where the rays are sent and received. For this tutorial, it consists of one transmitter and one receiver with associated antenna and waveform definitions. A parameter is created and applied to the target.

First, define the antenna.

  1. In the Definitions branch of the Project Tree, right-click on Antennas and select New Antenna Definition.
  2. Name the antenna name by typing Directional (30 deg) into the highlighted field.
  3. Press Enter to commit the name change.
  4. Double-click on Directional (30 deg) in the Project Tree to open the Antenna Editor.
  5. In the editor, use the Type drop-down menu to select Directional.
  6. Enter 30 degrees as the E-Plane Half Power Beam Width.
  7. Enter 30 degrees as the H-Plane Half Power Beam Width.
  8. Click Done to close the editor.

Next, create the transceiver.

  1. Right-click on the Transceivers branch of the Project Tree and select New Transceiver Points Layout.
  2. Under the Layout tab, click in the Type field and use the drop-down arrow to select Transmitter.
  3. In the next column, check the box that Activates the antenna pattern for viewing at this location.
  4. Check the Changes to Radius Affects All Points option.
  5. Click in the Radius field and enter 0.025 m.
  6. Click the Add button button on the right side of the Layout tab.
  7. Click in the second point's Type field and use the drop-down arrow to select Receiver.
  8. Press Enter to apply the change.
  9. Select the first point in the table by clicking on Transmitter.
  10. Toggle the orientation-editing settings by clicking the Orientation editing button button at the top of the tab.
  11. Enter 0.007 m as the Y value.
  12. Enter 0.5 m as the Z value.
  13. Press Enter to apply the change.
  14. Change the Point to 2 to select the Receiver.
  15. Enter -0.007 m as the Y value.
  16. Enter 0.5 m as the Z value.
  17. Press Enter to apply the change.
  18. Enter the transceiver name by typing Radar into the Name field.
  19. Click Done to close the editor.

Then, parameterize the transceiver.

  1. Click the Parameters button on the right-side of the WaveFarer window to open the Parameters window.
  2. Click the Add button in the upper-left corner of the window.
  3. Enter the Name by typing sensorVelocity into the highlighted field.
  4. Press Tab and enter 20 m/s into the Formula field.
  5. Press Tab and type Velocity of radar sensor into the Description field.
  6. Press Tab and name the next parameter by typing sensorLocation into the highlighted field.
  7. Press Tab and type sensorVelocity*t into the Formula field.
  8. Press Tab and type Location of radar sensor at time t into the Description field.
  9. Click Apply to save the changes and close the Parameters window.
  10. In the Transceivers branch of the Project Tree, double-click on Radar to open the editor.
  11. Under the Specify Orientation tab, click the Advanced Mode button on the right side of the editor.
  12. Select Anchor on the left side of the editor.
  13. In the Anchor: Fixed Position section, enter sensorLocation as the U value.
  14. Click Apply.
  15. Click Done to close the editor.

Then, set the waveform's properties.

  1. In the Definitions branch of the Project Tree, double-click on the Sinusoid waveform to open the Waveform Editor.
  2. Enter 77 GHz as the Frequency.
  3. Enter the waveform name by typing 77 GHz Sinusoid into the Name field.
  4. Click Done to close the editor.

Step 4: Set the Analysis Boundary

The analysis boundary inputs define the area included in the simulation. For this tutorial, the boundary is set inside the road to remove diffractions for more realistic results.

  1. Right-click on Analysis Boundaries in the Project Tree and select New Analysis Boundary to open the editor.
  2. Enter 199 m into the X1 field.
  3. Enter -9 m into the Y1 field.
  4. Enter -1 m into the Z1 field.
  5. Enter -4 m into the X2 field.
  6. Enter 9 m into the Y2 field.
  7. Enter 5 m into the Z2 field.
  8. Type Analysis Boundary into the Name field.
  9. Click Done to close the editor.

Step 5: Set the Analysis Configuration

The analysis configuration inputs control how the calculation engine evaluates the simulation space. Users can modify the tradeoff between simulation accuracy and run time by adjusting the reflection and diffraction values, which determine the maximum number of interactions a ray path can have with geometry faces and edges. Higher numbers increase accuracy, as well as run time. For the vehicle target, a ray must reflect off of at least three faces for it to return back to the receiver, so the values will allow three reflections and two diffractions.

  1. Right-click on Analysis Configurations in the Project Tree and select New Physical Optics Configuration.
  2. Enter the configuration name by typing 3R2D into the highlighted field.
  3. Press Enter to commit the name change.
  4. Double-click on 3R2D in the Project Tree to open the Physical Optics Configuration Editor.
  5. Under the Properties tab, enter 3 as the Number of Reflections.
  6. Enter 2 as the number of Diffractions.
  7. Under the Specialized Output Requests tab, check the Enable Time-Sampled Data setting.
  8. Click Done to close the editor.

Step 6: Animate the Scenario

Once the project is set up, users can animate the geometry by writing and executing a short script. This step is not required, but it is recommended because it provides visual confirmation that the parameter sweep will behave as expected when the simulation is created.

  1. Right-click on the Scripts branch of the Project Tree and select New Macro Script to open the Scripting window.
  2. In the Project Tree, right-click on New Macro Script and select Rename.
  3. Enter the script's name by typing Sweep t into the Project Tree.
  4. Press Enter to commit the change to the project.
  5. Enter the following script into the upper portion of the Scripting window:
var list = App.getActiveProject().getParameterList();

for( var i = 0; i <= 9; i += 0.1 )
{
  list.setFormula( "t", i + " s" );
  App.sleep( 10 );
}
  1. Save the script by clicking the Commit button in the toolbar, and close the Scripting window.
  2. Right-click on Sweep t in the Project Tree, then select Execute to run the script.

Step 7: Simulate a Linear Chirp

Once the project setup is complete, it must be saved in order for the script to be used to create a new simulation and write output files.

First, download the script.

  1. Download the Simulate Linear Chirp script and save it in WaveFarer's Macros folder.

Next, save the project.

  1. In the upper-left corner of WaveFarer, click FileSave Project As to open the editor.
  2. Choose the desired location and enter Euro NCAP Vehicle Target as the Project Name.
  3. Click Save to save the project.

Then, create and run the simulation.

  1. Click the Simulations button on the right side of the WaveFarer window to open the Simulations window.
  2. Click the Create New Simulation button to open the editor.

Under the Resources tab, verify that the settings are appropriate for the hardware being used to run the simulation.

  1. Click Done to close the editor.
  2. In the upper-left corner of WaveFarer, click MacrosSimulate Linear Chirp to open the editor.
  3. Name the simulation by entering Linear Chirp Simulation at 3 s as the Simulation name.
  4. Change the Time parameter by selecting t from the drop-down menu.
  5. Change the Launch times of each frame by entering 3 s.

The Receiver sampling interval value is passed to MATLAB for post-processing. It does not affect the simulation, so it does not need to be changed.

  1. Enter 77 GHz as the Start frequency.
  2. Enter 81 GHz as the Stop frequency.
  3. Enter 80 us as the Chirp length.
  4. Enter 0 s as the Reset time between chirps.
  5. Enter 51 as the Number of chirps per frame.
  6. Check the Queue simulation option.
  7. Click the Create Simulation button.

Step 8: Generate Range-Doppler

Simulation results can be exported for post-processing in MATLAB, where users can generate a range-Doppler graph that displays the distance and velocity of the vehicle target based on its response to the radar signal. Users should note that either an active MATLAB license or access to their software is a prerequisite for this step.

First, download the script.

  1. Download the Export Complex Impulse Response script and save it in WaveFarer's Macros folder.

The Macros folder is WaveFarer's default location for downloaded scripts. Users can change this location in by clicking Edit Application Preferences, and entering a location in the Macros Menu portion of the General tab.

Next, export the simulation.

  1. In the upper-left corner of the WaveFarer window, click Macros and select Export Complex Impulse Response to open the editor.
  2. Choose the Export a single simulation option.
  3. Select the Simulation to export using the drop-down arrow.
  4. Select Run directories as the Output Folder(s).
  5. Select Matlab (*.mat) as the Output File Format.
  6. Click OK to run the script.

This generates a .mat file for each run in the simulation.

Then, generate a range-Doppler.

  1. Open MATLAB.
  2. Download the MATLAB post-processing script and save it to the desired location.
  3. In the left sidebar of MATLAB, double-click on generateChirpRangeDoppler.m to open the script.
  4. Click the Run button in the editor at the top of the MATLAB window.
  5. When a prompt appears in the Command Window at the bottom of MATLAB, enter the path to the WaveFarer project inside single quotes.
  6. Press Enter.
  7. When a prompt appears in the Command Window, enter the desired WaveFarer simulation ID number.
  8. Press Enter to display the plot.

The Range-Doppler at Time=3.00 Sec displays the distance and velocity of the Vehicle Target based on its response to the radar signal.