Rate of a Cognitive Radio Communications System

7323 words (29 pages) Dissertation

16th Dec 2019 Dissertation Reference this

Tags: Information Systems

Disclaimer: This work has been submitted by a student. This is not an example of the work produced by our Dissertation Writing Service. You can view samples of our professional work here.

Any opinions, findings, conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of NursingAnswers.net.

MATLAB SIMULATION OF THE THROUGHPUT RATE OF A COGNITIVE RADIO COMMUNICATIONS SYSTEM

ABSTRACT

Based on the latest researches it has been shown that around the two third of the available spectrum has not been efficiently utilised. This inefficiency led to shortage in frequency which increased the price of occupying the bandwidth.

Wireless applications have become more popular and the available spectrum of radio frequencies has become a precious asset. Research also shows that that the frequency spectrum is not used completely at a given time. Some frequency bands are not used; some bands are overutlised whereas other bands are underutilised.

Taking all the above into consideration cognitive radio has been considered the best solution to overcome the problem of underutilisation of frequency bands. In cognitive radio systems the idea of secondary user; who is not the main user of the spectrum has been introduced. The secondary user can only use the spectrum when the primary user; the main user of the spectrum is not using the spectrum. This requires sensing the spectrum to check for the available spectrum bands and use them accordingly.

In this project the different spectrum sensing techniques will be discussed furthermore a MATLAB simulation for the throughput will be illustrated.

Table of Contents

Chapter 1

1. Introduction

1.1 Background

1.2 History

1.3 Cognitive Radio Definition

1.4 Literature Review

1.5 This Project

Chapter 2

2. Fundamentals of Cognitive Radio

2.1 Characteristics of Cognitive Radio

2.1.1 Cognitive Capability

2.1.2 Reconfigurability

2.2 Functions of Cognitive Radio

2.2.1 Spectrum Sensing and Analysis

2.2.2 Spectrum Management and Handoff

2.2.3 Spectrum Allocation and Sharing

2.3 Network Architecture and Application

Chapter 3

3. Cognitive Radio Spectrum Sensing

3.1 Energy Detection

3.2 Matched Filter Detection

3.3 Cyclostationary Detection

3.4 Cooperative Spectrum Sensing

3.5 Other Methods

Chapter 4

4. System Model

4.1 Energy Sensing

4.1.1 Formulation of energy sensing algorithm

4.1.2 Maximum likelihood analysis

4.2 Waveform sensing

4.1.1 Formulation of waveform sensing algorithm

4.1.2 Maximum likelihood analysis

4.3 Cyclostationary detection

4.3.1  Cyclostationary feature

4.3.1  Cyclic power spectrum

Chapter 5

5. Simulation

5.1 Why simulation

5.2 Simulation techniques

5.3 Energy sensing

5.4 Waveform sensing

5.5 Cyclostationary sensing

5.5.1 Cyclic power calculation for a specific value of α

5.5.2 Main program

Chapter 6

6. Results, Discussions and Conclusion

6.1 Receiver operating characteristics for energy sensing algorithm

6.1.1 Simulation results

6.1.2 Discussion

6.2 Energy / waveform sensing algorithms for Gaussian signal

6.2.1 Simulation results

6.2.2 Discussion

6.3 Energy / waveform sensing algorithms for constant envelop signal

6.3.1 Simulation results

6.3.2 Discussion

6.4 Cyclostationary sensing algorithm

6.4.1 Simulation results

6.4.2 Discussion

6.5 Comparison of the three algorithms

Bibliography

Appendix A

MATLAB Program

Energy Sensing and waveform sensing program

Cyclostationary Program

Appendix B

Project Plan

Appendix C

Consultation Meetings Attendance Form

Table of Figures

Figure 1: Spectrum Utilisation Measurement at Berkeley Wireless Research Centre

Figure 2: Cognitive Capability Sub-Functions

Figure 3: Cognitive Radio Architecture

Figure 4 : The receiver operating characteristics for energy detection algorithm

Figure 5 : The SEF performance for energy/waveform sensing algorithms for Nb=1000

Figure 6 : The SEF performance for energy/waveform sensing algorithms for Nb=100

