You are on page 1of 32

Creating a Wireless Network

Page 1 of 32

Tutorials > Module Tutorials > Creating a Wireless Network

Creating a Wireless Network


In this tutorial, you will create a radio network with a mobile jamming node. You will also perform the following tasks: Use a new type of link, the radio link, and a new type of node, the mobile node Use the Antenna Pattern Editor to create a directional antenna pattern Define the trajectory of a mobile node Use the Probe Editor to gather different types of statistics Execute parametric simulations Use the time controller to step through time values and relate node positions and results

Key ConceptWith Wireless functionality, you can model both terrestrial and satellite radio systems. In this tutorial, you will use OPNET Modeler and Wireless modeling to create a radio network; you will also observe variations in the quality of received signal that results from radio noise at the receiving node in a dynamic network topology. Interference (radio noise) can decrease the signal-to-noise ratio (SNR) in a radio-based network. Different types of antennas, such as directional antennas, can improve the SNR in a network by increasing the effective signal strength at the receiver. In this lesson, you will design a simple radio network with a mobile jammer node and two stationary communications nodes, then demonstrate the differences in the SNR of the network when the stationary nodes use an isotropic antenna versus a directional antenna.

Getting Started
The network topology consists of three nodes: The transmitter node transmits at uniform strength in all directions. It consists of a packet generator module, a radio transmitter module, and an antenna module. The receiver node measures the quality of the signal emitted by the stationary transmitter node. It consists of an antenna module, a radio receiver module, a sink processor module, and an additional processor module that works with the directional antenna. The mobile jammer node creates radio noise. The jammers trajectory takes it in and out of the radio range of the receiver node, increasing and decreasing interference at the receiver.
Wireless Topology

Figure 5-1

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 2 of 32

Key ConceptTo create node models for each of the network objects, you will use several modules unique to the Wireless functionality (an antenna module to model directional gain, a radio transmitter module, and a radio receiver module), in addition to the processor module.

The antenna module models the directional gain of a physical antenna by referencing its pattern attribute. The antenna uses two different patterns: the isotropic pattern (which has uniform gain in all directions) and a directional pattern that you will define.

The radio transmitter module transmits packets to the antenna at 1024 bits/second, using 100 percent of its channel bandwidth.

For each arriving candidate packet, the radio receiver module consults several properties to determine if the packets average bit error rate (BER) is less than a specified threshold. If the BER is low enough, the packet is sent to the sink and destroyed.

The processor module (called a pointing processor in this tutorial due to its function) calculates the information that the antenna needs to point at a target: latitude, longitude, and altitude coordinates. The pointing processor makes this calculation by using a Kernel Procedure that converts a nodes position in a subnet (described by the x position and y position attributes) into the global coordinates that the antenna requires. Key ConceptRadio links exist between radio transmitter-receiver channel pairs and are dynamically established during simulation; these links are not visible in any editor. In this lesson, information is transferred from a stationary transmitter object to a stationary receiver object. These objects are connected by a radio link. This link depends on many different physical characteristics of the components involved, including frequency band, modulation type, transmitter power, distance, and antenna direction.

The Antenna Pattern Editor


Key ConceptThe Antenna Pattern Editor uses the spherical angles polar and azimuth to graphically create a 3-dimensional antenna pattern. Antenna patterns are divided into segments for values of the spherical angles polar and azimuth. The values of polar represent horizontal two-dimensional (2D) slices (or planes) of the antenna pattern. For each slice, gain values are specified at regular azimuth intervals around the slice, thus defining the antenna pattern in that horizontal plane. The three-dimensional (3D) antenna pattern is represented as a collection of 2D slices.

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 3 of 32

Figure 5-2

Representation of an Antenna Pattern

Each slice is shown in a graph panel in which sample points specify gain values for varying degrees of azimuth. You use the polar plane menu to select which 2D slice, or value of polar, is displayed for editing. For this lesson, you will create a new antenna pattern, one with a gain of about 200 dB in one direction and a gain of about 0 dB in all other directions (a very directional antenna).
Procedure 5-1

Choose File > New and select Antenna Pattern from the pull-down list. Click OK. The Antenna Pattern Editor and a 3D viewer open in separate windows.
Figure 5-3 Antenna Pattern Editor

Figure 5-4

Antenna Pattern 3D Viewer

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 4 of 32

End of Procedure 5-1

