Complete project with results (ZIP, 17.6 MB)

WaveFarer script (XMACRO, 1.3 KB)

The radar range equation is commonly used as an analytic tool that calculates the received power for a target at a specified distance from a transceiver.

$$P_r = P_tG_tG_r\left(\frac{\lambda}{4\pi R}\right)^2\frac{\sigma}{4\pi R^2}$$

This equation can be solved for multiple distances and plotted for comparison. WaveFarer produces the same results at the radar range equation, as demonstrated in this tutorial.

In this tutorial, a transceiver consisting of one transmitter and one receiver uses 24.1 GHz antennas with 16 dBi gain and transmits 0 dBmw of power. The received power for a 20 dBsm corner reflector at incremented distances between 5 and 160 meters is simulated, and then graphs WaveFarer's generated results against the radar range equation.

This tutorial utilizes the following skills:

• Creating a corner reflector by defining a pyramid.
• Defining a parameter that varies the distance between the corner reflector and the origin.
• Assign a PEC material to the corner reflector in order to define its electromagnetic properties.
• Adding two transceiver components, each including a 45 degree directional antenna: one transmitter with a waveform frequency of 24.1 GHz and one receiver.
• Setting the analysis configuration to include 2 reflections, 1 diffraction, facet targeting, and MEC diffractions.
• Writing and executing a script that animates the geometry and confirms correct parameter sweep behavior.
• Running a simulation that performs a parameter sweep from 5 to 160 meters with a 2.5 meter increment.
• Evaluate the received power versus its distance from the origin.
• Import a script that plots the radar range equation.

## Step 1: Create the Geometry

The corner reflector will be modeled as a hollow pyramid, and then oriented to face the transmit and receive antennas. The remove faces feature will turn the pyramid into the desired corner reflector with three sides.

First, create the part.

1. Right-click on Parts in the Project Tree and select Create New ❯ Pyramid to open the editor.
2. Under the Edit Pyramid tab, define its size by typing in (.247 m) / sqrt(3) as the Height value.
3. Enter (.247 m) * sqrt(2/3) as the Radius 1 value.
4. Enter (.247 m) * sqrt(2/3) as the Radius 2 value.
5. Enter 0 m as the Top value.
6. Enter 3 as the Sides value.
7. Select Sheet using the Create as drop-down arrow.
8. Enter the geometry name by typing Corner Reflector into the Name field.
9. Under the Specify Orientation tab, select YZ Plane from the Presets drop-down menu.
10. In the Geometry window, right-click on the W axis and select Rotate around W'.
11. Enter -90 deg.
12. Click Done in the upper-right corner of the window to close the editor.

Then, remove one of the faces.

1. Right-click on the Corner Reflector in the Project Tree, then select Modify ❯ Remove Faces.
2. Click the Zoom to Extents button in the right sidebar.
3. Click on the face in the YZ plane.
4. Under the Preview tab, uncheck Close gaps left by removed faces.
5. Click Done to close the editor.

## Step 2: Parameterize the Corner Reflector

A parameter can be defined as a single value or formula, and can then be used in most of WaveFarer's edit fields. In this example, we will use parameterization to move the corner reflector along the x-axis.

First, create a parameter.

1. Click the Parameters button on the right side of the WaveFarer window.
2. Click the button in the upper-left corner of the Parameters window.
3. Enter the parameter name by typing targetLocation into the highlighted field.
4. Press Tab and type 10 m into the Formula cell.
5. Press Tab and type Distance to the corner reflector into the Description cell.
6. Click Apply.

Then, apply the parameter to the the reflector.

1. Right-click on the Corner Reflector in the Project Tree and select Modify ❯ Transform ❯ Translate.
2. Under the Specify Translation tab, click and drag the W' arrow to verify that the Corner Reflector moves along the x-axis.
3. Enter targetLocation as the W' value.
4. Click Done to close the editor.

