ECE 8863: Cognitive Radio Networks

Lab 2: Spectrum Sensing

Spectrum sensing is one of the fundamental functionalities of cognitive radio that assures the protection of primary user communications from harmful interference. The speed and accuracy of spectrum sensing techniques are essential factors in the performance of cognitive radio networks. The limitations imposed by computational complexity and a shortened monitoring time impede the success of spectrum sensing operation performed by cognitive radio nodes.

In this lab, we aim to design and implement an energy detector and measure its performance on the CR testbed. After finishing this lab, you will know how to

  • Explore the fundamental design and calibration procedure of energy detectors.
  • Understand the impact of hardware specifications on the performance of energy detectors.
  • Realize the influence of the sensing algorithm complexity on the accuracy and speed of sensing operation.

 

Environment Setup

  1. Log into your account on host laptops 1 & 2.

  2. Create a directory: lab2. This is your work area: <lab2>.

  3. Download the following files to <lab2>. Files: lab2_energy_detector.grc, lab2_energy_detector_sweep.py, lab2_PU_Transmitter.grc, lab2_PU_dynamic.py.

 

Lab Procedures

In this lab, we are going to develop an energy detector to perform spectrum sensing for cognitive radio transceivers. The energy detection is performed in the frequency domain. Figure 1 shows a block diagram of the energy detector that you are going to develop.

Block Diagram of Energy Detector Implementation Using USRP

Figure 1: Block Diagram of Energy Detector Implementation Using USRP

In this lab, we are going to develop the code that runs at the SDR host machine section. The detector development will be conducted in three stages. Figure 2 shows the setup for the second lab.

Lab2 Setup

Figure 2. Lab 2 Setup

In the first stage, we setup the primary user transmission in Host 1. In the second stage, we develop the energy detector on GRC environment and then using Python environment to detect Primary user transmissions. Third, we develop an automatic spectrum sensing scanner to detect unknown transmission on a given spectrum range.

Table 1: Summary of CR Sensing Specifications.

Parameter

Value

Sensing bandwidth 200 kHz
Sample rate 200 kSPS
AGC 0 dB
FFT Size 1024
Windowing function Blackman-Harris
Averaging Size 10
Probability of false alarm 0.1
Probability of detection 0.9
Scanning range 899-901 MHz
PU USRP 192.168.40.1
SU USRP 192.168.40.3

A. PU Transmission Setup

  1. Start with Host 1. Open lab2_PU_Transmitter.grc file. This is a simple DQPSK transmitter with a simple spectrum analyzer at the receiving side to verify the transmission.

  2. Make sure that the parameters are set as per Table 1. Use antenna VERT900.

  3. Generate and execute the flow graph.

  4. Verify the transmission through the FFT plot.

Task 1: Estimate and record the maximum received power level (in dBm) from the spectrum plot at the receiver.

B. Energy Detector and Calibration

  1. Stop the DQPSK transmission on Host 1. Make sure that there is no transmission from Host 1.
  1. Go to Host 2 and run lab2_energy_detector.grc. Make sure that the distance between USRP1 and USRP2 is approximately 1 m.

Task 2: Observe the activities in the spectrum band through the FFT plot and record what you see.

  1. Now start the DQPSK transmission on Host 1.

Task 3: Estimate received power at the receiver and record the value in dBm.

Task 4: Calculate the path loss in indoor environment using the estimated values obtained from Task 1 and Task 3. For simplicity, you can assume the power calculated in Task1 as the transmission power.

Hw1 Q4:

  1. In Task 2, do you observe any activity in the spectrum? If yes, what are these activities (recall that Host 1 is not transmitting)? If no, what do you see in the spectrum? What is the level of noise floor in dBm?
  2. Calculate the path loss using the ITU indoor path loss model given in the Appendix, and compare the result to the one obtained in Task 4. Do they match? Tell us why if they don't match.

C. Spectrum Sensing using Energy Detector:

  1. Use lab2_energy_detector_sweep.py to scan the range of frequencies specified in “scanning range” in Table 1. This Python code contains an energy detector similar to the one in GRC environment. Type lab2_energy_detector_sweep in the terminal to see the usage of this code.

Task 5: Change the default settings of the options to make the scanning more effective.

  1. Generate the PU transmission at 900 MHz with the GRC primary user.

Task 6: See if the energy detector can detect the PU transmission at the frequency you specified.

  1. Use lab2_PU_dynamic.py to generate PU transmission instead. The PU transmission in this case is dynamically switched in-band at 900 MHz and out-of-band.

Task 7: See if the energy detector can effectively detect the PU transmission.

Hw1 Q5:

  1. How do you set the threshold for the detection in Task 5?
  2. Which options or settings did you change to improve the speed of the detection in Task 5?
  3. Can the energy detector detect the PU transmission in Task 6? If yes, explain the PU activity behavior and list your your energy detector settings to show that the detection is effective. If no, tell us why the detection is not possible.
  4. Repeat the previous question for the case in Task 7.

Show your results to a TA. This is the only check point.

 

Appendix: ITU Model for Indoor Attenuation

The model

The ITU indoor path loss model is formally expressed as:

ITU path loss model
where
L = the total path loss. Unit: decibel (dB).
f = Frequency of transmission. Unit: megahertz(MHz).
d = Distance. Unit: meter (m).
N = The distance power loss coefficient.
n = Number of floors between the transmitter and receiver.
Pf(n) = the floor loss penetration factor.

Calculation of distance power loss coefficient

The distance power loss coefficient, N is the quantity that expresses the loss of signal power with distance. This coefficient is an empirical one. Some values are provided in Table 2.

Table 2. Distance Power Loss Coefficient

Frequency Band

Residential Area

Office Area

Commercial Area

900 MHz
N/A
33
20

Calculation of floor penetration loss factor

The floor penetration loss factor is an empirical constant dependent on the number of floors the waves need to penetrate. Some values are tabulated in Table 3.

Table 3. Floor Penetration Loss Factor

Frequency Band

Number of Floors

Residential Area

Office Area

Commercial Area

900 MHz
1
N/A
9
N/A
900 MHz
2
N/A
19
N/A
900 MHz
3
N/A
24
N/A

Questions? E-mail: infocom@ece.gatech.edu

You are visitor:

since 04/22/1997.