OPNET Modeler example - create a mobile wireless network


1. Routine overview

OPNET wireless modules support the construction of terrestrial and satellite wireless systems. In this example, a simple wireless network will be constructed consisting of a mobile interfering node and two stationary base stations. By configuring the trajectory, the interfering node can move, so that the network topology can be changed dynamically, and the impact of this change on the received signal quality can be observed.
The wireless noise interference generated by mobile interference nodes reduces the signal-to-noise ratio. In order to improve network performance, directional antennas will be used to enhance the anti-interference ability of the network. Therefore, the Antenna Model Editor will also be used in this example to create a directional antenna model. Finally, it will be seen through experiments that when the base station adopts a directional antenna, the SNR of the network is significantly improved compared with that of an omnidirectional antenna.
In a wireless-based network, interference will have a huge impact on the signal-to-noise ratio. Different types of antennas, such as directional antennas, can improve the SNR of a particular network. This example is to build a simple wireless network with a mobile interfering node and two fixed communication nodes (transmitting node and receiving node), and then show the difference in bit error rate when the fixed node uses an omnidirectional antenna and a directional antenna .
Wireless links exist dynamically between pairs of wireless transceiver channels and are dynamically established during simulation. In this routine, information is transferred from a fixed transmitter object to a fixed receiver object, these objects are connected by a wireless channel, the link is determined by many different physical characteristics of the components in the system, including frequency band, Modulation type, transmitter power, distance and antenna direction.
The network model for this routine is shown in the figure below.
insert image description here
A sending node (tx) sends data with equal strength in all directions. The node contains a packet generation module, a wireless transmitter module and an antenna module. The model of the sending node is shown in the figure below.
insert image description here
The receiving node (rx) measures the signal quality sent by the fixed transmitter node. The node includes an antenna module, a wireless receiver module, a receiver processor module and an additional processor module that works in conjunction with the directional antenna. The model of the receiving node is shown in the figure below.
insert image description here
Mobile jamming nodes (jams) generate wireless noise. The jammer's track allows it to move in and out of the receiver's wireless range, increasing and decreasing the amount of interference the receiver receives. The model of the mobile interfering node is shown in the figure below.
insert image description here
Through this routine, you will learn to use OPNET Modeler to create a wireless network and observe the change of received signal quality caused by wireless noise at the receiving node of a dynamic network topology; will add mobile nodes and define mobile node orbits; use antenna models The editor creates a directional antenna model.


2. Create an antenna model

This routine will create a new antenna model with 200dB gain in one direction and zero gain in any other direction, an ideal selective receiver.
Select Antenna Pattern from the File—>New drop-down list, and click OK to open the antenna model editor, as shown in the figure below.
insert image description here
This example uses the default number of theta divisions, which is 72, with a point every 5 degrees. The maximum theta value that can be represented by a sample point is 355 degrees, and for all theta values ​​from 0 to 355 degrees, you can specify a sample point with a gain approximately equal to 200dB. Specify any two sampling points in the graphics panel, the system will use the linear interpolation gain value to set all the sampling points between these two points, so as long as you set two sampling points, that is, the 0 degree point and the 355 degree point, you can Set all 72 points.
Right click in the project workspace and select Set Phi Plane, and select 5.0 deg in the following box that pops up.
insert image description here
Set the upper bound of the ordinate to 201 and the lower bound to 199, then the panel will display the new coordinate range.
Move the mouse to the leftmost point of the 200dB line, then click to confirm the first sampling point, move the mouse to the rightmost point of the 200dB line and click to confirm the second sampling point, then all the The sampling points between the specified points are automatically set using the linear interpolation gain value, and then a dotted line appears on the 200dB line, the distance between the points is 5 degrees, and a cone appears in the three-dimensional coordinates of the antenna shape, as shown in the figure below.
insert image description here
You have just specified a gain value with phi greater than or equal to 5 degrees, now you need to set the layer to 0 degrees, and then set the gain and sampling point of this layer. Still set the layer's gain value to 200dB, which fills the plane specified by the conical shell with phi greater than or equal to 5 degrees.
Right-click in the workspace and select Decrease Phi Plane from the menu, the current phi plane setting changes from 5 degrees to 0 degrees.
Set the upper bound of the ordinate to 201, and the lower bound to 199. The operation on the 200dB line is the same as above to determine the second sampling point.
Click the Normalize the Function action button to normalize the gain function across the pattern.
The 3D projection view will refresh to show the normalized result, as shown in the figure below. The small spherical portion of the pattern describes the sidelobe gain sampling points, which are used during normalization so that the sidelobe gain approaches zero.
insert image description here
Normalization will cause the points in the graphics panel to move up, as can be seen from the above figure. Finally name and save the antenna model and close the antenna model editor.