View the corner reflector's new coordinates in the bounding box of the Geometry window by clicking the Zoom to Extents button and then clicking on the Corner Reflector in the Project Tree. Verify that the Corner Reflector moves according to the parameter's Formula by changing the definition to 15 m in the Parameters window, clicking Apply, and rechecking the bounding box.

## Step 3: Define and Assign a PEC Material

A material needs to be associated with the geometry in order to determine its scattering behavior, so a material first needs to be defined and then assigned to the corner reflector. WaveFarer's definitions node allows users to define a set of electromagnetic properties once and use it in multiple places, although this tutorial is basic and requires just one.

First, define the reflector material.

1. Right-click on Materials in the Project Tree and select New Material Definition.
2. Enter the New Material name by typing PEC into the Project Tree.
3. Press Enter to commit the change to the project.
4. Double-click on PEC in the Project Tree to open the Material Editor.
5. Change the Type to Perfect Electrical Conductor (PEC) using the drop-down arrow.
6. If desired, navigate to the Appearance tab and change the PEC material's display color.
7. Click Done to finish the PEC material.

Then, assign the material to the Corner Reflector.

1. Click and drag the PEC material from the Definitions branch of the Project Tree and drop it on top of the Corner Reflector in the Parts branch of the Project Tree.

## Step 4: Create a Transceiver

The transceiver serves as the point where the rays are sent and received. For this tutorial, it will consist of one transmitter and one receiver with associated waveform and antenna definitions.

First, define the antenna.

1. In the Definitions branch of the Project Tree, right-click on Antennas and select New Antenna Definition.
2. Enter the antenna name by typing Directional (45 deg) into the Project Tree.
3. Press Enter to add the new antenna to the project.
4. Double-click on Directional (45 deg) in the Project Tree to open the Antenna Editor.
5. In the editor, click the Type drop-down arrow and select Directional.
6. Enter 45 degrees as the E-Plane Half Power Beam Width.
7. Enter 45 degrees as the H-Plane Half Power Beam Width.
8. Uncheck Auto and enter 16 dBi as the Maximum Gain.
9. 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 to open the editor.
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. Click Zoom to Extents in the right sidebar, then zoom in using the middle mouse wheel.
5. Check the Changes to Radius Affects All Points option.
6. Click in the Radius column and enter 0.02 m.
7. Click the button on the right side of the Layout tab.
8. Click in the second point's Type field and use the drop-down arrow to select Receiver.
9. Press Enter to apply the change.
10. Select the first point in the table by clicking on Transmitter.
11. Toggle the orientation-editing settings by clicking the button at the top of the tab.
12. Enter 0.02 m as the Y value.
13. Press Enter to apply the change.
14. Change the Point to 2 to select the Receiver.
15. Enter -0.02 m as the Y value.
16. Press Enter to apply the change.
17. Enter the transceiver name by typing Transceiver w/ 1 Tx, 1 Rx into the Name field.
18. 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 24.1 GHz as the Frequency.
3. Enter the waveform name by typing 24.1 GHz Sinusoid into the Name field.
4. Click Done to close the editor.

## Step 5: Set the Analysis Configuration

Users can enter inputs in the analysis configuration settings that control how the calculation engine evaluates the simulation space, modifying the tradeoff between accuracy and run time. The reflection and diffraction values determine the maximum amount of interactions a ray path can have with geometry faces and edges. Higher numbers increase accuracy, as well as run time.

1. Right-click on Analysis Configurations in the Project Tree and select New Physical Optics Configuration.
2. Enter the configuration name by typing 2R1D into the highlighted field.
3. Press Enter to add the configuration to the project.
4. Double-click on 2R1D in the Project Tree to open the Physical Optics Configuration Editor.

Under the Properties tab, the default settings are desired for this project. Confirm that the Number of Reflections is 2, Number of Diffractions is 1, Minimum Angular Ray Spacing is 0.01 degrees, Restrict Rays By Gain Threshold is checked with a value of 30 dBi, Include MEC Diffractions is checked, and Allow Knide Edges is unchecked.

