# EM.Terrano Tutorial Lesson 6: Simulating The Performance Of A Mobile Communications Link In A Multipath Urban Environment

 Tutorial Project: Simulating The Performance Of A Mobile Communications Link In A Multipath Urban Environment Objective: In this project, you will simulate a mobile transmitter in the Ann Arbor propagation scene and compute the signal-to-noise ratio at the receiver locations. Concepts/Features: CubeCAD CAD File Import STEP Format Impenetrable Surfaces SBR Analysis Variables Python Script Parametric Sweep Connectivity Map Received Power Coverage Map Minimum Version Required: All versions ' Download Link: EMTerrano_Lesson6

## What You Will Learn

In this tutorial, first you will learn how to import CAD models of buildings into EM.Terrano. Then, you will learn how to define realistic Super-Heterodyne transmitter and receiver systems and compute the connectivity map of a propagation scene.

## Getting Started

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

 Name EMTerrano_Lesson6 Meters GHz 2.4GHz 0.1GHz

For this tutorial lesson, you need to download the STEP model file containing the CAD models of the buildings. The file is called "Ann_Arbor.STP" and features a simplified model of part of the University of Michigan's Central Campus in downtown Ann Arbor, MI. To download the file click here.

## Importing the Building CAD Models

In EM.Cube, external objects are always imported to CubeCAD first. From CubeCAD you can transfer an imported object to any of the other computational modules. First, create an Impenetrable Surface group called Block_1 in EM.Terrano's navigation tree with all the default settings. This means that your buildings will have the default dark brown color and their material composition would be "Brick" with εr = 4.4 and σ = 0.001S/m.

To import the building models, go to the File Menu and select Import.... The standard Windows Open Dialog opens up with the file type set to .STP. Browse your folders to find the downloaded "Ann_Arbor.STP" file. Select it and click the "Open" button. A total 83 solid CAD objects appear in the project workspace of the CubeCAD Module as shown in the figure below.

 The imported building models in CubeCAD.

Next, you have to move all the imported buildings to the Block_1 group of the EM.Terrano. To do so, select all the building names on the Navigation Tree. Start with Solid_1 and select it. Then hold down the keyboard's Shift Key and click Solid_83. While still holding down the shift key, right-click on the selection and select Move To → EM.Terrano → Block_1 from the contextual menu. All the objects will disappear from CubeCAD and will reappear in EM.Terrano's navigation tree under the "Block_1" group.

 Moving the imported impenetrable building models from CubeCAD to the Block_1 group of the EM.Terrano.
 The imported impenetrable buildings on the global ground in the Ann Arbor scene propagation scene.

Keep the default value of the mesh density. Generate and view the mesh of the buildings and see how EM.Terrano combines multi-object buildings together to create a consistent mesh. In fact, connected or overlapped objects undergo a Boolean union operation before being discretized by the mesh generator.

 The facet mesh of the buildings in the Ann Arbor scene.

## Running a Basic SBR Analysis

For this tutorial lesson, you will define two base location sets called "BasePointSet_1" and "BasePointSet_2" with the colors blue and orange, respectively. Under "BasePointSet_1", create a single point object for the transmitter. Under "BasePointSet_2", create an array of base points for the receiver set according to the tables below:

Part Object Type Object Group Group Color Dimensions Coordinates
Point_1 Point Base_Point_1 Blue N/A (-90m, -150m, 2.5m)
Point_2 Point Base_Point_2 Orange N/A (-220m, -220m, 1.5m)
Array Object Parent Object X Count Y Count Z Count X Spacing Y Spacing Z Spacing
Point_2_Array_2 Point_2 90 90 1 5m 5m 0

Define a new default transmitter set associated with BasePointSet_1 and a new default receiver set associated with BasePointSet_2.

 The transmitter and receiver grid of the Ann Arbor scene.

Now run a quick SBR analysis of the Ann Arbor scene and visualize the received power coverage map.

 The top view of the received power coverage map of the Ann Arbor scene.

## Simulating a Realistic COMM Link with Super-Heterodyne Transmitter & Receiver Chains

So far in all the previous tutorial lessons, we have assumed very basic transmitters and receivers represented by very simple or isotropic radiators. In the real world, transmitter and receiver systems are more complicated than simple radiators. EM.Terrano lets you define "Super-Heterodyne" transmitter and receiver systems for your propagation scene.

