CN107395301B - Spectrum sensing method and device based on K-means algorithm - Google Patents

Spectrum sensing method and device based on K-means algorithm Download PDF

Info

Publication number
CN107395301B
CN107395301B CN201710706974.5A CN201710706974A CN107395301B CN 107395301 B CN107395301 B CN 107395301B CN 201710706974 A CN201710706974 A CN 201710706974A CN 107395301 B CN107395301 B CN 107395301B
Authority
CN
China
Prior art keywords
class
mme
calculating
signal
center point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201710706974.5A
Other languages
Chinese (zh)
Other versions
CN107395301A (en
Inventor
张勇威
万频
王永华
张顺超
肖逸瑞
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Guangdong University of Technology
Original Assignee
Guangdong University of Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Guangdong University of Technology filed Critical Guangdong University of Technology
Priority to CN201710706974.5A priority Critical patent/CN107395301B/en
Publication of CN107395301A publication Critical patent/CN107395301A/en
Application granted granted Critical
Publication of CN107395301B publication Critical patent/CN107395301B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04BTRANSMISSION
    • H04B17/00Monitoring; Testing
    • H04B17/30Monitoring; Testing of propagation channels
    • H04B17/382Monitoring; Testing of propagation channels for resource allocation, admission control or handover

Landscapes

  • Physics & Mathematics (AREA)
  • Electromagnetism (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Radar Systems Or Details Thereof (AREA)

Abstract

The invention discloses a frequency spectrum sensing method based on a K-means algorithm, which comprises the steps of obtaining a training signal, and calculating to obtain the MME characteristics of the training signal; obtaining a classifier by using a K mean value clustering algorithm and the MME characteristics; acquiring a test signal, and calculating to obtain the test MME characteristics of the test signal; and classifying the characteristics of the test MME by using the classifier to obtain a classification result, and calculating the detection probability by using the classification result. Therefore, according to the spectrum sensing method based on the K-means algorithm provided by the embodiment of the invention, the MME characteristics of the training signals are calculated, then the K-means algorithm is used for obtaining the classifier, and after the classifier is trained, the test MME characteristics of the test signals are led into the classifier for classification to obtain the classification result. By combining the MME characteristics with the K-means algorithm, the detection performance of spectrum sensing is improved. The invention also discloses a frequency spectrum sensing device based on the K mean value algorithm, and the technical effect can be realized.

Description

Spectrum sensing method and device based on K-means algorithm
Technical Field
The invention relates to the technical field of radio, in particular to a frequency spectrum sensing method based on a K mean value algorithm.
Background
With the progress and development of radio technology, the demand of various industries for radio frequency is increasing, and the problem of insufficient frequency spectrum resources is becoming more serious. At present, the spectrum resources adopt a management mode of national uniform allocation authorization, and the spectrum is divided into two types: licensed and unlicensed bands. The authorized frequency band occupies most of spectrum resources, such as a television broadcast frequency band, but not a few authorized frequency bands are in an idle state; the open-used unlicensed frequency band occupies a small part of the whole spectrum resource, and most wireless networks such as wireless local area networks, wireless metropolitan area networks and the like use the unlicensed frequency band to work, so that users on the frequency band are many, the traffic is large, and the radio frequency band basically tends to be saturated. Therefore, the lack of spectrum resources is not a real spectrum resource shortage, and is caused by the low spectrum utilization rate.
In order to improve the utilization rate of the spectrum, an accurate spectrum detection method needs to be found first. At present, a more classical spectrum detection method has an energy detection algorithm, but in the energy detection algorithm, because a decision threshold is difficult to determine, false decision is easily generated due to noise uncertainty in a low signal-to-noise ratio environment, so that the detection performance is rapidly reduced, and even if the threshold is a threshold capable of being self-adapted, a detector cannot make correct decision, so that the spectrum detection result is not accurate enough.
Therefore, how to obtain an accurate spectrum detection result is a problem to be solved by those skilled in the art.
Disclosure of Invention
The invention aims to provide a frequency spectrum sensing method based on a K-means algorithm so as to obtain an accurate frequency spectrum detection result.
In order to achieve the above purpose, the embodiment of the present invention provides the following technical solutions:
a spectrum sensing method based on a K-means algorithm comprises the following steps:
acquiring a training signal, and calculating to obtain the MME characteristics of the training signal;
obtaining a classifier by using a K mean value clustering algorithm and the MME characteristics;
acquiring a test signal, and calculating to obtain the test MME characteristics of the test signal;
and classifying the characteristics of the test MME by using the classifier to obtain a classification result, and calculating the detection probability by using the classification result.
The acquiring of the training signal and the calculating of the MME characteristic of the training signal include:
acquiring a first signal characteristic and a second signal characteristic, wherein the first signal characteristic and the second signal characteristic form a training signal; the first signal characteristic is a signal characteristic acquired by a secondary user when a primary user exists, and the second signal characteristic is a signal characteristic acquired by the secondary user when the primary user does not exist;
calculating to obtain a first perception matrix of a plurality of secondary users in a perception time period by using the training signal;
dividing the first sensing matrix into a first preset number of second sensing matrixes;
and calculating the MME characteristics of each second perception matrix.
The method for obtaining the classifier by using the K-means clustering algorithm and the MME characteristics comprises the following steps:
s301, randomly determining a second preset number of MME feature objects as class center points of the second preset number in a data object set formed by the MME features to form a second preset number of initial classes; wherein each class comprises a class central point and a non-class central point;
s302, calculating the distance from the non-class center point in each initial class to the center point of each class, and distributing each non-class center point to the class where the class center point closest to each non-class center point is located to form a target class;
s303, calculating the average value of all MME feature objects in the target class, judging whether the average value is the same as the class center point of the target class, if so, stopping, and determining a classifier; if not, reducing the class center point of the target class to be a non-class center point of the target class, taking the average value as the class center point of the target class, taking the target class as an initial class, and returning to the step S302.
After dividing the first sensing matrix into a preset number of second sensing matrices, the method further includes:
decomposing the signal vector of the second sensing matrix into I, Q parts to obtain a third sensing matrix;
then, the calculating to obtain the MME characteristics of each second sensing matrix includes:
and calculating the MME characteristics of each third perception matrix.
After the calculating the detection probability, the method further includes:
and calculating the false alarm probability.
A spectrum sensing device based on a K-means algorithm comprises:
the MME characteristic calculation module is used for acquiring a training signal and calculating the MME characteristics of the training signal;
the classifier calculation module is used for obtaining a classifier by utilizing a K mean value clustering algorithm and the MME characteristics;
the test MME characteristic calculation module is used for acquiring a test signal and calculating the test MME characteristic of the test signal;
and the classification module is used for classifying the characteristics of the test MME by using the classifier to obtain a classification result and calculating the detection probability by using the classification result.
Wherein, the MME characteristic calculation module comprises:
the training signal acquisition unit is used for acquiring a first signal characteristic and a second signal characteristic, and the first signal characteristic and the second signal characteristic form a training signal; the first signal characteristic is a signal characteristic acquired by a secondary user when a primary user exists, and the second signal characteristic is a signal characteristic acquired by the secondary user when the primary user does not exist;
the first perception matrix calculation unit is used for calculating a first perception matrix of a plurality of secondary users in a perception time period by utilizing the training signal;
the grouping unit is used for dividing the first sensing matrix into a first preset number of second sensing matrixes;
and the MME characteristic calculating unit is used for calculating and obtaining the MME characteristics of each second perception matrix.
Wherein the classifier computation module comprises:
a class center determining unit, configured to randomly determine, in a data object set formed by the MME features, a second preset number of MME feature objects as class center points of the second preset number, and form an initial class of the second preset number; wherein each class comprises a class central point and a non-class central point;
the target class forming unit is used for calculating the distance from the non-class center point in each initial class to the center point of each class, and distributing each non-class center point to the class where the class center point closest to each non-class center point is located to form a target class;
the judging unit is used for calculating the average value of all MME characteristic objects in the target class, judging whether the average value is the same as the class center point of the target class or not, if so, stopping and determining the classifier; if not, reducing the class center point of the target class into a non-class center point of the target class, taking the average value as the class center point of the target class, taking the target class as an initial class, and continuing to call the target class forming unit.
Wherein, still include:
the decomposition module is used for decomposing the signal vector of the second sensing matrix into I, Q parts after the first sensing matrix is divided into a preset number of second sensing matrices to obtain a third sensing matrix;
the MME feature calculating unit is specifically configured to:
and calculating the MME characteristics of each third perception matrix.
Wherein, still include:
and the false alarm probability calculation module is used for calculating the false alarm probability after calculating the detection probability.
According to the scheme, the invention provides the spectrum sensing method based on the K-means algorithm, the training signal is obtained, and the MME characteristics of the training signal are obtained through calculation; obtaining a classifier by using a K mean value clustering algorithm and the MME characteristics; acquiring a test signal, and calculating to obtain the test MME characteristics of the test signal; and classifying the characteristics of the test MME by using the classifier to obtain a classification result, and calculating the detection probability by using the classification result.
Therefore, according to the spectrum sensing method based on the K-means algorithm provided by the embodiment of the invention, the MME characteristics of the training signals are calculated, then the K-means algorithm is used for obtaining the classifier, and after the classifier is trained, the test MME characteristics of the test signals are led into the classifier for classification to obtain the classification result. By combining the MME characteristics with the K-means algorithm, the detection performance of spectrum sensing is improved.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
FIG. 1 is a flowchart of a spectrum sensing method based on a K-means algorithm according to an embodiment of the present invention;
FIG. 2 is a flowchart illustrating a method for calculating the characteristics of a training signal MME according to an embodiment of the present invention;
FIG. 3 is a flowchart of a compute classifier according to an embodiment of the present invention;
FIG. 4 is a diagram of an experimental effect of a specific spectrum sensing method based on a K-means algorithm according to an embodiment of the present invention;
fig. 5 is a schematic structural diagram of a spectrum sensing device based on a K-means algorithm according to an embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The embodiment of the invention discloses a frequency spectrum sensing method based on a K-means algorithm so as to obtain an accurate frequency spectrum detection result.
Referring to fig. 1, a spectrum sensing method based on a K-means algorithm provided by the embodiment of the present invention specifically includes:
s101, acquiring a training signal, and calculating to obtain the MME characteristics of the training signal;
specifically, during training, a Secondary User (SU) is used to collect signal data when a Primary User (PU) is present, and then a secondary user is used to collect signal data when the primary user is absent, wherein the two signal data form a training signal.
Suppose there are K SUs in a cognitive radio network and the number of samples per SU is N. We assume H0Expressed as signal absence, H1Indicating that a signal is present. The training signal can therefore be represented by:
Figure GDA0002499827440000051
wherein s isi(n) denotes a Primary User (PU) signal, wi(n) represents a mean of 0 and a variance of σ2A gaussian white noise signal.
And obtaining a sensing matrix in sensing time by using the training signal so as to calculate a covariance matrix, and obtaining the MME characteristics by using the ratio of the maximum eigenvalue to the minimum eigenvalue of the covariance matrix.
S102, obtaining a classifier by using a K-means clustering algorithm and the MME characteristics;
specifically, the sensing matrix is divided into a plurality of groups, so that a plurality of MME characteristics are obtained, a data object set is determined by using the MME characteristics, and a final classifier is obtained by using the data object set and a K-means algorithm.
S103, acquiring a test signal, and calculating to obtain the test MME characteristics of the test signal;
specifically, after the test signal is acquired, the MME characteristic of the test signal is determined, and a characteristic matrix is constructed.
And S104, classifying the features of the MME to be tested by using the classifier to obtain a classification result, and calculating the detection probability by using the classification result.
Specifically, the feature matrix is imported into a classifier to obtain a classification result, and the detection probability, that is, the detection performance index is calculated by using the classification result.
Meanwhile, the classification result can be further calculated, and the false alarm probability of the classification result can be calculated, so that the probability that the system is mistaken for the existence of the master user when the master user does not exist can be known.
According to the scheme, the spectrum sensing method based on the K-means algorithm calculates the MME characteristics of the training signals, then obtains the classifier by using the K-means algorithm, and then introduces the test MME characteristics of the test signals into the classifier for classification after training the classifier to obtain the classification result. By combining the MME characteristics with the K-means algorithm, the detection performance of spectrum sensing is improved.
The embodiment of the present invention provides a specific spectrum sensing method based on a K-means algorithm, which is different from the above embodiments, the embodiment of the present invention specifically defines and explains S101 in the above embodiment, and the contents of other steps are substantially the same as those in the above embodiment, and the specific contents may refer to the above embodiment, and are not described herein again. Specifically, referring to fig. 2, S101 specifically includes:
s201, collecting a first signal characteristic and a second signal characteristic, wherein the first signal characteristic and the second signal characteristic form a training signal; the first signal characteristic is a signal characteristic acquired by a secondary user when a primary user exists, and the second signal characteristic is a signal characteristic acquired by the secondary user when the primary user does not exist;
specifically, in training, first, signal data is acquired by a Secondary User (SU) in the presence of a Primary User (PU), and then signal data is acquired by the secondary user in the absence of the primary user, and these two types of signal data constitute a training signal. The training signal may be represented as
Figure GDA0002499827440000061
Wherein s isi(n) denotes a Primary User (PU) signal, wi(n) represents a mean of 0 and a variance of σ2A gaussian white noise signal. H0Expressed as signal absence, H1Is shown asThe presence of a signal; m is the number of sub-users, and the number of sampling points of each sub-user is N.
S202, calculating by using the training signal to obtain a first perception matrix of a plurality of secondary users in a perception time period;
specifically, Xi=[xi(1)xi(2)....xi(N)]A sampling matrix representing the ith SU, the sensing matrix of M secondary users in a sensing time period can be represented as:
Figure GDA0002499827440000071
s203, dividing the first sensing matrix into a first preset number of second sensing matrixes;
specifically, users are grouped, and a grouped perception matrix is obtained. The number of the packets is set according to actual conditions. Assuming that 9 secondary users cooperatively sense, the sampling point is 1000, and the sampling point is divided into 3 groups in advance; the data collected by these 9 sub-users is a matrix X of 9 rows and 1000 columns,
Figure GDA0002499827440000072
the method comprises the following three groups:
group one:
Figure GDA0002499827440000073
and a second group:
Figure GDA0002499827440000074
and (3) group III:
Figure GDA0002499827440000081
and S204, calculating the MME characteristics of each second perception matrix.
Specifically, each second sensing matrix is utilized to obtain a covariance matrix of each second sensing matrix, so as to obtain the MME characteristics of each group of users
Figure GDA0002499827440000082
Wherein is λmaxMaximum eigenvalue of covariance matrix, λminIs the minimum eigenvalue.
The embodiment of the present invention provides a specific spectrum sensing method based on a K-means algorithm, which is different from the above embodiments, the embodiment of the present invention specifically defines and explains S102 in the above embodiment, and the contents of other steps are substantially the same as those in the above embodiment, and the specific contents may refer to the above embodiment, and are not described herein again. Specifically, referring to fig. 3, S102 specifically includes:
s301, randomly determining a second preset number of MME feature objects as class center points of the second preset number in a data object set formed by the MME features to form a second preset number of initial classes; wherein each class comprises a class central point and a non-class central point;
specifically, the MME features form a data object set, and K objects are randomly selected as class center points in the data object set, thereby obtaining K classes, where one center point is in the class and the other points are non-center points.
S302, calculating the distance from the non-class center point in each initial class to the center point of each class, and distributing each non-class center point to the class where the class center point closest to each non-class center point is located to form a target class;
specifically, in the K-means clustering algorithm, non-class center points in all classes need to be respectively assigned to the class in which the class center point closest to the non-class center point is located, and a target class is formed after assignment is completed.
S303, calculating the average value of all MME feature objects in the target class, judging whether the average value is the same as the class center point of the target class, if so, stopping, and determining a classifier; if not, reducing the class center point of the target class to be a non-class center point of the target class, taking the average value as the class center point of the target class, taking the target class as an initial class, and returning to the step S302.
Specifically, the average value of all MME feature objects in the target class is calculated, whether the average value in the current target class is the current class center is determined, if not, the class center point needs to be reduced to the non-class center point, and the average value is used as a new class center point, then the step returns to S302 to continue calculating the distance and distributing to form a new target class, and when the average value in the target class is the center point, the cycle is stopped to determine the classifier.
In order to improve the classification effect and further improve the accuracy of spectrum sensing, an embodiment of the present invention provides a specific spectrum sensing method based on a K-means algorithm, where based on the above embodiment, the embodiment of the present invention further includes, after S203:
decomposing the signal vector of the second sensing matrix into I, Q parts to obtain a third sensing matrix;
then, the calculating to obtain the MME characteristics of each second sensing matrix includes:
and calculating the MME characteristics of each third perception matrix.
Specifically, assume that the sampled signal vector of the ith SU user is Xi=[xi(1)xi(2)...xi(N)]. Mixing XiThe expression is as follows:
Figure GDA0002499827440000091
Figure GDA0002499827440000092
wherein f iscIs carrying frequency, fsIs the sampling frequency. The decomposed group one perceptual matrix in the above embodiment can be expressed as:
Figure GDA0002499827440000093
and performing the same decomposition on the group two and the group three, and obtaining a new covariance matrix by using the decomposed sensing matrix so as to obtain the MME characteristics. The new covariance matrix ensures that there is a correlation (I and Q components) between the time, space, or phase of the received signalThe maximum utilization of the signal correlation is realized, so that the MME characteristic value obtained after decomposition can reflect the specific information of the current signal, the classification effect is improved, and the detection performance is improved.
Referring to FIG. 4, it is a graph showing the experimental effect of this example, where PdTo detect the probability, PfIs the false alarm probability. It can be seen that the detection effect using RMET as a feature is better than the detection effect using energy as a feature under the condition of SNR-12. And after the signal decomposition is added, the detection performance is further improved.
The following specific spectrum sensing method based on the K-means algorithm provided by the embodiment of the present invention specifically includes:
step 1, acquiring a training signal;
during training, firstly, when a Primary User (PU) exists, a Secondary User (SU) is used for collecting signal data, and then when the primary user does not exist, the secondary user is used for collecting signal data, wherein the two kinds of signal data form a training signal.
Specifically, assume that there are K SUs in a cognitive radio network and the number of sampling points per SU is N. H0Expressed as signal absence, H1Indicating that a signal is present. So that the received training signal can be transmitted by
Figure GDA0002499827440000101
And (4) showing.
Wherein s isi(n) denotes a Primary User (PU) signal, wi(n) represents a mean of 0 and a variance of σ2A gaussian white noise signal.
Step 2, determining a first perception matrix;
in particular, assume Xi=[xi(1)xi(2)....xi(N)]The sampling matrix representing the ith SU user, the sensing matrix in a sensing time period can be represented as
Figure GDA0002499827440000102
And 3, grouping the secondary users to obtain the MME characteristics of each group of secondary users.
It should be noted that the covariance matrix can be obtained according to the sensing matrix, so as to obtain the MME characteristics.
The covariance matrix of the above-mentioned perceptual matrix can be expressed as
Figure GDA0002499827440000103
Selecting
Figure GDA0002499827440000104
As a signature of the MME. Wherein λmaxIs the maximum eigenvalue, λ, of the covariance matrixminIs the minimum eigenvalue.
After the secondary users are grouped, the MME characteristics T of each group are obtained by the method, and the corresponding relation between a specific user group and T is shown in table 1.
TABLE 1
Figure GDA0002499827440000105
The sampling vector X may be set as described abovei=[xi(1)xi(2)....xi(N)]IQ decomposition is performed to expand the dimension, and thus the dimension of the matrix is expanded. Specifically, for Xi=[xi(1)xi(2)....xi(N)]The expression of IQ decomposition by vector is
Figure GDA0002499827440000111
Figure GDA0002499827440000112
Wherein f iscIs carrying frequency, fsIs the sampling frequency. The decomposed perceptual matrix can be expressed as:
Figure GDA0002499827440000113
with classical sample covariance matrix R (N)Ratio, new sample covariance matrix RY(N) ensures maximum exploitation of the signal correlation between the temporal, spatial or phase correlations (I and Q components) present in the received signal.
By the IQ decomposition method, users are grouped to obtain a plurality of sensing matrixes, IQ decomposition can be performed on vectors in each matrix, so that a new covariance matrix and new MME characteristics are obtained by using the sensing matrixes after IQ decomposition, and the corresponding relation between a specific user group and T and the new T is shown in table 2, wherein GMME represents characteristic values obtained after IQ decomposition.
TABLE 2
Figure GDA0002499827440000114
Step 4, determining a classifier by using a K mean algorithm;
the calculation method may specifically refer to S301 to S303 in the above embodiments, and details are not repeated here.
To finally obtain the formula
Figure GDA0002499827440000121
If the formula is satisfied, it is judged that*If not, then determine A*=0。
Let S1 and S0 denote the states of the PU, respectively. The availability of a channel, a, may be defined as:
Figure GDA0002499827440000122
when a ═ 0 indicates that the channel cannot be used, a ═ 1 indicates that the channel can be used.
Step 5, determining a characteristic value of the test matrix;
specifically, the test signal is collected in the unknown network, and the test matrix and the eigenvalue of the test signal are determined, so as to obtain the eigenvector, where the step of calculating the eigenvalue of the test signal is substantially the same as the step of calculating the eigenvalue of the training signal, and reference may be specifically made to steps 1 to 3, which are not described herein again. From the eigenvalues, the test matrix can be defined as T ═ { T ═ T1,T2,...,TL}. Where L represents the number of training features.
Step 6, calculating a detection result;
the test matrix is led into a classifier to obtain a classification result, and a formula is used
Figure GDA0002499827440000123
Determining a detection probability PdAnd false alarm probability Pfa
Referring to fig. 5, the following describes a spectrum sensing apparatus based on a K-means algorithm according to an embodiment of the present invention, where the embodiment of the present invention specifically includes:
an MME feature calculation module 401, configured to obtain a training signal, and calculate an MME feature of the training signal;
specifically, during training, a Secondary User (SU) is used to collect signal data when a Primary User (PU) is present, and then a secondary user is used to collect signal data when the primary user is absent, wherein the two signal data form a training signal.
Suppose there are K SUs in a cognitive radio network and the number of samples per SU is N. We assume H0Expressed as signal absence, H1Indicating that a signal is present. The training signal can therefore be represented by:
Figure GDA0002499827440000131
wherein s isi(n) denotes a Primary User (PU) signal, wi(n) represents a mean of 0 and a variance of σ2A gaussian white noise signal.
The MME feature calculation module 401 obtains a sensing matrix within a sensing time by using the training signal, thereby calculating a covariance matrix, and obtaining an MME feature by using a ratio of a maximum eigenvalue to a minimum eigenvalue of the covariance matrix.
A classifier calculation module 402, configured to obtain a classifier by using a K-means clustering algorithm and the MME features;
specifically, the classifier calculation module 402 divides the sensing matrix into a plurality of groups, so as to obtain a plurality of MME features, determines a data object set by using the MME features, and obtains a final classifier by using the data object set and the K-means algorithm.
A test MME characteristic calculation module 403, configured to obtain a test signal, and calculate a test MME characteristic of the test signal;
specifically, after the test signal is acquired, the test MME characteristic calculation module 403 determines an MME characteristic of the test signal, and constructs a characteristic matrix.
A classifying module 404, configured to classify the test MME features by using the classifier to obtain a classification result, and calculate a detection probability by using the classification result.
Specifically, the classification module 404 imports the feature matrix into a classifier to obtain a classification result, and calculates a detection probability, that is, calculates a detection performance index, using the classification result.
Meanwhile, the classification result can be further calculated, and the false alarm probability of the classification result can be calculated, so that the probability that the system is mistaken for the existence of the master user when the master user does not exist can be known.
According to the scheme, the spectrum sensing device based on the K-means algorithm provided by the embodiment of the invention has the advantages that the MME feature calculation module 401 calculates the MME features of the training signals, the classifier calculation module 402 obtains the classifier by using the K-means algorithm, and the classification module 404 guides the test MME features of the test signals into the classifier after the classifier is trained to classify the test MME features to obtain the classification result. By combining the MME characteristics with the K-means algorithm, the detection performance of spectrum sensing is improved.
Different from the foregoing embodiments, the embodiment of the present invention provides a specific spectrum sensing device based on a K-means algorithm, and specifically defines and explains the MME feature calculation module 401 in the foregoing embodiments, and the contents of other modules are substantially the same as those in the foregoing embodiments, and the specific contents may refer to the foregoing embodiments, and are not described herein again. The MME feature calculation module 401 specifically includes:
the training signal acquisition unit is used for acquiring a first signal characteristic and a second signal characteristic, and the first signal characteristic and the second signal characteristic form a training signal; the first signal characteristic is a signal characteristic acquired by a secondary user when a primary user exists, and the second signal characteristic is a signal characteristic acquired by the secondary user when the primary user does not exist;
specifically, during training, the training signal acquisition unit first acquires signal data by using a Secondary User (SU) when a Primary User (PU) exists, and then acquires signal data by using a secondary user when the primary user does not exist, and the two types of signal data constitute a training signal. The training signal may be represented as
Figure GDA0002499827440000141
Wherein s isi(n) denotes a Primary User (PU) signal, wi(n) represents a mean of 0 and a variance of σ2A gaussian white noise signal. H0Expressed as signal absence, H1Indicated as signal presence; m is the number of sub-users, and the number of sampling points of each sub-user is N.
The first perception matrix calculation unit is used for calculating a first perception matrix of a plurality of secondary users in a perception time period by utilizing the training signal;
specifically, Xi=[xi(1)xi(2)....xi(N)]A sampling matrix representing the ith SU, the sensing matrix of M secondary users in a sensing time period can be represented as:
Figure GDA0002499827440000142
the grouping unit is used for dividing the first sensing matrix into a first preset number of second sensing matrixes;
specifically, the grouping unit groups users to obtain a grouped perception matrix. The number of the packets is set according to actual conditions. Assuming that 9 secondary users cooperatively sense, the sampling point is 1000, and the sampling point is divided into 3 groups in advance;
the data collected by these 9 sub-users is a matrix X of 9 rows and 1000 columns,
Figure GDA0002499827440000151
the method comprises the following three groups:
group one:
Figure GDA0002499827440000152
and a second group:
Figure GDA0002499827440000153
and (3) group III:
Figure GDA0002499827440000154
and the MME characteristic calculating unit is used for calculating and obtaining the MME characteristics of each second perception matrix.
Specifically, the MME feature calculation unit obtains the covariance matrix of each second sensing matrix by using each second sensing matrix, thereby obtaining the MME features of each group of users
Figure GDA0002499827440000155
Wherein is λmaxMaximum eigenvalue of covariance matrix, λminIs the minimum eigenvalue.
The embodiment of the present invention provides a specific spectrum sensing device based on a K-means algorithm, which is different from the above embodiments, the embodiment of the present invention specifically defines and explains the classifier calculation module 402 in the above embodiments, the contents of other modules are substantially the same as those in the above embodiments, and the specific contents may refer to the above embodiments, and are not described herein again. The classifier computation module 402 specifically includes:
a class center determining unit, configured to randomly determine, in a data object set formed by the MME features, a second preset number of MME feature objects as class center points of the second preset number, and form an initial class of the second preset number; wherein each class comprises a class central point and a non-class central point;
specifically, the MME features form a data object set, and the class center determining unit randomly selects K objects in the data object set as class center points, thereby obtaining K classes, where one center point is in the class and the other points are non-center points.
The target class forming unit is used for calculating the distance from the non-class center point in each initial class to the center point of each class, and distributing each non-class center point to the class where the class center point closest to each non-class center point is located to form a target class;
specifically, in the K-means clustering algorithm, the target class forming unit needs to allocate non-class center points in all classes to the class where the class center point closest to the target class is located, and form the target class after allocation is completed.
The judging unit is used for calculating the average value of all MME characteristic objects in the target class, judging whether the average value is the same as the class center point of the target class or not, if so, stopping and determining the classifier; if not, reducing the class center point of the target class into a non-class center point of the target class, taking the average value as the class center point of the target class, taking the target class as an initial class, and continuing to call the target class forming unit.
Specifically, the average value of all MME feature objects in the target class is calculated, the determining unit determines whether the average value in the current target class is the current class center, if not, the class center point needs to be reduced to the non-class center point, and the average value is used as a new class center point, then the step returns to S302 to continue calculating the distance and distributing to form a new target class, and when the average value in the target class is the center point, the cycle is stopped to determine the classifier.
In order to improve the classification effect and further improve the accuracy of spectrum sensing, an embodiment of the present invention provides a specific spectrum sensing apparatus based on a K-means algorithm, and based on the above embodiment, the embodiment of the present invention further includes:
the decomposition module is used for decomposing the signal vector of the second sensing matrix into I, Q parts after the first sensing matrix is divided into a preset number of second sensing matrices to obtain a third sensing matrix;
the MME feature calculating unit is specifically configured to:
and calculating the MME characteristics of each third perception matrix.
Specifically, assume that the sampled signal vector of the ith SU user is Xi=[xi(1)xi(2)...xi(N)]. The decomposition module decomposes XiThe expression is as follows:
Figure GDA0002499827440000171
Figure GDA0002499827440000172
wherein f iscIs carrying frequency, fsIs the sampling frequency. The decomposed group one perceptual matrix in the above embodiment can be expressed as:
Figure GDA0002499827440000173
and performing the same decomposition on the group two and the group three, and obtaining a new covariance matrix by using the decomposed sensing matrix so as to obtain the MME characteristics. The new covariance matrix ensures the maximum utilization of the signal correlation among the time, space or phase correlations (I and Q components) of the received signal, so the MME eigenvalue obtained after decomposition can reflect the specific information of the current signal better, the classification effect is improved, and the detection performance is improved.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (6)

1. A frequency spectrum sensing method based on a K-means algorithm is characterized by comprising the following steps:
acquiring a training signal, and calculating to obtain the MME characteristics of the training signal;
obtaining a classifier by using a K mean value clustering algorithm and the MME characteristics;
acquiring a test signal, and calculating to obtain the test MME characteristics of the test signal;
classifying the characteristics of the test MME by using the classifier to obtain a classification result, and calculating the detection probability by using the classification result;
the acquiring of the training signal and the calculating of the MME characteristic of the training signal include:
acquiring a first signal characteristic and a second signal characteristic, wherein the first signal characteristic and the second signal characteristic form a training signal; the first signal characteristic is a signal characteristic acquired by a secondary user when a primary user exists, and the second signal characteristic is a signal characteristic acquired by the secondary user when the primary user does not exist;
calculating to obtain a first perception matrix of a plurality of secondary users in a perception time period by using the training signal;
dividing the first sensing matrix into a first preset number of second sensing matrixes;
calculating to obtain the MME characteristics of each second perception matrix;
and, utilize K mean value clustering algorithm and said MME characteristic to obtain the classifier, including:
s301, randomly determining a second preset number of MME feature objects as class center points of the second preset number in a data object set formed by the MME features to form a second preset number of initial classes; wherein each class comprises a class central point and a non-class central point;
s302, calculating the distance from the non-class center point in each initial class to the center point of each class, and distributing each non-class center point to the class where the class center point closest to each non-class center point is located to form a target class;
s303, calculating the average value of all MME feature objects in the target class, judging whether the average value is the same as the class center point of the target class, if so, stopping, and determining a classifier; if not, reducing the class center point of the target class to be a non-class center point of the target class, taking the average value as the class center point of the target class, taking the target class as an initial class, and returning to the step S302.
2. The spectrum sensing method according to claim 1, wherein after dividing the first sensing matrix into a preset number of second sensing matrices, the method further comprises:
decomposing the signal vector of the second sensing matrix into I, Q parts to obtain a third sensing matrix;
then, the calculating to obtain the MME characteristics of each second sensing matrix includes:
and calculating the MME characteristics of each third perception matrix.
3. The spectrum sensing method according to any one of claims 1 to 2, wherein after calculating the detection probability, the method further comprises:
and calculating the false alarm probability.
4. A spectrum sensing device based on a K-means algorithm is characterized by comprising:
the MME characteristic calculation module is used for acquiring a training signal and calculating the MME characteristics of the training signal;
the classifier calculation module is used for obtaining a classifier by utilizing a K mean value clustering algorithm and the MME characteristics;
the test MME characteristic calculation module is used for acquiring a test signal and calculating the test MME characteristic of the test signal;
the classification module is used for classifying the characteristics of the test MME by using the classifier to obtain a classification result and calculating the detection probability by using the classification result;
wherein, the MME characteristic calculation module comprises:
the training signal acquisition unit is used for acquiring a first signal characteristic and a second signal characteristic, and the first signal characteristic and the second signal characteristic form a training signal; the first signal characteristic is a signal characteristic acquired by a secondary user when a primary user exists, and the second signal characteristic is a signal characteristic acquired by the secondary user when the primary user does not exist;
the first perception matrix calculation unit is used for calculating a first perception matrix of a plurality of secondary users in a perception time period by utilizing the training signal;
the grouping unit is used for dividing the first sensing matrix into a first preset number of second sensing matrixes;
the MME characteristic calculating unit is used for calculating and obtaining the MME characteristics of each second perception matrix;
and, the classifier computation module includes:
a class center determining unit, configured to randomly determine, in a data object set formed by the MME features, a second preset number of MME feature objects as class center points of the second preset number, and form an initial class of the second preset number; wherein each class comprises a class central point and a non-class central point;
the target class forming unit is used for calculating the distance from the non-class center point in each initial class to the center point of each class, and distributing each non-class center point to the class where the class center point closest to each non-class center point is located to form a target class;
the judging unit is used for calculating the average value of all MME characteristic objects in the target class, judging whether the average value is the same as the class center point of the target class or not, if so, stopping and determining the classifier; if not, reducing the class center point of the target class into a non-class center point of the target class, taking the average value as the class center point of the target class, taking the target class as an initial class, and continuing to call the target class forming unit.
5. The spectrum sensing apparatus of claim 4, further comprising:
the decomposition module is used for decomposing the signal vector of the second sensing matrix into I, Q parts after the first sensing matrix is divided into a preset number of second sensing matrices to obtain a third sensing matrix;
the MME feature calculating unit is specifically configured to:
and calculating the MME characteristics of each third perception matrix.
6. The spectrum sensing apparatus of any one of claims 4 to 5, further comprising:
and the false alarm probability calculation module is used for calculating the false alarm probability after calculating the detection probability.
CN201710706974.5A 2017-08-17 2017-08-17 Spectrum sensing method and device based on K-means algorithm Active CN107395301B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710706974.5A CN107395301B (en) 2017-08-17 2017-08-17 Spectrum sensing method and device based on K-means algorithm

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710706974.5A CN107395301B (en) 2017-08-17 2017-08-17 Spectrum sensing method and device based on K-means algorithm

Publications (2)

Publication Number Publication Date
CN107395301A CN107395301A (en) 2017-11-24
CN107395301B true CN107395301B (en) 2020-09-11

Family

ID=60353274

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710706974.5A Active CN107395301B (en) 2017-08-17 2017-08-17 Spectrum sensing method and device based on K-means algorithm

Country Status (1)

Country Link
CN (1) CN107395301B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108494509A (en) * 2018-03-09 2018-09-04 广东工业大学 A kind of cooperative frequency spectrum sensing method and device
CN108566254A (en) * 2018-03-27 2018-09-21 广东工业大学 A kind of frequency spectrum sensing method and device
CN108462544B (en) * 2018-03-27 2021-09-17 广东工业大学 Spectrum sensing method and device
CN108712222A (en) * 2018-05-17 2018-10-26 广东工业大学 A kind of cooperative frequency spectrum sensing method and relevant apparatus
CN108736992A (en) * 2018-05-17 2018-11-02 广东工业大学 A kind of cooperative frequency spectrum sensing method and relevant apparatus
CN108768563A (en) * 2018-05-17 2018-11-06 广东工业大学 A kind of cooperative frequency spectrum sensing method and relevant apparatus
CN109004997A (en) * 2018-08-09 2018-12-14 广东工业大学 A kind of frequency spectrum sensing method, device and computer readable storage medium
CN109309538A (en) * 2018-08-28 2019-02-05 广东工业大学 A kind of frequency spectrum sensing method, device, equipment, system and storage medium
CN109743121A (en) * 2019-03-01 2019-05-10 广东工业大学 A kind of channel occupation status detection method, device, electronic equipment and storage medium
CN112003662B (en) * 2020-06-24 2023-04-18 常州工学院 Cooperative spectrum sensing method and device based on dimensionality reduction and clustering in cognitive network

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103166723A (en) * 2013-03-18 2013-06-19 广东工业大学 Cognitive radio sensor network spectrum sensing method based on extensible correlation function
CN103326797A (en) * 2013-06-21 2013-09-25 上海交通大学 Cooperation type frequency spectrum sensing method in cognitive network
CN104135327A (en) * 2014-07-10 2014-11-05 上海大学 Spectrum sensing method based on support vector machine

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8515473B2 (en) * 2007-03-08 2013-08-20 Bae Systems Information And Electronic Systems Integration Inc. Cognitive radio methodology, physical layer policies and machine learning

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103166723A (en) * 2013-03-18 2013-06-19 广东工业大学 Cognitive radio sensor network spectrum sensing method based on extensible correlation function
CN103326797A (en) * 2013-06-21 2013-09-25 上海交通大学 Cooperation type frequency spectrum sensing method in cognitive network
CN104135327A (en) * 2014-07-10 2014-11-05 上海大学 Spectrum sensing method based on support vector machine

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
A machine learning based spectrum-sensing algorithm using sample covariance matrix;Haozhou Xue 等;《2015 10th International Conference on Communications and Networking in China (ChinaCom)》;20160623;全文 *
K-mean Clustering based Cooperative Spectrum Sensing in Generalized k-μ Fading Channels;Vaibhav Kumar 等;《2016 Twenty Second National Conference on Communication (NCC)》;20160908;第1-5页 *
Machine learning techniques with probability vector for cooperative spectrum sensing in cognitive radio networks;Yingqi Lu, 等;《2016 IEEE Wireless Communications and Networking Conference》;20160915;全文 *
无线认知传感器网络的研究;王永华 等;《计算机科学》;20110730;第38卷(第7期);全文 *

Also Published As

Publication number Publication date
CN107395301A (en) 2017-11-24

Similar Documents

Publication Publication Date Title
CN107395301B (en) Spectrum sensing method and device based on K-means algorithm
CN107360577B (en) Frequency spectrum sensing method and device based on machine learning
CN107733541B (en) Spectrum sensing method, device, equipment and computer readable storage medium
CN102291186B (en) Frequency spectrum perceiving method based on estimation of signal arrival direction
KR101271430B1 (en) Method and apparatus for detecting received signal in wireless communication systems
CN108462544B (en) Spectrum sensing method and device
JP5624847B2 (en) Signal detection apparatus and signal detection method
CN105978644B (en) Star based on cuckoo searching algorithm ground cognitive system frequency spectrum access method
CN107426736B (en) Cognitive radio frequency spectrum sensing method and system
CN107071788B (en) Spectrum sensing method and device in cognitive wireless network
CN113098604B (en) Visible light communication spectrum sensing system and method
CN112994813B (en) Adaptive sampling frequency spectrum sensing method and related device
Geng et al. Spectrum sensing for cognitive radio based on feature extraction and deep learning
CN107171752B (en) Cognitive radio frequency spectrum sensing method and system
Zhang et al. A modified cyclostationary spectrum sensing based on softmax regression model
Patil et al. Performance analysis of energy detection method in spectrum sensing using static & variable threshold level for 3G/4G/VoLTE
CN103117821A (en) Weighing cooperation spectrum sensing method based on rayleigh quotient
CN108235328B (en) Automatic spectrum re-sensing method, system, computer readable storage medium and terminal
US9231668B2 (en) Radio apparatus and method of operating the same
CN109672484B (en) Opportunity resource intelligent exploration method
KR101686974B1 (en) 2-Stage Reporting Method for Cooperative Spectrum Sensing in Cognitive Radio Networks and Apparatus thereof
Kashef et al. Spectrum sensing based on GoF testing techniques
Reypnazarov et al. Research of Energy Detection Method in Spectrum Sensing in Cognitive Radio Networks
CN109347583A (en) Cooperation frequency spectrum sensing method based on nuclear space optimization under noise uncertain condition
Ivrigh et al. Spectrum sensing for cognitive radio networks based on blind source separation

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant