Summary of the invention
Technical problem to be solved by this invention provides a kind of energy detection method and device of uniting time domain double threshold and frequency domain variable point numeral, consumption was purpose when it saved detection simultaneously to improve the accurate probability of detection, comprehensive time domain energy detects the characteristics with the frequency domain energy measuring, has realized the frequency spectrum joint-detection in the cognitive radio system based on the time domain double threshold.
The present invention utilizes the energy measuring method of double threshold to carry out primary detection according to the characteristics of time domain energy detection with the frequency domain energy measuring.If the statistics energy drops on the two ends of two thresholdings, then directly judge.If energy drops between the high low threshold of time domain, then utilize the frequency domain energy measuring.Wherein, if energy drops between low threshold and the variable point numeral segmentation threshold, then carry out the frequency domain energy measuring of N point FFT conversion, otherwise carry out
The frequency domain energy measuring of some FFT conversion.
For addressing the above problem, the present invention is achieved by the following scheme:
A kind of energy detection method of uniting time domain double threshold and frequency domain variable point numeral comprises the steps:
A. determine high threshold λ
H, low threshold λ
L, and the segmentation threshold λ of time domain double threshold and frequency domain variable point numeral
D, wherein
In the formula, N
TBe default sampling number,
Be the white Gaussian noise variance of estimating, P
fBe default false alarm probability, Q
-1Be the inverse function of Q function, α is default splitting factor;
B. utilize the time domain energy detection method to carry out primary detection to measured signal; Namely detect carrying out time domain energy to measured signal earlier, calculate the time domain energy value of measured signal; The time domain energy value of calculating gained is compared with high threshold and the low threshold determined, if the time domain energy value of calculating gained is more than or equal to high threshold λ
H, then be judged to H
1, namely main subscriber signal exists; If calculate the time domain energy value of gained smaller or equal to low threshold λ
L, then be judged to H
0, namely main subscriber signal does not exist; Be in high threshold λ if calculate the time domain energy value of gained
LWith low threshold λ
HBetween, showing then the time domain energy detection method can't determine whether main subscriber signal exists, then need further determine with the frequency domain energy measuring;
C. utilize frequency domain energy measuring method further to detect determining the measured signal whether main subscriber signal exists; Namely for dropping on high threshold λ
LWith segmentation threshold λ
DBetween measured signal, the frequency domain energy measuring of carrying out the fast Fourier transform that N orders is calculated the frequency domain energy value of measured signal; For dropping on segmentation threshold λ
DWith low threshold λ
LAnd between measured signal, carry out
The frequency domain energy measuring of the fast Fourier transform of point, the frequency domain energy value of calculating measured signal; Frequency domain energy value and the preset frequency domain detection threshold of calculating gained are compared, if more than or equal to the frequency domain detection thresholding, then be judged to H
1, main subscriber signal exists; Otherwise be judged to H
0, main subscriber signal does not exist.
In step C, the preset frequency domain detection threshold is λ
NAnd λ
N/2, and λ
N>λ
N/2To carry out frequency domain energy value and the λ of the fast Fourier transform gained that N orders
NCompare, whether exist to judge main subscriber signal; To carry out
Frequency domain energy value and the λ of the fast Fourier transform gained of point
N/2Compare, whether exist to judge main subscriber signal.
In the above-mentioned steps each default threshold value be one with SNR(Signal-to-Noise Ratio) relevant parameter, different threshold value of each SNR value correspondence, and the more big default thresholding of SNR is more little, on the contrary thresholding is more big.
In step C, preset frequency domain detection threshold λ
NBe preset frequency domain detection threshold λ
N/22 times.
In step C, when SNR is in-10db~0db scope, preset frequency domain detection threshold λ
NBetween 27321~273217, preset frequency domain detection threshold λ
N/2Between 13661~136608.
In steps A, default time-domain sampling points N
TBetween 256~512, preset the frequency domain sample points N between 1024~2048, default false alarm probability P
fBetween 0.01~0.1, default splitting factor α is between 0.4655~0.5345.
Based on the designed a kind of energy testing apparatus of uniting time domain double threshold and frequency domain variable point numeral of said method, mainly form by AD modular converter, time domain energy detection module, frequency domain variable point numeral energy detection module, energy range judge module, the first threshold judgement module, the second threshold judgement module with the door module.The input input radio frequency signal of AD modular converter wherein.The output of AD modular converter is divided into 2 the tunnel, the one tunnel and links to each other with the input of time domain energy detection module, and one the tunnel links to each other with the input of frequency domain variable point numeral energy detection module.The output of time domain energy detection module connects the input of energy range judge module, the output of energy range judge module is divided into 2 the tunnel, one the tunnel directly links to each other after the first threshold judgement module with an input of door module, another road links to each other after frequency domain variable point numeral energy detection module and the second threshold judgement module with another input of door module, with the output output detection signal of door module.
In the such scheme, described time domain energy detection module comprises the first square operation device and accumulation calculating device.Wherein the input of the first square operation device links to each other with the output of AD modular converter, the output of the first square operation device links to each other with the input of accumulation calculating device, and the output of accumulation calculating device connects the input of the first threshold judgement module through the energy range judge module.
In the such scheme, described frequency domain variable point numeral energy detection module comprises fast Fourier transform count selector, fast Fourier transformer, the second square operation device and COMPREHENSIVE CALCULATING device.Wherein the count input of selector of fast Fourier transform connects the AD modular converter, the count output of selector of fast Fourier transform links to each other with the input of COMPREHENSIVE CALCULATING device via fast Fourier transformer, the second square operation device successively, and the output of COMPREHENSIVE CALCULATING device connects the input of the second threshold judgement module.
Compared with prior art, the present invention has following characteristics:
1, adopt the time domain double threshold, when signal to noise ratio was bigger, the energy of detection signal was greater than high threshold λ
H, only carry out time domain energy this moment and detect, and unite energy measuring with respect to the time-domain and frequency-domain of simple gate limit, saved the time consumption of frequency domain detection;
2, be between the high low threshold when energy value, carry out the frequency domain energy measuring, if energy value is in λ
LAnd λ
DBetween, adopt the N point to carry out the frequency domain energy measuring of the FFT conversion that N orders, otherwise carry out
The frequency domain energy measuring of the FFT conversion of point with respect to the frequency domain energy measuring of constant FFT conversion of counting, has reduced data processing amount, consumes when having saved detection;
3, under the condition that guarantees certain detection performance and accuracy, with respect to adopting the multiple detection algorithm of associating, data processing amount is little, and algorithm complex is low, and is simple and practical, can be widely used in cognitive radio system.
Embodiment
The present invention has realized time domain-frequency domain variable point numeral energy measuring according to the characteristics of time domain energy detection with the frequency domain energy measuring based on double threshold.Its whole concept as shown in Figure 1, utilize that time domain detects the time consumption less and realize simple advantage, carry out Preliminary screening to main with signal earlier, measured signal is gathered by the radiofrequency signal of digital to analog converter A/D and is obtained x (n), carry out the time domain energy detection then and obtain energy statistic value Y, as shown in Figure 2, if statistical value Y is in high low threshold λ
L, λ
HThen directly adjudicate at two ends, no longer carries out frequency domain detection; If energy value is in high low threshold λ
H, λ
LBetween, time domain is adjudicated main subscriber signal and is existed, and restarts frequency domain variable point numeral FFT change detection module and confirms that energy value is in λ
L, λ
DBetween, carry out N point FFT conversion, otherwise carry out
Put the FFT conversion, and compare according to gained frequency domain energy statistic value and threshold value, greater than thresholding, then adjudicate main subscriber signal and exist, otherwise do not exist.So namely saved to consume when detecting and guaranteed certain detection probability again.
The value of time domain double threshold is extremely important, high threshold λ
HValue will influence false alarm probability P
f, the more high false alarm probability of value is more low, thereby but increased energy and drop on the time consumption that probability between the double threshold increases detection algorithm; Low threshold λ
LValue influence detection probability P
d, the more little accurate detection probability of value is more big, but equally also can increase the time consumption of detection algorithm; And the difference of two-door limit value also can increase the time consumption of detection algorithm too greatly.Therefore, take all factors into consideration false alarm probability, accurately detection probability and detection algorithm the time consume to determine the value of time domain double threshold.
The algorithm of energy measuring detects according to the difference of measured signal watt level, and it is a kind of efficient algorithm of the deterministic signal Detection of Existence to unknown parameter.
The time domain energy detection model as shown in Figure 3.The time domain energy detector is made up of analog to digital converter (A/D), square operation device, accumulation calculating device and threshold judgement module.Gather radiofrequency signal x (t) and by analog to digital converter analog signal is become digital signal x (n), x (n) enters the accumulation calculating device to N by the square operation device
TThe summation of dimension sampled point, the time domain energy statistical value Y of acquisition measured signal is with Y and predefined decision threshold λ
HAnd λ
LCompare, judge whether to exist main subscriber signal.
In cognitive radio, frequency spectrum detection can abstractly be a binary hypothesis test problem:
Wherein: v (n) for the zero-mean variance is
Additive white Gaussian noise, i.e. v (n)
S (n) is main subscriber signal to be measured; X (n) is the signal from RF acquisition; N
TSampling number for the time domain detection signal; H
1With H
0There are not two kinds of hypothesis for representing that respectively main subscriber signal s (n) is present in.Suppose in this detection algorithm that s (n) is zero for average, variance is
Gaussian random process, i.e. s (n)
And s (n) and v (n) are separate, then s (n)+v (n)
The essence of energy detection algorithm is when main subscriber signal exists, the energy of the energy statistics amount that obtains during greater than the noise individualism: E{ (s (n)+v (n))
2}=E{s (n)
2}+E{v (n)
2E{v (n)
2}
Time domain energy decision statistic value is:
The frequency spectrum perception performance is weighed by two kinds of probability: detection probability P
dWith false alarm probability P
f, respectively as shown in the formula expression:
P
d=P (is judged to H
1| H
1)
P
f=P (is judged to H
1| H
0)
Wherein: detection probability P
dRepresent that main user is using frequency spectrum while cognitive user also to detect the situation that main user exists, its size shows the degree that main user is protected and not disturbed by cognitive user.False alarm probability P
fShow that cognitive user detects main user and exists and in fact main user and non-existent situation.If P
fHigher, then cognitive user reduces the utilance of idle channel, but reduces the chance of access of radio network.
When main user does not exist when namely only having noise, it is N that decision statistic amount Y obeys the degree of freedom
TCard side, center distribute; When main user existed, it was N that the decision statistic amount is obeyed the degree of freedom
TNon-central card side distribute, acentric parameter κ is main subscriber signal energy and white Gaussian noise double-side band power spectral density N
0The ratio, that is:
Wherein:
According to central-limit theorem, work as N
T1 o'clock, decision statistic amount Y can be approximately Gaussian random process, and expression formula is as follows:
By above analysis, the time domain detection probability
With false alarm probability
But approximate representation is:
Wherein:
In cognitive radio system, for default one group
Sampling number N
T(SNR, Signal Noise Ratio) is relevant, as follows with signal to noise ratio:
Wherein:
Along with the increase of SNR, N
TCount and reduce;
Default false alarm probability criterion is all followed in the design of present most detector, can be by sampling number N based on this criterion decision threshold
TWith default P
fAnd estimate
Expression is as follows:
When Y is in λ
LWith λ
HBetween, start frequency domain detection, the frequency domain detection model as shown in Figure 4, it is mainly by analog to digital converter (A/D), the FFT selector of counting, the FFT module, the square operation device, the COMPREHENSIVE CALCULATING device, the threshold judgement module is formed.Collect digital signal x (n) by analog to digital converter (A/D) to receiving radio-frequency head signal x (t), discriminative information by time domain, carrying out FFT counts and selects and carry out the FFT conversion, then frequency-region signal is carried out a square acquisition frequency domain energy signal, by the COMPREHENSIVE CALCULATING device frequency domain energy signal is averaging and obtains the frequency domain energy statistic value
, at last will
With default thresholding λ
FRelatively, judge whether to exist main subscriber signal.
The relative time domain energy of frequency domain energy measuring detects, and is to be in λ at time domain energy statistical value Y
L, λ
HBetween detect on the basis of main subscriber signal and carry out one-time detection again, thereby improved the accuracy that detects, but increased the time consumption that detects.Frequency domain according to Y near λ
LTo λ
HSNR constantly increases in the process, so at λ
L, λ
HBetween must exist a bit, make frequency domain adopt N point FFT conversion and employing
The court verdict that some FFT conversion obtains is the same;
Just introduced frequency domain variable point numeral segmentation threshold λ based on this thought
D, Y drops on λ for the time domain energy statistical value
L, λ
DBetween, this moment, SNR compared lessly, adopted N point FFT conversion; Drop on λ and work as time domain energy statistic value Y
D, λ
HBetween, this moment, SNR was relatively large, adopted
Point FFT conversion can obtain adopting the same court verdict of N point FFT conversion, thereby adopts the frequency domain detection algorithm of variable point numeral, by frequency domain variable point numeral segmentation threshold λ is set
D, not only effectively guaranteed accuracy in detection but also consumption when having saved.Other processes of frequency domain energy measuring and time domain energy detection type seemingly just no longer describe in detail.
A kind of energy detection method of uniting time domain double threshold and frequency domain variable point numeral of present embodiment specifically comprises the steps:
A, determine high threshold λ
H, low threshold λ
L, and the segmentation threshold λ of time domain double threshold and frequency domain variable point numeral
D, wherein
In the formula, N
TBe default sampling number,
Be the white Gaussian noise variance of estimating, P
fBe default false alarm probability, Q
-1Be the inverse function of Q function, α is default splitting factor.
In the present invention preferably implements, default sampling number N
TBetween 256~512, preset the frequency domain sample points N between 1024~2048, default false alarm probability P
fBetween 0.01~0.1, default splitting factor α is between 0.4655~0.5345.
B. utilize the time domain energy detection method to carry out primary detection to measured signal; Namely detect carrying out time domain energy to measured signal earlier, calculate the time domain energy value of measured signal; The time domain energy value of calculating gained is compared with high threshold and the low threshold determined, if the time domain energy value of calculating gained is more than or equal to high threshold λ
H, then be judged to H
1, namely main subscriber signal exists; If calculate the time domain energy value of gained smaller or equal to low threshold λ
L, then be judged to H
0, namely main subscriber signal does not exist; Be in high threshold λ if calculate the time domain energy value of gained
LWith low threshold λ
HBetween, showing then the time domain energy detection method can't determine whether main subscriber signal exists, then need further determine with the frequency domain energy measuring.
C. utilize frequency domain energy measuring method further to detect determining the measured signal whether main subscriber signal exists; Namely for dropping on high threshold λ
LWith segmentation threshold λ
DBetween measured signal, the frequency domain energy measuring of carrying out the fast Fourier transform that N orders is calculated the frequency domain energy value of measured signal; For dropping on segmentation threshold λ
DWith low threshold λ
LAnd between measured signal, carry out
The frequency domain energy measuring of the fast Fourier transform of point, the frequency domain energy value of calculating measured signal; Frequency domain energy value and the preset frequency domain detection threshold of calculating gained are compared, if more than or equal to the frequency domain detection thresholding, then be judged to H
1, main subscriber signal exists; Otherwise be judged to H
0, main subscriber signal does not exist.
In step C, the preset frequency domain detection threshold is λ
NAnd λ
N/2, and λ
N>λ
N/2To carry out frequency domain energy value and the λ of the fast Fourier transform gained that N orders
NCompare, whether exist to judge main subscriber signal; To carry out
Frequency domain energy value and the λ of the fast Fourier transform gained of point
N/2Compare, whether exist to judge main subscriber signal.In the preferred embodiment of the present invention, SNR is in-10db~0db scope the time, preset frequency domain detection threshold λ
NBetween 27321~273217, preset frequency domain detection threshold λ
N/2Between 13661~136608.λ
NAnd λ
N/2Between value, can not have correlation, as long as satisfy λ
N>λ
N/2Get final product, but in the preferred embodiment of the present invention, preset frequency domain detection threshold λ
NJust be preset frequency domain detection threshold λ
N/22 times, as long as set one of them preset frequency domain detection threshold, another preset frequency domain detection threshold is just known like this.
Can be a kind of energy testing apparatus of uniting time domain double threshold and frequency domain variable point numeral of realizing said method, mainly form by AD modular converter, time domain energy detection module, frequency domain variable point numeral energy detection module, energy range judge module, the first threshold judgement module, the second threshold judgement module with the door module.The input input radio frequency signal of AD modular converter wherein.The output of AD modular converter is divided into 2 the tunnel, the one tunnel and links to each other with the input of time domain energy detection module, and one the tunnel links to each other with the input of frequency domain variable point numeral energy detection module.The output of time domain energy detection module connects the input of energy range judge module, the output of energy range judge module is divided into 2 the tunnel, one the tunnel directly links to each other after the first threshold judgement module with an input of door module, another road links to each other after frequency domain variable point numeral energy detection module and the second threshold judgement module with another input of door module, with the output output detection signal of door module.Referring to Fig. 1.
Described time domain energy detection module comprises the first square operation device and accumulation calculating device.Wherein the input of the first square operation device links to each other with the output of AD modular converter, the output of the first square operation device links to each other with the input of accumulation calculating device, and the output of accumulation calculating device connects the input of the first threshold judgement module through the energy range judge module.Referring to Fig. 3.
Described frequency domain variable point numeral energy detection module comprises fast Fourier transform count selector, fast Fourier transformer, the second square operation device and COMPREHENSIVE CALCULATING device.Wherein the count input of selector of fast Fourier transform connects the AD modular converter, the count output of selector of fast Fourier transform links to each other with the input of COMPREHENSIVE CALCULATING device via fast Fourier transformer, the second square operation device successively, and the output of COMPREHENSIVE CALCULATING device connects the input of the second threshold judgement module.Referring to Fig. 4.
The time domain double threshold of present embodiment and the energy detection method flow process of frequency domain variable point numeral as shown in Figure 5, among the figure
Be illustrated under the condition of main user's existence, time domain detects with λ
LThe probability that whether exists for threshold judgement master subscriber signal.
For judging the non-existent probability of main user; Time domain detects under main user's the situation carries out frequency domain detection again, if time domain energy statistical value Y is in λ
L, λ
DBetween, the frequency domain detection of then carrying out N point FFT conversion is among the figure
Represent that frequency domain detection is with λ under the condition of main user's existence
NThe probability that whether exists for threshold judgement master subscriber signal,
For judging the non-existent probability of main subscriber signal; If time domain energy statistical value Y is in λ
D, λ
HBetween, then carry out
The frequency domain detection of some FFT conversion is among the figure
Represent that frequency domain detection is with λ under the condition of main user's existence
N/2The probability that whether exists for threshold judgement master subscriber signal,
For judging the non-existent probability of main subscriber signal; If time domain energy statistical value Y is greater than λ
H, then no longer carry out frequency domain detection, directly with
Probabilistic determination master user exist.
According to the flow process that Fig. 5 represents, the whole detection probability that can obtain time domain double threshold and frequency domain variable point numeral energy detection system is as follows:
Obey v (n) at white Gaussian noise
Distribute, the radiofrequency signal of collection is obeyed s (n)
Can get during distribution
By the simulation result of Fig. 6, when SNR was lower, Y was less than low threshold for the time domain energy value as can be seen, and adjudicate main user do not exist this moment, when the Y curve during with the low threshold curve intersection corresponding threshold value be λ in the detection system
LWhen time domain energy value Y is between the high low threshold, carry out frequency domain detection, as we know from the figure, corresponding SNR ratio carries out when the frequency domain detection of carrying out N point FFT conversion exists to main user
The frequency domain detection of some FFT conversion is low to the corresponding SNR of main user, and will
The frequency domain energy curve of some FFT conversion and the corresponding thresholding of point of corresponding thresholding curve intersection are set at the λ in the detection system
DBut frequency domain detection arrives the corresponding SNR of main user all than high threshold λ
HCorresponding SNR is low.Fig. 6 has proved choosing of thresholding and along with the increase of SNR, by λ is set from emulation
D, consume when having saved detection under the correct detection probability situation guaranteeing.
According to the system works flow process, the time domain detection module is in running order always, has only as time domain detection statistic Y to be in λ
L, λ
HBetween just start frequency domain detection, so the time consumption of this detection system is directly proportional with the probability of use of frequency domain detection module.According to emulation, can obtain consuming when time domain detects T
tConsumption T during with frequency domain detection
fBetween relation, if time-domain sampling is counted and is N
T, frequency domain carries out N
TThe FFT conversion of point, then T
f=2T
tIf frequency domain carries out
Point FFT conversion, consumption when then detecting
Do not carry out simultaneously because time domain detects with frequency domain detection, can work simultaneously but A/D gathers the radiofrequency signal module, be in λ so work as Y
L, λ
HBetween the time, the time consumption T of time-domain and frequency-domain joint-detection
Tf, the time consumption T that will detect separately greater than frequency domain
f, less than T
tWith T
fSum, that is: T
f<T
Tf<T
t+ T
f
Fig. 7 simulation result consumes T as can be seen during associating time domain double threshold and frequency domain variable point numeral energy detection system whole
Tf, be in λ at Y
L, λ
HDuring two ends, consumption T when whole
TfEqual to consume when time domain detects T
t, that is: T
Tf=T
tIf λ
L≤ Y≤λ
DThe time, consumption T when whole
F2<T
Tf<T
t+ T
F2If λ
D≤ Y≤λ
HThe time, consumption T when whole
F1<T
Tf<T
t+ T
F1