Figure 7 : The SEF performance for energy/waveform sensing algorithms for Nb=10

Figure 8 : The SEF performance for energy/waveform sensing algorithms for Nb=1000

Figure 9 : The SEF performance for energy/waveform sensing algorithms for Nb=100

Figure 10 : The SEF performance for energy/waveform sensing algorithms for Nb=10

Figure 11 : The waveforms of primary user signal and received signal for SNR=0dB

Figure 12 : The cyclic power spectrum of the received signal for SNR=0dB

Figure 13 : The average cyclic power spectrum of the received signal as a function of spectral frequency for SNR=0dB

Figure 14 : Comparison of different detection and avoid algorithms

Chapter 1

1. Introduction

In the last couple decades the use of wireless applications has significantly increased which increased the need of the radio spectrum. The strategy of assigning fixed spectrum band to some applications led to some problems given the fact that those applications are not efficiently using the spectrum assigned to them which led to having overutlised and underutilised bands in the spectrum.

Cognitive radio concept that was introduced by Joseph Mitola has been accepted as an innovative technology which will help to overcome the problem of efficiency using the spectrum.  In cognitive radio systems users have the ability to adapt and use the radio spectrum based on their surrounding environment’s conditions. [1]

The efficient use of spectrum has been an important aspect in radio communications. One of the best ways of improving the utilisation of the spectrum at a given time is giving the secondary users (SU) who are not serviced users the ability to use the unoccupied bands of the spectrum which are not being used by the primary users (PU).  This is the main concept behind cognitive radio systems. [2]

1.1 Background

In the early decades of the 20th century when the radio communication became popular, people were afraid that the new users will interfere with the existing users hence each user obtained his own licence to avoid the interference. However, it became difficult afterwards for other wireless applications to operate properly in the radio spectrum given the fact that most of the spectrum has been used. William Kennard former chairperson of the United States Federal Communication Commission (FCC) referred to this problem as ‘’Spectrum Drought’’ [3].

Figure 1: Spectrum Utilisation Measurement at Berkeley Wireless Research Centre

From figure 1 above we can see that the lower frequencies are used more than the higher frequencies. It is very difficult to reconfigure the use of spectrum hence cognitive radio will give us the ability to establish an understanding and share the spectrum between the licensed users who are the main users of the spectrum and the unlicensed users who can only use the spectrum when the licensed users are not using it.

1.2 History

In 1999 Joseph Mitola introduced the concept of cognitive radio in his paper ‘’Cognitive Radio: Making Software Radios More Personal’’ [4]. Mitola continued his research and produced other papers where he described cognitive radio systems. Mitola’s research made regulatory bodies in countries such as the United Stated and United Kingdom realise that the radio frequency spectrum is used in an inefficient way. Hence, the regulatory bodies have started considering the use of cognitive radio technique.

Moreover, the new emerging technology of cognitive radio systems have been included in wireless standards such as IEEE802.11k in which sensing information have been used in order to detect to which network a wireless device needs to be connected. The wireless local area network can be a good example to explain the use of cognitive radio; wireless devices in the network tend to connect to the access point that provides the strongest signal which might lead to having access points serving users over their capacity and other access points serving none. With IEEE802.11k the user will check if the access point has reached its maximum capacity it will choose another access point which hasn’t. Hence, the efficiency of the network will increase.

1.3 Cognitive Radio Definition

To get an in-depth understanding about the cognitive radio we need to understand the concept of cognitively. The encyclopaedia of Computer Science defines cognitively as mental states and processes intervene between input stimuli and output responses. Moreover, in his paper Simon Haykin defines cognitive radio as ‘’Cognitive radio is an intelligent wireless communication system that is aware of its surroundings environment, and uses the methodology of understanding-by-building to learn from the environment and adapt its internal states to statistical variations in the incoming RF stimuli by making corresponding changes in certain operating parameters in real-time with two primary objectives in mind: highly reliable communications whenever and wherever needed and efficient utilisation of radio spectrum’’.  The rapid change in technology made the implementation of cognitive radio systems more feasible. [2]

