Featured Examples
NetSim contains example configuration files to help users simulate and understand the concepts associated with Cognitive Radio. To simulate these examples, click Examples > Cognitive-Radio in the NetSim Home Screen.
Users can change the default parameter values in these examples and see how they impact the Cognitive Radio network.
CR Keep-out Distance
The Cognitive Radio network you model from the example configuration file meets the following specifications:
A network with 1 base station and 2 CR CPEs, and a unicast application running on one of the CR CPEs.
NetSim uses the following defaults for this example:
The unicast application transmits data at a constant bit-rate from CR CPE 2 to CR CPE 3.
The Simulation runs for 100 seconds.
To simulate the example for CR Keep-out Distance in Cognitive Radio, follow these steps:
Open NetSim and Select Examples > Cognitive Radio Networks > CR Keepout Distance then click on the tile in the middle panel to load the example as shown in below screenshot
Figure-1: List of scenarios for the example of CR Keepout Distance
The following network diagram illustrates what the NetSim UI displays when you open the example configuration file see Figure-2.
Figure-2: Network set up for studying the CR Keepout Distance
By default, NetSim sets a grid length of 500m x 250m.
By default, NetSim sets the Incumbent Count to 2, the range of the operating frequency from 54 MHz to 60 MHz, and incumbent is always ON. To do so:
Click on Base Station , expand the right-side property panel and set the below properties,
Go to INTERFACE 1 (COGNITIVE RADIO)-> Datalink layer
The following parameters settings have been made for this example.
1 for the Incumbent count field.
250, 0 for the X, Y co-ordinates
54 for the Oper Freq Start(MHz) field.
60 for the Oper Freq End(MHz) field.
10 for the ON Duration(s) field.
0 for the OFF Duration(s) field.
The following figure illustrates the CR Bs pop-up window and the default settings see Figure-3.
Figure-3: Datalink Layer properties window
Click on the set traffic tab and create a CBR application between two CR CPEs.
Simulate the CR Keep-out Distance for Cognitive Radio example. To do so:
Click the Run icon located on the toolbar. The Run Simulation pop-up window appear.
Retain the default settings in the Simulation Configuration tab (Simulation Time = 100).
After NetSim simulates the CR Keep-out Distance for Cognitive Radio example, NetSim displays the Simulation Results window.
Interpret the results. To do so:
In Simulation results window, click on Additional Metrics and scroll down for Incumbent Metrics under CR Metrics see Figure 4‑4.
Observe the value in the Operational Time (Microsec) and Idle Time (Microsec) column. Because the incumbent is operational throughout the simulation, you will see that the value of the Operational Time is 100 seconds and that of the Idle time is zero (0) seconds. The following Figure-4 illustrates step (b).
Figure-4: Incumbent metrics Table
Click on Application metrics and observe the value in the Throughput (Mbps) column. Because we set the Keep-out distance to100 and set the incumbent coordinates to outside the Keep-out distance, there is no Interference, and you see a non-zero value for the throughout. The following figure illustrates step (c).
Figure-5: Application Metrics Table
Effect of Coding Rate
The Cognitive Radio network modeled in the example configuration file has the following settings:
A network with 1 base station, 1 router, 1 wired node and 2 CR CPEs, and a unicast application running on one of the CR CPEs.
NetSim uses the following defaults for this example:
The unicast application transmits data at a constant bit-rate from CR CPE 2 to Wired Node 5.
The simulation runs for 30 seconds.
To simulate the example Effect of Coding Rate for Cognitive Radio, in NetSim:
Open NetSim and Select Examples > Cognitive Radio Networks > Effect of Coding Rate then click on the tile in the middle panel to load the example as shown in below screenshot
Figure-6: List of scenarios for the example of Effect of Coding Rate
The following network diagram illustrates what the NetSim UI displays when you open the example configuration file see Figure-7.
Figure-7: Network set up for studying the Effect of Coding Rate
By default, NetSim sets a grid length of 600m x 300m.
By default, NetSim sets the Coding Rate to 1/2. To do so:
Click on Base Station 1, expand the right-side property panel and set the below properties,
Click INTERFACE 1 (COGNITIVE RADIO) -> Physical layer ,see Figure-8.
Coding Rate drop-down list is set to 1/2.
Click Enter. The following figure illustrates the CR Bs pop-up window and the default settings.
Figure-8: Physical layer window
See that by default, NetSim has not enabled Path Loss for the wireless links between the Base Station and the CR CPEs. To do so:
Click on the wireless link between Base Station 1 and CR CPE 2 and expand right side property panel and set the Link Properties below
Channel Characteristics as No pathloss.
Configure an application between two nodes by selecting a CBR application from CR-CPE-2 i.e., Source to Wired Node 5 from the Set Traffic tab . Click on the Application and expand the right-side properties set the properties below.
Packet Size remaining 1460Bytes and Inter Arrival Time remaining 10000µs. Transport Protocol is set to UDP instead of TCP.
Simulate the Effect of Coding Rate for Cognitive Radio example. To do so:
Click the Run icon located on the toolbar.
The Run Simulation pop-up window appears.
Retain the default settings in the Simulation Configuration tab (Simulation Time = 30).
After NetSim simulates the Effect of Coding Rate for Cognitive Radio example, NetSim displays the Simulation Results window.
Interpret the results. To do so, see the value in the Throughput (Mbps) column, in the Application Metrics Table window see Figure-9. You will see a value of 0.8218 Mbps. The following Figure-9 illustrates step (6).
Figure-9: Application Metrics Table
Simulate the Effect of Coding Rate for Cognitive Radio example with the following values: 2/3, 3/4, and 5/6. You should see the following values of throughput for the different Coding Rates.
Sl No |
Coding Rate |
Throughput (Mbps) |
|---|---|---|
1 |
1/2 |
0.8218 |
2 |
2/3 |
0.9573 |
3 |
3/4 |
0.9576 |
4 |
5/6 |
1.1197 |
Table-1: Different Coding Rates vs. Throughput
You will see that the throughput for #3 is more than that for #2 because, the number of data bits for #3 is more than that for #2, but the number of redundant bits is same. For #2, 2 data bits and 1 redundant bit, and for #3, 3 data bits and 1 redundant bit.
Plot
Figure-10: Plot of Coding rate vs Throughput
Effect of Downlink-Uplink Ratio
The Cognitive Radio network you model from the example configuration file meets the following specifications:
A network with 1 base station, 1 router, 1 Wired node and 2 CR CPEs, and a unicast application running on one of the CR CPEs.
NetSim uses the following defaults for this example:
The unicast application transmits data at a constant bit-rate from CR CPE 2 to Wired Node 5.
Simulation runs for 30 seconds.
To simulate the example Effect of Downlink-Uplink Ratio for Cognitive Radio, in NetSim:
Open NetSim and Select Examples > Cognitive Radio Networks > Effect of DL UL Ratio then click on the tile in the middle panel to load the example as shown in below Figure-11
Figure-11: List of scenarios for the example of Effect of DL UL Ratio
The following network diagram illustrates what the NetSim UI displays when you open the example configuration file Figure-12.
Figure-12: Network set up for studying the Effect of DL UL Ratio
By default, NetSim sets a grid length of 600m x 300m.
By default, NetSim sets the Downlink and Uplink ratio to 1:1. To do so:
Click on Base Station 1, expand the right-side property panel and set the below properties
Go to INTERFACE 1 (COGNITIVE_RADIO) ->PHYSICAL LAYER see Figure-13.
DL UL Ratio drop-down list is set to 1:1.
The following Figure-13 illustrates the CR Bs pop-up window and the default settings.
Figure-13: Physical layer window
By default, NetSim has not enabled Path Loss for the wireless links between the Base Station and the CR CPEs. To do so:
Click on the wireless link between Base Station 1 and CR CPE 2 and expand the right-side property panel and set the Link Properties as Channel Characteristics to No pathloss.
Configure an application between two nodes by selecting a CBR application from CR-CPE-2 i.e., Source to Wired Node 5 from the Set Traffic tab . Click on the Application and expand the right-side properties set the properties below.
Packet Size remaining 1460Bytes and Inter Arrival Time remaining 10000µs. Transport Protocol is set to UDP instead of TCP.
Simulate the Effect of Downlink-Uplink Ratio for Cognitive Radio example. To do so:
Click the Run icon located on the toolbar. The Run Simulation pop-up window appears.
Retain the default settings in the Simulation Configuration tab (Simulation Time = 30).
Click on Run. After NetSim simulates the Effect of Downlink-Uplink Ratio for Cognitive Radio example, NetSim displays the Simulation Results window.
Interpret the results. To do so, see the value in the Throughput (Mbps) column, in the Application Metrics Table window see Figure-14. You will see a value of 0.8218 Mbps. The following Figure-14 illustrates step (6).
Figure-14: Application Metrics Table
Simulate the Effect of Downlink-Uplink Ratio for Cognitive Radio example with the following Uplink to Downlink ratios: 1:2, 1:3, and 1:4. You should see the following values of throughput for the different Uplink to Downlink ratios see Table-2.
Sl No |
DL: UL Ratio |
Throughput (Mbps) |
|---|---|---|
1 |
1:1 |
0.8218 |
2 |
1:2 |
0.9571 |
3 |
1:3 |
0.9575 |
4 |
1:4 |
1.001 |
Table-2: Different DL:UL Ratio vs. Throughput
You will see that the throughput for #2 is lesser than that for #3 because, 3 subframes are allocated for upstream and only 1 subframe for downstream. This means more data can be transmitted through the uplink.
Plot
Figure-15: DL:UL ratio vs Throughput
PU SU Spectrum Usage
The Cognitive Radio network modelled from the example configuration file meets the following specifications:
A network with 1 Base Station and 2 CR CPEs, and a unicast application running on one of the CR CPEs.
NetSim uses the following defaults for this example:
The unicast application transmits data at a constant bit-rate from CR CPE 2 to CR CPE3.
Simulation runs for 100 seconds.
Packet trace is enabled.
To simulate the example for PU and SU’s Spectrum Usage for Cognitive Radio, in NetSim:
Open NetSim and Select Examples > Cognitive Radio Networks > PU SU Spectrum Usage then click on the tile in the middle panel to load the example as shown in below screenshot
Figure-16: List of scenarios for the example of PU SU Spectrum Usage
The following network diagram illustrates what the NetSim UI displays when you open the example configuration file see Figure-17.
Figure-17: Network set up for studying the PU SU Spectrum Usage
By default, NetSim sets a grid length of 140m x 70m.
By default, NetSim sets the Incumbent Count to 2, the range of the operating frequency from 54 MHz to 60 MHz, and incumbent has an OFF period. To do so:
Click on Base Station 1, expand the right-side property panel and set the below properties
Go to INTERFACE 1 (COGNITIVE_RADIO)->DATALINK LAYER
Incumbent count drop-down list is set to 1.
NetSim specifies a value of 54 in the Oper Freq Start(MHz) field.
NetSim specifies a value of 60 in the Oper Freq End(MHz) field.
NetSim specifies a value of 10 in the ON Duration(s) field.
NetSim specifies a value of 10 in the OFF Duration(s) field.
The following figure illustrates the CR Bs pop-up window and the default settings see Figure-18.
Figure-18: Datalink Layer properties window
Ensure that the distance between incumbent and CR CPEs is less than 100m (keep-out distance).
Enable Packet Trace in Configure Reports tab.
Simulate the PU SU Spectrum Usage for Cognitive Radio example. To do so:
Click the Run icon located in the ribbon.
The Run Simulation pop-up window appears.
Retain the default settings in the Simulation Configuration tab (Simulation Time = 100).
Click Run. After NetSim simulates the PU SU Spectrum Usage for Cognitive Radio example, NetSim displays the Simulation Results window.
Interpret the results. To do so:
Click Packet Trace in the left area of simulation results window and filter the Packet Type column by CBR and BW Request the Transmitter ID column by Node-2 (CR CPE 2).
See the filtered values in the PHY Layer START time column, in the spreadsheet. Observe that no data is transmitted between 10 to 20 seconds because, the incumbent user is using the channel. For the first 10 seconds, Node-2 uses the channel and for the next 10 seconds, the incumbent (Base Station 1) uses the channel. And, this happens every 10 seconds. The following Figure-19 illustrates step (b).
Figure-19: Packet Trace