For this tutorial, you can use the default number of azimuth divisions (72), so the largest value of azimuth that has a sample point is 355 degrees. You can specify sample points with gain equal to about 200 dB for values of azimuth from 0 to 355 degrees. Specifying any two sample points in the graph panel automatically sets all sample points in between with linearly-interpolated gain values. Therefore, you need to specify only two sample points in this plane: one at 0 degrees and one at 355 degrees. To adjust the current polar plane to 5 degrees (360/72), perform the following procedure.
Procedure 5-2

Select 5 in the Polar plane <phi> pull-down menu. The graph panel displays the curve for the 5-degree polar plane.
Figure 5-5 5-Degree Polar Plane

End of Procedure 5-2

Next, set the ordinate bounds of the graph:


Procedure 5-3 Setting the Ordinate Bounds of the Graph

Click on the Set Ordinate Upper Bound tool button.

2 3

In the dialog box, enter 201 as the Ordinate Upper Bound and click OK. Click on the Set Ordinate Lower Bound tool button.

In the dialog box, enter 199 as the Ordinate Lower Bound and click OK. The graph panel displays the new ordinate range. This range will make it easier to enter the desired gain accurately.

End of Procedure 5-3

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 5 of 32

Now that you have set the graph panel, specify sample points for polar = 5 degrees, as follows:
Procedure 5-4

Move the cursor as close to the 200 dB line as possible and left-click on the first sample point (0 degrees) in the graph. Move the cursor to the far right (still on the 200 dB line) and left-click on the second point (355 degrees).
Figure 5-6 Specifying Sample Points

All sample points between the two specified points are set automatically with linearly interpolated gain values. A dotted line marks the range of sample points.
End of Procedure 5-4

When you define points in the graph panel, the 3D projection view displays a coneshaped shell of gain values for phi = 5 degrees to phi = 10 degrees and for theta = 0 degrees to theta = 360 degrees.
Figure 5-7 3D Projection View

Now that you have specified the gain values for polar = 5 degrees, you need to set the gain and sample points for the polar = 0 plane. Doing so specifies a gain of about 200 dB for polar = 05 degrees and for azimuth = 0360 degrees. This fills in the coneshaped shell specified in the polar = 5 degrees plane.
Procedure 5-5

Press Ctrl-[up arrow] (or, choose Antenna > Decrease Polar Plane). The current polar plane changes from 5 degrees to 0 degrees.

Verify that the Ordinate Upper Bound is 201 and the Ordinate Lower Bound is 199. Move the cursor as close to the 200 dB line as possible and left-click on the first sample point (0 degrees) in the graph. Move the cursor to the far right (still on the 200 dB line) and left-click on the second point (355 degrees).

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 6 of 32

End of Procedure 5-5

Normalize the function over the entire pattern, as follows:


Procedure 5-6

Click the Normalize the Function tool button to normalize the 3D gain function over the entire pattern.

The 3D projection view updates, displaying the result of normalization. Normalization shifts the points in the graph upward, so they might disappear from view.
Figure 5-8 Updated 3D Projection View

Choose File > Save. Name the antenna pattern <initials>_mrt_cone, and then save. Close the Antenna Pattern Editor.

End of Procedure 5-6

Creating the Pointing Processor


Key ConceptThe antenna pointing processor calculates the position of the transmitter module and sets the antenna modules targeting attributes. It receives only a beginsimulation interrupt, so it can be designed as a single unforced state.
Procedure 5-7

Choose File > New and select Process Model from the pull-down list, then click OK. The Process Model Editor opens in a new window.

Using the Create State tool button, place one state in the workspace.

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 7 of 32

3 4

Right-click on the state and select Set Name from the Object pop-up menu. Name the state point.

End of Procedure 5-7

The process model determines the identities of the objects of interest, then retrieves and modifies the receiver objects attribute values. Kernel Procedures in the Identification and Topology Packages (prefixed with op_id and op_topo) do the first task. A Kernel Procedure from the Ima Package (with the prefix op_ima) does the second task. Import the code for the process model:
Procedure 5-8 Importing code for the process model

1 2

Double-click on the top half of the point state to open the Enter Executives block. Choose File > Import Select the file listed below, then click the Import button to import it (OK on Linux platforms). <reldir>\models\std\tutorial_req\ modeler\mrt_ex The file is imported.

3 4

Review the code before you continue. Save the Enter Executives block.

End of Procedure 5-8

Next, you need to modify the process attributes:


Procedure 5-9 Modifying the Process Attributes

Choose Interfaces > Process Interfaces. The Process Interfaces dialog box displays.

2 3 4

Change the initial value of the begsim intrpt attribute to enabled. Change the Status of all the attributes to hidden. Save your changes by clicking on the OK button.

End of Procedure 5-9