From the definition above we can say that cognitive radio is an intelligent system that can make decisions about the efficient use of the radio spectrum based on the information gathered from the surrounding environment. As we mentioned above the most important aspect of cognitive radio is the coexistence of both the primary users and secondary users in the system to make sure of the efficient use of the radio spectrum in which the secondary user can only use the spectrum when the primary user is not using it. This requires the primary user not to change its infrastructure in order to give the ability to the system which in turn will give access to the spectrum to the secondary user. [3]

Hence we can state that the main purpose of cognitive radio system is to increase the efficiency of spectrum utilisation and to avoid the interference between the primary and secondary users of the network.

1.4 Literature Review

During the preliminary work for this project a research has been conducted and some papers have been checked and the following are examples of what were found:

In [4] the term cognitive radio has been used for the first time by Joseph Mitola. In his paper Mitola also suggested using Radio Knowledge Representation Language (RKRL) which provides a standard language to dynamically adopt for unanticipated data exchange.

Simulation and analysis of cognitive radio systems have been discussed in Goutam Ghosh’s article [5]. The reuse of unoccupied frequency bands in order to increase the efficiency of the bandwidth allocated was already discussed in this paper.

Simon Hayken discussed the tasks that are meant to be accomplished by cognitive radio systems and the emergent behaviour of the systems in his 2005 article [6]. His paper discusses in details Mitola’s visionary ideas and gives detailed explanations by presenting detailed expositions of signal processing which is one of the most important aspects of cognitive radio systems.

Cognitive Radio technique Detect and Avoid (DAA) has been discussed by Prof. Sam Reisenfeld in his 2009 paper [7]. The paper talks about the importance of DAA in providing high reliable decision when a primary user is not using a particular frequency band.

The fundamentals, architecture and applications of cognitive radio networks were presented in the 2011 paper [1] by Beibei Wang and K. J. Ray Liu. Important issues of dynamic spectrum sharing have also been discussed in the paper.

The resource allocation for ad hoc cognitive radio networks has been discussed in the 2011 journal article [8] by Seung-Jun Kim. Few solutions have been suggested and numerical results and simulation has also been presented in the document.

The physical, MAC and network layer of cognitive radio networks has been discussed in [9]. The paper can provide us with cross-layer overview when designing cognitive radio networks.

The spectrum sensing techniques, challenges of cognitive radio networks and the methods used to analyse resource allocation have been discussed in the 2016 article [10].

An in depth illustration of cognitive radio networks have been presented in the Ahmed Khattab’s book [11].

Various spectrum sensing techniques have been discussed by the literature review paper prepared by Scott Parson [12]. Energy detector based sensing, Coherent based sensing, Matched filter sensing, cyclostationary based sensing and hybrid based sensing techniques were explained thoroughly in the paper.

Spectrum sensing, spectrum sharing and spectrum access have been discussed in [13].

1.5 This Project

After discussing the various techniques used in sensing the spectrum in cognitive radio networks and through simulating the throughput rate of cognitive radio systems we will be able to simulate the throughput of the channel for three different sensing techniques which will lead us to make the right decision and make an efficient use of the frequency spectrum.

As chapter one serves as an introduction for this paper and discusses the history, background and literature review related to cognitive radio networks the second chapter discusses the fundamentals of cognitive radio. Different spectrum sensing techniques have been discussed in the third chapter. A system model for each of the spectrum sensing techniques have been presented in chapter four whereas the Matlab code has been presented in chapter five. The results have been discussed in the last chapter.

Chapter 2

2. Fundamentals of Cognitive Radio

2.1 Characteristics of Cognitive Radio

Energy and bandwidth are considered to be the most important resources of communications. Hence, to improve the quality and the capacity of the communication network the mentioned resources need to be taken into consideration. Recently researches are trying to find new resources that can efficiently improve the quality and the capacity of the service. [1]

Cognitive radio has been considered the technology that can efficiently utilise the available resource in an intelligence and flexible way. The main difference between the cognitive radio networks and other networks is that the devices in the cognitive radio networks can adapt and change the parameters, by which they are participating in the network, based on their environment. [1]