3. Create a pointer to the processor

The antenna pointing processor calculates the position of the transmitter module and then sets the target property of the antenna module, which does not receive interrupts, so it can be set to an independent non-forced state.
Create a new process module, place the state and create a transition according to the figure below.
insert image description here
Double-click the upper part of the point to add the entry execution code, click Import... under File, and follow the path below to find the mrt_ex file to import.

\OPNET installation path\14.5.A\models\std\tutorial_req\modeler\mrt_ex

Add a space to the last empty line in the editor window, then save the file.
Select Process Interfaces in the Interfaces menu, and set various properties according to the figure below.
insert image description here
Click OK to save the process model, then click the compile button, and the window shown in the figure below will pop up after compiling.
insert image description here
Close the process editor.


Fourth, create a node model

In this routine, three node models are to be created, namely the transmitter node model, the jamming transmitter node model and the receiver node model.

1. Transmitter node model

The transmitter node contains a packet generation module, a wireless transmitter module and an antenna module.
Create a new node model, open the node editor, place objects, connect packet flows, and name objects as shown in the figure below.
insert image description here
The property settings of the tx_gen node are shown in the figure below.
insert image description here
The attribute setting of the radio_tx node is shown in the figure below, and its power attribute is increased.
insert image description here
Under Node Interfaces in Interfaces, set various parameters according to the figure below.
insert image description here
Name and save the transmitter node model.

2. Jamming transmitter node model

The jamming transmitter node introduces radio noise into the network, and like the stationary transmitter node, it contains a packet generation module, a radio transmitter module and an antenna module. It behaves the same as a stationary transmitter, but the channel power and signal modulation are different. These differences make the packets sent by the interfering transmitter node look like noise to the receiver.
A jamming transmitter node model can be generated from the transmitter node model.
Open the transmitter node model, and change the modulation type attribute of radio_tx to jammod, as shown in the figure below.
insert image description here
Name and save the jammer node model.

3. Receiver node model

The receiver node includes an antenna module, a wireless receiver module, a sink processor module, and a pointing processing module, whose role is to make the directional antenna point to the transmitter.
Create a new node model, open the node editor, place objects, connect packet flows, and name objects as shown in the figure below.
insert image description here
Right-click the rx_point module and select the process model for it, that is, the pointing processor process created earlier.
insert image description here
The property settings of the radio_rx node are shown in the figure below.
insert image description here
Set the pattern attribute of the antenna ant_rx to promoted, as shown in the figure below.
insert image description here
Under Node Interfaces in Interfaces, set various parameters according to the figure below.
insert image description here
Name and save the receiver node model.


5. Create a network model

Create a new Project, name the new project and scenario, select Create Empty Scenario for the topology, select Enterprise for the network specification, specify Size for the size, 10km × 10km, and keep the others as default.
Place the network model you created and name it as shown in the figure below.
insert image description here
When placing it, it must be noted that the jamming transmitter node must be a mobile node, otherwise the setting of the subsequent mobile path will not be successful.
insert image description here
In this routine, the relative position of the nodes has an important influence on the behavior of mobile wireless communication. In order to obtain the expected simulation results, the nodes are positioned according to the position coordinates mentioned below.
The position coordinates of the jam node are (0.5, 2.5), as shown in the figure below.
insert image description here
The position coordinates of the tx node are (3.0, 3.0), as shown in the figure below.
insert image description here
The position coordinates of the rx node are (4.0, 3.0), as shown in the figure below.
insert image description here
To specify the motion of the nodes using the moving platform, the network model uses an attribute called trajectory. The value of this attribute is the filename of an ASCII text file in the project editor that contains Data specifying the time and position that the mobile node will pass through during the simulation.
After the network model is defined, it is necessary to specify a trajectory for the mobile jamming transmitter nodes to travel.
In the Topology menu, select Define Trajectory... and set the parameters as shown in the figure below.
insert image description here
Then click Define Path, the dialog box disappears, the mouse cursor becomes a line in the project editor, click the left mouse button on the left edge of the jam node to start drawing the node movement track, and then at the (7.5, 2.5) position of the grid Click the left button, it's okay if it's not very accurate, there will be precise adjustments later.
After drawing, right click to end the drawing of the trajectory, and the trajectory will disappear from the screen at this time, because it has not been referenced by the mobile node. Next, apply the trajectory just created to the jam node, right click on the node, edit its properties, and set the trajectory property to the trajectory just drawn.
At this time, you can see the trajectory you just drew in the project editor, it is white with an arrow, select the right button to edit its properties, and set the parameters according to the figure below.
insert image description here
After the settings are complete, close the dialog box and save the entire project.


6. Collect statistics and run the simulation

For this routine, we focus on the impact of different antenna models on the receiving nodes in the network. The antenna model properties can be automatically changed by configuring the simulation tool for parametric simulation research, without the need to change in the node domain every simulation Antenna model property values.
Post-simulation receive channel statistics including bit error rate (BER) and throughput (packets/sec) can be collected in the project editor. The packet throughput statistic represents the average number of correctly received packets per second on the receiving channel. The samples collected for this attribute are only those packets whose BER value is less than the receiver ECC threshold, which is defined in the wireless receiver model in the node model. It is specified in the ecc threshold attribute of the transmitter module. Since the value of this attribute is 0 errors/bit for the wireless receiver in this example, only packets with no bit errors will be received.
Right-click on the rx module and select Choose Individual DES Statistics, and check the bit error rate and throughput (packets/sec) according to the figure below.
insert image description here
Right-click the bit error rate, select Change Collection Mode, and set it as shown in the figure below.
insert image description here
In the same way, set the throughput(packets/sec) as follows.
insert image description here
Click OK when finished and close the corresponding dialog.
Next set up the simulation sequence.
Select Configure/Run Discrete Event Simulation (Advanced) under DES in the menu bar. After opening the dialog box, right-click to edit the properties of the simulation sequence, as shown in the figure below.
insert image description here
Then add the properties of several objects and assign values ​​as shown in the figure below. The antenna model of the first simulation sequence is set to omnidirectional antenna (isotropic).
insert image description here
Copy the simulation sequence above, and then paste it into this window, only change the transmitting antenna mode here, and change it to the conical antenna model drawn at the beginning of our article, as shown in the figure below.
insert image description here
After the setting is completed, save it, and click the Run Simulation button to run the two simulations together. After the simulation is completed, the display is as follows.
insert image description here
This shows that our previous operations and configurations are correct, and the simulation can be successfully completed.


7. View the simulation results

Right-click in the blank space of the project editor and click View Results to view the simulation results.
The bit error rate curve under the omnidirectional antenna model is shown in the figure below.
insert image description here
As expected, the omnidirectional antenna pattern shows that the bit error rate of the receiver node increases with the decrease of the distance between the interfering node and the receiver node. When the distance between the interfering node and the receiver node is the smallest, the error rate The bitrate reaches its maximum value. The omnidirectional receiver antenna is interfered with by interfering nodes throughout the simulation.
The bit error rate curve under the directional antenna model is shown in the figure below.
insert image description here
The directional antenna pattern diagram also shows that the bit error rate of the receiver node increases as the distance between the interferer node and the receiver node decreases, but after about one minute, the direction vector between the interferer antenna and the receiver antenna is no longer aligned with the direction of the maximum gain of the receiver antenna, so the receiver node stops receiving interference from the interfering node, and the bit error rate of the receiver drops to 0, thereby significantly reducing the received packets, which dramatically increases the probability of successfully receiving packets from stationary transmitter nodes.
The statistical result curve of packet throughput is shown in the figure below, where the blue line represents the omnidirectional antenna model, and the red line represents the conical antenna model.
insert image description here
It can be seen from the above figure that for the omnidirectional antenna model, the average value of the received packets during the simulation decreases. At the end of the simulation, due to the increase in the distance between the jamming transmitter and the receiver, this trend is somewhat somewhat reversed. For the directional antenna model, when the direction vector connecting the interfering transmitter and receiver antenna coincides with the direction of maximum gain of the receiver antenna, the packet throughput is very low. However, after about 1 minute, when the jamming transmitter is not in the direction of maximum gain of the receiver antenna, the number of received packets starts to increase.


Summarize

The above is the OPNET Modeler routine - all the content of creating a mobile wireless network. I hope that through this routine, you can learn to use OPNET Modeler to create a wireless network and observe the wireless noise caused by wireless noise at the receiving node of a dynamic network topology. Changes in the quality of the received signal, adding mobile nodes and defining mobile node orbits, using the antenna model editor to create a directional antenna model, etc.
Bibliography of this article: OPNET Network Simulation/Edited by Chen Min. - Beijing: Tsinghua University Press, 2004

Guess you like

Origin blog.csdn.net/weixin_42570192/article/details/129693191