Disclosure of Invention
Aiming at the limitation of the prior art, the invention provides a centralized spectrum sensing method, a system, a storage medium and computer equipment, and the technical scheme adopted by the invention is as follows:
a centralized spectrum sensing method, comprising the steps of:
acquiring training data of user perception signals at each time, and generating an original signal matrix of the training data; performing I/Q decomposition on the original signal matrix of the training data, and converting the decomposition result of the original signal matrix of the training data into a covariance matrix to construct a signal feature vector of the training data; generating a training set by taking the signal feature vector of the training data as a sample;
acquiring test data of each user perception signal, and generating an original signal matrix of the test data; performing I/Q decomposition on the original signal matrix of the test data, and converting the decomposition result of the original signal matrix of the test data into a covariance matrix to construct a signal feature vector of the test data; generating a test set by using the signal feature vector of the test data;
according to the training set, a spectrum sensing judgment classifier is obtained by using a DBSCAN algorithm;
and judging whether a main user signal exists or not by using the spectrum sensing judgment classifier according to the test set.
Compared with the prior art, the method extracts the signal characteristic vectors of the sensing signals by a method based on the covariance matrix and IQ decomposition, finds and deletes abnormal values in the signal characteristic vectors while clustering the signal characteristic vectors by applying a DBSCAN algorithm, and further obtains a more effective classifier; the invention improves the perception performance in the environment with low SNR and avoids the influence of the selection of the initial point during training. Simulation experiments show that the method provided by the invention still has better perception performance in a low signal-to-noise ratio environment.
Further, the original signal matrix Y is represented as follows:
wherein x is m (n) represents the perceived signal of the sub-user M at the nth sampling time point, M ═ 1, 2],n=[1,2,...,N]。
Furthermore, a decomposition result Y obtained by I/Q decomposition of the original signal matrix I And Y Q Are respectively expressed as follows:
further, the decomposition result Y I And Y Q Respectively converted into covariance matrix C I And C Q This is shown as follows:
C I =E[Y I (Y I ) T ];
C Q =E[Y Q (Y Q ) T ];
wherein, E [. C]Representing the desired operation, covariance matrix C I And C Q Can be represented as:
further, the signal feature vector is expressed as follows:
t=[t I ,t Q ];
wherein:
further, according to the training set, obtaining a spectrum sensing decision classifier by using a DBSCAN algorithm, comprising the following steps:
dividing the samples of the training set into C by using DBSCAN algorithm 1 And C 2 Two clusters;
separately obtaining C by minimizing Euclidean distance between samples in a cluster 1 And C 2 Corresponding cluster center psi 1 And psi 2 ;
According to the cluster center psi 1 And psi 2 And constructing a spectrum sensing judgment classifier.
Further, the spectrum sensing decision classifier is expressed by the following formula:
wherein, the characteristic vector of the signal to be tested of the test set is represented; when gamma is more than or equal to gamma, representing that a main user signal exists, otherwise representing that the main user signal does not exist; gamma is a parameter controlling the false alarm probability.
A centralized spectrum sensing system, comprising:
the training set acquisition module is used for acquiring training data of each user perception signal and generating an original signal matrix of the training data; performing I/Q decomposition on the original signal matrix of the training data, and converting the decomposition result of the original signal matrix of the training data into a covariance matrix to construct a signal feature vector of the training data; generating a training set by taking the signal feature vector of the training data as a sample;
the test set acquisition module is used for acquiring test data of each user perception signal and generating an original signal matrix of the test data; performing I/Q decomposition on the original signal matrix of the test data, and converting the decomposition result of the original signal matrix of the test data into a covariance matrix to construct a signal feature vector of the test data; generating a test set by using the signal characteristic vector of the test data;
the spectrum sensing judgment classifier obtaining module is used for obtaining a spectrum sensing judgment classifier by using a DBSCAN algorithm according to the training set;
and the master user signal judgment module is used for judging whether a master user signal exists or not by using the spectrum sensing judgment classifier according to the test set.
The present invention also provides the following:
a storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the centralized spectrum sensing method as described above.
A computer device comprising a primary user-side, a secondary user-side and a central node mutually constituting a cognitive radio network, the central node comprising a storage medium, a processor and a computer program stored in the storage medium and executable by the processor, the computer program when executed by the processor implementing the steps of the centralized spectrum sensing method as described above.
Detailed Description
The drawings are for illustrative purposes only and are not to be construed as limiting the patent;
it should be understood that the embodiments described are only a few embodiments of the present application, and not all embodiments. All other embodiments obtained by a person of ordinary skill in the art based on the embodiments in the present application without making any creative effort belong to the protection scope of the embodiments in the present application.
The terminology used in the embodiments of the present application is for the purpose of describing particular embodiments only and is not intended to be limiting of the embodiments of the present application. As used in the examples of this application and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. It should also be understood that the term "and/or" as used herein refers to and encompasses any and all possible combinations of one or more of the associated listed items.
When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present application. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the application, as detailed in the appended claims. In the description of the present application, it is to be understood that the terms "first," "second," "third," and the like are used solely to distinguish one from another and are not necessarily used to describe a particular order or sequence, nor are they to be construed as indicating or implying relative importance. The specific meaning of the above terms in the present application can be understood by those of ordinary skill in the art as appropriate.
In addition, in the description of the present application, "a plurality" means two or more unless otherwise specified. "and/or" describes the association relationship of the associated objects, meaning that there may be three relationships, e.g., a and/or B, which may mean: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship. The invention is further illustrated below with reference to the figures and examples.
In order to solve the limitation of the prior art, this embodiment provides a technical solution, and the technical solution of the present invention is further described below with reference to the drawings and the embodiments.
A centralized spectrum sensing method, please refer to fig. 1, comprising the following steps:
s01, acquiring training data of each user perception signal, and generating an original signal matrix of the training data; performing I/Q decomposition on the original signal matrix of the training data, and converting the decomposition result of the original signal matrix of the training data into a covariance matrix to construct a signal feature vector of the training data; generating a training set by taking the signal feature vector of the training data as a sample;
s02, obtaining test data of each user perception signal, and generating an original signal matrix of the test data; performing I/Q decomposition on the original signal matrix of the test data, and converting the decomposition result of the original signal matrix of the test data into a covariance matrix to construct a signal feature vector of the test data; generating a test set by using the signal characteristic vector of the test data;
s03, obtaining a spectrum sensing judgment classifier by using a DBSCAN algorithm according to the training set;
and S04, according to the test set, the spectrum sensing judgment classifier is used for judging whether a main user signal exists.
Compared with the prior art, the method has the advantages that the signal characteristic vectors are extracted from the sensing signals by a method based on the covariance matrix and IQ decomposition, and the DBSCAN algorithm is used for finding and deleting abnormal values in the signal characteristic vectors while clustering the signal characteristic vectors, so that a more effective classifier is obtained; the invention improves the perception performance in the environment with low SNR and avoids the influence of the selection of the initial point during training. Simulation experiments show that the method provided by the invention still has good perception performance in a low signal-to-noise ratio environment.
Specifically, the method and the device utilize the difference of the correlation between a main user (PU) signal and a Gaussian white signal to detect, and the perceived signal still has the correlation after the PU signal is subjected to shadow effect and multipath attenuation, so that whether the main user signal exists or not can be judged through the difference of the correlation; for example, as shown in fig. 2, in the cognitive radio network in this embodiment, there are M (i ═ 1, 2, …, M) Secondary Users (SUs) and one Primary User (PU), in a certain sensing time period, the number of samples of each SU is N, each SU sends a sensed signal to a central node (FC), and finally, the FC determines whether the PU exists, thereby completing the detection process of multi-user cooperative spectrum sensing. This detection can be expressed in this embodiment as a binary hypothesis:
idle hypothesis H 0 Indicating that the frequency band is idle, namely no master user exists, and the secondary user serving as the cognitive user can access the frequency band;
occupancy assumption H 1 The frequency band is occupied, namely a primary user exists, and a secondary user serving as a cognitive user cannot access the frequency band.
The model of the sampled signal for each secondary user can be expressed as follows:
H 0 :x i (n)=η i (n)
H 1 :x i (n)=s(n)+η i (n);
where s (n) is the Primary User (PU) signal, η i (n) are independently and identically distributed, eachValue of 0, variance of σ 2 White gaussian noise signal.
For the embodiment, the cognitive radio network has M SUs, the number of sampling time points of each SU is N in the sensing time period, and the SUs cooperatively detect one PU; the sampling result for each sensing time segment will generate a signal feature vector after the processing of steps S01 and S02. The training set is a set of signal characteristic vectors correspondingly obtained by sampling results of a plurality of perception time periods, and the test set comprises the signal characteristic vectors correspondingly obtained by the perception time periods in the test stage.
Further, the original signal matrix Y is represented as follows:
wherein x is m (n) represents the perceived signal of the sub-user M at the nth sampling time point, M ═ 1, 2],n=[1,2,...,N]。
Further, the decomposition result Y obtained by I/Q decomposition of the original signal matrix I And Y Q Are respectively expressed in the following ways:
further, the decomposition result Y I And Y Q Respectively converted into covariance matrix C I And C Q This is shown as follows:
C I =E[Y I (Y I ) T ];
C Q =E[Y Q (Y Q ) T ];
wherein, E [ ·]Representing the desired operation, covariance matrix C I And C Q Can be represented as:
specifically, when the PU signal is not present, C I And C Q Are all diagonal matrices; when the PU signal is present, C I And C Q Are all non-diagonal matrices. Therefore, this difference can be used to detect the channel state.
Further, the signal feature vector is expressed as follows:
t=[t I ,t Q ];
wherein:
specifically, when the PU signal is not present, t is satisfied I 1 and t Q 1. Conversely, when the PU signal is present, t is satisfied I > 1 and t Q >1。
Further, according to the training set, a DBSCAN algorithm is used to obtain a spectrum sensing decision classifier, please refer to fig. 3, which includes the following steps:
s031, use DBSCAN algorithm to divide the sample of the said training set into C 1 And C 2 Two clusters;
s032, respectively obtaining C by minimizing Euclidean distance between samples in cluster 1 And C 2 Corresponding cluster center psi 1 And psi 2 ;
S033, according to the cluster center psi 1 And psi 2 Construction ofAnd a spectrum sensing judgment classifier.
Specifically, the implementation principle flow of S031 to S033 is as follows:
presetting a radius parameter r and a field density threshold MinPts;
step 1: marking all samples in the training set D as unvisited;
step 2: randomly selecting a mark p from the unvisited samples in the training set D;
and step 3: marking p as visited;
and 4, step 4: if there are at least MinPts samples in the region centered at p and having radius r, a cluster C is created k Give p as the current cluster C k (ii) a Otherwise, marking p as an abnormal value and removing the abnormal value;
and 5: marking samples in the field with p as the center and r as the radius as a sample set omega, and marking each p' in the sample set omega as a visited; in addition, in the region with the radius of r as the center of p', at least MinPts samples are added to omega; adding p 'to the current cluster C if p' is not already a member of any cluster k ;
Step 6: returning to the step 2 until all samples in the training set D are marked as visited;
and 7: when the algorithm is finished, the cluster division C ═ C is obtained 1 ,C 2 );
And step 8: obtaining cluster center Ψ ═ { ψ by minimizing euclidean distances between samples in each cluster 1 ,ψ 2 ) And constructing a corresponding classifier by using the cluster center.
Further, the spectrum sensing decision classifier is expressed by the following formula:
wherein, the characteristic vector of the signal to be tested of the test set is represented; when gamma is larger than or equal to gamma, representing that a main user signal exists, otherwise representing that the main user signal does not exist; gamma is a parameter controlling the false alarm probability.
Next, the present embodiment will be further described in the form of a simulation experiment.
In the simulation experiment part, probability (P) is detected d ) And false alarm probability (P) f ) For evaluating perceptual performance. P d And P f Is defined as:
wherein D 1 Indicating the presence of a PU signal. P d Indicating the presence of a PU signal, the FC determines the probability of PU presence. P is f Indicating that the PU signal is not present, the FC determines the probability of the PU being present.
In a simulation experiment, a PU signal is an AM signal; the training set comprises 2000 signal feature vectors; the sensing performance of the invention is tested by 4000 signal characteristics and compared with a spectrum sensing method based on MME, DMM or RMET and adopting a K-means clustering algorithm.
Referring to fig. 4, under the conditions that the sampling cost N is 3000, the number of times users M is 4, and SNR is-15 dB, the present invention has the best sensing performance compared with other sensing algorithms;
referring to fig. 5, under the conditions that the sampling cost N is 3000, the number of times users M is 4, and SNR is-17 dB, the present invention still has better sensing capability and is better than other sensing schemes; in particular, when P f The detection probability ratios of the present invention and the MME are 86.3% and 48.5%, respectively, which indicates that the present invention can better improve the spectrum sensing performance and is superior to other sensing algorithms under the condition of low SNR.
A centralized spectrum sensing system, please refer to fig. 6, comprising:
the training set acquisition module 1 is used for acquiring training data of each user perception signal and generating an original signal matrix of the training data; performing I/Q decomposition on the original signal matrix of the training data, and converting the decomposition result of the original signal matrix of the training data into a covariance matrix to construct a signal feature vector of the training data; generating a training set by taking the signal feature vector of the training data as a sample;
the test set acquisition module 2 is used for acquiring test data of each user perception signal and generating an original signal matrix of the test data; performing I/Q decomposition on the original signal matrix of the test data, and converting the decomposition result of the original signal matrix of the test data into a covariance matrix to construct a signal feature vector of the test data; generating a test set by using the signal characteristic vector of the test data;
the spectrum sensing judgment classifier obtaining module 3 is used for obtaining a spectrum sensing judgment classifier by applying a DBSCAN algorithm according to the training set;
and the main user signal judgment module 4 is used for judging whether a main user signal exists or not by using the spectrum sensing judgment classifier according to the test set.
The present invention also provides the following:
a storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of the centralized spectrum sensing method as described above.
A computer device comprising a primary user-side, a secondary user-side and a central node mutually constituting a cognitive radio network, the central node comprising a storage medium, a processor and a computer program stored in the storage medium and executable by the processor, the computer program, when executed by the processor, implementing the steps of the centralized spectrum sensing method as described above.
It should be understood that the above-described embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the embodiments of the present invention. Other variations and modifications will be apparent to persons skilled in the art in light of the above description. This need not be, nor should it be exhaustive of all embodiments. Any modification, equivalent replacement, and improvement made within the spirit and principle of the present invention should be included in the protection scope of the claims of the present invention.