The two main characteristics of cognitive radio networks are cognitive capability and reconfigurability. [1]

2.1.1 Cognitive Capability

Before adjusting their function based on the surrounding environment cognitive radios have to collect information about the surrounding environment. This function where the cognitive radio devices get information about the surrounding network parameters such as transmitted waveform, geographical information and radio frequency is referred to as cognitive capability. [1]

Cognitive capability characteristic can be divided into three sub-functions which are also presented in figure 2. Those sub-functions will be described in more details in the next sections. [1] [14]

Spectrum sensing – where the device gets the necessary information about the surrounding network and detect of spectrum holes. [14]

Spectrum analysis – where characteristic estimation for the detected spectrum hole is done. [14]

Spectrum decision – where the most convenient spectrum is selected after checking important parameters. [14]

Figure 2: Cognitive Capability Sub-Functions

2.1.2 Reconfigurability

Once the Cognitive radio devices gathered the necessary information about the surrounding environment they will change their parameters based on the information gathered in order to achieve the best performance. This characteristic is referred to as reconfigurability. [1]

2.2 Functions of Cognitive Radio

The duty cycle of a cognitive radio includes detecting the white space (spectrum hole) in the spectrum, detecting the best frequency bands, managing spectrum access with the other users of the network and leaving the network when primary users wants to use it. We can summarise the steps mentioned above in the following three categories. [1]

2.2.1 Spectrum Sensing and Analysis

In this stage cognitive radio will detect pats of the frequency spectrum that is not being used by primary user which is referred to as white space or spectrum hole. After detecting those holes cognitive radio will try to make the best use of them. However, when the primary user starts using the network again i.e. the white spectrum is not available anymore, cognitive radio can detect that and it will make sure that no interference between the primary and secondary users will occur. [1]

2.2.2 Spectrum Management and Handoff

After sensing the spectrum and finding the spectrum holes, the secondary users of the cognitive radio network will choose the best frequency bands and use them based on their communication’s Quality of Service. This function is called spectrum management and handoff. When the primary user wants to use a band that is occupied by a secondary user, the secondary user will hop in to the next preferred spectrum hole which can be chosen based on the parameters of the secondary user. [1]

2.2.3 Spectrum Allocation and Sharing

To achieve optimal spectrum efficiency a good spectrum allocation and sharing technique is required given the fact that some of the spectrum could be shared amongst secondary users or between primary and secondary users. When the secondary users are sharing the spectrum with primary users there is a certain level of interference that is allowed to occur, anything above that threshold requires the secondary user to leave the spectrum. When the spectrum is shared amongst secondary users then cognitive radio will make sure to avoid collision and interference between the secondary users. [1]

2.3 Network Architecture and Application

Figure 3 below shows the network architecture of a cognitive radio network that includes a primary network and secondary network.

Figure 3: Cognitive Radio Architecture

The secondary network is defined as a network that consists of secondary users either with or without a base station. The users in this network can access the licensed spectrum only if there is no primary user using the spectrum.  The access of the secondary users to the network is usually managed by a secondary base station. All the components of the secondary network are equipped with the functions of cognitive radio. In a network when more than one secondary network is sharing a common spectrum band an entity called spectrum broker might be used to manage and coordinate the usage of the spectrum.  The spectrum broker gets the information from each secondary network and distributes the network resources to make sure an optimal efficiency is achieved. [1]

The primary network is defined as the network that consists of primary users and a primary base station. The users in this network are the authorised users of the spectrum in the network and the spectrum access is managed by the base station in the network. The transmission of primary users should not be effected by the transmission of the secondary users. The users of this network are not equipped with the functions of cognitive radio. Hence, when the secondary network is using the bandwidth alongside the network it should not only sense the spectrum, find the white space (spectrum hole) and utilise the best spectrum band but it should also sense the presence of the primary network and leave the spectrum to the next available spectrum band in order to avoid interference. [1]

Cognitive radio can be used in different applications. Cognitive radio systems can sense the environment, detect any change in the radio frequency and reconfigure the characteristics to adapt with the changes. All the above made the optimal use of the spectrum a reality. Moreover, the decentralised decision making for spectrum sharing resulted in decreasing the limitation of centralised spectrum management techniques. [1]

