Movatterモバイル変換


[0]ホーム

URL:


CN107395301B - A kind of spectrum sensing method and device based on K-means algorithm - Google Patents

A kind of spectrum sensing method and device based on K-means algorithm
Download PDF

Info

Publication number
CN107395301B
CN107395301BCN201710706974.5ACN201710706974ACN107395301BCN 107395301 BCN107395301 BCN 107395301BCN 201710706974 ACN201710706974 ACN 201710706974ACN 107395301 BCN107395301 BCN 107395301B
Authority
CN
China
Prior art keywords
class
mme
signal
calculating
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.)
Expired - Fee Related
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 TechnologyfiledCriticalGuangdong University of Technology
Priority to CN201710706974.5ApriorityCriticalpatent/CN107395301B/en
Publication of CN107395301ApublicationCriticalpatent/CN107395301A/en
Application grantedgrantedCritical
Publication of CN107395301BpublicationCriticalpatent/CN107395301B/en
Expired - Fee Relatedlegal-statusCriticalCurrent
Anticipated expirationlegal-statusCritical

Links

Images

Classifications

Landscapes

Abstract

Translated fromChinese

本发明公开了一种基于K均值算法的频谱感知方法,获取训练信号,计算得到所述训练信号的MME特征;利用K均值聚类算法与所述MME特征得到分类器;获取测试信号,计算得到所述测试信号的测试MME特征;利用所述分类器对所述测试MME特征分类得到分类结果,利用所述分类结果计算检测概率。可见,本发明实施例提供的一种基于K均值算法的频谱感知方法,计算训练信号的MME特征,然后利用K均值算法得到分类器,训练好分类器后再将测试信号的测试MME特征导入分类器进行分类得到分类结果。利用MME特征与K均值算法结合,提高了频谱感知的检测性能。本发明还公开了一种基于K均值算法的频谱感知装置,同样可以实现上述技术效果。

Figure 201710706974

The invention discloses a spectrum sensing method based on a K-means algorithm, which acquires a training signal, and calculates the MME feature of the training signal; uses a K-means clustering algorithm and the MME feature to obtain a classifier; obtains a test signal, calculates and obtains Test MME features of the test signal; use the classifier to classify the test MME features to obtain a classification result, and use the classification result to calculate a detection probability. It can be seen that a spectrum sensing method based on the K-means algorithm provided by the embodiment of the present invention calculates the MME feature of the training signal, then uses the K-means algorithm to obtain a classifier, and after the classifier is trained, the test MME feature of the test signal is imported into the classification classifier to get the classification result. The detection performance of spectrum sensing is improved by combining MME features with K-means algorithm. The invention also discloses a spectrum sensing device based on the K-means algorithm, which can also achieve the above technical effects.

Figure 201710706974

Description

Translated fromChinese
一种基于K均值算法的频谱感知方法与装置A kind of spectrum sensing method and device based on K-means algorithm

技术领域technical field

本发明涉及无线电技术领域,更具体地说,涉及一种基于K均值算法的频谱感知方法。The present invention relates to the field of radio technology, and more particularly, to a spectrum sensing method based on K-means algorithm.

背景技术Background technique

随着无线电技术的进步和发展,各行各业对无线电频率的需求越来越多,频谱资源匮乏的问题日益严重。目前,频谱资源采用国家统一分配授权的管理模式,将频谱分为两种类型:授权频段和非授权频段。其中,授权频段占据着大部分频谱资源,如电视广播频段,但不少授权频段处于空闲状态;开放使用的非授权频段占整个频谱资源的很少一部分,如无线局域网、无线城域网等无线网络大多使用非授权频段在工作,该频段上的用户很多,业务量也很大,无线电频段已基本趋于饱和。所以说,频谱资源的匮乏并不是真正意义上的频谱资源不足,更多是由频谱利用率过低造成的。With the progress and development of radio technology, all walks of life have more and more demands for radio frequencies, and the problem of lack of spectrum resources is becoming more and more serious. At present, spectrum resources adopt the national unified allocation and authorization management mode, and the spectrum is divided into two types: licensed frequency bands and unlicensed frequency bands. Among them, licensed frequency bands occupy most of the spectrum resources, such as TV broadcasting frequency bands, but many licensed frequency bands are idle; unlicensed frequency bands that are open for use account for a small part of the entire spectrum resources, such as wireless local area networks, wireless metropolitan area networks, etc. Most of the networks work in unlicensed frequency bands. There are many users in this frequency band, and the traffic volume is also very large. The radio frequency band has basically become saturated. Therefore, the lack of spectrum resources is not the lack of spectrum resources in the true sense, but is more caused by the low utilization rate of spectrum.

想要提高频谱的利用率,首先要找到准确的频谱检测的方法。目前比较经典的频谱检测方法有能量检测算法,但是,在能量检测算法中由于判决门限比较难确定,在低信噪比环境下容易受到噪声不确定性影响产生误判从而导致检测性能急剧下降,即使是能够自适应的门限值,检测器也不能做出正确的判断,因此频谱的检测结果不够准确。In order to improve the utilization of the spectrum, we must first find an accurate spectrum detection method. At present, the classical spectrum detection method is the energy detection algorithm. However, in the energy detection algorithm, the decision threshold is difficult to determine, and it is easily affected by noise uncertainty in a low signal-to-noise ratio environment, resulting in misjudgment, which leads to a sharp decline in detection performance. Even if it is an adaptive threshold value, the detector cannot make a correct judgment, so the detection result of the spectrum 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.

发明内容SUMMARY OF THE INVENTION

本发明的目的在于提供一种基于K均值算法的频谱感知方法,以得到准确的频谱检测结果。The purpose of the present invention is to provide a spectrum sensing method based on K-means algorithm to obtain accurate spectrum detection results.

为实现上述目的,本发明实施例提供了如下技术方案:To achieve the above purpose, the embodiments of the present invention provide the following technical solutions:

一种基于K均值算法的频谱感知方法,包括:A spectrum sensing method based on K-means algorithm, comprising:

获取训练信号,计算得到所述训练信号的MME特征;Obtaining a training signal, and calculating the MME feature of the training signal;

利用K均值聚类算法与所述MME特征得到分类器;Using K-means clustering algorithm and the MME feature to obtain a classifier;

获取测试信号,计算得到所述测试信号的测试MME特征;Obtain a test signal, and calculate the test MME feature of the test signal;

利用所述分类器对所述测试MME特征分类得到分类结果,利用所述分类结果计算检测概率。Use the classifier to classify the test MME features to obtain a classification result, and use the classification result to calculate a detection probability.

其中,所述获取训练信号,计算得到所述训练信号的MME特征,包括:Wherein, the acquisition of the training signal is calculated to obtain the MME feature of the training signal, including:

采集第一信号特征与第二信号特征,所述第一信号特征与所述第二信号特征构成训练信号;其中所述第一信号特征为主用户存在时,次用户采集到的信号特征,所述第二信号特征为所述主用户不存在时,次用户采集到的信号特征;Collect the first signal feature and the second signal feature, and the first signal feature and the second signal feature constitute a training signal; wherein the first signal feature is the signal feature collected by the secondary user when the primary user exists, so the The second signal feature is the signal feature collected by the secondary user when the primary user does not exist;

利用所述训练信号计算得到一个感知时间段内多个次用户的第一感知矩阵;Using the training signal to calculate and obtain the first perception matrices of multiple secondary users within a perception time period;

将所述第一感知矩阵分为第一预设个数的第二感知矩阵;dividing the first perception matrix into a first preset number of second perception matrices;

计算得到每个第二感知矩阵的MME特征。Calculate the MME feature of each second perceptual matrix.

其中,利用K均值聚类算法与所述MME特征得到分类器,包括:Wherein, using the K-means clustering algorithm and the MME feature to obtain a classifier, including:

S301,在由所述MME特征构成的数据对象集中,随机确定第二预设个数的MME特征对象作为第二预设个数的类中心点,形成第二预设个数的初始类;其中,每个类中包括类中心点与非类中心点;S301, randomly determining a second preset number of MME feature objects as the class center points of the second preset number in the data object set composed of the MME features to form the second preset number of initial classes; wherein , each class includes class center points and non-class center points;

S302,计算每个初始类中的非类中心点到每个类中心点的距离,将每个非类中心点分配到距离每个非类中心点最近的类中心点所在的类,形成目标类;S302: Calculate the distance from the non-class center point in each initial class to each class center point, assign each non-class center point to the class where the class center point closest to each non-class center point is located, and form a target class ;

S303,计算目标类中所有MME特征对象的平均值,判断所述平均值是否与所述目标类的类中心点相同,若是,则停止,确定分类器;若否,则将所述目标类的类中心点还原为所述目标类的非类中心点,将所述平均值作为所述目标类的类中心点,将所述目标类作为初始类,返回S302。S303, calculate the average value of all MME feature objects in the target class, and determine whether the average value is the same as the class center point of the target class, if so, stop and determine the classifier; The class center point is restored to the non-class center point of the target class, the average value is taken as the class center point of the target class, the target class is taken as the initial class, and the process returns to S302.

其中,将所述第一感知矩阵分为预设个数的第二感知矩阵之后,还包括:Wherein, after dividing the first perception matrix into a preset number of second perception matrices, the method further includes:

将所述第二感知矩阵的信号向量分解为I、Q两部分,得到第三感知矩阵;Decomposing the signal vector of the second sensing matrix into two parts, I and Q, to obtain a third sensing matrix;

则所述计算得到每个第二感知矩阵的MME特征,包括:Then the calculation obtains the MME feature of each second perception matrix, including:

计算得到每个第三感知矩阵的MME特征。Calculate the MME feature of each third perceptual matrix.

其中,所述计算检测概率之后,还包括:Wherein, after calculating the detection probability, it also includes:

计算虚警概率。Calculate the false alarm probability.

一种基于K均值算法的频谱感知装置,包括:A spectrum sensing device based on K-means algorithm, comprising:

MME特征计算模块,用于获取训练信号,计算得到所述训练信号的MME特征;The MME feature calculation module is used to obtain the training signal, and calculate the MME feature of the training signal;

分类器计算模块,用于利用K均值聚类算法与所述MME特征得到分类器;A classifier computing module for obtaining a classifier by using the K-means clustering algorithm and the MME feature;

测试MME特征计算模块,用于获取测试信号,计算得到所述测试信号的测试MME特征;The test MME feature calculation module is used to obtain the test signal, and calculate the test MME feature of the test signal;

分类模块,用于利用所述分类器对所述测试MME特征分类得到分类结果,利用所述分类结果计算检测概率。A classification module, configured to use the classifier to classify the test MME features to obtain a classification result, and use the classification result to calculate a detection probability.

其中,所述MME特征计算模块,包括:Wherein, the MME feature calculation module includes:

训练信号采集单元,用于采集第一信号特征与第二信号特征,所述第一信号特征与所述第二信号特征构成训练信号;其中所述第一信号特征为主用户存在时,次用户采集到的信号特征,所述第二信号特征为所述主用户不存在时,次用户采集到的信号特征;A training signal collection unit, configured to collect a first signal feature and a second signal feature, the first signal feature and the second signal feature constitute a training signal; wherein the first signal feature exists when the primary user exists, the secondary user The collected signal feature, the second signal feature is the signal feature collected by the secondary user when the primary user does not exist;

第一感知矩阵计算单元,用于利用所述训练信号计算得到一个感知时间段内多个次用户的第一感知矩阵;a first perceptual matrix calculation unit, configured to use the training signal to calculate and obtain the first perceptual matrices of multiple secondary users within a perceptual time period;

分组单元,用于将所述第一感知矩阵分为第一预设个数的第二感知矩阵;a grouping unit, configured to divide the first perception matrix into a first preset number of second perception matrices;

MME特征计算单元,用于计算得到每个第二感知矩阵的MME特征。The MME feature calculation unit is configured to calculate and obtain the MME feature of each second perception matrix.

其中,所述分类器计算模块,包括:Wherein, the classifier calculation module includes:

类中心确定单元,用于在由所述MME特征构成的数据对象集中,随机确定第二预设个数的MME特征对象作为第二预设个数的类中心点,形成第二预设个数的初始类;其中,每个类中包括类中心点与非类中心点;A class center determination unit, configured to randomly determine a second preset number of MME feature objects in the data object set composed of the MME features as the class center points of the second preset number to form a second preset number of The initial class of ; among them, each class includes class center point and non-class center point;

目标类形成单元,用于计算每个初始类中的非类中心点到每个类中心点的距离,将每个非类中心点分配到距离每个非类中心点最近的类中心点所在的类,形成目标类;The target class forming unit is used to calculate the distance from the non-class center point in each initial class to each class center point, and assign each non-class center point to the location of the class center point closest to each non-class center point. class, form the target class;

判断单元,计算目标类中所有MME特征对象的平均值,判断所述平均值是否与所述目标类的类中心点相同,若是,则停止,确定分类器;若否,则将所述目标类的类中心点还原为所述目标类的非类中心点,将所述平均值作为所述目标类的类中心点,将所述目标类作为初始类,继续调用所述目标类形成单元。The judgment unit calculates the average value of all MME feature objects in the target class, and judges whether the average value is the same as the class center point of the target class, if so, stop and determine the classifier; The class center point of is restored to the non-class center point of the target class, the average value is taken as the class center point of the target class, the target class is taken as the initial class, and the target class forming unit is continuously called.

其中,还包括:Among them, it also includes:

分解模块,用于将所述第一感知矩阵分为预设个数的第二感知矩阵之后,将所述第二感知矩阵的信号向量分解为I、Q两部分,得到第三感知矩阵;a decomposition module, configured to decompose the signal vector of the second perception matrix into two parts I and Q after dividing the first perception matrix into a preset number of second perception matrices to obtain a third perception matrix;

则所述MME特征计算单元,具体用于:Then the MME feature calculation unit is specifically used for:

计算得到每个第三感知矩阵的MME特征。Calculate the MME feature of each third perceptual matrix.

其中,还包括:Among them, it also includes:

虚警概率计算模块,用于计算检测概率之后,计算虚警概率。The false alarm probability calculation module is used to calculate the false alarm probability after the detection probability is calculated.

通过以上方案可知,本发明提供一种基于K均值算法的频谱感知方法,获取训练信号,计算得到所述训练信号的MME特征;利用K均值聚类算法与所述MME特征得到分类器;获取测试信号,计算得到所述测试信号的测试MME特征;利用所述分类器对所述测试MME特征分类得到分类结果,利用所述分类结果计算检测概率。It can be seen from the above solutions that the present invention provides a spectrum sensing method based on K-means algorithm, obtains a training signal, and calculates the MME feature of the training signal; uses the K-means clustering algorithm and the MME feature to obtain a classifier; obtains a test signal, and calculate the test MME feature of the test signal; use the classifier to classify the test MME feature to obtain a classification result, and use the classification result to calculate the detection probability.

可见,本发明实施例提供的一种基于K均值算法的频谱感知方法,计算训练信号的MME特征,然后利用K均值算法得到分类器,训练好分类器后再将测试信号的测试MME特征导入分类器进行分类得到分类结果。利用MME特征与K均值算法结合,提高了频谱感知的检测性能。It can be seen that a spectrum sensing method based on the K-means algorithm provided by the embodiment of the present invention calculates the MME feature of the training signal, then uses the K-means algorithm to obtain a classifier, and after the classifier is trained, the test MME feature of the test signal is imported into the classification classifier to get the classification result. The detection performance of spectrum sensing is improved by combining MME features with K-means algorithm.

