Tuesday, 9 January 2018

An Experimental Realization of Spectrum Sensing in Cognitive Radio.

An Experimental Realization of Spectrum Sensing in Cognitive Radio. 

The purpose of this project is to effectively utilize the bandwidth. The implementation of Cognitive radio makes sure full use of spectrum for secondary user while primary user (licensed user) is not available. Spectrum sensing is the function of cognitive radio which responsible to sense and understand its spectrum environment then detect unused spectrum in licensed band. The research paper on this project has been published in 2nd International Electrical Engineering Conference IEEC 2017 here.

Proposed Work
We have implemented an essential part of cognitive radio which is termed as spectrum sensing. As described above the spectrum sensing is a technique by which we determine which part of the licensed user spectrum is available. This spectrum sensing technique has many algorithms such as ED, MFD and FD. We have implemented ED (energy detection).
For this purpose the platform used are MATLAB and raspberry pi. The MATLAB is used as a PU or licensed user and raspberry pi act as SU or unlicensed user.
In this scenario the PU has five channels. On these five channels, MATLAB randomly allocate the user and starts transmission. This can be shown in the figure below.


Fig ure 6.1: PU Transmission

It is clear from the above figure that out of 5 channels the 1st, 4th  and 5th channels are allocated to PU. Now the MATLAB transmits the signal to raspberry pi. The raspberry pi and MATLAB are connected via Ethernet cable.


Raspberry pi which is our sensor after receiving the signal performs FFT. After performing FFT the energy is calculated. The calculated energy is then compared with the predefined threshold. The threshold can be static and it could be variable depending upon the selection.
If the value of energy of the channel is less than the threshold then PU is not present else it is present. The channels which are not used by the PU are called spectrum holes. As shown in the figure 6.1.


Figure 6.2: Indicating Spectrum holes And PU



The SU (Raspberry pi) starts transmission on the Spectrum holes. This can be shown in figure 6.2.




Figure 6.3: SU Transmission on Spectrum Holes


Process
·         Generate Channels Randomly: We generated five channels on different frequencies and set a center frequency for each channel. As we are not working on real spectrum, we have generated channels of our own through MATLAB.
·         Sensing: Spectrum is sensed by Raspberry Pi and PSD/ energy of each channel is calculated in this step by calculating the energy and summing it up.
·         Threshold: we have set a fixed threshold, on calculating energy of channels it has been comparing to a threshold.
·         Decision: If the calculated energy is less than the threshold it detects that PU is absent and if the calculated energy is greater than threshold it detects that the PU is present.
·         Allocation: On detecting which of the channels are vacant, Raspberry Pi allocates those channels to a secondary user which can use the channel until PU resumes its transmission.



Results And Simulation
The results we have after using algorithm of energy detection and coding on Raspberry Pi are shown as follows.
We run the algorithm of energy detection on Raspberry pi and show the results through graphs and on circuit through LEDs.


      
Figure 6.4: MATLAB results (a)

The above graph shows the detection of primary user. On x-axis frequencies are mentioned and on y-axis mentioned power. In above graph, channel 1st, 3rd and channel 5th indicate the presence of signal whereas the other three channels are vacant indicating the spectrum holes.



                                                              Figure 6.5: MATLAB results (b)

This graph shows that the spectrum holes are now in use by secondary user. In figure. we received no primary user on channel-2 and channel-4, after sensing one out of these two channels are allocated to secondary user for transmission.


Presentation In Model Form. 

No comments:

Post a Comment