1. 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, then 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 targetLocation into the Project Tree.
4. Press Enter to commit the change to the project.
5. Enter the following script into the Scripting window:
var list = App.getActiveProject().getParameterList();

for( var t = 5; t <= 160; t += 5 )
{
list.setFormula( "targetLocation", t + " m" );
App.sleep( 100 );
}
1. Save the script by clicking the Commit button in the toolbar, and close the Scripting window.

Place the geometry within view by clicking Zoom to Extents in the right sidebar.

1. Right-click on Sweep targetLocation in the Project Tree, then select Execute to run the script.

Watch the Corner Reflector move along the x-axis until it is outside of the Geometry view.

## Step 7: Create and Run a Simulation

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

First, save the project.

1. Click File in the upper-left corner of the WaveFarer window, then select Save Project As.
2. Enter Corner Reflector as the project name.
3. Click Save.

Then, create and run the simulation.

1. Click the Simulations button in the upper-right corner of WaveFarer to open the Simulations window.
2. Click the Create New Simulation button in the upper-left corner of the Simulations window.
3. In the Create Simulation window, enter the simulation name by typing Sweep from 5 to 160 m into the Name box.
4. Select 2R1D as the Configuration using the drop-down arrow.
5. If applicable, change the Resource tab settings to match the hardware that will run the simulation.
6. Under the Setup Parameter Sweep tab, check the Perform Parameter Sweep option.
7. Click the Add a new parameter sequence button to define a parameter sweep.
8. Confirm that targetLocation is the parameter to sweep.
9. Use the Sweep Type drop-down arrow to select Start, End, Count.
10. Enter 63 as the Count value.
11. Enter 5 m as the Starting Value.
12. Enter 160 m as the Ending Value.

Verify that the Evaluated Values are between 5 meters and 160 meters with 2.5 meter increments (i.e., 5 m, 7.5 m, 10 m, etc.).

1. Click Create & Queue Simulation.

Notice that the simulation now appears at the top of the Simulations window, and the Sweep field indicates which of the 63 parameter values are being simulated. The Status field will change to Complete when the simulation is finished and the results have been generated.

## Step 8: View Received Power versus Distance

The simulation's received power results are available, and can be plotted against the project's defined parameter by running a script. A second macro can be imported in order to compare WaveFarer's results to the radar range equation results. The equation script must first be downloaded, and is available with the project input files in the upper-left portion of this tutorial page.

First, graph the received power versus parameter.

1. Download the Plot Received Power Versus Parameter script and save it in WaveFarer's macros folder.
2. In the upper-left corner of WaveFarer, select Macros, then ResultsPlot Received Power Versus Parameter to open the editor.

Note that the Project, Simulation, and Sensor settings each have only one available option. These default values will plot the magnitude of received power, which is desired for this project.

1. Click OK to change the editor

Note that the units selection is Distance and both transceiver boxes are checked. These default values will plot the received power of Rx 0 from Tx 0 versus distance, which is desired for this project.

1. Click OK to change the editor a second time.

Note that an XY graph will be created and its title and labels can be customized.

1. Click OK to close the editor.

Verify that the graph appears in the Graphs branch of Project Tree and double-click on it to view.

Then, import the script that solves the radar range equation.

1. Download the Plot Radar Range Equation script.
2. Right-click on the Scripts branch of the Project Tree, and select Import Scripts.
3. Choose Plot Radar Range Equation.xmacro from the available files.
4. Click Open to add the script to the project.
5. Right-click on Plot Radar Range Equation in the Scripts branch of the Project Tree, and select Execute.
6. Double-click on the Received Power vs. targetLocation graph in the Project Tree to view the plot generated by the radar range equation script.

Verify that the plot generated by the radar range equation matches the simulated results.