附图说明Description of drawings

为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to explain the embodiments of the present invention or the technical solutions in the prior art more clearly, the following briefly introduces the accompanying drawings that need to be used in the description of the embodiments or the prior art. Obviously, the accompanying drawings in the following description are only These are some embodiments of the present invention. For those of ordinary skill in the art, other drawings can also be obtained according to these drawings without creative efforts.

图1为本发明实施例公开的一种基于K均值算法的频谱感知方法流程图;1 is a flowchart of a spectrum sensing method based on a K-means algorithm disclosed in an embodiment of the present invention;

图2为本发明实施例公开的一种计算训练信号MME特征的流程图;FIG. 2 is a flowchart of calculating the MME feature of a training signal disclosed in an embodiment of the present invention;

图3为本发明实施例公开的一种计算分类器的流程图;3 is a flowchart of a computing classifier disclosed in an embodiment of the present invention;

图4为本发明实施例公开的一种具体的基于K均值算法的频谱感知方法实验效果图;4 is an experimental effect diagram of a specific K-means algorithm-based spectrum sensing method disclosed in an embodiment of the present invention;

图5为本发明实施例公开的一种基于K均值算法的频谱感知装置结构示意图。FIG. 5 is a schematic structural diagram of a spectrum sensing apparatus based on a K-means algorithm disclosed in an embodiment of the present invention.

具体实施方式Detailed ways

下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, but not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those of ordinary skill in the art without creative efforts shall fall within the protection scope of the present invention.

本发明实施例公开了一种基于K均值算法的频谱感知方法,以得到准确的频谱检测结果。The embodiment of the present invention discloses a spectrum sensing method based on a K-means algorithm, so as to obtain an accurate spectrum detection result.

参见图1,本发明实施例提供的一种基于K均值算法的频谱感知方法,具体包括:Referring to FIG. 1 , a spectrum sensing method based on a K-means algorithm provided by an embodiment of the present invention specifically includes:

S101,获取训练信号,计算得到所述训练信号的MME特征;S101, obtaining a training signal, and calculating the MME feature of the training signal;

具体的,在训练时,首先在主用户(PU)存在时,利用次用户(SU)采集信号数据,然后在主用户不存在时,利用次用户采集信号数据,这两种信号数据构成了训练信号。Specifically, during training, first, when the primary user (PU) exists, the secondary user (SU) is used to collect signal data, and then when the primary user does not exist, the secondary user is used to collect signal data. These two types of signal data constitute training. Signal.

假设在认知无线电网络中有K个SU而且每个SU的采样点数为N。我们假设H0表示为信号不存在,H1表示为信号存在。因此在两种假设下训练信号可由下式表示:Suppose there are K SUs in the cognitive radio network and the number of sampling points for each SU is N. We assume that H0 represents the absence of the signal and H1 represents the presence of the signal. Therefore, under the two assumptions, the training signal can be expressed as:

Figure GDA0002499827440000051
Figure GDA0002499827440000051

其中si(n)表示主用户(PU)信号,wi(n)表示均值为0,方差为σ2高斯白噪声信号。where si (n) represents the primary user (PU) signal, andwi (n) represents the mean value of 0 and the variance of σ2 Gaussian white noise signal.

利用训练信号,得到一个感知时间内的感知矩阵,从而计算出协方差矩阵,利用协方差矩阵的最大特征值与最小特征值之比得到MME特征。Using the training signal, a perceptual matrix in a perceptual time is obtained, thereby calculating the covariance matrix, and using the ratio of the largest eigenvalue to the smallest eigenvalue of the covariance matrix to obtain the MME feature.

S102,利用K均值聚类算法与所述MME特征得到分类器;S102, using the K-means clustering algorithm and the MME feature to obtain a classifier;

具体地,将感知矩阵分为多组,从而得到多个MME特征,利用MME特征确定一个数据对象集,利用数据对象集和K均值算法得到最终的分类器。Specifically, the perception matrix is divided into multiple groups, thereby obtaining multiple MME features, using the MME features to determine a data object set, and using the data object set and K-means algorithm to obtain the final classifier.

S103,获取测试信号,计算得到所述测试信号的测试MME特征;S103, obtain a test signal, and calculate the test MME feature of the test signal;

具体地,获取到测试信号后,确定测试信号的MME特征,并构造特征矩阵。Specifically, after the test signal is acquired, the MME feature of the test signal is determined, and a feature matrix is constructed.

S104,利用所述分类器对所述测试MME特征分类得到分类结果,利用所述分类结果计算检测概率。S104: Use the classifier to classify the test MME features to obtain a classification result, and use the classification result to calculate a detection probability.

具体地,将特征矩阵导入分类器,得到分类结果,并利用分类结果计算检测概率,也就是计算检测性能指标。Specifically, the feature matrix is imported into the classifier, the classification result is obtained, and the detection probability is calculated by using the classification result, that is, the detection performance index is calculated.

同时,还可以进一步对分类结果计算,计算其虚警概率,以便知道主用户不存在时,系统错误的以为主用户存在的概率。At the same time, the classification result can be further calculated to calculate the false alarm probability, so as to know the probability that the system mistakenly believes that the main user exists when the main user does not exist.

通过以上方案可知,本发明实施例提供的一种基于K均值算法的频谱感知方法,计算训练信号的MME特征,然后利用K均值算法得到分类器,训练好分类器后再将测试信号的测试MME特征导入分类器进行分类得到分类结果。利用MME特征与K均值算法结合,提高了频谱感知的检测性能。It can be seen from the above scheme that a spectrum sensing method based on the K-means algorithm provided by the embodiment of the present invention calculates the MME characteristics of the training signal, then uses the K-means algorithm to obtain a classifier, and after the classifier is trained, the test MME of the test signal is used. The feature is imported into the classifier for classification to obtain the classification result. The detection performance of spectrum sensing is improved by combining MME features with K-means algorithm.

本发明实施例提供一种具体的基于K均值算法的频谱感知方法,区别于上述实施例,本发明实施例对上述实施例中S101作了具体的限定与说明,其他步骤内容与上述实施例大致相同,具体内容可以参考上述实施例,此处不再赘述。具体地,参见图2,S101具体包括:The embodiment of the present invention provides a specific spectrum sensing method based on the K-means algorithm. Different from the above-mentioned embodiments, the embodiment of the present invention specifically defines and describes S101 in the above-mentioned embodiment, and the content of other steps is roughly the same as that of the above-mentioned embodiment. The same, the specific content can refer to the above-mentioned embodiments, and details are not repeated here. Specifically, referring to FIG. 2, S101 specifically includes:

S201,采集第一信号特征与第二信号特征,所述第一信号特征与所述第二信号特征构成训练信号;其中所述第一信号特征为主用户存在时,次用户采集到的信号特征,所述第二信号特征为所述主用户不存在时,次用户采集到的信号特征;S201: Collect a first signal feature and a second signal feature, where the first signal feature and the second signal feature constitute a training signal; wherein the first signal feature is the signal feature collected by the secondary user when the primary user exists , the second signal feature is the signal feature collected by the secondary user when the primary user does not exist;

具体地,在训练时,首先在主用户(PU)存在时,利用次用户(SU)采集信号数据,然后在主用户不存在时,利用次用户采集信号数据,这两种信号数据构成了训练信号。训练信号可以表示为