A generic super-heterodyne transmitter is assumed to consist of a mixer that up-converts the frequency of a baseband or IF signal and then amplifies the RF signal using a power amplifier (PA). The amplified RF signal is then transferred to the transmit antenna using a transmission line segment. In this way, using the transmitter chain definition you can account for all the mismatches and power attenuations or amplifications up the chain. For this project, you will use the default vertical half-wave dipole radiator. The antenna is fed by a 1m 50Ω coaxial cable with an attenuation of 0.5dB/m. All the transmitter stages are matched, so all the impedance mismatch factors are 0dB. We assume a 100% radiation efficiency for the transmit antenna. Open the property dialog of the transmitter set. Select the radio button labeled User Defined Antenna and keep the same radiation pattern (as mentioned in EM.Terrano Tutorial Lesson 2, the radiation pattern data file "DPL_STD.RAD" is located in the "Models" folder under the documents folder). Click the Transmitter Chain button to open up the Transmitter Chain dialog.

 The Transmitter Set dialog.

Set the different parameters and stage gains according to the figure below.

Tx Chain Parameter Original Value New Value
Baseband/IF Amplifier Gain 0dB 5dB
Mixer Conversion Gain 0dB -5dB
Power Amplifier Gain 0dB 15dB
Transmission Line Attenuation Factor 0dB/m 0.5dB/m
Transmission Line Length 0m 1m

The baseband signal power is 1W or 30dBm. From the Transmitter Chain dialog, you can see that the Total Transmitter Chain Gain is 11.49dB.

 Setting the super-heterodyne parameters in the Transmitter Chain dialog.

For the receiver, you need to define a system bandwidth in Hz. Set the receiver bandwidth to 100MHz. Here, too, you will use a 1m 50Ω coaxial cable with an attenuation of 0.5dB/m. Set all the temperatures to the standard room temperature at 300°K. Also define all the noise figures and stage gains according to the table below:

Rx Chain Parameter Original Value New Value
Low-Noise Amplifier Gain 0dB 10dB
Low-Noise Amplifier Noise Figure 0dB 3dB
Mixer Conversion Gain 0dB -5dB
Mixer Noise Figure 0dB 5dB
Baseband/IF Amplifier Gain 0dB 10dB
Baseband/IF Amplifier Noise Figure 0dB 5dB
Transmission Line Attenuation Factor 0dB/m 0.5dB/m
Transmission Line Length 0m 1m
Minimum SNR 3dB 25dB

From the Receiver Chain dialog, you can see that Total Receiver Chain Gain is 14.5dB and the Noise Power is -74.21dBm. Close the receiver chain dialog to return to the receiver set's property dialog.

 Setting the super-heterodyne parameters in the Receiver Chain dialog.

EM.Terrano can also compute the connectivity map of your propagation scene. For this purpose, you defined a "Minimum SNR" parameter for the receiver, which is the minimum required signal-to-noise ratio value to close the link and establish a connection between the transmitter and receiver. The connectivity map is a binary color map. All the receivers whose computed SNR value is above this minimum are considered "Connected" and are shown in red (or white). The unconnected or disconnected receivers are shown in purple (or black). In the receiver set dialog, check the box at the bottom of the dialog labeled Generate Connectivity Map and set the value of the minimum SNR to 25dB. The connectivity map is computed based on this minimum SNR.

Run an SBR analysis of your modified Ann Arbor propagation scene and visualize the received power coverage map as well as the connectivity map that has been added to the observables section of the navigation tree.

 The received power coverage map of the Ann Arbor scene with super-heterodyne transmitter and receivers.
 The connectivity map of the Ann Arbor scene with SNRmin = 25dB with Rainbow color map option.

To plot the connectivity map in black and white colors, right-click on its name in the navigation tree and select Properties… from the contextual menu. In the output plot settings dialog, change the color map option from the default Rainbow to Basic.

 Changing the color map option from the default Rainbow to Basic in Output Plot Settings dialog.
 The connectivity map of the Ann Arbor scene with SNRmin = 25dB with Basic color map option.

## Writing a Python Script to Define the Mobile Path