Wireless networks use the radio transceiver pipeline to model packet transmission. Because the network in this tutorial will use the default closure stage (dra_closure) of the radio transceiver pipeline, you must include a C library that defines the function used to compute closure. To make sure this library is loaded when the simulation is run, do the following procedure.

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 8 of 32

Procedure 5-10

Choose File > Declare External Files The Declared External Files dialog box opens.

Find closure_support in the list of available files and select its checkbox, then click OK.

End of Procedure 5-10

Finally, compile the process model.


Procedure 5-11 Compiling the Process Model

Left-click on the Compile Process Model tool button. When you are prompted to save the model, name it <initials>_mrt_rx_point and click Save.

If the model does not compile, see the Troubleshooting chapter in the Modeling Concepts manual. 2 After the process model has compiled, close the Compilation dialog box and the Process Editor.

End of Procedure 5-11

Creating the Node Models


You need three node models to build the radio network model: a transmitter, a receiver, and a jammer node.

The Transmitter Node


The transmitter node model consists of a packet generator module, a radio transmitter module, and an antenna module. The packet generator generates 1024-bit packets that arrive at the mean rate of 1.0 packets/second with a constant interarrival time (these are the default values). After they are generated, packets move through a packet stream to the radio transmitter module, which transmits the packets on a channel at 1024 bits/second using 100 percent of the channel bandwidth. The packets then pass from the transmitter through another packet stream to the antenna module. The antenna module uses an isotropic antenna pattern (this is the default value) to apply a transmission gain that is uniform in all directions. The following procedure describes how to create the transmitter node model.
Procedure 5-12 Creating the Transmitter Node Model

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 9 of 32

Choose File > New, select Node Model from the pull-down list, and click OK. The Node Editor opens in a new window.

Create the modules and packet streams as shown, and name the nodes accordingly. Use the Create Processor, Create Radio Transmitter, Create Antenna, and Create Packet Stream tool buttons.
Figure 5-9 Transmitter Node Model

Change the process model attribute of the tx_gen processor to simple_source.

End of Procedure 5-12

To run parameterized simulations, you must promote the power attribute of the utilized channel. When you promote the attribute, it can be changed easily at simulation run time.
Procedure 5-13

Right-click on the radio_tx node and select Edit Attributes from the pop-up menu. The Transmitter Attributes dialog box opens.
Figure 5-10 Transmitter Attributes Dialog Box

Click on the Value field for the channel attribute. A dialog box displays showing the Compound Attribute Table for channel.

In the Compound Attribute Table for channel, promote the power attribute by selecting its value and clicking on the Promote button.
Figure 5-11 Promoting the Power Attribute

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 10 of 32

The word promoted appears as the value for power. 4 Click OK twice to close both dialog boxes.

End of Procedure 5-13

Next, define the node model interface attributes.


Procedure 5-14

Choose Interfaces > Node Interfaces. The Node Interfaces dialog box displays.

In the Node types table, change the Supported value to no for the mobile and satellite types. Except for the promoted radio_tx.channel [0].power attribute, change the Status of all attributes to hidden. For reference, add a comment describing the node. The Node Interfaces dialog box should look like this:
Figure 5-12 Completed Node Interfaces Dialog Box

5 6

Save your changes by clicking the OK button. Choose File > Save and save the node model as <initials>_mrt_tx.

End of Procedure 5-14

The Jammer Node

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 11 of 32

The network jammer node introduces radio noise into the network. Like the stationary transmitter node, it consists of a packet generator module, a radio transmitter module, and an antenna module. Its behavior is similar to that of the stationary transmitter node, but channel power and signal modulation are different. These differences will make packets transmitted by the jammer node sound like noise to the receiver. The jammer node model is created from a copy of the transmitter node model (<initials>_mrt_tx).
Procedure 5-15

1 2

Open the <initials>_mrt_tx node model if it is not open. Right-click on the radio_tx object and select Edit Attributes from the pop-up menu. Change the modulation attribute to jammod. Click OK to close the radio_tx attribute dialog box. Choose Interfaces > Node Interfaces, then perform the following steps: 4.1 Change the Supported value to yes for mobile type and no for fixed type. 4.2 Modify the Comments to describe the jammer node. 4.3 Click OK to close the Node Interfaces dialog box.

3 4

Choose File > Save As and save the file as <initials>_mrt_jam.

End of Procedure 5-15

The Receiver Node


The receiver node consists of an antenna module, a radio receiver module, a sink processor module, and the pointing processor module, which helps to point the directional antenna towards the transmitter.
Procedure 5-16

1 2

Choose Edit > Clear Model. Create the modules and packet streams as shown in the next figure; set node names accordingly. Make sure the antenna module has the name ant_rx. This name is referenced by the <initials>_mrt_rx_point process model.
Figure 5-13 The Receiver Node

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 12 of 32

End of Procedure 5-16

Change the following attributes.


Procedure 5-17

Right-click on rx_point and open its attribute dialog box. Set the value of the process model attribute to <initials>_mrt_rx_point, and then click OK to close the dialog box. Right-click on radio_rx and open its attribute dialog box. Set the value of the error model attribute to dra_error_all_stats, and then click OK to close the dialog box. Right-click on ant_rx and open its attribute dialog box. Right-click on pattern in the Attribute column and select Promote Attribute to Higher Level from the pop-up menu. The word promoted appears in the Value cell of the attribute.
Figure 5-14 Pattern Attribute is Promoted

Click OK to close the dialog box.

End of Procedure 5-17

Next, define the node model interface attributes, as described in the following procedure.
Procedure 5-18 Defining the Node Model Interface Attributes

1 2

Choose Interfaces > Node Interfaces. In the Node types table, change the Supported value to no for the mobile and satellite type. Except for the promoted ant_rx.pattern attribute, change the Status of all attributes to hidden.

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 13 of 32

4 5 6

Save your changes by clicking on the OK button. Choose File > Save As and save the node model as <initials>_mrt_rx. Close the Node Editor.

End of Procedure 5-18

Creating the Network Model


Now that you have created all the necessary node and process models, you can create the network model.
Procedure 5-19

1 2 3

Choose File > New and select Project from the list of options, then click OK. Name the new project <initials>_mrt_net, and the scenario antenna_test. In the Startup Wizard, use the settings listed in the following table.
Dialog Box Name Initial Topology Choose Network Scale Specify Size Select Technologies Review Value Default value: Create empty scenario Campus (Use metric units enabled) 8 x 4 Kilometers None Check values, then click Finish

Open the object palette (if necessary), then switch to the icon view by clicking on the button in the upper-left corner of the dialog box.

Next, click on Configure Palette..., clear the palette, and click the Node Models button. Add the <initials>_mrt_jam, <initials>_mrt_rx, and <initials>_mrt_tx node models to the palette. Save the palette as <initials>_mrt_palette. Click OK to close the Configure Palette dialog box. Build the network shown below. The nodes positions will be specified precisely later, so you just need to place the appropriate nodes for now.
Figure 5-15 Network Topology

6 7

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 14 of 32

8 9

Close the object palette. For each node, perform the following tasks: 9.1 Right-click on the node and choose Edit Attribute (Advanced) from the nodes submenu to view the advanced attributes dialog box. 9.2 Edit the name attribute and the x position and y position attributes for each node, as listed in the following table.

Node node_0 node_1 mobile_node_0

Name rx tx jam

x, y Position 4, 2 3, 2 0.5, 1.5

Make sure you rename the transmitter node (node_1) to tx. This name is referenced by the <initials>_mrt_rx_point process model. The relative position of nodes plays an important role in the behavior of wireless communications. To get the expected results, make sure you place the nodes exactly as specified.
Figure 5-16 Required Node Positions

End of Procedure 5-19

Key ConceptTo specify node movement, the node model uses an attribute called trajectory. The value of this attribute is the name of an ASCII text file that is created in the Project Editor. The file contains data specifying times and locations that the mobile node will pass through as the simulation progresses. Now that the network model has been defined, you must specify a trajectory for the mobile jamming node to follow.
Procedure 5-20

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 15 of 32

1 2

Choose Topology > Define Trajectory In the Define Trajectory dialog box, specify the attributes as shown: Trajectory name: <initials>_mrt Initial altitude: 0 meter(s) Initial wait time: 0h0m0s Check Coordinates are relative to objects position
Figure 5-17 Define Trajectory Dialog Box

Click on the Define Path button. When you click on the Define Path button in the Define Trajectory dialog box, the dialog box closes; next, the Trajectory Status dialog box displays and your cursor changes to a line in the Project Editor.
Figure 5-18 Cursor in Define Path Mode

Figure 5-19

Trajectory Status Dialog Box

You can specify the traversal information for a segment either as an explicit duration or based on a specified speed: 4 Change the Speed value to 10 m/s.

End of Procedure 5-20

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 16 of 32

You can now draw the mobile nodes trajectory:


Procedure 5-21

Move the cursor over the jam node. When the X/Y position in the Trajectory Status dialog box is equal to 0.5 km/1.5 km, left-click to begin the trajectory. You can zoom in and out or scroll around while defining a trajectory, which helps for more precise layouts: 2.1 Click on the Zoom to Rectangle tool button.