Cognitive radio systems can provide military with a secure and adaptive communications. The military communication has a low capacity because of the shortage in the radio spectrum given the fact that static assignments of bandwidth will result in some bands remaining unused. With the dynamic spectrum assignment and access technique used in cognitive radio systems the problem has been eliminated where cognitive radio can provide spectrum access to make sure that the available bandwidth is used efficiently. [1]

Cognitive radio is also used in public safety and state emergency services. Communicating the necessary information is an essential in case of a natural disaster or a terrorist attack which sometimes might lead to destroying the available communication channels. Cognitive radio can detect the available spectrum and direct the communication there in order to achieve an efficient and reliable communication. More than one service type is also supported by cognitive radio networks (video, voice, date) which make it have an essential role during emergency situations. [1]

Rapidly growing wireless application needs to have an access to the spectrum. Cognitive radio can provide the necessary spectrum access to those applications given the fact that it can sense the spectrum and direct the communication to the available spectrum slots in the network. Another advantage of using cognitive radio in wireless applications is that it is very easy to maintain the network specially when there is no need to update the hardware of the network. The entire network can be maintained by upgrading the software of radio management.   [1]

Chapter 3

3. Cognitive Radio Spectrum Sensing

The previous chapter described the main functions of cognitive radio networks from which we have noticed that spectrum sensing is the most important step towards perfectly completing the functions of cognitive radio. As spectrum sensing allow the user to know the available spectrum in any given time. [12]

Spectrum sensing is defined as detecting the presence of signals. The unused frequency slots in the spectrum will be used to accommodate for a new communication. The secondary users of the network who are occupying the spectrum that are leased by the primary users should detect the incoming primary user and move to another vacant slot in the spectrum [15].

Various methods are used to detect the use of the spectrum and make sure to make the most usage of the spectrum. Spectrum sensing devices are used to achieve the maximum throughput of the cognitive radio network. Some of the above mentioned devices are capable of sensing the spectrum and others can make decision based on the information they gather from the surrounding spectrum sensing units [15].

The spectrum sensing techniques are dependent on the application that the cognitive radio network is being used for. Some applications might not need to have information about the signal on air. Other applications need to know information about the specification of the signal. Whereas other applications are more interested about the identification of a given signal [15].

In this chapter three spectrum sensing techniques will be discussed. The advantages and disadvantages of each technique will be briefly discussed in this chapter as well [15].

3.1 Energy Detection

Energy detection technique is considered to be the most common technique used in spectrum sensing of cognitive radio networks. The main reason for being the most common used technique is the less amount of computation required and the low amount of information needed about the possible signal. A threshold is established and the energy level that will be detected will be compared to it [15].

Energy detection can be implemented in time or frequency domain. The square of the signal is being averaged while using the time domain. An FFT is required to implement energy detection in the frequency domain and after that the signals will be averaged over the observation time. The final stage of both implementation methods in comparing the results with the threshold [15].

In energy detection it is very hard to distinguish between the original signal, noise and interference which was one of the reasons that this method is not used in many cognitive radio applications [15].

Despite being cheap, a very useful technique in some complex cognitive radio strategies and a simple method its performance at lower SNR levels which might lead to false detection made the use of this method very limited [15].

3.2 Matched Filter Detection

This spectrum sensing method provides us with the best signal to noise ratio and the reason for that is because it matches a specific signal. In this method a demodulation of the signal is required which will provide us with more information about the signal of the primary user [15].

This method is considered to be a costly method of sensing the spectrum because detailed information (modulation technique, bandwidth, frequency synchronisation, frame format) about the signal needs to be stored in the spectrum sensing device hence implementing it has been considered impractical [15].

Waveform detection can be considered as a simplified type of matched filter detection. In waveform detection the implementation complexity and the security of the primary user has been improved. The waveform detection also assumes that the secondary user will definitely know and detect a pattern that exists in the primary user’s signal [16].

Although waveform detection requires less detection time and has a good detection performance, it also can have synchronisation errors which can significantly decrease the performance of the network [16].

