Você está na página 1de 39

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.

OPNET Modeler/Release 16.1 TUT-5-1


Creating a Wireless Network

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.

Figure 5-1 Wireless Topology


jammer trajectory
stationary
receiver node
mobile
jammer node
stationary
transmitter node

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.

TUT-5-2 OPNET Modeler/Release 16.1


Creating a Wireless Network

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.

Figure 5-2 Representation of an Antenna Pattern

z polar

gain at polar,azimuth

azimuth
x

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

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.

OPNET Modeler/Release 16.1 TUT-5-3


Creating a Wireless Network

Figure 5-3 Antenna Pattern Editor

polar plane menu

graph panel

Figure 5-4 Antenna Pattern 3D Viewer

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.

TUT-5-4 OPNET Modeler/Release 16.1


Creating a Wireless Network

Procedure 5-2

1 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

1 Click on the Set Ordinate Upper Bound tool button.

2 In the dialog box, enter 201 as the Ordinate Upper Bound and click OK.

3 Click on the Set Ordinate Lower Bound tool button.

4 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

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

OPNET Modeler/Release 16.1 TUT-5-5


Creating a Wireless Network

Procedure 5-4

1 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
cone-shaped 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 cone-shaped shell specified in the polar = 5 degrees plane.

Procedure 5-5

1 Press Ctrl-[up arrow] (or, choose Antenna > Decrease Polar Plane).

The current polar plane changes from 5 degrees to 0 degrees.

2 Verify that the Ordinate Upper Bound is 201 and the Ordinate Lower Bound is
199.

TUT-5-6 OPNET Modeler/Release 16.1


Creating a Wireless Network

3 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).

End of Procedure 5-5

Normalize the function over the entire pattern, as follows:

Procedure 5-6

1 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

2 Choose File > Save. Name the antenna pattern <initials>_mrt_cone, and then
save.

3 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 begin-simulation interrupt, so it can be designed as a single
unforced state.

OPNET Modeler/Release 16.1 TUT-5-7


Creating a Wireless Network

Procedure 5-7

1 Choose File > New and select Process Model from the pull-down list, then click
OK.

The Process Model Editor opens in a new window.

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

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

4 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 Double-click on the top half of the point state to open the Enter Executives block.

2 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 Review the code before you continue.

4 Save the Enter Executives block.

End of Procedure 5-8

Next, you need to modify the process attributes:

TUT-5-8 OPNET Modeler/Release 16.1


Creating a Wireless Network

Procedure 5-9 Modifying the Process Attributes

1 Choose Interfaces > Process Interfaces.

The Process Interfaces dialog box displays.

2 Change the initial value of the begsim intrpt attribute to enabled.

3 Change the Status of all the attributes to hidden.

4 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.

Procedure 5-10

1 Choose File > Declare External Files

The Declared External Files dialog box opens.

2 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

1 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.

OPNET Modeler/Release 16.1 TUT-5-9


Creating a Wireless Network

2 After the process model has compiled, close the Compilation dialog box and the
Process Editor.

End of Procedure 5-11

TUT-5-10 OPNET Modeler/Release 16.1


Creating a Wireless Network

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

1 Choose File > New, select Node Model from the pull-down list, and click OK.

The Node Editor opens in a new window.

2 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

3 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.

OPNET Modeler/Release 16.1 TUT-5-11


Creating a Wireless Network

Procedure 5-13

1 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

2 Click on the Value field for the channel attribute.

A dialog box displays showing the Compound Attribute Table for channel.

3 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

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

1 Choose Interfaces > Node Interfaces.

The Node Interfaces dialog box displays.

TUT-5-12 OPNET Modeler/Release 16.1


Creating a Wireless Network

2 In the Node types table, change the Supported value to no for the mobile and
satellite types.

3 Except for the promoted radio_tx.channel [0].power attribute, change the Status
of all attributes to hidden.

4 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 Save your changes by clicking the OK button.

6 Choose File > Save and save the node model as <initials>_mrt_tx.

End of Procedure 5-14

The Jammer Node


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 Open the <initials>_mrt_tx node model if it is not open.

OPNET Modeler/Release 16.1 TUT-5-13


Creating a Wireless Network

2 Right-click on the radio_tx object and select Edit Attributes from the pop-up
menu. Change the modulation attribute to jammod.

3 Click OK to close the radio_tx attribute dialog box.

4 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.

5 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 Choose Edit > Clear Model.

2 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

End of Procedure 5-16

Change the following attributes.

TUT-5-14 OPNET Modeler/Release 16.1


Creating a Wireless Network

Procedure 5-17

1 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.

2 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.

3 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

4 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 Choose Interfaces > Node Interfaces.

2 In the Node types table, change the Supported value to no for the mobile and
satellite type.

3 Except for the promoted ant_rx.pattern attribute, change the Status of all
attributes to hidden.

OPNET Modeler/Release 16.1 TUT-5-15


Creating a Wireless Network

4 Save your changes by clicking on the OK button.

5 Choose File > Save As and save the node model as <initials>_mrt_rx.

6 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 Choose File > New and select Project from the list of options, then click OK.

2 Name the new project <initials>_mrt_net, and the scenario antenna_test.

3 In the Startup Wizard, use the settings listed in the following table.

Dialog Box Name Value

Initial Topology Default value: Create empty scenario

Choose Network Scale Campus (Use metric units enabled)

Specify Size 8 x 4 Kilometers

Select Technologies None

Review Check values, then click Finish

4 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.

5 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.

6 Click OK to close the Configure Palette dialog box.

7 Build the network shown below. The nodes positions will be specified precisely
later, so you just need to place the appropriate nodes for now.

TUT-5-16 OPNET Modeler/Release 16.1


Creating a Wireless Network

Figure 5-15 Network Topology

<initials>_mrt_jam
model <initials>_mrt_rx
<initials>_mrt_tx model
model

8 Close the object palette.

9 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 Name x, y Position

node_0 rx 4, 2

node_1 tx 3, 2

mobile_node_0 jam 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

OPNET Modeler/Release 16.1 TUT-5-17


Creating a Wireless Network

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

1 Choose Topology > Define Trajectory

2 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

3 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

TUT-5-18 OPNET Modeler/Release 16.1


Creating a Wireless Network

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

You can now draw the mobile nodes trajectory:

Procedure 5-21

1 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.

2 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.

OPNET Modeler/Release 16.1 TUT-5-19


Creating a Wireless Network

Figure 5-20 3000m Segment Length

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

Figure 5-21 Trajectory Segment Dialog Box

4 Click on Continue to draw a second segment.

5 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 Click on Continue to draw the third and last segment of the trajectory.

7 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.

8 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:

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

TUT-5-20 OPNET Modeler/Release 16.1


Creating a Wireless Network

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.

# X Pos (km) Y Pos (km) Ground Speed

1 0.000 0.000 n/a

2 3.000 0.000 10.000

3 3.000 1.000 10.000

4 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

OPNET Modeler/Release 16.1 TUT-5-21


Creating a Wireless Network

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

1 Right-click on the rx node object and select Choose Individual DES Statistics
from the rx pop-up menu.

2 Expand the Module Statistics > radio_rx.channel [0] > radio receiver tree.

3 Select the bit error rate statistic.

The right side of the dialog box fills up with information associated with the
statistic.

4 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.

5 Select the Advanced checkbox in the Capture Mode dialog box.

TUT-5-22 OPNET Modeler/Release 16.1


Creating a Wireless Network

6 Change the Capture mode to glitch removal. Click OK when done.

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

1 Select the throughput (packets/sec) statistic and choose Change Collection


Mode from the pop-up menu.

2 Select the Advanced checkbox in the Capture Mode dialog box.

3 Verify that Capture mode is set to bucket, and the Bucket mode is set to
sum/time.

4 Select the Everyseconds radio button and set the sample frequency to 10
seconds.

5 Make sure the Reset checkbox is selected.

6 Click OK to close the Capture Mode dialog box, then click OK again to close the
Choose Results dialog box.

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

OPNET Modeler/Release 16.1 TUT-5-23


Creating a Wireless Network

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

1 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.

TUT-5-24 OPNET Modeler/Release 16.1


Creating a Wireless Network

Figure 5-24 Probe pb0 Attributes Dialog Box

3 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 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.

OPNET Modeler/Release 16.1 TUT-5-25


Creating a Wireless Network

Procedure 5-25 Setting Up a Coupled Node Statistic Probe Between Transmitter


and Receiver

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

2 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 Expand the Campus Network subnet, then the rx node.

4 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

5 Click OK to confirm your selection.

The Choose Probed Object dialog box closes, and the selected object is shown
in the probe.

TUT-5-26 OPNET Modeler/Release 16.1


Creating a Wireless Network

6 Right-click on the Coupled Node Statistics probe and select Choose Coupled
Object.

7 Select top.Campus Network.tx.radio_tx as the coupled object, then click OK to


confirm.

8 Right-click on the Coupled Node Statistics probe and select Edit Attributes.

9 Set the submodule attribute to channel [0].

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.

OPNET Modeler/Release 16.1 TUT-5-27


Creating a Wireless Network

Procedure 5-26

1 Left-click on the existing coupled probe to select it.

2 Choose Edit > Copy, then Edit > Paste to duplicate the probe.

3 Right-click on the newly created probe and select Choose Coupled Object.

4 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 Close the Probe Editor.

2 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

1 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.

2 Choose DES > Configure/Run Discrete Event Simulation.

End of Procedure 5-28

TUT-5-28 OPNET Modeler/Release 16.1


Creating a Wireless Network

Configure the simulation, as described in the following procedure.

Procedure 5-29 Configuring the Simulation

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

2 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 Select the ant_rx.pattern attribute.

2 Click the Enter Multiple Values button.

3 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:

OPNET Modeler/Release 16.1 TUT-5-29


Creating a Wireless Network

Procedure 5-31

1 Set the jam.radio_tx.channel [0].power attribute to 20. Press <Return> when


finished.

2 Set the tx.radio_tx.channel [0].power attribute to 1. Press <Return> when


finished.

Figure 5-29 Adding Values for the Promoted Attributes

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 Click on the Common tree node.

2 Change Duration to 12 minutes.

3 Change Seed to 50.

4 Make sure that Simulation Kernel is set to Development.

5 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.

TUT-5-30 OPNET Modeler/Release 16.1


Creating a Wireless Network

6 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.

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

1 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 Click the DES Run (1) Tables tab.

3 Expand the Report: Packet Info tree node until the node-centric packet statistics
are visible, then select Number of Packets Created.

OPNET Modeler/Release 16.1 TUT-5-31


Creating a Wireless Network

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

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

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.

8 Select Number of Packets Created to verify that Run 2 created the same number
of packets as did Run 1.

TUT-5-32 OPNET Modeler/Release 16.1


Creating a Wireless Network

9 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 In the Results Browser, click the DES Graphs tab.

2 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

3 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.

4 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.

OPNET Modeler/Release 16.1 TUT-5-33


Creating a Wireless Network

Figure 5-32 Results Treeview (Expanded)

5 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.

The two humps match the two locations when the jammer is closest to the
receiver.

TUT-5-34 OPNET Modeler/Release 16.1


Creating a Wireless Network

Figure 5-34 Position of Jammer Relative to Receiver


low point of the dip
closest approaches
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.

OPNET Modeler/Release 16.1 TUT-5-35


Creating a Wireless Network

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
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

1 Select View > Show Time Controller.

Figure 5-36 Time Controller

2 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.

TUT-5-36 OPNET Modeler/Release 16.1


Creating a Wireless Network

Figure 5-37 Configuring the Time Controller

2.4 Click OK to close the dialog box.

Figure 5-38 Time Controller After Configuration

3 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.

OPNET Modeler/Release 16.1 TUT-5-37


Creating a Wireless Network

Figure 5-39 Time Controller Animation

4 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

1 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.

2 Click Close to close the time controller.

End of Procedure 5-36

Congratulations! You have completed this tutorial.

TUT-5-38 OPNET Modeler/Release 16.1


Creating a Wireless Network

If you installed other modules, return to the main tutorial menu and continue with
the tutorials.

OPNET Modeler/Release 16.1 TUT-5-39

Você também pode gostar