2.2 Click and drag around the tx and rx nodes:

NoteIf necessary, you can edit the trajectory file for exact precision. 3 Left-click on the grid when the Trajectory Status dialog box shows X/Y position of 3.5 km and 1.5 km, and the Current segments Length is as close to 3000 m as possible.
Figure 5-20 3000m Segment Length

The Trajectory <initials>_mrt Segment Information dialog box appears.


Figure 5-21 Trajectory Segment Dialog Box

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 17 of 32

4 5

Click on Continue to draw a second segment. Left-click when the X/Y Position is at 3.5km/2.5km and the Current segments length is about 1000m. The Trajectory <initials>_mrt Segment Information dialog box reappears.

6 7

Click on Continue to draw the third and last segment of the trajectory. Left-click when the X/Y Position is at 6.5km/2.5km and the Current segments length is about 3000m. Note that you will probably need to scroll the network view horizontally. The Trajectory <initials>_mrt Segment Information dialog box reappears.

Click on Complete to finish the trajectory definition. This closes the Trajectory Status and Segment Information dialog boxes. The trajectory disappears from the screen because it has not yet been referenced by a mobile node. You need to assign this trajectory to the jammer in the following steps:

Click on the Zoom to Previous tool button to reset the network zoom level.

10 Right-click on the jam node and select Edit Attributes. 11 Change the trajectory attribute to <initials>_mrt. 12 Click OK to close the dialog box. The trajectory is visible as a white line in the Project Editor.
Figure 5-22 Network Topology with Jammer Trajectory

13 Right-click on the trajectory and select Edit Trajectory. The Edit Trajectory Information dialog box displays. 14 Make sure the Coordinates are relative to objects position checkbox is selected. 15 Change the Ground speed in pop-up to m/s. 16 Review the X Pos, Y Pos, and Ground Speed values for each row, as listed in the following table.
# 1 2 3 X Pos (km) 0.000 3.000 3.000 Y Pos (km) 0.000 0.000 1.000 Ground Speed n/a 10.000 10.000

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 18 of 32

6.000

1.000

10.000

17 Click OK to close the dialog box and to overwrite the existing file if you made any changes. 18 Save the project with the default name.
End of Procedure 5-21

Collecting Statistics and Running Simulations


Key ConceptFor this model, you are interested in the effect different antenna patterns have on the receiving node in a network. Instead of changing the antenna pattern attribute (which controls the antenna pattern used) at the node level for each simulation, you can configure the Simulation Sequence to vary this attribute automatically for parametric studies. You can gather the radio receiver channel statistics for this simulation in the Project Editor. These statistics include the bit error rate (BER) and throughput in packets/sec. The packet throughput statistic indicates the average number of packets the receiver channel successfully received per second. New samples of this statistic are only generated for packets with BER lower than the receiver ECC threshold, as specified at the node level in the radio receiver modules ecc threshold attribute. Because the radio receiver module used in this tutorial has a value of 0.0 errors/bit for this attribute, only packets that have no bit errors will be accepted. Key ConceptYou can change the collection mode for different statistics. These modes specify the way in which statistics are captured (all values, bucket, sample, glitch removal). To collect the bit error rate and throughput statistics, perform the following procedure.
Procedure 5-22 Collecting bit error rate and throughput statistics

Right-click on the rx node object and select Choose Individual DES Statistics from the rx pop-up menu. Expand the Module Statistics > radio_rx.channel [0] > radio receiver tree. Select the bit error rate statistic. The right side of the dialog box fills up with information associated with the statistic.

2 3

Click the Modify button to the right of the Collection mode information. You can also right-click on the bit error rate statistic and choose Change Collection Mode from the pop-up menu. Select the Advanced checkbox in the Capture Mode dialog box. Change the Capture mode to glitch removal. Click OK when done.

5 6

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 19 of 32

The new collection mode is shown in the Statistics information area of the Choose Results dialog box.
End of Procedure 5-22

To set the collection mode for the throughput statistic, perform the following procedure.
Procedure 5-23 Setting the collection mode for the throughput statistic

Select the throughput (packets/sec) statistic and choose Change Collection Mode from the pop-up menu. Select the Advanced checkbox in the Capture Mode dialog box. Verify that Capture mode is set to bucket, and the Bucket mode is set to sum/time. Select the Everyseconds radio button and set the sample frequency to 10 seconds. Make sure the Reset checkbox is selected. Click OK to close the Capture Mode dialog box, then click OK again to close the Choose Results dialog box.

2 3

5 6

End of Procedure 5-23

Collecting Results with the Probe Editor


Key ConceptThe Probe Editor provides another option for collecting statistics from a simulation. The Probe Editor is a more powerful statistic collection tool than the Project Editor, and can be used to customize many different types of statistics. In this section, you will Become familiar with the Probe Editor and its uses Learn about different types of statistics, including some that are not available in the Project Editor Configure different probes for the collection of statistics

Key ConceptFor this lesson, you will use the Probe Editor to collect received power coupled statistics. So far you have already set up two statistic probes via the Project Editor: bit error rate and throughput (packets/sec). The Choose Individual DES Statistics right-click menus provide a simple graphical interface to the underlying Probe file that stores the defined statistics.
Procedure 5-24

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 20 of 32

Choose DES > Choose Statistics (Advanced). The Probe Editor opens with the probe file of the current scenario in the Project Editor.
Figure 5-23 Probe Editor for Probe File of Current Scenario

You can see the two Node Statistics defined earlier. 2 Right-click on the pb0 node statistic and select Edit Attributes to display the probes Attributes dialog box.
Figure 5-24 Probe pb0 Attributes Dialog Box

When you are done reviewing the attribute values, click Cancel to close the dialog box.

End of Procedure 5-24

A node statistics probe will collect all the values written to the specified statistics. But in the case of wireless communication, it is possible to further restrict the amount of collected data based on the origin of that data. To do so, you use a Coupled Node Statistic probe. This probe defines both the node where the statistic is collected and an

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 21 of 32

associated transmitter or receiver node. Only data resulting from an exchange between the two nodes of the statistic will be recorded. In this session, you are going to collect the respective contributions of the jammer and transmitter nodes to the received power at the receiver First set up a Coupled Node Statistic probe between transmitter and receiver, as described in the following procedure.
Procedure 5-25 Setting Up a Coupled Node Statistic Probe Between Transmitter and Receiver

Click the Create Coupled Node Statistic Probe button and a probe appears below Coupled Node Statistic Probes in the workspace.

Right-click on the new Coupled Node Statistic probe and select Choose Probed Object. The Choose Probed Object dialog box opens, showing you the current subnet.
Figure 5-25 Choose Probed Object Dialog Box

3 4

Expand the Campus Network subnet, then the rx node. Click on the radio_rx module. The node model content is shown on the right, with the selected module highlighted.
Figure 5-26 Chosen Probed Object

Click OK to confirm your selection.

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 22 of 32

The Choose Probed Object dialog box closes, and the selected object is shown in the probe. 6 Right-click on the Coupled Node Statistics probe and select Choose Coupled Object. Select top.Campus Network.tx.radio_tx as the coupled object, then click OK to confirm. Right-click on the Coupled Node Statistics probe and select Edit Attributes. Set the submodule attribute to channel [0].

8 9

10 Left-click in the Value column of the statistic row. The Available Statistics dialog box appears. This dialog box shows the statistic and the group it belongs to (group.statistic), the statistics dimension (if any), and a description. Only statistics that can be probed by a Coupled Node Statistics probe appear in this list. 11 Select radio receiver.received power (W) from the list and click OK. In the Edit Attributes dialog box, the group attribute changes to radio receiver and the statistic attribute changes to received power (W).
Figure 5-27 Attributes Change when Statistic Is Selected

12 Click OK to close the probes Attribute dialog box.


End of Procedure 5-25

Next, you need to create a similar probe between the receiver and the jammer.

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 23 of 32

Procedure 5-26

1 2 3 4

Left-click on the existing coupled probe to select it. Choose Edit > Copy, then Edit > Paste to duplicate the probe. Right-click on the newly created probe and select Choose Coupled Object. Select top.Campus Network.jam.radio_tx, then click OK.

End of Procedure 5-26

Now that you have set up the probes correctly to collect the desired statistics, save the probe file:
Procedure 5-27

1 2

Close the Probe Editor. When asked if you want to save the changes, click on Save.

End of Procedure 5-27

Configuring and Running Simulations


Now that you have specified the statistics to collect, you can configure the simulation to conduct a parametric studyone in which the value of an attribute is varied to determine the effect on network behavior.
Procedure 5-28

Verify that the Network Simulation Repositories preference is empty. 1.1 Choose Edit > Preferences. 1.2 Type network sim in the Search for: field and click Find. 1.3 Verify the Value cell shows (). Delete any other entry. 1.4 Click OK to close the dialog box.

Choose DES > Configure/Run Discrete Event Simulation.

End of Procedure 5-28

Configure the simulation, as described in the following procedure.


