EM.Terrano Tutorial Lesson 4: Analyzing An Urban Canyon Propagation Scene

From Emagtech Wiki
Jump to: navigation, search
Tutorial Project: Analyzing An Urban Canyon Propagation Scene
Terrano L4 Fig title.png

Objective: In this project, you will build and analyze a fairly large urban propagation scene made up of a large set of imported buildings.

Concepts/Features:

  • CubeCAD
  • CAD File Import
  • Impenetrable Surfaces
  • SBR Analysis
  • Frequency Sweep
  • Received Power Coverage Map

Minimum Version Required: All versions

'Download2x.png Download Link: EMTerrano_Lesson4

What You Will Learn

In this tutorial you will use the random city wizard to create an urban canyon propagation scene. You will become familiar with using Python commands and their arguments. You will also learn to set up and run frequency sweeps and parametric sweeps in EM.Terrano.

Getting Started

Open the EM.Cube application and switch to EM.Terrano. Start a new project with the following parameters:

Starting Parameters
Name EMTerrano_Lesson4
Length Units Meters
Frequency Units GHz
Center Frequency 1GHz
Bandwidth 1GHz

Creating & Analyzing a Random City Propagation Scene

For this tutorial lesson, you will use a wizard to build the geometry of an urban environment. Click on the Random City Wizard RandomCityWizardIcon.png button of the Wizard Toolbar or select the menu item Tools → Propagation Wizards → Random City. A dialog pops up and asks for the total city extents and number of buildings. Accept the default values of 250m and 25 for the city size and the total number of buildings in the scene, respectively. The wizard created 25 buildings with random locations and random dimensions in an area of 250m × 250m centered at the origin of coordinates.

EM.Terrano's wizard toolbar.
The preliminary dialog of the random city wizard.
The geometry of the random city created by the wizard.

Note that since the locations and dimensions of all the buildings are random variables, you may get a different scene than the one show in the above figure. Also note that the wizard automatically defines and places a default transmitter and a grid of receivers that cover the entire scene. The transmitter is placed at (0, 0, 10m) by default. Since the location of the buildings is totally random, there is a chance that your transmitter may fall inside an "impenetrable" building and become useless. In that case, open the variables dialog and click its Update button consecutively. Every time a new random city scene is generated. Repeat this process until you get an acceptable scene.

Run an SBR analysis of the random city scene and visualize its received power coverage map.

The received power coverage map of the random city scene.

Changing the Statistics of the Random City

The box objects created by the wizard are highly parameterized. Open the property dialog of the first building called "Box_1". You will see that the value of the three coordinates of the center of the local coordinate system (LCS) and the three box dimensions along the X, Y, Z directions all involve functions like "random.uniform(min_value, max_value)". This is a Python function that generates a random value with a uniform distribution between two specified values "min_value" and "max_value".

The property dialog of the first building in the random city scene.

Open the variables dialog and see all the variables defined by the wizard for the random city scene. Edit and change the definition of the following variables:

Variable Name Original Definition New Definition
building_height_min 5 20
building_height_max 20 60
The variables dialog showing the new parameters of the random city scene.
The geometry of the random city after changing the building height statistics.

Run an SBR analysis of the new random city scene and visualize its received power coverage map. In the figure below, the buildings have been shown in the mesh view mode.

The received power coverage map of the modified random city scene.

Using the Python Command Line to Generate an Urban Canyon Scene

All of EM.Cube's wizards have been written in Python and have Python scripts which you can access and view. You can also run these Python scripts from EM.Terrano's command line. The name of all wizard Python functions starts with "emag_". The following is the complete Python synthax for the random city wizard:



emag_random_city(city_size,n_buildings,add_TxRx,rotate_bldg,semi_random,building_base_min,building_base_max,building_height_min,building_height_max,er,sig,tx_h,rx_h,rx_spacing)



The Boolean argument "add_TxRx" is used to add a transmitter and a receiver grid. The Boolean argument "rotate_bldg" is used to rotate all the buildings randomly. If the Boolean argument "semi_random" is true, random values will be used to generate the city scene, but all the locations, orientations and dimensions are frozen afterwards. The resulting scene doesn't get updated and redrawn randomly very often. The variables "er" and "sig" are used to define the material composition of the building walls. The variables "tx_h" and "rx_h" represent the transmitter and receiver heights, respectively.

For this part of the tutorial lesson, start a new project. To see a list of available Python functions, click the Models Models icon.png button of the Simulate Toolbar or select the menu item Simulate → Python Models & Scripts... to open the Models Dialog.

EM.Cube's models dialog.

This dialog provides a comprehensive list of all the preloaded python functions and scripts as well as your own user-defined Python functions. Select any file from the list and click the Open button of the dialog to open it in a text editor of your choice, which you have associated with the ".PY" file extension in Microsoft Windows. Two common choices are Windows Notepad or Notepad++. The figure below shows the contents of the Python file "emag_random_city.PY" in Notepad++.

The Python file "emag_random_city.PY" opened in the text editor Notepad++.

If start typing the name of a Python wizard function in the command line, a small tip window will appear that helps you remember the syntax of the command.

Typing a new Python command in the command line.

If you select the syntax and double-click on the tip window, it will be copied into the command window. Now you can replace the arguments with their numeric values relevant to this project:

Argument Name Value
city_size 400
n_buildings 40
add_TxRx True
rotate_bldg False
semi_random True
building_base_min 10
building_base_max 30
building_height_min 20
building_height_max 60
er 4.44
sig 0.001
tx_h 10
rx_h 1.5
rx_spacing 5

So, in the command line enter the following command and hit the Enter key of the keyboard.



emag_random_city(400,40,True,False,True,10,30,20,60,4.44,0.001,10,1.5,5)



The geometry of the random city generated by the Python command.

Run an SBR analysis of the new random city scene and visualize its received power coverage map. In the figure below, the buildings have been shown in the mesh view mode.

The received power coverage map of the new random city scene.

Running a Frequency Sweep of the Propagation Scene

In this part of the tutorial lesson, you will run a frequency sweep of the semi-random city scene to see how the received power coverage changes as a function of the frequency. Open the Run Dialog and select Frequency Sweep from the "Simulation Mode" drop-down list. Click the Settings button next to this drop-down list to open the Frequency Settings dialog. Set the Start and End Frequency to 0.5GHz and 1.5GHz, respectively, with 11 frequency samples.

EM.Terrano's Run dialog with Frequency Sweep selected as the simulation mode.
The Frequency Sweep Settings dialog.

Back in the Run dialog, check the box labeled Create Mean and Standard Deviation Coverage Maps in the "statistical Analysis" section of the dialog. Run the frequency sweep and wait until the simulation is completed. You will see a total 13 coverage map entries in the Observables section of the navigation tree. Each of the first 11 maps corresponds to one of the 11 frequency samples. The last two coverage maps represent the mean and standard deviation coverage maps of the first 11 plots. You can view these coverage maps one at a time or you can animate them in the project workspace.

The received power coverage map of the random city scene at f = 500MHz.
The received power coverage map of the random city scene at f = 800MHz.
The received power coverage map of the random city scene at f = 1.2GHz.
The received power coverage map of the random city scene at f = 1.5GHz.

Finally, visualize the mean and standard deviation coverage maps:

The mean received power coverage map of the random city scene over 11 frequency samples.
The standard deviation received power coverage map of the random city scene over 11 frequency samples.

Performing a Parametric Sweep of the Transmitter Height

In a parametric sweep simulation, one or more variables or parameters are varied, and the simulation engine is run for each parameter set. Open the Simulation Run dialog and choose the Parametric Sweep option from the Simulation Mode drop-down list. Click on the Settings button next to this drop-down list to open the Sweep Settings dialog.

Selecting parametric sweep as the simulation mode in EM.Tempo's run dialog.

The sweep variables list is initially empty. On the left side of this dialog, you see a list of all the available independent variables. Select the transmitter height variable "tx_h" from the left table and used the --> button to move it to the right table. Another dialog titled "Sweep Variable" opens up. You have to set the start, stop and step values of your sweep variable. By default, the sweep variable is of uniform type. Enter 5, 25, and 5 for start, stop and step values, respectively. This will create a value list of {5, 10, 15, 20, 25}. Close the sweep variable dialog and then close the sweep settings dialog to return to the simulation run dialog. Uncheck the box labeled Create Mean and Standard Deviation Coverage Maps in the run dialog.

Parametric sweep settings dialog.
Sweep variable settings dialog.
Settings the transmitter height variable (tx_h).

Run the sweep simulation. At the end of the parametric sweep, five coverage maps appear in the observables section of the navigation tree, each corresponding to one of the transmitter height values.

The received power coverage map of the random city scene with h_tx = 5m.
The received power coverage map of the random city scene with h_tx = 15m.
The received power coverage map of the random city scene with h_tx = 25m.

You can animate the coverage map plots in the project workspace. Right-click on the name of the receiver set "RX1" in the navigation tree and select Animation from the contextual menu. The five coverage maps start to appear in the project workspace consecutively and in an infinite loop. The Animation Controls dialog pops up at the lower right corner of the screen. From this dialog you can modify the animation frame rate in milliseconds. Use the Esc key to stop the animation.

The animation controls dialog.
VIDEO: The animation of the received power coverage map of the random city scene as a function of the transmitter height.

 

Back icon.png Back to EM.Terrano Tutorial Gateway