Sie sind auf Seite 1von 118

OPNET Modeler

Day 2
copyright 2001 OPNET Technologies, Inc.
2
Course Outline
Events and Event List Concepts
Process Modeling
Process Modeling Lab
Collecting Scalar Statistics
Radio Modeling


Events and
Event List Concepts
copyright 2001 OPNET Technologies, Inc.
4
Agenda
Event-driven Simulation

Event List and the Simulation Time Clock

Simulation Kernel

Interrupts

Processes and Interrupts

Event List Example
copyright 2001 OPNET Technologies, Inc.
5
Event-Driven Simulation
Events are specific activities that occur at a certain time

OPNET simulations are event-driven

Simulation time advances when an event occurs

A different method might be to sample at regular intervals
Disadvantages:
Accuracy of results is limited by the sampling resolution
Simulation is inefficient if nothing happens for long periods
copyright 2001 OPNET Technologies, Inc.
6
Time Event Type Module
0.0 Initialize src.gen
0.0 Initialize src.rte
4.3 Timer expires src.gen
4.3 Packet arrives src.rte
Head
Event List Concepts
Single global event list

Shared simulation time clock

Events scheduled in time order

Event removed from event list when it completes
copyright 2001 OPNET Technologies, Inc.
7
The Simulation Kernel
Simulation Kernel (SK) manages the event list

SK delivers each event, in sequence, to the appropriate module

SK receives requests from processes and inserts new events in the event list
copyright 2001 OPNET Technologies, Inc.
8
Event Generation and Cancellation
Events can be generated in several ways
BEGSIM/ENDSIM interrupts
Self interrupts
Packet arrivals (STRM interrupts)
Writing to a statwire (STAT interrupts)

Events can be cancelled before they occur
copyright 2001 OPNET Technologies, Inc.
9
Interrupts
First event in the event list becomes an interrupt

Delivered by the Simulation Kernel to the designated module

Data associated with the event can be obtained by the module

Processors and queues can have BEGSIM interrupts
copyright 2001 OPNET Technologies, Inc.
10
How Does the Event List Work?
New event reaches head of
event list, which causes
Simulation Kernel to deliver
an interrupt to the appropriate
module
Simulation Kernel regains
control from module
Process within the
module gains control
and processes
interrupt
Simulation Kernel
deletes event from
event list, allowing
new event to reach
head of list
copyright 2001 OPNET Technologies, Inc.
11
Event List Implementation
The Simulation Kernel uses an efficient proprietary algorithm to maintain
the event list
Event times are expressed as double-precision, floating-point numbers and
are used to keep the event list sorted
0.01234 56789 11111 11
0.01234 56789 11111 22
0.01234 56789 11111 33
0.01234 56789 11111 44
0.01234 56789 11111 55
0.01234 56789 11111 66
0.01234 56789 11111 77
Suppose that this interrupt triggers an event to occur at
0.01234 56789 11111 75.
The Simulation Kernel minimizes the time required to
place this event at the correct place on the list.
copyright 2001 OPNET Technologies, Inc.
12
Delivery of Interrupts
When an interrupt is delivered to a module, control passes from the
Simulation Kernel to the module

If the module is a queue or processor, the interrupt is delivered to the
process running within the module

Other modules have default behaviors
copyright 2001 OPNET Technologies, Inc.
13
Event List Concepts Reviewed

Events must exist in the event list at the start of a simulation
A processor or queue module has the begsim interrupt attribute enabled

An event list typically has a few events each event may schedule other
events

The event list is always growing and shrinking

An event is pending until executed

A pending event can be cancelled
copyright 2001 OPNET Technologies, Inc.
14
Forced States
Forced (green) and unforced (red)
states differ significantly in
execution timing

In a forced state, the process:
Invokes the enter executives
Invokes the exit executives
Evaluates all condition statements
If exactly one condition statement
evaluates to true, the transition is
traversed to the next state

OPNET convention: code in enter
execs only
Transition to next state
Transition to next state
Forced (green) states
Enter execs
invoked
No blocking or waiting
Exit execs
invoked
Enter execs
invoked
Exit execs
invoked
No blocking or waiting
copyright 2001 OPNET Technologies, Inc.
15
Unforced States
In an unforced state, the process:
Invokes the enter executives
Places a marker at the middle of
the state
Releases control to the Simulation
Kernel and becomes idle
Resumes at the marker and
processes the exit execs when next
invoked
Start of invocation
End of invocation
Unforced (red) states
Transition to next state
Blocking, waiting
for invocation
Exit execs processed
when invocation occurs
Enter execs
invoked
Next
invocation
starts here
Blocking, wait for
next invocation
copyright 2001 OPNET Technologies, Inc.
16
Transitions Between States
After completing the exit executives, the process evaluates the
conditions for all transitions from the state

One and only one condition statement must evaluate to true

The single true transition is taken to the next state

A transition with condition = default is true if and only if no other
conditions are true

A transition with no condition set is termed unconditional and is
always true
copyright 2001 OPNET Technologies, Inc.
17
How a Process Handles an Interrupt
Flow diagram showing how a process handles an interrupt:
(except the initial interrupt)



Implement
exit execs
Set marker;
block and wait
for interrupt
Receive
interrupt
Evaluate
condition
statements
Red state?
Yes
No


Follow transition
to next state
Implement enter
execs
Find marker
copyright 2001 OPNET Technologies, Inc.
18
Process Model Example
Model with three forced states and one unforced state:
3. Transition occurs. 6. Transition occurs.
2. Exit execs invoked immediately. Transition
condition (pk_count == 0) evaluates to
true. 5. Exit execs invoked immediately.
8. Marker is placed and
process stops here.
7. Enter execs invoked. 4. Enter execs invoked.
1. Initial interrupt delivered and the enter
execs invoked.
copyright 2001 OPNET Technologies, Inc.
19
The Simulation Kernel and Processes
Control passes between the Simulation Kernel (SK) and multiple processes
(pr1, pr2, etc.), as described below:
Description In control Idle
Read first event on event list. Deliver to appropriate process (pr1). SK All processes

Invoke enter and exit execs of initial state (forced1) . Evaluate pr1 SK; other processes
condition statements and transition to next state (forced2).
Invoke enter and exit execs of forced2. Transition to next state (unforced).
Invoke enter execs of next state (unforced). Release control to SK. Become idle.

Remove first event from event list. Advance next event to SK All processes
head of list. Deliver interrupt to pr2.

Invoke enter and exit execs of initial state (this process model is not shown). pr2 SK ; other processes
Evaluate condition statements and transition to next state
copyright 2001 OPNET Technologies, Inc.
20
Event List Example
Consider this model:
Network model
Node model
Node model
Node model: src
Node model: dest1
Network model
copyright 2001 OPNET Technologies, Inc.
21
Event List Example (cont.)
The network model has three nodes (src, dest1, dest2) relying
on two node models (both dest nodes use the same node model)

In the src node model, packets are generated at gen and sent by
queue to either transmitter (tx0 / tx1)

Packets then flow across a link to a destination node (dest1,
dest2) where they are received (rx) and thrown out (sink)

Three modules (gen, queue, and sink) have process models
associated with them
copyright 2001 OPNET Technologies, Inc.
22
The BEGSIM Interrupt
BEGSIM is an interrupt that occurs at simulation time 0.0, before any other
type of interrupt

A BEGSIM interrupt usually initializes a module and schedules future
events

Any processor or queue can have its begsim intrpt attribute enabled,
resulting in an event being placed on the event list for time 0
copyright 2001 OPNET Technologies, Inc.
23
Event List Example (cont.)
The begsim intrpt attribute for modules src.gen and src.queue
is enabled; this places two events in the event list
Time Event Type Module
0.0 BEGSIM src.gen
0.0 BEGSIM src.queue
Node model
copyright 2001 OPNET Technologies, Inc.
24
Processing the First Interrupt
Consider the process model specified by the src.gen module
Node model: src
Process model: gen
copyright 2001 OPNET Technologies, Inc.
25
Starting the Simulation
Simulation Kernel reads the event at the head of the event list, and
delivers control to the process in the src.gen module

Process begins execution at the initial state, marked with the black arrow

Process executes the Init states enter execs
Time Event Type Module
0.0 BEGSIM src.gen
0.0 BEGSIM src.queue
copyright 2001 OPNET Technologies, Inc.
26
Processing the First Interrupt in Process gen (cont.)
Process model
Process model: gen
copyright 2001 OPNET Technologies, Inc.
27
Because Init is a forced (green) state, process immediately invokes and
completes the exit execs.

Process evaluates all condition statements. This state has only one
departing transition which evaluates to true.

Process transitions to Wait state.
Processing the First Interrupt in Process gen (cont.)
copyright 2001 OPNET Technologies, Inc.
28
Process model
Process invokes and completes the enter execs of Wait.
Processing the First Interrupt in Process gen (cont.)
copyright 2001 OPNET Technologies, Inc.
29
Line 9 of the enter execs
schedules a self interrupt using
a KP. This adds an event to
the event list.

Process places a marker at the
middle of Wait.

Process becomes idle.
Time Event Type Module
0.0 BEGSIM src.gen
0.0 BEGSIM src.queue
4.3 SELF src.gen
Marker
Processing the First Interrupt in Process gen (cont.)
copyright 2001 OPNET Technologies, Inc.
30
Processing the Second Interrupt at module src.queue
Simulation Kernel removes the first event and advances the next event to
the head of the event list. The simulation time remains 0.0.

Simulation Kernel delivers a BEGSIM interrupt to src.queue.

Process in src.queue module gains control. It executes until it reaches
an unforced (red) state, places a marker, and then becomes idle. (This
model is not shown.)
Time Event Type Module
0.0 BEGSIM src.queue
4.3 SELF src.gen
First event is removed
copyright 2001 OPNET Technologies, Inc.
31
Processing the Next Interrupt at module src.gen
Simulation Kernel removes the previous event and advances the next
event to the head of the event list. The simulation time becomes 4.3
seconds.

Simulation Kernel delivers the SELF interrupt to the gen process. The
process resumes at the marker in the middle of Wait.

Process invokes and completes the exit execs of Wait.


Time Event Type Module
4.3 SELF src.gen
copyright 2001 OPNET Technologies, Inc.
32
Continuing the Process at gen
Process evaluates all condition statements when leaving Wait. This
state has one outgoing conditional transition that evaluates to true.
copyright 2001 OPNET Technologies, Inc.
33
Continuing the Process at gen (cont.)
Process transitions to Send.
Process invokes the enter execs of Send and calls op_pk_send( ) to
send a packet. This results in an event of type STRM being placed
on the event list.
Time Event Type Module
4.3 SELF src.gen
4.3 STRM src.queue

copyright 2001 OPNET Technologies, Inc.
34
Continuing the Process at gen (cont.)
Process immediately invokes and completes the exit execs, because
Send is a forced (green) state.

Process evaluates all possible transitions. One evaluates to true.

Process transitions to Wait

Process invokes enter execs of Wait, schedules another SELF interrupt
in the event list and becomes idle.

Simulation Kernel takes control and processes the next event in the list.
copyright 2001 OPNET Technologies, Inc.
35
Simulation Termination
Simulations terminate in one of four ways:
The event list is emptied
Simulation attribute duration expires
A process calls for termination, using the KP op_sim_end()
A fatal error occurs
copyright 2001 OPNET Technologies, Inc.
36
How Does Time Advance?
Simulation time advances only when an event with a later time is
processed from the event list

No simulation time occurs during the execution of a process

No time elapses during transitions between states

A process model must always have an unforced (red) state so time can
advance
Avoid endless looping between
forced (green) states
copyright 2001 OPNET Technologies, Inc.
37
Events and Event List Concepts: Summary
Forced and unforced states execute differently

Any processor or queue can have the attribute begsim intrpt enabled,
scheduling an event for time 0.0

Control passes dynamically between the Simulation Kernel and individual
processes
Process Modeling
copyright 2001 OPNET Technologies, Inc.
39
Agenda
Process models

Process Editor
State transitions
Executive blocks

Kernel Procedures

Examine acb_fifo

Lab: Modify a process model
copyright 2001 OPNET Technologies, Inc.
40
Process Models
Process models represent algorithms
Communications protocols and algorithms
Shared-resource managers
Queuing disciplines
Specialized traffic generators
Statistic-collection mechanisms
Control Processes

Process Editor provides the features for creating process models
copyright 2001 OPNET Technologies, Inc.
41
1. Create state
2. Create transition
3. Set initial state
4. Edit state variable
5. Edit temporary variable
6. Edit header block
7. Edit function block
8. Edit diagnostic block
9. Edit termination block
10. Compile process model
1 2 3 4 5 6 7 8 9 10
Process Editor
Toolbar Buttons:
copyright 2001 OPNET Technologies, Inc.
42
State Transitions
Transitions connect states
Conditional
Unconditional
Transition executive
Exactly one condition must evaluate to true
If the condition statement (x == y) is true, the transition executive (Reset_Timers)
is invoked
Transition executive Condition statement
copyright 2001 OPNET Technologies, Inc.
43
State Executive Blocks
Each state has two executive blocks
Enter executives are invoked upon entering a state
Exit executives are invoked before exiting a state
copyright 2001 OPNET Technologies, Inc.
44
Introduction to Kernel Procedures
Pre-written functions for difficult, tedious, or common operations

KPs free users from addressing memory management, data structure,
handling event processing, etc.

KPs focus on communication modeling

All KPs begin with prefix op_
copyright 2001 OPNET Technologies, Inc.
45
Common Kernel Procedures
Packet Package:
op_pk_create ()
op_pk_create_fmt ()
op_pk_copy ()
op_pk_get ()
op_pk_total_size_get ()
op_pk_nfd_set ()
op_pk_nfd_get ()
op_pk_send ()
op_pk_send_delayed ()
op_pk_destroy ()

Subq Package:
op_subq_pk_insert ()
op_subq_pk_remove ()

Interrupt Package:
op_intrpt_schedule_self ()
op_intrpt_type ()
op_intrpt_strm ()
op_intrpt_code ()

Simulation and
Event Packages:
op_ev_cancel ()
op_sim_time ()

ID, Topo and Internal
Model Access Packages:
op_id_self ()
op_topo_parent ()
op_topo_child ()
op_ima_obj_attr_get ()

Distribution Package:
op_dist_load ()
op_dist_outcome ()

Naming convention for Kernel Procedures -
op_<family name describing object >_<action>
copyright 2001 OPNET Technologies, Inc.
46
Kernel Procedures Help
From the Help menu, select Online Documentation and refer to the
Simulation Kernel manual
Press <Control> + <h> to view Essential Kernel Procedures
Press <Control> + <Shift> + <h> to view All Kernel Procedures
Each KP is described in several
paragraphs. Review at least the
Abstract, Syntax, and Return
Value fields.
KP Name
Syntax
Return Value
Example
The manual is divided into sections
by KP family (such as Anim, Dist,
Sim, Stat) and sorted by KP name
within each section.
Details
Purpose
Errors
Reference
Abstract
copyright 2001 OPNET Technologies, Inc.
47
State transition diagrams
C programming language
Library of OPNET Kernel Procedures (KPs)
State variables (private to each process)
Temporary variables
Proto-C
copyright 2001 OPNET Technologies, Inc.
48
Example Process Model: acb_fifo
Queue process model

Characteristics
Has a service rate, in bits/sec
FIFO queue

Active Concentrating Bit-oriented First In First Out queue
Active: Has a processor
Concentrating: Will take from many input streams and output to only one
stream
Bit-oriented: Delay is based on number of bits processed
copyright 2001 OPNET Technologies, Inc.
49
acb_fifo: State Overview
Purpose of each state
init initializes state variables
arrival queues packets
svc_start calculates when the packet can be sent
svc_compl sends the packet
idle is the wait state
copyright 2001 OPNET Technologies, Inc.
50
acb_fifo: Idle state
Packet arrival
Packet is queued in arrival
To svc_start if not busy
Back to idle if busy


Service completion
Sends queued packet in svc_compl
To svc_start if queue nonempty
Back to idle if queue busy


copyright 2001 OPNET Technologies, Inc.
51
acb_fifo: arrival State
Gets the incoming packet

Tries to queue packet

Destroys packet if
queue is full

copyright 2001 OPNET Technologies, Inc.
52
acb_fifo: svc_start State
Begins servicing the packet
Schedules an interrupt for service completion

copyright 2001 OPNET Technologies, Inc.
53
acb_fifo: svc_compl State
Sends the serviced packet
Receiving module will get control immediately

copyright 2001 OPNET Technologies, Inc.
54
Lab: Expand the network
Lab Book: Lab #13
The banks network has expanded to 4 source nodes, 12 switch nodes, and 3
destination nodes
Design a switch node with 4 inputs and 2 outputs
This switch takes an input from any input port and sends it to a random output
port
copyright 2001 OPNET Technologies, Inc.
55
Process Modeling: Summary
Process models
Finite state machines
Proto-C
acb_fifo

Kernel Procedures
Process Modeling Lab
copyright 2001 OPNET Technologies, Inc.
57
Lab Description
This lab uses the project bank_net, to model changes in the transaction rate
and measure the effects of those changes

Create modified sink process model to compute ETE delay
Get the packet
Obtain the creation time
Write out its ETE delay as a global statistic
Destroy the packet

Incorporate new sink process model into existing node model

Create ETE delay statistic probe

Run simulation

Filter the View Results graphs to answer questions
copyright 2001 OPNET Technologies, Inc.
58
Lab Description
Lab Book: Lab #14

What is the average end-to-end
delay (ETE delay) for all
transactions when the generation
rate is 0.4 seconds/transaction (or
2.5 transactions/second)?

For this generation rate, what
percentage of the packets incurred
an ETE delay of less than 1 second?
Collecting
Scalar Statistics
copyright 2001 OPNET Technologies, Inc.
60
Agenda
Conceptual goals:
Creation of an attribute of a
process model
Collect scalar statistics
Tool goals:
View scalar analysis results
copyright 2001 OPNET Technologies, Inc.
61
Creating an Attribute for the Process Model
2
4
4
1
3
copyright 2001 OPNET Technologies, Inc.
62
Scalar Statistics
A scalar statistic is a single value representing a statistic computed over an
interval, typically the entire simulation. A scalar statistic:
Allows for parametric studies.
Must be plotted versus another scalar.
Shows the effect that making a change has on certain output parameters.
Is usually a summary of some aspect of a networks behavior.
copyright 2001 OPNET Technologies, Inc.
63
Vectors, Scalars, Probes, and Output Files
Probes collect data at a
designated node, link or
module.
There are two types of
output:
vector
scalar
A vector statistic is a single
output plotted versus
simulation time. (Example:
throughput as it evolves
over time).
copyright 2001 OPNET Technologies, Inc.
64
Scalar Statistics
A scalar statistic is a single value representing a statistic computed over an
interval, typically the entire simulation (example: average end-to-end delay
for all received packets in a simulation).

Scalar statistics:
Must be plotted versus
another scalar statistic
Allows for parametric studies
Requires many simulation
runs because each run
produces only one data
point
copyright 2001 OPNET Technologies, Inc.
65
Collecting Scalar Statistics
Use any of three methods
to collect a scalar
statistic:
A statistic probe created
in the Probe Editor (as
below)
An attribute probe
The KP
op_stat_scalar_write
(scstat_name, value)
2
1
3
copyright 2001 OPNET Technologies, Inc.
66
Using the Simulation Sequence Editor
In order to collect scalar
statistics, a scalar file must
be specified.
This output file will record
the scalar simulation
statistics.
There is only one data point
per simulation run.
The simulation program
appends data to an existing
file, allowing for multi-
simulation parametric
studies.
copyright 2001 OPNET Technologies, Inc.
67
Using the Simulation Sequence Editor
By promoting an objects
attribute to the simulation
level, multiple values for
that attribute can be set.
By left-clicking on a blank
under Attribute the user
can add a currently
promoted attribute.
After adding the attribute to
the table, the user can select
multiple values for that
statistic, and simulations
will run with each value.
1
2 3
4
copyright 2001 OPNET Technologies, Inc.
68
Plotting a Scalar Panel
1
2
5
4
3
copyright 2001 OPNET Technologies, Inc.
69
Understanding the Problem and Questions
Modify the Bank_net project to include a custom generator that has an
attribute transaction_rate, the transaction rate in transactions
per second.

Answer the following questions:
Are your results the same with this customized generator as with the ideal
generator? Hint: run the simulation with the same probe file as before.
Verify that results are the same.
What is the maximum generation rate such that the average ETE delay for
all transactions is less than 5 seconds? Hint: run multiple simulations with
different transaction rates, collecting scalar data.
copyright 2001 OPNET Technologies, Inc.
70
Creating a Custom Generator Procedure
1. Determine functionality of the process model.
2. Determine necessary states.
3. Create transitions between states. Write condition statements and
create macros for them.
4. Determine state variables.
5. Use C code and KPs to implement each states enter and exit
executives.
6. Declare variables.
7. Compile the process model.
copyright 2001 OPNET Technologies, Inc.
71
Functionality of the Process Model
The process model must:
Include a custom attribute, transaction_rate.
Generate packets as specified in the original problem:
Packet interarrivals are exponentially distributed.
Packet size varies according to a normal distribution with a mean size of 3200 bits
and a standard deviation of 20 bits.
Write any necessary statistics.
copyright 2001 OPNET Technologies, Inc.
72
Useful KPs for This Model
dist_ptr =op_dist_load (dist_name, dist_arg0, dist_arg1) loads a
distribution to generate stochastic values.
rand_num =op_dist_outcome (dist_ptr) generates a random value from
the specified distribution.
op_intrpt_schedule_self (time, code) schedules a self interrupt for the
invoking process.
pkptr =op_pk_create (bulk_size) creates a packet.
pkptr = op_pk_create_fmt (<initials>_trans_pkt) creates a packet of
specific format.
op_pk_bulk_size_set (pkptr, bulk_size) sets the bulk size of a packet.
copyright 2001 OPNET Technologies, Inc.
73
Useful KPs for This Model
op_pk_send (pkptr, outstrm_index) forwards a packet through an
output packet stream and schedules its arrival at a destination module.
current_time =op_sim_time () obtains the current simulation time.
object_id =op_id_self () obtains the value of the surrounding
processor or queue.
op_ima_obj_attr_get (objid, attr_name, value_ptr) obtains the value
of an attribute for the specified object.
copyright 2001 OPNET Technologies, Inc.
74
Lab Approach and Hints
Remember the questions we are trying to answer:
Are your results the same with this customized generator as with the ideal generator?
What is the maximum generation rate such that the average ETE delay for all transactions is less than 5 seconds?
1. Create a new generator process model.
a. Create an attribute of the process named transaction_rate.
b. Place states and transitions.
c. Define code in executive blocks.
d. Compile the process model.
NOTE: if you do not want to create this model, it is available as model "mdlr_lab12_gen".
Examine it to see how it was implemented.
2. Modify the node model to include the new generator process (use a processor instead of an
ideal generator).
3. Modify probe file to capture the scalar statistic ETE delay by adding a global statistic
probe.
4. Run multiple simulations and view output in the Analysis Tool. To ensure convergence,
you may want to run with a duration longer than 1000 sec (however, the simulations will
take longer to complete).
copyright 2001 OPNET Technologies, Inc.
75
Lab Results
copyright 2001 OPNET Technologies, Inc.
76
If you finish early, try the Advanced Lab
Modify the sink process to collect the total number of bits that it receives
(use op_pk_total_size_get ()). At the end of the simulation, write out the
the statistic:
"Global Bit Throughput" = total bits received / total simulation time
Add an additional receiver to the PHIL node model that also sends packets
to the sink module.
Add an additional New York node that sends bank transactions to PHIL.
Plot the scalar panel ETE Delay vs. Global Bit Throughput for a variety of
transaction rates.
Radio Modeling
copyright 2001 OPNET Technologies, Inc.
78
Agenda
Conceptual Goals
Introduction to radio modeling
Introduction to Transceiver
Pipeline Stages
Mobile/Satellite Nodes
Custom Packets
Custom Antennas
Link Models
Custom PDFs
Tool Goals
Define Trajectory
Packet Format Editor
Link Model Editor
Antenna Pattern Editor
PDF Editor
copyright 2001 OPNET Technologies, Inc.
79
Radio Modeling
Modeler / Radio allows models to utilize
mobile nodes and mobile subnets using
dynamic RF links.

Node and subnet positions are updated (lazy
evaluation) based on user specifications such
as time step, altitude and a defined path that is
anchored on absolute or relative coordinates.

Radio transceivers must be used that employ a
14 stage link budget model called the
Transceiver Pipeline
copyright 2001 OPNET Technologies, Inc.
80
Radio Modeling
Radio is a broadcast technology and depends on dynamically changing
parameters. The simulation must evaluate the possible connectivity
between a transmitter channel and every receiver channel for each
transmission.

The network level characteristics factored into these calculations are the
locations of the source and destination nodes, the distance between the
nodes, and the direction the radio signal travels from the source node to
the destination node.

If the nodes are mobile or satellite nodes, these position-related parameters
may change during simulation.
copyright 2001 OPNET Technologies, Inc.
81
Radio Links
A radio link is not statically represented by an object, as are point-to-
point and bus links.

A radio link can exist between any radio transmitterreceiver channel pair
and is dynamically established during simulation.

The possibility of a radio link between a transmitter channel and a
receiver channel depends on many physical characteristics of the
components involved, as well as time-varying parameters, which are
modeled in the Transceiver Pipeline Stages.
copyright 2001 OPNET Technologies, Inc.
82
Radio Links
In OPNET simulations, parameters such as frequency band,
modulation type, transmitter power, distance, and antenna
directionality are common factors that determine whether a radio link
exists at a particular time or can ever exist
copyright 2001 OPNET Technologies, Inc.
83
Transceiver Pipeline
Models the transmission of packets across a communications channel (link)
Implements the physical layer characteristics
Divided into multiple stages, each modeling a particular aspect of the
channel
Determines whether or not a packet can be received at the links destination
S1 S2 S3 S4
Transmitter Receiver
Each stage models an aspect of
the links behavior
copyright 2001 OPNET Technologies, Inc.
84
Radio Transceiver Attributes for Specifying Pipeline Stages
8 Stages (6-13) Associated
with Radio Receiver
6 Stages (0-5) Associated
with Radio Transmitter
Receiver Group
Transmission Delay
Link Closure (LOS)
Channel Match
Tx Antenna Gain
Propagation Delay
Rx Antenna Gain
Received Power
Background Noise
Interference Noise
Signal-to-Noise Ratio
Bit Error Rate
Error Allocation
Error Correction
Radio Transmitter Radio Receiver
copyright 2001 OPNET Technologies, Inc.
85
Radio Transmitter and Receiver Attributes
Modulation - name of modulation table used to look up the bit error
rate (BER) as a function of effective signal to noise ratio
Channel - specifies the number and attributes of the channels in the
transceiver
Noise figure - represents the effect of thermal noise on radio
transmission (receiver only)
Ecc threshold (err/bits) - specifies the highest proportion of bit
errors allowed in a packet in order for the packet to be accepted by a
receiver (receiver only)
... model - these attributes specify the various Transceiver Pipeline
Stage models used
copyright 2001 OPNET Technologies, Inc.
86
Radio Channel Attributes
Data rate (bps) - rate at which data may be transmitted or received
Packet formats - determines the types of packets a channel can
transmit or receive
Bandwidth (KHz) - specifies bandwidth of channel
Min frequency (MHz) - specifies the base frequency of the channel
Spreading code - used to specify a user-assigned code for the
channel
Power (W) - transmission power of packets transmitted through this
channel (transmitter only)
copyright 2001 OPNET Technologies, Inc.
87
Mobile Nodes
Mobile nodes model terrestrial network elements whose positions vary
with time, such as automobiles, aircraft, and ships.
Mobile nodes cannot be connected to point-to-point and bus links,
because they move relative to the earth.
Mobile nodes may change position during a simulation, either on an
assigned trajectory or by direct changes to the nodes position attributes.
copyright 2001 OPNET Technologies, Inc.
88
Mobile Node Trajectories
A trajectory is the path a mobile node moves along during simulation
Trajectories can be created using the Define Trajectory selection in
the Network pull down menu.
During simulation, the mobile node follows the trajectory by
traveling in a straight line from one defined position to the next.
Once the simulation time exceeds the last specified time in the
trajectory file, the mobile node remains at its final position.
copyright 2001 OPNET Technologies, Inc.
89
Defining a Trajectory
Mobile nodes support an attribute called trajectory which specifies the name
of an ASCII text file defining the path of the mobile node during the
simulation.
2. Set the Trajectory
attributes to the desired
values.
1. Choose Define Trajectory
from Network pull down
menu
3. Click on Define Path.
5. Left-click in the work space to
define intermediate positions for the
mobile node.
4. Left-click at some
location in the Project
Editor to begin the
trajectory.
copyright 2001 OPNET Technologies, Inc.
90
Defining a Trajectory Continued
8. Click on complete to
finish the trajectory
creation process.
6. Define Trajectory
Segment Information
7. Left-click in the work space to
define more intermediate positions
for the mobile node.
9. Type in a trajectory
name. Click OK to
save the trajectory.
copyright 2001 OPNET Technologies, Inc.
91
Satellite Nodes
Satellite nodes model network elements in orbit around the earth, such as
satellites and spacecraft
Like mobile nodes, satellite nodes cannot be connected by point-to-point
and bus links because they change positions during a simulation
Satellite nodes change position based on an assigned orbit or by direct
changes to the nodes position attributes.
copyright 2001 OPNET Technologies, Inc.
92
Orbits
Orbits can be imported from STK and viewed using op_vuorb (shown below)
copyright 2001 OPNET Technologies, Inc.
93
Lab Description
This lab will model a mobile paging system.

Parameters:
Telephones initiate pages addressed to a specific mobile pager
The pages are relayed through a central base station
A radio tower broadcasts the pages
If the appropriate mobile pager receives the page, an ack is transmitted back to
the radio tower
The radio tower relays the ack back to the base station and a successful page
statistic is recorded
copyright 2001 OPNET Technologies, Inc.
94
Lab : Overview
Create the acknowledgement and page packet formats

Create the necessary antenna pattern, PDF, and link parameter models

Use the provided node models and the newly created parameter models to
build the mobile paging network

Configure the radio transmitters and receivers

Create trajectories for the mobile pagers

Choose results, run the simulation, and view the results
copyright 2001 OPNET Technologies, Inc.
95
Lab : Node Specifications
Telephone Node Specification

Generates pages based on a custom PDF
Determines destination of page based on a custom PDF
Encapsulates an ack in the page
Sends the pages on the single output port to the base station
copyright 2001 OPNET Technologies, Inc.
96
Lab : Node Specifications (cont.)
Base Station Specification
Receives pages on one of eight input ports
Receives acks on one input port (paired with the output port) and records the
Percentage of Successful Pages (i.e., the number of acks received/pages sent)

Radio Tower Specification
Receives pages from the Base Station via an input port and broadcasts them to
the mobiles
Receives acks from the mobiles and forwards them to the Base Station via an
output port
copyright 2001 OPNET Technologies, Inc.
97
Lab : Node Specifications (cont.)
Mobile Specification
Receives pages and checks destination
If the mobile is the destination, decapsulates the ack and transmits it
copyright 2001 OPNET Technologies, Inc.
98
Lab : Create Packet Formats
Open the Packet Format Editor
Create ack packet format containing 2 fields
Source Node (64 bits)
Destination Node (64 bits)
Save as <your initials>_ack_packet
copyright 2001 OPNET Technologies, Inc.
99
Lab : Create Signal Packet Formats
Open the Packet Format Editor
Create page packet format containing 3 fields
Source Node (64 bits)
Destination Node (64 bits)
Encapsulated ack packet
Be sure to name the encapsulated packet field Ack Packet as the process model in the
pager that will send the acknowledgement to the base station is written to look for that name
in the received packet.
Save as <your initials>_page_packet
copyright 2001 OPNET Technologies, Inc.
100
Lab : Create Antenna Pattern
Create an antenna pattern for the
radio tower.
Number of phi planes = 10
Phi planes 90 to 162 degrees =
10 db
Phi plane 72 degrees = -5 db
Save as
<initials>_page_ant
4
5
1
2
3
copyright 2001 OPNET Technologies, Inc.
101
Lab : Create Link Model
Create a link model that supports the recently created packets and that
represents a 16,384 bits/sec link.
Select File, New, Link Model.
Configure the link:
Link types supported: ptsimp
and ptdup
Attributes = Values
packet formats = ack_packet and
page_packet
data rate = 16,384 bits/sec
ecc model = dpt_ecc
error model = dpt_error
propdel model = dpt_propdel
txdel model = dpt_txdel
Save as
<initials>_page_link
copyright 2001 OPNET Technologies, Inc.
102
Lab : Create Destination PDF
Create Page Destination PDF
Select File, New, PDF Editor
Determines which mobile pager is the destination
The mobile pagers receive pages according to the following distribution:
Mobile 0: 50%
Mobile 1: 15%
Mobile 2: 25%
Mobile 3: 10%
Use Add Impulse action button

Normalize PDF
Save As:
<initials>_page_dest_pdf
copyright 2001 OPNET Technologies, Inc.
103
Lab : Create Interarrival PDF
Create Page Interarrival PDF

Determines time between pages for each telephone
Create PDF similar to the one shown below

Smooth and Normalize PDF



Save as
<initials>_page_pk_pdf
copyright 2001 OPNET Technologies, Inc.
104
Lab : Node Descriptions
In the interest of time, we (OPNET) have created all the nodes required for
this lab based on the specifications outlined at the beginning of this
chapter.

The next several slides focus on discussing the approach and logic that
went into the development of the nodes and the process models.

Although the students will not have time in this course to develop these
nodes themselves, we (OPNET) encourage everyone in the class to attempt
to build these models at a later date as a good skill-building exercise.
copyright 2001 OPNET Technologies, Inc.
105
Lab : Paging Network Model Example
Open the project page_net
copyright 2001 OPNET Technologies, Inc.
106
Lab : Telephone Node Model Description
Added an Ideal Generator to generate page packets with the Page
Interarrival PDF [Note - We used a PDF similar to the one built earlier in
this lab.]
Created a Source ID attribute to determine the origin of the page
Created a process model that will set the fields of the page packet and
encapsulate an ack packet
copyright 2001 OPNET Technologies, Inc.
107
Lab : Base Station Node Model Description
Added 8 receivers for incoming telephone lines
Added 1 transceiver pair for communication with the radio tower
Created a process model that will forward pages to the radio tower, receive
acks, and record the Percentage of Successful Pages
copyright 2001 OPNET Technologies, Inc.
108
Lab : Tower Node Model Description
Included an antenna module that utilizes the antenna pattern created
earlier in the lab
Configured the radio transceivers to transmit and receive on different
frequencies
copyright 2001 OPNET Technologies, Inc.
109
Lab : Mobile Node Model Description
Created a process model with a custom attribute Mobile ID. This process
compares the Destination ID of the packet with Mobile ID and
decapsulates and returns the ack if they are equal.
Configured the transceivers to receive pages and transmit acks on
frequencies matching the towers
Configured the antenna module to use an isotropic antenna
copyright 2001 OPNET Technologies, Inc.
110
Lab : Running the Simulation
Under the Simulation pull-down menu, select Choose Individual
Statistics and then under Global Statistics select % of Packets
Successfully Transmitted

Configure the simulation for 100 seconds

Run the simulation
copyright 2001 OPNET Technologies, Inc.
111
Lab : Viewing the Results
Under the Results pull-down menu, select View Results and then
under Global Statistics view % of Packets Successfully Transmitted.
copyright 2001 OPNET Technologies, Inc.
112
Lab : Added Challenge
If you have additional time, try any one or more of the following
Modify the model to include 4 additional telephones
Modify the model to include 4 additional pagers with pages evenly distributed
among all 8
Modify the model to include another base station that shares the same radio
tower (Hint: Modify the ack packet format)

The added challenges are not dependent on one another
copyright 2001 OPNET Technologies, Inc.
113
Radio Features
TMM: (Terrain Modeling Module)
The Terrain Modeling Module allows users to take into account terrain and
environmental effects when modeling wireless networks.
With TMM, the user can import elevation maps that contain terrain data.
Supported map formats are DTED and DEM.
TMM also allows the user to select and compare signal loss from various
propagation models.

Simulation Efficiencies
DRG
Dynamic Receiver Group
Parallel Processing
copyright 2001 OPNET Technologies, Inc.
114
Lab: Using TMM
Switch to the scenario called TMM
copyright 2001 OPNET Technologies, Inc.
115
Lab: Viewing a Terrain Profile
Using the Terrain Profile, you can view signal strength loss from a
transmitter to a receiver.
copyright 2001 OPNET Technologies, Inc.
116
Lab: Running a Simulation with TMM
Select Configure Simulation.
Check the box entitled, Use TMM.
copyright 2001 OPNET Technologies, Inc.
117
Lab: Viewing Results of TMM
Under the Results pull-down menu, select View Results and then
under Global Statistics view % of Packets Successfully Transmitted.
copyright 2001 OPNET Technologies, Inc.
118
Summary
Radio models depend on dynamically changing parameters, which the
simulation evaluates to determine the possible connectivity between all
radio transmitters and receivers.

Modeler provides the user the ability to simulate the movement of mobile
nodes along trajectories and satellite nodes in orbit.

The antenna, PDF, link and packet editors further expands the users
capability to define and customize parameters that affect the behavior of
the model.

Das könnte Ihnen auch gefallen