Procedure 5-29 Configuring the Simulation

Click on the Inputs tree node, the Object Attributes node, and then on the Add button to display the Add Attributes dialog box.

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 24 of 32

Click in the Add column for all three of the unresolved attributes, and then click OK.
Figure 5-28 Add Attribute Dialog Box

End of Procedure 5-29

These are the attributes that you promoted in the Node Editor. Because you did not assign values when you promoted the attributes, you must assign them now. Note that the attributes now appear in the Attributes table, but they lack values. Add the values for the ant_rx.pattern attribute (if necessary, drag the column divider to expand the Attribute column and show the full attribute names).
Procedure 5-30

1 2 3

Select the ant_rx.pattern attribute. Click the Enter Multiple Values button. In the attribute dialog box, click in the Value cell and select isotropic. Move down to the next row, click again, and select <initials>_mrt_cone. Click OK.

End of Procedure 5-30

Add the values for the jam.radio_tx.channel [0].power and tx.radio_tx.channel [0].power attributes as follows:
Procedure 5-31

Set the jam.radio_tx.channel [0].power attribute to 20. Press <Return> when finished. Set the tx.radio_tx.channel [0].power attribute to 1. Press <Return> when finished.
Figure 5-29 Adding Values for the Promoted Attributes

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 25 of 32

End of Procedure 5-31

Note that the Number of runs is now 2. This is because the ant_rx.pattern attribute now has two possible values, so that two separate simulations will run using a different value for this attribute for each simulation. Change the Seed and Duration settings for this simulation, as described in the following procedure.
Procedure 5-32

1 2 3 4 5

Click on the Common tree node. Change Duration to 12 minutes. Change Seed to 50. Make sure that Simulation Kernel is set to Development. When you are finished making changes in the Configure/Run DES dialog box, click Run. The DES Execution Manager dialog box appears and the first simulation run is launched.

When both simulations are complete, close the DES Execution Manager dialog box. If you had problems, see Troubleshooting Tutorials.

End of Procedure 5-32

Viewing and Interpreting Results


Now that the simulations have been run, you can examine network performance and check the bit error rate and packet throughput results.

Tabular Statistics
To gain a high-level understanding of network behavior for each type of antenna, you can look at the Global Packet Statistics report for each simulation run. These reports contain the number of packets created, copied, and destroyed, broken down by node, module, and packet format.

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 26 of 32

The reports are found in the Results Browser under two tabs named DES Run (<run_number>) Tables. Run 1 contains results for the isotropic antenna case and run 2 contains results for the directional antenna case. NoteGlobal packet statistics are collected automatically for new simulations that are run using a sequential development kernel. You can disable this collection from the Global Packet Statistics page of the Configure/Run DES dialog box. Use the Global Packet Statistics reports to examine overall packet activity during the simulation.
Procedure 5-33

In the Project Editor, right-click in the workspace and choose View Results from the pop-up menu. The Results Browser opens with the current scenario selected.

2 3

Click the DES Run (1) Tables tab. Expand the Report: Packet Info tree node until the node-centric packet statistics are visible, then select Number of Packets Created.
Figure 5-30 Packets Created in Run 1

There were 1,420 packets created during the simulation. The transmitter and jammer nodes each create one packet per second, from simulation time 10 seconds to 12 minutes; thus, each creates (12 x 60) - 10 = 710 packets, as shown in the table. 4 Select Number of Packets Destroyed in the tree. The table shows that the receiver node destroyed 1,418 packets during the simulation (all but the last packet from each of the transmitter and jammer nodes, which are still enroute at the end of simulation). 5 Click the Show button. The table opens in a separate window

Click in the [Total] cell for the Campus Network.rx node.

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 27 of 32

A new window opens with a table showing how many packets were destroyed in each module of the receiver node.

The radio_rx module destroyed packets that were blocked by interference from the jammer. The successfully received packets were destroyed in the rx_sink module. Notice that, for the isotropic antenna used in this simulation, almost all packets were blocked. 7 Click the DES Run (2) Tables tab and expand the Report: Packet Info tree node until the node-centric packet statistics are visible. Select Number of Packets Created to verify that Run 2 created the same number of packets as did Run 1. Select Number of Packets Destroyed and drill down to the module statistics for the receiver node, as you did for Run 1.

The same number of packets were destroyed in Run 2, but many more (almost half) were successfully received with the directional antenna.
End of Procedure 5-33

Graphical Statistics
Now that you have seen the effect of different antennas on packet reception statistics, check the bit error rate and packet throughput results.
Procedure 5-34

1 2

In the Results Browser, click the DES Graphs tab. In the source treeview, expand the antenna_test node to show the two simulation runs. These results correspond to the two simulationsone for the isotropic antenna pattern and one for the directional antenna pattern.
Figure 5-31 Results Browser

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 28 of 32

Verify that the checkbox for run 1 is selected and unselect the checkbox for run 2 to restrict data to the first (isotropic antenna) run. In the results (bottom) treeview, expand the Object Statistics > Campus Network > rx > radio_rx > channel [0] > radio_receiver tree to view the full hierarchy of available statistics for that simulation run.
Figure 5-32 Results Treeview (Expanded)

Select the checkboxes next to bit error rate, throughput (packets/sec), and both received power coupled statistics, then click the Show button. Move the graph off to the side. The graphs show the bit error rate, throughput, and received power statistics for the isotropic antenna.
Figure 5-33 Bit Error Rate, Throughput, and Received Power Coupled Statistics of the Isotropic Antenna

As expected, the graph for the isotropic antenna pattern shows that the bit error rate at the receiver node gradually increased as the distance between the jammer and receiver nodes decreases, and vice-versa. The bit error rate reaches a maximum of about 0.35 errors/bit when the distance between the jammer and the receiver is smallest. The isotropic receiver antenna receives jammer interference during the entire simulation.

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 29 of 32

The two humps match the two locations when the jammer is closest to the receiver.
Figure 5-34 Position of Jammer Relative to Receiver

The received power from the transmitter is constant, which is expected since both transmitter and receiver are fixed nodes. The received power from the jammer follows a similar pattern as the bit error rate. 6 Select run 2 and unselect run 1 in the upper treeview. The previously selected statistics are now showing the data from run 2. 7 Click on the Show button. The results for the directional antenna that follow are highly dependent on the antenna gain. If your results do not match those shown here, it is probably due to small variations in the defined gain. The graphs show the bit error rate, throughput, and received power statistics for the directional antenna.
Figure 5-35 Bit Error Rate, Throughput, and Received Power Coupled Statistics of the Directional Antenna

The bit error rate graph from the directional antenna also reveals that the bit error rate at the receiver node is non-zero initially as the distance between the jammer node and receiver node decreases. However, after about 1 minute, the direction vector between the jammer antenna and the receiver antenna was no longer in line with the direction of greatest gain for the receiver antenna. Therefore, the receiver node stopped receiving interference from the jammer node and the bit error rate at the receiver dropped to

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 30 of 32

0. This drop dramatically increased the number of packets received from the stationary transmitter node (as will be seen in the next graphs). After about 6 minutes, the jammer comes back into the antennas cone, at which point the bit error rate increases and the number of packets received first drops (as the jammer approaches the receiver), then increases again (as the jammer moves away). Once the jammer leaves the antennas cone, the bit error rate drops back to 0. Once again, the received power of the jammer matches the bit error rate pattern. The very large power values from transmitter and jammer are due to the unrealistic 200dB gain provided by the antenna pattern.
End of Procedure 5-34

Using the Time Controller


To correlate the position of the jammer with the bit error rate, use the time controller.
Procedure 5-35 Using the Time Controller

Select View > Show Time Controller.


Figure 5-36 Time Controller

Click the Configure button. 2.1 Set the Slider end time value to 0h12m0.000s. 2.2 Set the Time step value to 0h0m20.00s. 2.3 Unselect the Start modeling at time checkbox.
Figure 5-37 Configuring the Time Controller

2.4 Click OK to close the dialog box.


Figure 5-38 Time Controller After Configuration

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 31 of 32

Click the Play ( ) button to have the time controller iterate through the time range. At each step, the jammer node is positioned accordingly along its trajectory and a green vertical line indicates the current time in the graph window.
Figure 5-39 Time Controller Animation

Click the Pause (

) button to stop the animation.

End of Procedure 5-35

Key ConceptYou can manually change the current time by entering a value in the time controllers Current time field.
Procedure 5-36

Manually slide the time value to check the position of the jammer for the double humps and the dip for the isotropic antenna, or the spike in the directional antenna. Click Close to close the time controller.

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

Creating a Wireless Network

Page 32 of 32

End of Procedure 5-36

Congratulations! You have completed this tutorial. If you installed other modules, return to the main tutorial menu and continue with the tutorials.
Home 1986-2011 OPNET Technologies, Inc. All Rights Reserved. This software may be covered by one or more U.S. Patents. See complete patent notice in the Legal Notices section. OPNET Support Center

file:///D:/programs/OPNET/16.1.A/doc/modeler/Tutorials/tut_wireless.html

9/24/2011

You might also like