Next, you want to move your transmitter around the city and see how the coverage map is affected due to the multipath effects. Since the height of the transmitter will stay fixed (vehicle-mounted), you will need two functions that determine the X and Y coordinates of the transmitter's base location, i.e. Point_1, at each step or instant of time. The Figure below shows the mobile path of the transmitter across the scene. It consists of two segments:

1. Vertical segment between (-90, -150, 2.5) and (-90, 110, 2.5) with 13 20m steps along the +Y axis
2. Horizontal segment between (-90, 110, 2.5) and (210, 110, 2.5) with 15 20m steps along the +X axis
 The mobile path of the transmitter across downtown Ann Arbor.

You can write a Python function with an integer argument n representing the index of the successive points the transmitter traverses along the path. There are a total of 29 points starting from n = 0 and ending at n = 28. Two Python functions are indeed needed, one for the X-coordinate and the other for the Y-coordinate of the transmitter's based location as the variable n varies over its range. You are going to call these functions "mobile_path_x(n)" and "mobile_path_y(n)", respectively.

You can write a Python script in any text editor outside EM.Cube. But EM.Cube also provides a convenient utility for creating and managing Python functions. For this purpose, click the Models 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++.

EM.Cube also provides a blank Python file called "blank.PY" that is located in the folder "Documents → EMG → Python" and can be used as a template for your scripts. Select "blank.PY" from the list and open it. First, save the file as "mobile_path.PY" to change its name. The portion of the function that you have to enter in the provided template is given below:

def mobile_path_x(n):
if n<=13:
return -90.0
else:
return -90.0 + (n-13)*20.0
def mobile_path_y(n):
if n<13:
return -150.0 + n*20.0
else:
return 110.0

 In Python indentation is very important. You can indent using the tab key or using a certain number of spaces, but you cannot mix the two ways in the same script.

The figure below shows the entire script in Notepad++.

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

Once your Python script is complete, you can load it to EM.Cube using the Update button of the Models dialog and use it at the command line. If you start typing the name of your new Python function in the command line, a small tip window will appear that helps you remember the syntax of the command.

 Oftentimes you might have to exit the EM.Cube application and open it again to use your new Python functions.
 Typing a new Python command in the command line.

Now, open the variable dialog and define a new variable n = 0. Next, open the property dialog of the point object "Point_1" and replace the numeric values of its X and Y coordinates as follows:

Parameter Name Original Value New Value
X-coordinate -90 mobile_path_x(n)
Y-coordinate -150 mobile_path_y(n)
 Initiating the index variable "n" in the variables dialog.
 Changing the LCS coordinates of the transmitter's base location to Python functions.

## Testing a Dry Run of Your Mobile Propagation Scene

You can give different values to your variable "n" and verify the location of the transmitter. It is often useful to try a dry run of your variables before committing to a real sweep simulation. Open EM.Terrano's simulation run dialog and select Parametric Sweep as the simulation mode. Open the parametric sweep settings dialog, designate "n" as the sweep variable and set its start, stop and step values to 0, 28 and 1, respectively.

 The parametric sweep settings dialog showing "n" as the sweep variable.

While still in the parametric sweep settings dialog, click the Dry Run button of this dialog. You will see that the transmitter starts moving in the project workspace. In other words, the sweep variable n step through all of its designated samples and your physical structure gets updated for each sample. This results in an animation of the physical structure in the project workspace. A dry run is a safe way to test the extreme values of your variables before starting a time consuming sweep simulation. The dry run dialog works similar to animation controls dialog. You can change the speed of the dry run from this dialog.

 The dry run dialog.

## Running a Parametric Sweep Simulation of Your Mobile Propagation Scene

You are now ready to run a parametric sweep simulation of your project. Start the sweep and wait until all the 29 individual SBR simulations are completed. Then, visualize the coverage map and animate it.

 The top view of the coverage map of the Ann Arbor scene corresponding to the first position of the mobile transmitter. The top view of the coverage map of the Ann Arbor scene corresponding to the 12th position of the mobile transmitter. The top view of the coverage map of the Ann Arbor scene corresponding to the 17th position of the mobile transmitter. The top view of the coverage map of the Ann Arbor scene corresponding to the last position of the mobile transmitter.
 VIDEO: Animation of top view of the coverage map of the Ann Arbor scene corresponding to the last position of the mobile transmitter.