3.3 Cyclostationary Detection

By definition any modulated signal will most probably have periodicity. Which means that autocorrelation of the signal will produce a grade of periodicity as well [15].

Given the fact that the noise is not correlated it is relatively easy to distinguish noise from signals. Cyclic correlation function is used instead of power spectral density in the cylclostationary spectrum sensing method [15].

At the presence of cyclic frequency the peak of that frequency is usually presented in the Cyclic Spectral Density [15]. This is shown in the last chapter of this report.

Cyclostationary spectrum sensing technique is considered to be a very complicated method given the fact that it needs more than one FFT calculation and correlation.

The above mentioned method are discussed and simulated in the next chapters of this report.

3.4 Cooperative Spectrum Sensing

In some radio systems such as hidden source, fading channels and local interference it is very hard for the system to collect information about the surrounding environment which might make data recovering an impossible task to achieve. However, the probability of detection increases if multiple spectrum sensing devices share their information amongst each other in the same network [15].

Cooperative spectrum sensing can be achieved by using a central unit which can manage the frequency spectrum based on the information it gets from the surrounding environment [15].

Despite the fact that using cooperative spectrum sensing technique will be a good communication strategy between the central device and the radio link, it will also consume a lot of bandwidth [15].

3.5 Other Methods

Wavelet transform, radio identification and multitaper spectral estimation are considered to be other methods of spectral sensing. It is also common to find a combination of more than one technique used in spectrum sensing in order to improve the performance of the communication link. However, it is better to find out the requirements of the application and the sensing environment and choose the spectrum sensing technique and strategy based on those two aspects [15].

Chapter 4

4. System Model

The objective of cognitive radio systems is the detection of the presence of signal in a heavily noisy channel. Ideally, the radio must be able to detect the presence of primary user in case the signal is present and report an available for use channel if the signal is not present.  However, since both signal and noise are of random nature, error is inevitable. Therefore, the performance of the detection algorithm is measured based on the probability of missed detection in the case of occupied channel and the probability of false detection when no signal is present. High performance algorithms must ensure small probabilities for both missed detection and false detection scenarios.

The performance of different detection schemes, including energy sending, waveform sensing and cyclostationary detection algorithms under the presence of noise is analyzed in the following sections. Furthermore, the criteria for achieving maximum likelihood (i.e., probability of missed detection equal to probability of false detection) are discussed.

4.1 Energy Sensing

4.1.1 Formulation of energy sensing algorithm

Let’s denote the primary user signal, channel noise, and received signal with x, z and y, respectively. Also, let’s characterize the detection of primary user signal by the binary hypothesis test H, where H0 is the hypothesis of the channel being free and H1 is the hypothesis the primary user signal is present. So,