Figure GDA0002499827440000061
其中si(n)表示主用户(PU)信号,wi(n)表示均值为0,方差为σ2高斯白噪声信号。H0表示为信号不存在,H1表示为信号存在;M为次用户的个数,每个次用户的采样点数为N。Specifically, during training, first, when the primary user (PU) exists, the secondary user (SU) is used to collect signal data, and then when the primary user does not exist, the secondary user is used to collect signal data. These two types of signal data constitute training. Signal. The training signal can be expressed as
Figure GDA0002499827440000061
where si (n) represents the primary user (PU) signal, andwi (n) represents the mean value of 0 and the variance of σ2 Gaussian white noise signal. H0 indicates that the signal does not exist, and H1 indicates that the signal exists; M is the number of secondary users, and the number of sampling points for each secondary user is N.

S202,利用所述训练信号计算得到一个感知时间段内多个次用户的第一感知矩阵;S202, using the training signal to calculate and obtain the first perception matrices of multiple secondary users within a perception time period;

具体地,Xi=[xi(1)xi(2)....xi(N)]表示第i个SU的采样矩阵,则在一个感知时间段内M个次用户的感知矩阵可以表示为:

Figure GDA0002499827440000071
Specifically, Xi =[xi (1)xi (2)....xi (N)] represents the sampling matrix of the i-th SU, then the perceptual matrix of M secondary users in a perceptual time period It can be expressed as:
Figure GDA0002499827440000071

S203,将所述第一感知矩阵分为第一预设个数的第二感知矩阵;S203, dividing the first perception matrix into a first preset number of second perception matrices;

具体地,将用户分组,得到分组后的感知矩阵。分组个数根据实际情况设定。假设有9个次用户协作感知,采样点为1000,预设分成3组;那么这9个次用户采集的数据就是一个9行1000列的矩阵X,

Figure GDA0002499827440000072
分成三组:Specifically, users are grouped to obtain a grouped perception matrix. The number of groups is set according to the actual situation. Assuming that there are 9 secondary users for collaborative perception, the sampling point is 1000, and the preset is divided into 3 groups; then the data collected by these 9 secondary users is a matrix X with 9 rows and 1000 columns,
Figure GDA0002499827440000072
Divide into three groups:

组一:Group one:

Figure GDA0002499827440000073
Figure GDA0002499827440000073

组二:Group two:

Figure GDA0002499827440000074
Figure GDA0002499827440000074

组三:Group three:

Figure GDA0002499827440000081
Figure GDA0002499827440000081

S204,计算得到每个第二感知矩阵的MME特征。S204, calculate and obtain the MME feature of each second perception matrix.

具体地,利用每个第二感知矩阵得到每个第二感知矩阵的协方差矩阵,从而得到每组用户的MME特征

Figure GDA0002499827440000082
其中为λmax协方差矩阵的最大特征值,λmin为最小特征值。Specifically, each second perceptual matrix is used to obtain the covariance matrix of each second perceptual matrix, so as to obtain the MME characteristics of each group of users
Figure GDA0002499827440000082
whereλmax is the largest eigenvalue of the covariance matrix, andλmin is the smallest eigenvalue.

本发明实施例提供一种具体的基于K均值算法的频谱感知方法,区别于上述实施例,本发明实施例对上述实施例中S102作了具体的限定与说明,其他步骤内容与上述实施例大致相同,具体内容可以参考上述实施例,此处不再赘述。具体地,参见图3,S102具体包括:The embodiment of the present invention provides a specific spectrum sensing method based on the K-means algorithm. Different from the above-mentioned embodiment, the embodiment of the present invention specifically defines and describes S102 in the above-mentioned embodiment, and the content of other steps is roughly the same as that of the above-mentioned embodiment. The same, the specific content can refer to the above-mentioned embodiments, and details are not repeated here. Specifically, referring to FIG. 3, S102 specifically includes:

S301,在由所述MME特征构成的数据对象集中,随机确定第二预设个数的MME特征对象作为第二预设个数的类中心点,形成第二预设个数的初始类;其中,每个类中包括类中心点与非类中心点;S301, randomly determining a second preset number of MME feature objects as the class center points of the second preset number in the data object set composed of the MME features to form the second preset number of initial classes; wherein , each class includes class center points and non-class center points;

具体地,MME特征构成了一个数据对象集,随机在数据对象集中选择K个对象作为类中心点,从而得到K个类,类中有一个中心点,而其余点为非中心点。Specifically, the MME feature constitutes a data object set, and K objects are randomly selected as the class center points in the data object set, so as to obtain K classes, there is one center point in the class, and the other points are non-center points.

S302,计算每个初始类中的非类中心点到每个类中心点的距离,将每个非类中心点分配到距离每个非类中心点最近的类中心点所在的类,形成目标类;S302: Calculate the distance from the non-class center point in each initial class to each class center point, assign each non-class center point to the class where the class center point closest to each non-class center point is located, and form a target class ;

具体地,在K均值聚类算法中,需要将所有类中的非类中心点分别分配到距离它最近的类中心点所在的类中,分配完成后形成目标类。Specifically, in the K-means clustering algorithm, it is necessary to assign the non-class center points in all classes to the class where the closest class center point is located, and the target class is formed after the assignment is completed.

S303,计算目标类中所有MME特征对象的平均值,判断所述平均值是否与所述目标类的类中心点相同,若是,则停止,确定分类器;若否,则将所述目标类的类中心点还原为所述目标类的非类中心点,将所述平均值作为所述目标类的类中心点,将所述目标类作为初始类,返回S302。S303, calculate the average value of all MME feature objects in the target class, and determine whether the average value is the same as the class center point of the target class, if so, stop and determine the classifier; The class center point is restored to the non-class center point of the target class, the average value is taken as the class center point of the target class, the target class is taken as the initial class, and the process returns to S302.

具体地,计算目标类中所有MME特征对象的平均值,判断当前目标类中的平均值是否就是当前的类中心,如果不是,则需要将类中心点还原为非类中心点,而将平均值作为新的类中心点,然后返回S302继续计算距离并分配形成新的目标类,直到目标类中的平均值就是其中心点时,停止循环确定出分类器。Specifically, calculate the average value of all MME feature objects in the target class, and determine whether the average value in the current target class is the current class center. As the new class center point, then return to S302 to continue calculating the distance and assigning to form a new target class, until the average value in the target class is the center point, stop the loop to determine the classifier.

为了提高分类效果,从而进一步提高频谱感知的准确性,本发明实施例提供一种具体的基于K均值算法的频谱感知方法,基于上述实施例,本发明实施例在S203后还包括:In order to improve the classification effect and further improve the accuracy of spectrum sensing, the embodiment of the present invention provides a specific spectrum sensing method based on the K-means algorithm. Based on the above embodiment, the embodiment of the present invention further includes after S203:

将所述第二感知矩阵的信号向量分解为I、Q两部分,得到第三感知矩阵;Decomposing the signal vector of the second sensing matrix into two parts, I and Q, to obtain a third sensing matrix;

则所述计算得到每个第二感知矩阵的MME特征,包括:Then the calculation obtains the MME feature of each second perception matrix, including:

计算得到每个第三感知矩阵的MME特征。Calculate the MME feature of each third perceptual matrix.

具体地,假设第i个SU用户的采样的信号向量为Xi=[xi(1)xi(2)...xi(N)]。将Xi分解成I和Q两部分,表达式如下:Specifically, it is assumed that the sampled signal vector of the i-th SU user is Xi =[xi (1)xi (2)...xi (N)]. Decompose Xi into two parts I and Q, the expression is as follows:

Figure GDA0002499827440000091
Figure GDA0002499827440000091

Figure GDA0002499827440000092
Figure GDA0002499827440000092

其中fc是携带频率,fs是采样频率。所以上述实施例中分解后的组一的感知矩阵可以表示为:where fc is the carry frequency and fs is the sampling frequency. Therefore, the decomposed perceptual matrix ofgroup 1 in the above embodiment can be expressed as:

Figure GDA0002499827440000093
组二、组三也进行同样分解,利用分解后的感知矩阵得到新的协方差矩阵,从而得到MME特征。新的协方差矩阵中确保了接收信号存在的时间、空间或相位相关(I和Q分量)之间的信号相关性的最大利用,因此分解后得到的MME特征值更能反映当前信号的具体信息,提高了分类效果,从而提高了检测的性能。
Figure GDA0002499827440000093
The second and third groups are also decomposed in the same way, and the new covariance matrix is obtained by using the decomposed perceptual matrix, thereby obtaining the MME feature. The new covariance matrix ensures the maximum utilization of the signal correlation between the time, space or phase correlation (I and Q components) of the received signal, so the MME eigenvalues obtained after decomposition can better reflect the specific information of the current signal , which improves the classification effect and thus the detection performance.

参考图4,为本实施例的实验效果图,其中Pd为检测概率,Pf为虚警概率。可以看出,在SNR=-12条件下,用RMET作为特征的检测效果比用能量作为特征的检测效果好。而且加上信号分解后,其检测性能有了进一步的提升。Referring to FIG. 4 , which is an experimental effect diagram of this embodiment, where Pd is the detection probability, and Pf is the false alarm probability. It can be seen that under the condition of SNR=-12, the detection effect of using RMET as a feature is better than that of using energy as a feature. And after adding signal decomposition, its detection performance has been further improved.

下面对本发明实施提供的一种具体的基于K均值算法的频谱感知方法,具体包括:The following provides a specific spectrum sensing method based on K-means algorithm for implementation of the present invention, which specifically includes:

第1步,获取训练信号;Step 1, obtain the training signal;

在训练时,首先在主用户(PU)存在时,利用次用户(SU)采集信号数据,然后在主用户不存在时,利用次用户采集信号数据,这两种信号数据构成了训练信号。During training, firstly, when the primary user (PU) exists, the secondary user (SU) is used to collect signal data, and then when the primary user does not exist, the secondary user is used to collect signal data. These two signal data constitute the training signal.

具体地,假设在认知无线电网络中有K个SU而且每个SU的采样点数为N。H0表示为信号不存在,H1表示为信号存在。因此接收的训练信号可由

Figure GDA0002499827440000101
表示。Specifically, it is assumed that there are K SUs in the cognitive radio network and the number of sampling points of each SU is N. H0 indicates that the signal is not present, and H1 indicates that the signal is present. Thus the received training signal can be
Figure GDA0002499827440000101
express.

其中si(n)表示主用户(PU)信号,wi(n)表示均值为0,方差为σ2高斯白噪声信号。where si (n) represents the primary user (PU) signal, andwi (n) represents the mean value of 0 and the variance of σ2 Gaussian white noise signal.

第2步,确定第一感知矩阵;Step 2, determine the first perception matrix;

具体地,假设Xi=[xi(1)xi(2)....xi(N)]表示第i个SU用户的采样矩阵,则在一个感知时间段内的感知矩阵可以表示为

Figure GDA0002499827440000102
Specifically, assuming that Xi =[xi (1)xi (2)....xi (N)] represents the sampling matrix of the i-th SU user, then the perceptual matrix in one perceptual time period can be expressed as for
Figure GDA0002499827440000102

第3步,将次用户分组,从而得到每组次用户的MME特征。In the third step, the secondary users are grouped to obtain the MME characteristics of each group of secondary users.

需要说明的是,可以根据感知矩阵得到协方差矩阵,从而得到MME特征。It should be noted that the covariance matrix can be obtained according to the perception matrix, thereby obtaining the MME feature.

上述感知矩阵的协方差矩阵可以表示为

Figure GDA0002499827440000103
选取
Figure GDA0002499827440000104
作为信号的MME特征。其中λmax为协方差矩阵的最大特征值,λmin为最小特征值。The covariance matrix of the above perception matrix can be expressed as
Figure GDA0002499827440000103
select
Figure GDA0002499827440000104
MME features as signals. where λmax is the largest eigenvalue of the covariance matrix, and λmin is the smallest eigenvalue.

将次用户分组后,利用上述方法得到每组的MME特征T,具体用户组与T的对应关系如表1所示。After the secondary users are grouped, the above method is used to obtain the MME feature T of each group, and the corresponding relationship between the specific user group and T is shown in Table 1.

表1Table 1

Figure GDA0002499827440000105
Figure GDA0002499827440000105

需要说明的是,可以将上述的采样向量Xi=[xi(1)xi(2)....xi(N)]进行IQ分解,扩充维数,从而矩阵的维数得到扩充。具体地,对Xi=[xi(1)xi(2)....xi(N)]向量进行的IQ分解的表达式为It should be noted that the above-mentioned sampling vector Xi =[xi (1)xi (2)....xi (N)] can be decomposed by IQ to expand the dimension, so that the dimension of the matrix is expanded . Specifically, the expression for the IQ decomposition of Xi =[xi (1)xi (2)....xi (N)] vector is:

Figure GDA0002499827440000111
Figure GDA0002499827440000111

Figure GDA0002499827440000112
Figure GDA0002499827440000112

其中fc是携带频率,fs是采样频率。所以分解后的感知矩阵可以表示为:where fc is the carry frequency and fs is the sampling frequency. So the decomposed perception matrix can be expressed as:

Figure GDA0002499827440000113
Figure GDA0002499827440000113

与经典样本协方差矩阵R(N)相比,新的样本协方差矩阵RY(N)确保了接收信号中存在的时间,空间或相位相关(I和Q分量)之间的信号相关性的最大利用。Compared to the classical sample covariance matrix R(N), the new sample covariance matrix RY (N) ensures the signal correlation between the temporal, spatial or phase correlations (I and Q components) present in the received signal. maximum use.

通过上述IQ分解的方法,将用户分组,得到多个感知矩阵后,可以将每个矩阵中的向量均进行IQ分解,从而利用IQ分解后感知矩阵得到新的协方差矩阵和新的MME特征,具体用户组与T和新的T之间的对应关系如表2所示,其中GMME表示进行IQ分解后得到的特征值。Through the above IQ decomposition method, after grouping users to obtain multiple perceptual matrices, IQ decomposition can be performed on the vectors in each matrix, so as to use the perceptual matrix after IQ decomposition to obtain a new covariance matrix and a new MME feature. The correspondence between specific user groups and T and new T is shown in Table 2, where GMME represents the eigenvalue obtained after IQ decomposition.

表2Table 2

Figure GDA0002499827440000114
Figure GDA0002499827440000114

第4步,利用K均值算法确定分类器;Step 4, use the K-means algorithm to determine the classifier;

计算方法具体可以参考上述实施例中的S301至S303,此处不再赘述。For the specific calculation method, reference may be made to S301 to S303 in the foregoing embodiment, which will not be repeated here.

最终得到式

Figure GDA0002499827440000121
如果满足该式则判定A*=1,如果不满足则判定A*=0。final formula
Figure GDA0002499827440000121
If this formula is satisfied, it is determined that A* =1, and if it is not satisfied, it is determined that A* =0.

需要说明的是,让S=1和S=0分别表示PU的状态。频道的可用性A可以被定义为:

Figure GDA0002499827440000122
当A=0表示频道不能使用,A=1表示频道可以使用。It should be noted that, let S=1 and S=0 respectively represent the state of the PU. The availability A of a channel can be defined as:
Figure GDA0002499827440000122
When A=0 means the channel cannot be used, A=1 means the channel can be used.

第5步,确定测试矩阵的特征值;Step 5: Determine the eigenvalues of the test matrix;

具体地,在未知网络中采集测试信号,确定测试信号的测试矩阵和特征值,从而得到特征向量,其中计算测试信号的特征值与计算训练信号的特征值的步骤大体相同,具体可以参考第1步至第3步,此处不再赘述。根据特征值,可以定义测试矩阵为T={T1,T2,...,TL}。其中,L表示训练特征的个数。Specifically, the test signal is collected in the unknown network, and the test matrix and eigenvalues of the test signal are determined, so as to obtain the eigenvector, wherein the steps of calculating the eigenvalue of the test signal and calculating the eigenvalue of the training signal are roughly the same. For details, please refer toSection 1. Go to step 3, which will not be repeated here. According to the eigenvalues, the test matrix can be defined as T={T1 , T2 , . . . , TL }. Among them, L represents the number of training features.

第6步计算检测结果;Step 6 Calculate the test results;

将测试矩阵导入分类器中,从而得到分类结果,利用公式Import the test matrix into the classifier to get the classification result, using the formula

Figure GDA0002499827440000123
确定检测概率Pd和虚警概率Pfa
Figure GDA0002499827440000123
The detection probability Pd and the false alarm probability Pfa are determined.

下面对本发明实施例提供的一种基于K均值算法的频谱感知装置进行介绍,参考图5,本发明实施例具体包括:The following describes a spectrum sensing device based on a K-means algorithm provided by an embodiment of the present invention. Referring to FIG. 5 , the embodiment of the present invention specifically includes:

MME特征计算模块401,用于获取训练信号,计算得到所述训练信号的MME特征;The MMEfeature calculation module 401 is used to obtain a training signal, and calculate the MME feature of the training signal;

具体的,在训练时,首先在主用户(PU)存在时,利用次用户(SU)采集信号数据,然后在主用户不存在时,利用次用户采集信号数据,这两种信号数据构成了训练信号。Specifically, during training, first, when the primary user (PU) exists, the secondary user (SU) is used to collect signal data, and then when the primary user does not exist, the secondary user is used to collect signal data. These two types of signal data constitute training. Signal.

假设在认知无线电网络中有K个SU而且每个SU的采样点数为N。我们假设H0表示为信号不存在,H1表示为信号存在。因此在两种假设下训练信号可由下式表示:Suppose there are K SUs in the cognitive radio network and the number of sampling points for each SU is N. We assume that H0 represents the absence of the signal and H1 represents the presence of the signal. Therefore, under the two assumptions, the training signal can be expressed as:

Figure GDA0002499827440000131
Figure GDA0002499827440000131

其中si(n)表示主用户(PU)信号,wi(n)表示均值为0,方差为σ2高斯白噪声信号。where si (n) represents the primary user (PU) signal, andwi (n) represents the mean value of 0 and the variance of σ2 Gaussian white noise signal.

MME特征计算模块401利用训练信号,得到一个感知时间内的感知矩阵,从而计算出协方差矩阵,利用协方差矩阵的最大特征值与最小特征值之比得到MME特征。The MMEfeature calculation module 401 uses the training signal to obtain a sensing matrix within a sensing time, thereby calculating a covariance matrix, and using the ratio of the maximum eigenvalue to the minimum eigenvalue of the covariance matrix to obtain the MME feature.

分类器计算模块402,用于利用K均值聚类算法与所述MME特征得到分类器;Aclassifier calculation module 402, configured to obtain a classifier by using the K-means clustering algorithm and the MME feature;

具体地,分类器计算模块402将感知矩阵分为多组,从而得到多个MME特征,利用MME特征确定一个数据对象集,利用数据对象集和K均值算法得到最终的分类器。Specifically, theclassifier calculation module 402 divides the perception matrix into multiple groups to obtain multiple MME features, uses the MME features to determine a data object set, and uses the data object set and K-means algorithm to obtain a final classifier.

测试MME特征计算模块403,用于获取测试信号,计算得到所述测试信号的测试MME特征;The test MMEfeature calculation module 403 is used to obtain a test signal, and calculate the test MME feature of the test signal;

具体地,获取到测试信号后,测试MME特征计算模块403确定测试信号的MME特征,并构造特征矩阵。Specifically, after acquiring the test signal, the test MMEfeature calculation module 403 determines the MME feature of the test signal, and constructs a feature matrix.

分类模块404,用于利用所述分类器对所述测试MME特征分类得到分类结果,利用所述分类结果计算检测概率。Theclassification module 404 is configured to use the classifier to classify the test MME feature to obtain a classification result, and use the classification result to calculate a detection probability.

具体地,分类模块404将特征矩阵导入分类器,得到分类结果,并利用分类结果计算检测概率,也就是计算检测性能指标。Specifically, theclassification module 404 imports the feature matrix into the classifier, obtains the classification result, and uses the classification result to calculate the detection probability, that is, to calculate the detection performance index.

同时,还可以进一步对分类结果计算,计算其虚警概率,以便知道主用户不存在时,系统错误的以为主用户存在的概率。At the same time, the classification result can be further calculated to calculate the false alarm probability, so as to know the probability that the system mistakenly believes that the main user exists when the main user does not exist.

通过以上方案可知,本发明实施例提供的一种基于K均值算法的频谱感知装置,MME特征计算模块401计算训练信号的MME特征,然后分类器计算模块402利用K均值算法得到分类器,训练好分类器后分类模块404再将测试信号的测试MME特征导入分类器进行分类得到分类结果。利用MME特征与K均值算法结合,提高了频谱感知的检测性能。It can be seen from the above solutions that in the spectrum sensing device based on the K-means algorithm provided by the embodiment of the present invention, the MMEfeature calculation module 401 calculates the MME feature of the training signal, and then theclassifier calculation module 402 uses the K-means algorithm to obtain a classifier, and the trained Thepost-classifier classification module 404 then imports the test MME features of the test signal into the classifier for classification to obtain a classification result. The detection performance of spectrum sensing is improved by combining MME features with K-means algorithm.

本发明实施例提供一种具体的基于K均值算法的频谱感知装置,区别于上述实施例,本发明实施例对上述实施例中MME特征计算模块401作了具体的限定与说明,其他模块内容与上述实施例大致相同,具体内容可以参考上述实施例,此处不再赘述。MME特征计算模块401具体包括:The embodiment of the present invention provides a specific spectrum sensing device based on the K-means algorithm. Different from the above embodiments, the embodiments of the present invention specifically limit and describe the MMEfeature calculation module 401 in the above embodiments, and the contents of other modules are the same as The foregoing embodiments are substantially the same, and for specific content, reference may be made to the foregoing embodiments, which will not be repeated here. The MMEfeature calculation module 401 specifically includes:

训练信号采集单元,用于采集第一信号特征与第二信号特征,所述第一信号特征与所述第二信号特征构成训练信号;其中所述第一信号特征为主用户存在时,次用户采集到的信号特征,所述第二信号特征为所述主用户不存在时,次用户采集到的信号特征;A training signal collection unit, configured to collect a first signal feature and a second signal feature, the first signal feature and the second signal feature constitute a training signal; wherein the first signal feature exists when the primary user exists, the secondary user The collected signal feature, the second signal feature is the signal feature collected by the secondary user when the primary user does not exist;

具体地,在训练时,训练信号采集单元首先在主用户(PU)存在时,利用次用户(SU)采集信号数据,然后在主用户不存在时,利用次用户采集信号数据,这两种信号数据构成了训练信号。训练信号可以表示为

Figure GDA0002499827440000141
其中si(n)表示主用户(PU)信号,wi(n)表示均值为0,方差为σ2高斯白噪声信号。H0表示为信号不存在,H1表示为信号存在;M为次用户的个数,每个次用户的采样点数为N。Specifically, during training, the training signal acquisition unit first uses the secondary user (SU) to collect signal data when the primary user (PU) exists, and then uses the secondary user to collect signal data when the primary user does not exist. The data constitutes the training signal. The training signal can be expressed as
Figure GDA0002499827440000141
where si (n) represents the primary user (PU) signal, andwi (n) represents the mean value of 0 and the variance of σ2 Gaussian white noise signal. H0 indicates that the signal does not exist, and H1 indicates that the signal exists; M is the number of secondary users, and the number of sampling points for each secondary user is N.

第一感知矩阵计算单元,用于利用所述训练信号计算得到一个感知时间段内多个次用户的第一感知矩阵;a first perceptual matrix calculation unit, configured to use the training signal to calculate and obtain the first perceptual matrices of multiple secondary users within a perceptual time period;

具体地,Xi=[xi(1)xi(2)....xi(N)]表示第i个SU的采样矩阵,则在一个感知时间段内M个次用户的感知矩阵可以表示为:

Figure GDA0002499827440000142
Specifically, Xi =[xi (1)xi (2)....xi (N)] represents the sampling matrix of the i-th SU, then the perceptual matrix of M secondary users in a perceptual time period It can be expressed as:
Figure GDA0002499827440000142

分组单元,用于将所述第一感知矩阵分为第一预设个数的第二感知矩阵;a grouping unit, configured to divide the first perception matrix into a first preset number of second perception matrices;

具体地,分组单元将用户分组,得到分组后的感知矩阵。分组个数根据实际情况设定。假设有9个次用户协作感知,采样点为1000,预设分成3组;Specifically, the grouping unit groups users to obtain a grouped perception matrix. The number of groups is set according to the actual situation. Suppose there are 9 sub-user cooperative perceptions, the sampling point is 1000, and the preset is divided into 3 groups;

那么这9个次用户采集的数据就是一个9行1000列的矩阵X,

Figure GDA0002499827440000151
分成三组:Then the data collected by these 9 users is a matrix X with 9 rows and 1000 columns.
Figure GDA0002499827440000151
Divide into three groups:

组一:Group one:

Figure GDA0002499827440000152
Figure GDA0002499827440000152

组二:Group two:

Figure GDA0002499827440000153
Figure GDA0002499827440000153

组三:Group three:

Figure GDA0002499827440000154
Figure GDA0002499827440000154

MME特征计算单元,用于计算得到每个第二感知矩阵的MME特征。The MME feature calculation unit is configured to calculate and obtain the MME feature of each second perception matrix.

具体地,MME特征计算单元利用每个第二感知矩阵得到每个第二感知矩阵的协方差矩阵,从而得到每组用户的MME特征

Figure GDA0002499827440000155
其中为λmax协方差矩阵的最大特征值,λmin为最小特征值。Specifically, the MME feature calculation unit obtains the covariance matrix of each second sensing matrix by using each second sensing matrix, so as to obtain the MME feature of each group of users
Figure GDA0002499827440000155
whereλmax is the largest eigenvalue of the covariance matrix, andλmin is the smallest eigenvalue.

本发明实施例提供一种具体的基于K均值算法的频谱感知装置,区别于上述实施例,本发明实施例对上述实施例中分类器计算模块402作了具体的限定与说明,其他模块内容与上述实施例大致相同,具体内容可以参考上述实施例,此处不再赘述。分类器计算模块402具体包括:The embodiment of the present invention provides a specific spectrum sensing device based on the K-means algorithm. Different from the above embodiments, the embodiment of the present invention specifically limits and describes theclassifier calculation module 402 in the above embodiment, and the contents of other modules are the same as those of the above embodiments. The foregoing embodiments are substantially the same, and for specific content, reference may be made to the foregoing embodiments, which will not be repeated here. Theclassifier calculation module 402 specifically includes:

类中心确定单元,用于在由所述MME特征构成的数据对象集中,随机确定第二预设个数的MME特征对象作为第二预设个数的类中心点,形成第二预设个数的初始类;其中,每个类中包括类中心点与非类中心点;A class center determination unit, configured to randomly determine a second preset number of MME feature objects in the data object set composed of the MME features as the class center points of the second preset number to form a second preset number of The initial class of ; among them, each class includes class center point and non-class center point;

具体地,MME特征构成了一个数据对象集,类中心确定单元随机在数据对象集中选择K个对象作为类中心点,从而得到K个类,类中有一个中心点,而其余点为非中心点。Specifically, the MME feature constitutes a data object set, and the class center determination unit randomly selects K objects in the data object set as the class center points, thereby obtaining K classes, with one center point in the class, and the rest of the points are non-center points .

目标类形成单元,用于计算每个初始类中的非类中心点到每个类中心点的距离,将每个非类中心点分配到距离每个非类中心点最近的类中心点所在的类,形成目标类;The target class forming unit is used to calculate the distance from the non-class center point in each initial class to each class center point, and assign each non-class center point to the location of the class center point closest to each non-class center point. class, form the target class;

具体地,在K均值聚类算法中,目标类形成单元需要将所有类中的非类中心点分别分配到距离它最近的类中心点所在的类中,分配完成后形成目标类。Specifically, in the K-means clustering algorithm, the target class forming unit needs to assign the non-class center points in all classes to the class where the nearest class center point is located, and form the target class after the assignment is completed.

判断单元,计算目标类中所有MME特征对象的平均值,判断所述平均值是否与所述目标类的类中心点相同,若是,则停止,确定分类器;若否,则将所述目标类的类中心点还原为所述目标类的非类中心点,将所述平均值作为所述目标类的类中心点,将所述目标类作为初始类,继续调用所述目标类形成单元。The judgment unit calculates the average value of all MME feature objects in the target class, and judges whether the average value is the same as the class center point of the target class, if so, stop and determine the classifier; The class center point of is restored to the non-class center point of the target class, the average value is taken as the class center point of the target class, the target class is taken as the initial class, and the target class forming unit is continuously called.

具体地,计算目标类中所有MME特征对象的平均值,判断单元判断当前目标类中的平均值是否就是当前的类中心,如果不是,则需要将类中心点还原为非类中心点,而将平均值作为新的类中心点,然后返回S302继续计算距离并分配形成新的目标类,直到目标类中的平均值就是其中心点时,停止循环确定出分类器。Specifically, the average value of all MME feature objects in the target class is calculated, and the judgment unit judges whether the average value in the current target class is the current class center, if not, the class center point needs to be restored to a non-class center point, and the The average value is used as the new class center point, and then returns to S302 to continue calculating the distance and assigning to form a new target class, until the average value in the target class is its center point, stop the loop to determine the classifier.

为了提高分类效果,从而进一步提高频谱感知的准确性,本发明实施例提供一种具体的基于K均值算法的频谱感知装置,基于上述实施例,本发明实施例还包括:In order to improve the classification effect, thereby further improving the accuracy of spectrum sensing, the embodiment of the present invention provides a specific spectrum sensing device based on the K-means algorithm. Based on the above embodiment, the embodiment of the present invention further includes:

分解模块,用于将所述第一感知矩阵分为预设个数的第二感知矩阵之后,将所述第二感知矩阵的信号向量分解为I、Q两部分,得到第三感知矩阵;a decomposition module, configured to decompose the signal vector of the second perception matrix into two parts I and Q after dividing the first perception matrix into a preset number of second perception matrices to obtain a third perception matrix;

则所述MME特征计算单元,具体用于:Then the MME feature calculation unit is specifically used for:

计算得到每个第三感知矩阵的MME特征。Calculate the MME feature of each third perceptual matrix.

具体地,假设第i个SU用户的采样的信号向量为Xi=[xi(1)xi(2)...xi(N)]。分解模块将Xi分解成I和Q两部分,表达式如下:Specifically, it is assumed that the sampled signal vector of the i-th SU user is Xi =[xi (1)xi (2)...xi (N)]. The decomposition module decomposes Xi into two parts I and Q, and the expression is as follows:

Figure GDA0002499827440000171
Figure GDA0002499827440000171

Figure GDA0002499827440000172
Figure GDA0002499827440000172

其中fc是携带频率,fs是采样频率。所以上述实施例中分解后的组一的感知矩阵可以表示为:where fc is the carry frequency and fs is the sampling frequency. Therefore, the decomposed perceptual matrix ofgroup 1 in the above embodiment can be expressed as:

Figure GDA0002499827440000173
组二、组三也进行同样分解,利用分解后的感知矩阵得到新的协方差矩阵,从而得到MME特征。新的协方差矩阵中确保了接收信号存在的时间、空间或相位相关(I和Q分量)之间的信号相关性的最大利用,因此分解后得到的MME特征值更能反映当前信号的具体信息,提高了分类效果,从而提高了检测的性能。
Figure GDA0002499827440000173
The second and third groups are also decomposed in the same way, and the new covariance matrix is obtained by using the decomposed perceptual matrix, thereby obtaining the MME feature. The new covariance matrix ensures the maximum utilization of the signal correlation between the time, space or phase correlation (I and Q components) of the received signal, so the MME eigenvalues obtained after decomposition can better reflect the specific information of the current signal , which improves the classification effect and thus the detection performance.

本说明书中各个实施例采用递进的方式描述,每个实施例重点说明的都是与其他实施例的不同之处,各个实施例之间相同相似部分互相参见即可。The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same and similar parts between the various embodiments can be referred to each other.

对所公开的实施例的上述说明,使本领域专业技术人员能够实现或使用本发明。对这些实施例的多种修改对本领域的专业技术人员来说将是显而易见的,本文中所定义的一般原理可以在不脱离本发明的精神或范围的情况下,在其它实施例中实现。因此,本发明将不会被限制于本文所示的这些实施例,而是要符合与本文所公开的原理和新颖特点相一致的最宽的范围。The above description of the disclosed embodiments enables 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 implemented in 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.5A2017-08-172017-08-17 A kind of spectrum sensing method and device based on K-means algorithmExpired - Fee RelatedCN107395301B (en)

Priority Applications (1)

Application NumberPriority DateFiling DateTitle
CN201710706974.5ACN107395301B (en)2017-08-172017-08-17 A kind of spectrum sensing method and device based on K-means algorithm

Applications Claiming Priority (1)

Application NumberPriority DateFiling DateTitle
CN201710706974.5ACN107395301B (en)2017-08-172017-08-17 A kind of spectrum sensing method and device based on K-means algorithm

Publications (2)

Publication NumberPublication Date
CN107395301A CN107395301A (en)2017-11-24
CN107395301Btrue CN107395301B (en)2020-09-11

Family

ID=60353274

Family Applications (1)

Application NumberTitlePriority DateFiling Date
CN201710706974.5AExpired - Fee RelatedCN107395301B (en)2017-08-172017-08-17 A kind of spectrum sensing method and device based on K-means algorithm

Country Status (1)

CountryLink
CN (1)CN107395301B (en)

Families Citing this family (10)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
CN108494509A (en)*2018-03-092018-09-04广东工业大学A kind of cooperative frequency spectrum sensing method and device
CN108462544B (en)*2018-03-272021-09-17广东工业大学Spectrum sensing method and device
CN108566254A (en)*2018-03-272018-09-21广东工业大学A kind of frequency spectrum sensing method and device
CN108768563A (en)*2018-05-172018-11-06广东工业大学A kind of cooperative frequency spectrum sensing method and relevant apparatus
CN108736992A (en)*2018-05-172018-11-02广东工业大学A kind of cooperative frequency spectrum sensing method and relevant apparatus
CN108712222A (en)*2018-05-172018-10-26广东工业大学A kind of cooperative frequency spectrum sensing method and relevant apparatus
CN109004997A (en)*2018-08-092018-12-14广东工业大学A kind of frequency spectrum sensing method, device and computer readable storage medium
CN109309538A (en)*2018-08-282019-02-05广东工业大学 A spectrum sensing method, apparatus, device, system and storage medium
CN109743121A (en)*2019-03-012019-05-10广东工业大学 A channel occupancy state detection method, device, electronic device and storage medium
CN112003662B (en)*2020-06-242023-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 numberPriority datePublication dateAssigneeTitle
CN103166723A (en)*2013-03-182013-06-19广东工业大学 Spectrum Sensing Method for Wireless Cognitive Sensor Networks Based on Extension Correlation Function
CN103326797A (en)*2013-06-212013-09-25上海交通大学Cooperation type frequency spectrum sensing method in cognitive network
CN104135327A (en)*2014-07-102014-11-05上海大学Spectrum sensing method based on support vector machine

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication numberPriority datePublication dateAssigneeTitle
US8515473B2 (en)*2007-03-082013-08-20Bae 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 numberPriority datePublication dateAssigneeTitle
CN103166723A (en)*2013-03-182013-06-19广东工业大学 Spectrum Sensing Method for Wireless Cognitive Sensor Networks Based on Extension Correlation Function
CN103326797A (en)*2013-06-212013-09-25上海交通大学Cooperation type frequency spectrum sensing method in cognitive network
CN104135327A (en)*2014-07-102014-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 numberPublication date
CN107395301A (en)2017-11-24

Similar Documents

PublicationPublication DateTitle
CN107395301B (en) A kind of spectrum sensing method and device based on K-means algorithm
CN107360577B (en)Frequency spectrum sensing method and device based on machine learning
CN103141067B (en) Frequency band identification method and device
CN108462544B (en)Spectrum sensing method and device
CN103118394A (en)Multi-antenna spectrum sensing method and device suitable for broadband system
CN112994813B (en)Adaptive sampling frequency spectrum sensing method and related device
Huang et al.WiAnti: An anti-interference activity recognition system based on WiFi CSI
Talukdar et al.Implementation of SNR estimation based energy detection on USRP and GNU radio for cognitive radio networks
Murti et al.Spectrum sensing using adaptive threshold based energy detection in cognitive radio system
KR101079928B1 (en)Cognitive Radio Communication Apparatus and Method for Cluster based Cooperative Sensing
CN107171752B (en)Cognitive radio frequency spectrum sensing method and system
KR20210043724A (en)Radio channel utilization
CN108712222A (en)A kind of cooperative frequency spectrum sensing method and relevant apparatus
Men et al.A robust cooperative spectrum sensing method against faulty nodes in CWSNs
CN108494509A (en)A kind of cooperative frequency spectrum sensing method and device
US9231668B2 (en)Radio apparatus and method of operating the same
Agarwal et al.Hardware implementation of k-means clustering based spectrum sensing using usrp in a cognitive radio system
Bruno et al.An edge detection approach to wideband temporal spectrum sensing
CN109347583A (en) Cooperative Spectrum Sensing Method Based on Kernel Space Optimization under Noise Uncertainty
Suriya et al.SPECTRUMNET: Cooperative Spectrum Monitoring Using Deep Neural Networks
Men et al.A Robust and Energy Efficient Cooperative Spectrum Sensing Scheme in Cognitive Wireless Sensor Networks.
CN112073135B (en)Centralized spectrum sensing method, system, storage medium and communication equipment
Shaik et al.Curvelet based signal detection for spectrum sensing using Principal Component of Analysis
KR101465747B1 (en)method of optimally sensing channel of primary user in cognitive radio network
CN104219679A (en)Improved method for assigning channels in cognitive radio networks

Legal Events

DateCodeTitleDescription
PB01Publication
PB01Publication
SE01Entry into force of request for substantive examination
SE01Entry into force of request for substantive examination
GR01Patent grant
GR01Patent grant
CF01Termination of patent right due to non-payment of annual fee
CF01Termination of patent right due to non-payment of annual fee

Granted publication date:20200911


[8]ページ先頭

©2009-2025 Movatter.jp