The primary user signal is defined as a Gaussian (

mu0=Nb*Az^2;

snr=10^(SNR(j)/10);

sig1=Nb*Az^4*((alpha-1)*snr^2+2*snr+1);

sig1=sqrt(sig1);

mu1=Nb*(snr+1)*Az^2;

%obtain ST

ST=(mu0*sig1+mu1*sig0)/(sig0+sig1);

STvec(j)=ST;

%Obtain theoritical SEF

num=sqrt(Nb)*snr;

denom=1+sqrt((alpha-1)*snr^2+2*snr+1);

SEF_theory(j)=qfunc(num/denom);

i_md=0;

i=0;

while i_md<Maxerr

i=i+1;

% Generate the signal and noise vectors

z=Az*sqrt(0.5)*(randn(1,blocklen)+ 1i.*randn(1,blocklen));

x=sqrt(0.5)*(randn(1,blocklen)+ 1i.*randn(1,blocklen));

if alpha==1

x=x./abs(x);

end

%Energy detection if H0

y=z;

S=sum(abs(y).^2);

Sz(i,j)=S;

%False detection

if S>ST

i_fd=i_fd+1;

end

%Energy detection if H1

y=x+z;

S=sum(abs(y).^2);

Sy(i,j)=S;

%Missed detection

if S<ST

i_md=i_md+1;

end

if i>Maxblock

break

end

end

Pfd(j)=i_fd/i;

Pmd(j)=i_md/i;

end

semilogy(SNR,Sy(3,:))

hold on

semilogy(SNR,Sz(3,:))

hold on

semilogy(SNR,STvec)

legend(‘Primary user is active’,’Primary user inactive’,’Threshold’)

xlabel(‘SNR in dB’);

ylabel(‘Energy of the received signal’);

title([‘Energy Detection Method   Nb=’,num2str(Nb),’    alpha=’,num2str(alpha)])

figure

semilogy(SNR,Pfd,’b’)

hold on

semilogy(SNR,Pmd,’g’)

hold on

semilogy(SNR,SEF_theory,’b–‘)

% Waveform Sensing algorithm

for j=1:length(SNR)

i_fd=0;

i_md=0;

%calculate the statistical features of the channel

Az=10^(-SNR(j)/20);

snr=10^(SNR(j)/10);

%obtain ST

num=Nb*snr*Az^2;

denom=sqrt(2*(alpha-1)*snr+1)+1;

ST=num/denom;

STvec(j)=ST;

%Obtain theoretical SEF

num=sqrt(Nb)*sqrt(snr);

denom=sqrt((alpha-1)*snr+0.5)+sqrt(0.5);

SEF_theory(j)=qfunc(num/denom);

i_md=0;

i=0;

while i_md<Maxerr

i=i+1;

% Generate the signal and noise vectors

z=Az*sqrt(0.5)*(randn(1,blocklen)+ 1i.*randn(1,blocklen));

x=sqrt(0.5)*(randn(1,blocklen)+ 1i.*randn(1,blocklen));

if alpha==1

x=x./abs(x);

end

%Waveform detection

y=x+z;

S=sum(real(y.*conj(x)));

%Missed detection

if S<ST

i_md=i_md+1;

end

if i>Maxblock

break

end

end

SEF(j)=i_md/i;

end

semilogy(SNR,SEF,’r’)

hold on

semilogy(SNR,SEF_theory,’r–‘)

xlabel(‘SNR in dB’);

ylabel(‘SEF’);

% ylim([1e-7,1]);

legend(‘Energy Sensing Simulation P_f_d’,’Energy Sensing Simulation P_m_d’,…

‘Energy Sensing Theoretical’,’Waveform Sensing Simulation’,’Waveform Sensing Theoretical’,’location’,’southwest’)

title([‘Nb=’,num2str(Nb),’    alpha=’,num2str(alpha)])

Cyclostationary Program

clear;clc;close all

global L Nwindow nfft t Noverlap K

fs=1e6;

datalen=100;

symlen=32;

m=symlen*datalen;

SNR=0;

tt=(0:1:m-1)’;

f0=2/symlen;

Az=10^(-SNR/20);

z=Az*randn(1,m);

z=z’;

%generate digital data:OFDM

data=sqrt(0.5)*(randn(datalen,1)+ 1i.*randn(datalen,1));

a=[];

for i=1:datalen

a=[a;ones(symlen,1)*data(i)];

end

y=real(abs(a).*exp(2*pi*f0*1i*tt+1i*angle(a)));

x=z+y;

plot(y)

hold on

plot(x)

xlim([0,3*symlen]);

xlabel(‘Smples’)

legend(‘Primary user signal (x)’,’Received signal (y)’);

%Define parameters

L = length(x);      % signal length

Nwindow = 128;          % window length

nfft = 2*Nwindow;       % FFT length

f = (0:nfft/2-1)/nfft; %Normalized frequency

n=length(x);

t = (0:n-1)’;

Noverlap=floor(2/3*Nwindow);    % block overlap

K = fix((n-Noverlap)/(Nwindow-Noverlap));   % Number of windows

dela = 1/L;           % cyclic frequency resolution

amin = 2;            % first cyclic freq. bin to scan (i.e. cyclic freq. a1*da)

amax = 120;           % last cyclic freq. bin to scan (i.e. cyclic freq. a2*da)

for i=amin:amax

alpha=i/L;

j=i-amin+1;

CPS(:,j)=CalcCycl(x,x,alpha);

CPSz(:,j)=CalcCycl(z,z,alpha);

end

%Plot the CPS as a 3D figure

CPS_1sided=CPS(1:nfft/2,:);

CPS_1sidedz=CPSz(1:nfft/2,:);

aplot=[amin:amax]/L;

figure

%Multiply by fs to convert normalized frequency to actual frequency divide by 1e3 to express in kHz

meshz(f*fs/1e3,aplot*fs/1e3,abs(CPS_1sided’))

% imagesc(aplot,f,abs(CPS_1sided)),

colormap(jet),colorbar,axis xy,title(‘Cyclic Power Spectrum’),

ylabel(‘cyclic frequency alpha [kHz]’),xlabel(‘spectral frequency f [kHz]’)

figure

CPSavg=sum(abs(CPS_1sided’))/amax;

CPSavgz=sum(abs(CPS_1sidedz’))/amax;

CT=ones(length(CPSavg),1)*Az;

plot(f*fs/1e3,abs(CPSavg))

hold on

plot(f*fs/1e3,abs(CPSavgz))

% hold on

% plot(f*fs/1e3,CT)

xlabel(‘spectral frequency f [kHz]’)

title(‘Average Cyclic Power Spectrum’);

legend(‘Primary user signal present’,’primary user signal absent’);

figure

plot(abs(CPS_1sided(16,:)))

hold on

plot(abs(CPS_1sidedz(16,:)))

function CPS= CalcCycl(x,y,alpha)

global nfft t Noverlap K Nwindow

%Define window

% Window = kaiser(Nwindow);

Window = hanning(Nwindow);

% Introduce the frequency shift to x and y

y = y.*exp(-1i*pi*alpha*t);

x = x.*exp(1i*pi*alpha*t);

% compute CPS

CPS = 0;

index = 1:Nwindow;

for i=1:K

xw = Window.*x(index);

yw = Window.*y(index);

Yw1 = fft(yw,nfft);     % Yw(f+a/2) or Yw(f)

Xw2 = fft(xw,nfft);     % Xw(f-a/2) or Xw(f-a)

CPS = Yw1.*conj(Xw2) + CPS;

index = index + (Nwindow – Noverlap);

end

% normalize the CPS with respect to window

CPS = CPS/(K*norm(Window)^2);

 

Appendix B

Project Plan

In semester one 2016 a project plan has been prepared based on the ENGG411 requirements of the previous semester. The project plan and activities breakdown are shown in the table below.

Start Date End Date Description
10-Jul 30-Sep Reading resources
25-Jul 05-Aug Project Specifications and Plan
10-Jul 15-Aug Develope of approach and Strategy
10-Aug 01-Sep Software Development
02-Sep 05-Sep Testing Software
06-Sep 10-Sep Running and Debuging Software
11-Sep 18-Sep Progress Report
20-Sep 30-Sep Analysing Results and Generating Conculsions
01-Oct 20-Oct Final Report (First Draft)
21-Oct 25-Oct Presentation (First Draft)
26-Oct 30-Oct Poster (First Draft)
01-Nov 12-Nov Final Report (First Draft)
13-Nov 16-Nov Seminar Title and Abstract
17-Nov 20-Nov Poster
20-Nov 23-Nov Presentation
01-Jul 15-Nov Log Book

The following Gantt chart was also prepared based on the activity breakdown mentioned in the table above:

However, based on the timetable presented in the second semester the activity breakdown and Gantt chart have been modified to accommodate the changes mentioned in the new guidelines of the unit.

It is worth to mention that most of the activities have stayed as they are and carried out according to the original plan. Dates, deliverables and assessment task have been modified in the new plan.

Appendix C

Consultation Meetings Attendance Form

Throughout the semester few meetings with my project supervisor have been scheduled and the consultation meeting attendance form below shows the meetings date and topics discussed in the meeting.

More in depth information about the meetings have been recorded in the logbook.

Cite This Work

To export a reference to this article please select a referencing stye below:

Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.
Reference Copied to Clipboard.

Related Services

View all

DMCA / Removal Request

If you are the original writer of this dissertation and no longer wish to have your work published on the UKDiss.com website then please: