SVM cooperative spectrum sensing method and system based on PSO
By introducing a PSO-SVM cooperative spectrum sensing system into cognitive radio networks and using the particle swarm optimization algorithm to adaptively adjust the kernel parameters and penalty factor of the SVM, the problem of limited detection performance of existing spectrum sensing methods in complex channel environments is solved, achieving higher detection accuracy and robustness.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-23
- Publication Date
- 2026-03-13
AI Technical Summary
In existing cognitive radio networks, spectrum sensing methods are insufficient in resisting fading and interference in complex channel environments. Their fusion decision is simple and lacks adaptability, making it difficult to fully extract feature information and adapt to complex environmental changes, thus limiting detection performance.
A collaborative spectrum sensing system based on particle swarm optimization support vector machine (PSO-SVM) is adopted. By deploying the PSO module and the SVM decision module in the fusion center, the particle swarm optimization algorithm is used to jointly optimize the kernel parameters and penalty factors of the SVM to achieve adaptive adjustment.
It improves detection accuracy and robustness, enhances detection performance in low signal-to-noise ratio and complex environments, has strong adaptability, reduces false alarm rate and false negative rate, and has high computational efficiency.
Smart Images

Figure CN121665252A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of cognitive radio technology, specifically to a PSO-based SVM cooperative spectrum sensing method and system. Background Technology
[0002] Currently, in cognitive radio (CR) networks, spectrum sensing is a core component, and existing technologies generally employ energy detection-based spectrum sensing models. Its basic framework is as follows:
[0003] (1) System architecture: In a typical cognitive radio spectrum sensing scenario, there is one primary user (PU) and multiple secondary users (SU). When the PU occupies the channel, the SU needs to sense it in time and avoid interfering with the PU; when the PU is idle, the SU can use the idle spectrum resources for communication.
[0004] (2) Channel Model: The signal received by the SU is obtained by superimposing noise on the signal transmitted by the PU after passing through the wireless channel. Common channel environments include additive white Gaussian noise (AWGN) channel, Rayleigh fading channel, and Ricean fading channel. To simplify the analysis, existing methods mostly use the Rayleigh fading channel model to characterize the uncertainty of wireless propagation.
[0005] (3) Energy detection method: The SU node performs energy statistics on the received signal, calculates the detection statistics, and compares them with a preset threshold value: if the energy is greater than the threshold, the PU is determined to exist; otherwise, the PU is determined not to exist. This method is widely used because it does not require prior knowledge (such as PU signal characteristics).
[0006] (4) Cooperative sensing and fusion decision: To overcome the problem that the detection results of a single SU are greatly affected by noise and fading, the existing technology often adopts cooperative spectrum sensing (CSS). In CSS, different SUs upload their respective detection results to the fusion center, and the fusion center makes a judgment on the global channel occupancy status according to certain fusion rules (such as AND decision, OR decision, K-out-of-N decision).
[0007] (5) Performance evaluation indicators: Existing technologies generally pass the detection probability ( ), false alarm probability ( The performance of the sensing method is measured by metrics such as the area under the curve (AUC). The goal is to maximize the detection probability while maintaining a low false alarm probability.
[0008] While the aforementioned technologies are frequently used in the field of spectrum sensing, they still have the following objective drawbacks in complex channel environments:
[0009] (1) Insufficient resistance to fading and interference
[0010] Energy detection methods are highly sensitive to noise uncertainty; the detection probability drops significantly when the signal is at a low signal-to-noise ratio or experiences degree fading. Traditional energy detection lacks robustness in typical channel environments such as Rayleigh fading, Ricean fading, or Nakagami fading.
[0011] (2) The fusion judgment is too simplistic.
[0012] While OR decision-making offers high sensitivity, it is prone to high false alarm rates; AND decision-making is overly conservative, resulting in generally low detection probabilities; K-out-of-N decision-making requires preset parameters and exhibits unstable performance when the number of search units (SUs) is unbalanced or when channel conditions vary significantly. These hard-decision-based fusion strategies cannot adapt to different channel and noise environments.
[0013] (3) Inability to fully extract feature information
[0014] Traditional methods mainly rely on single-dimensional energy characteristics for decision-making, ignoring the potential information of the received signal in multiple dimensions such as time domain, frequency domain, and statistical characteristics, which limits the detection performance.
[0015] (4) Difficulty adapting to complex environmental changes
[0016] Most existing solutions are based on fixed thresholds or simple statistics, lacking adaptive capabilities. When channel conditions change rapidly or the noise environment is complex, their performance is prone to significant degradation, making it difficult to meet the high-reliability sensing requirements of emerging wireless scenarios such as 5G / 6G IoT.
[0017] Therefore, a new solution is needed to address the above problems. Summary of the Invention
[0018] The purpose of this invention is to provide a PSO-based SVM cooperative spectrum sensing method and system to solve the technical problems mentioned in the background art.
[0019] To achieve the above objectives, the present invention provides the following technical solution: a PSO-based SVM cooperative spectrum sensing system, comprising at least a cognitive user, an authorized user, and a fusion center;
[0020] The authorized user, i.e. the primary user PU, transmits signals within the authorized frequency band. The signals are affected by path loss and fading during propagation.
[0021] The cognitive user, or sub-user (SU), obtains local observation data by randomly distributing multiple SUs in the network and periodically sampling energy in the target frequency band.
[0022] The fusion center, or FC, receives observation data uploaded by each SU and uses it for unified decision-making.
[0023] The fusion center is equipped with a PSO module and an SVM decision module.
[0024] The SVM decision module is used for binary classification (channel idle / occupied) based on the energy characteristics of SU.
[0025] The PSO module is used in conjunction with the SVM decision module to jointly optimize the kernel parameters and penalty factor of the SVM using the particle swarm optimization algorithm.
[0026] A PSO-based SVM cooperative spectrum sensing method, used in the aforementioned PSO-based SVM cooperative spectrum sensing system, includes at least the following steps:
[0027] S1: Perform data collection and preprocessing. The data collection is performed by energy sampling through SU nodes. The preprocessing includes at least feature extraction, normalization, and dataset partitioning.
[0028] S2: Transmit the feature vectors of the SU nodes obtained in S1 to the fusion center;
[0029] S3: Establish the SVM classifier to be tuned and initialize the PSO search space and fitness function;
[0030] S4: Optimize the PSO module and return the globally optimal parameters. Perform SVM classification training, select the optimal parameter combination obtained from the PSO module, and train the SVM classifier to obtain the SVM decision module;
[0031] S5: Perform global decision-making, using a trained SVM decision module to make a decision on the test samples or real-time observation data, and output a global decision on whether the channel is occupied by the PU.
[0032] Furthermore, the collection of the data includes at least the following steps:
[0033] At each SU node, energy detection is performed on the received signal within a preset period, energy characteristic values are calculated, and sample feature vectors are formed.
[0034] In the process of spectrum sensing, the first The signals received by each SU are described by the following two assumptions:
[0035]
[0036] in, Indicates the first The SU in the first The signal received at each sampling point; The signal emitted by the PU; Let G represent independent and identically distributed zero-mean Gaussian white noise with variance . , ; For PU to the first The channel coefficients of each SU, taking into account both path loss and Rayleigh fading, are described by formula (2):
[0037]
[0038] in, The fast fading coefficient is represented by a complex Gaussian distribution. The distance between PU and SU is the Euclidean distance. This refers to the path loss factor.
[0039] Energy detection methods achieve spectrum sensing by statistically analyzing signal energy. The normalized detection statistic of a single SU for the received signal within one sensing period is defined as follows:
[0040]
[0041] In the assumption In this case, the PU does not transmit a signal, and the SU only receives noise. Therefore, Follow the mean The central chi-square distribution, that is, ;
[0042] In the assumption The PU transmits a signal, and the SU receives a signal consisting of a signal term and noise. Assume the transmitted PU signal has a variance. For a zero-mean Gaussian random variable, then Will follow the shape as , scale is Gamma distribution:
[0043]
[0044] in Signal-to-noise ratio;
[0045] Spectrum occupancy decisions are based on detection statistics and set thresholds. The comparison implementation, specifically the decision rules are as follows:
[0046] .
[0047] Furthermore, S3 includes at least the following steps:
[0048] In the fusion center, the PSO module initializes several particles to form a particle swarm;
[0049] Each particle represents a candidate combination of SVM parameters, with a kernel parameter of γ and a penalty factor of C;
[0050] The particle swarm performs an iterative search using velocity and position update formulas.
[0051]
[0052] in, It is a particle The current velocity at time t; It is a particle At the current position at time t; This represents the individual's historical optimal solution. The optimal solution for the population; Inertial weights are used to balance global and local search capabilities; and These are constants, which respectively modulate the effects on individual cognition and social cooperation; To add randomness to random numbers in the range [0,1]; It is a particle The new velocity at time t+1;
[0053] Cross-validation accuracy or the area under the ROC curve (AUC) is used as the fitness function;
[0054]
[0055] Update the individual and global extrema until convergence or the maximum number of iterations is reached.
[0056] Compared with the prior art, the beneficial effects of the present invention are:
[0057] This invention introduces a hyperparameter auto-optimization module based on particle swarm optimization (PSO) into the fusion center, enabling the kernel parameters and penalty factors of the SVM classifier to adaptively adjust under dynamic channel conditions and different signal-to-noise ratios, thereby achieving a better trade-off between detection accuracy, robustness, and computational efficiency. Attached Figure Description
[0058] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0059] Figure 1 This is a schematic diagram of the system architecture of the present invention;
[0060] Figure 2 This is a flowchart of the process of the present invention. Detailed Implementation
[0061] The technical solutions of the present invention will be clearly and completely described below with reference to the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments.
[0062] Example 1:
[0063] Please see Figure 1 A PSO-based SVM collaborative spectrum sensing system includes at least a cognitive user, an authorized user, and a fusion center;
[0064] Authorized users, also known as primary users (PUs), transmit signals within the authorized frequency band. During the propagation process, the signals are affected by path loss and fading.
[0065] Cognitive users, or secondary users (SUs), obtain local observation data by randomly distributing multiple SUs in the network and periodically sampling energy in the target frequency band.
[0066] The fusion center, or FC, receives observation data uploaded by each SU and uses it for unified decision-making.
[0067] The fusion center is equipped with a PSO module and an SVM decision module.
[0068] The SVM decision module is used for binary classification (channel idle / occupied) based on the energy characteristics of SU.
[0069] The PSO module is used in conjunction with the SVM decision module to jointly optimize the kernel parameters and penalty factors of the SVM using the particle swarm optimization algorithm.
[0070] Example 2:
[0071] Please see Figure 2 A PSO-based SVM cooperative spectrum sensing method, used in the above embodiment one, includes at least the following steps:
[0072] S1: Perform data collection and preprocessing. Data collection is performed by energy sampling through SU nodes. Preprocessing includes at least feature extraction, normalization, and dataset partitioning.
[0073] S2: Transmit the feature vectors of the SU nodes obtained in S1 to the fusion center;
[0074] S3: Establish the SVM classifier to be tuned and initialize the PSO search space and fitness function;
[0075] S4: Optimize the PSO module and return the globally optimal parameters. Perform SVM classification training, select the optimal parameter combination obtained from the PSO module, and train the SVM classifier to obtain the SVM decision module;
[0076] S5: Perform global decision-making, using a trained SVM decision module to make a decision on the test samples or real-time observation data, and output a global decision on whether the channel is occupied by the PU.
[0077] Data collection includes at least the following steps:
[0078] At each SU node, energy detection is performed on the received signal within a preset period, energy characteristic values are calculated, and sample feature vectors are formed.
[0079] In the process of spectrum sensing, the first The signals received by each SU are described by the following two assumptions:
[0080]
[0081] in, Indicates the first The SU in the first The signal received at each sampling point; The signal emitted by the PU; Let G represent independent and identically distributed zero-mean Gaussian white noise with variance . , ; For PU to the first The channel coefficients of each SU, taking into account both path loss and Rayleigh fading, are described by formula (2):
[0082]
[0083] in, The fast fading coefficient is represented by a complex Gaussian distribution. The distance between PU and SU is the Euclidean distance. This refers to the path loss factor.
[0084] Energy detection methods achieve spectrum sensing by statistically analyzing signal energy. The normalized detection statistic of a single SU for the received signal within one sensing period is defined as follows:
[0085]
[0086] In the assumption In this case, the PU does not transmit a signal, and the SU only receives noise. Therefore, Follow the mean The central chi-square distribution, that is, ;
[0087] In the assumption The PU transmits a signal, and the SU receives a signal consisting of a signal term and noise. Assume the transmitted PU signal has a variance. For a zero-mean Gaussian random variable, then Will follow the shape as , scale is Gamma distribution:
[0088]
[0089] in Signal-to-noise ratio;
[0090] Spectrum occupancy decisions are based on detection statistics and set thresholds. The comparison implementation, specifically the decision rules are as follows:
[0091] .
[0092] S3 includes at least the following steps:
[0093] In the fusion center, the PSO module initializes several particles to form a particle swarm;
[0094] Each particle represents a candidate combination of SVM parameters, with a kernel parameter of γ and a penalty factor of C;
[0095] The particle swarm performs an iterative search using velocity and position update formulas.
[0096]
[0097] in, It is a particle The current velocity at time t; It is a particle At the current position at time t; This represents the individual's historical optimal solution. The optimal solution for the population; Inertial weights are used to balance global and local search capabilities; and These are constants, which respectively modulate the effects on individual cognition and social cooperation; To add randomness to random numbers in the range [0,1]; It is a particle The new velocity at time t+1;
[0098] Cross-validation accuracy or the area under the ROC curve (AUC) is used as the fitness function;
[0099]
[0100] Update the individual and global extrema until convergence or the maximum number of iterations is reached.
[0101] Working principle:
[0102] 1. Energy detection modeling under a collaborative spectrum sensing framework
[0103] Establish a cooperative spectrum sensing system model between primary users (PU) and secondary users (SU) in a cognitive radio network.
[0104] Each SU obtains local observations through energy detection and forms local detection results or statistics.
[0105] This step provides the basic feature input for subsequent machine learning modeling, ensuring the correspondence between the solution and the actual communication scenario.
[0106] 2. Support Vector Machine (SVM) as a global decision maker
[0107] A global decision model is constructed by using the energy detection statistics of multiple SUs as input features.
[0108] Compared to traditional OR / AND decision rules, SVM can learn complex nonlinear decision boundaries, improving detection accuracy under low signal-to-noise ratio conditions.
[0109] 3. SVM Parameter Optimization Mechanism Based on Particle Swarm Optimization (PSO)
[0110] To address the challenges of manually selecting the penalty factor C and kernel function parameter γ in SVM classifiers, which are sensitive to performance issues, the PSO algorithm is introduced for global search optimization.
[0111] During the PSO iteration process, AUC is used as the fitness function to dynamically update the particle swarm, ultimately obtaining the globally optimal parameter combination.
[0112] Compared with traditional manual parameter tuning or grid search, this method can converge quickly in a large search space and avoid overfitting.
[0113] 4. Joint optimization and judgment process design
[0114] After the PSO algorithm is completed, the final SVM model is retrained using the optimal parameters to obtain the global decision maker.
[0115] By optimizing the training process, the spectrum sensing system exhibits higher detection probability and better ROC curve performance in typical wireless channels (Rayleigh fading, Rice fading, etc.).
[0116] Key technology points sorted as follows:
[0117] (1) PSO algorithm optimization mechanism → (2) SVM decision maker → (3) Energy detection cooperative input → (4) Final joint process design.
[0118] The PSO algorithm optimization mechanism is the core innovation, the SVM decision maker is the key support, and the energy detection collaborative input and process design are the parts that ensure implementation and integrity.
[0119] In summary, the specific advantages and reasons for the present invention over the prior art are as follows:
[0120] ① Improve detection accuracy ( (Boost, AUC enhancement)
[0121] By treating the hyperparameters C and kernel parameter γ of SVM as continuous variables and globally searching them in the parameter space using PSO, the "missed solutions" or "undersampling" problems caused by step size selection in traditional discrete grid search are avoided, thus finding a hyperparameter combination closer to the optimal one.
[0122] Simulation experiments (under typical path loss factor conditions) show that the area under the ROC curve (AUC) of the PSO-SVM described in this invention is improved by approximately 5% compared to the unoptimized / manually configured SVM, indicating that the overall detection performance is indeed improved. This improvement stems from the better fit of the SVM to the discriminant surface of positive and negative samples under different signal-to-noise ratio distributions after PSO algorithm optimization.
[0123] ② Improve robustness under low / medium SNR
[0124] PSO-SVM can automatically adapt to the SNR distribution of samples, making the classification decision boundary more robust and reducing the false negative rate under moderate fading and low SNR conditions. And maintain or reduce the false alarm rate within a controllable range. ).
[0125] In theory, optimized kernel parameters can better characterize the nonlinear distribution of energy features (especially when the receiving conditions of different SUs differ greatly), thus resulting in stronger overall discrimination capability when merging information from multiple nodes.
[0126] ③ Enhance adaptability and deployment flexibility (adaptation to changes in channel / noise models)
[0127] PSO can run online or periodically to update SVM hyperparameters based on the latest training / validation samples, enabling the system to adapt to environmental changes (including changes in path loss, fading type, etc.) and avoiding the low adaptability problem that requires manual retuning.
[0128] Despite various fading models (such as Rayleigh, Rician, and Nakagami) and complex noise, PSO-SVM can still obtain relatively robust hyperparameter combinations through re-optimization, thereby enhancing the universality of the method.
[0129] ④ The trade-off between computational efficiency and engineering implementation advantages
[0130] Compared to exhaustive grid search (whose complexity increases dramatically with the number of grid points), PSO can explore the continuous parameter space with a small number of particles and a finite number of iterations. It typically requires significantly fewer model evaluations than high-resolution grid search, thus reducing the overall computational burden.
[0131] In engineering implementation, PSO parameter tuning can adopt a strategy of offline training + online fine-tuning: offline / periodic optimization is performed when the system starts up or the environment changes significantly (to ensure robustness), while daily operation only requires low-cost online fine-tuning or the most recent optimization result is used directly, balancing real-time performance and performance.
[0132] It will be apparent to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the present invention. No reference numerals in the claims should be construed as limiting the scope of the claims.
Claims
1. A PSO-based SVM cooperative spectrum sensing system, characterized in that: It includes at least cognitive users, authorized users, and integration centers; The authorized user, i.e. the primary user PU, transmits signals within the authorized frequency band. The signals are affected by path loss and fading during propagation. The cognitive user, or sub-user (SU), obtains local observation data by randomly distributing multiple SUs in the network and periodically sampling energy in the target frequency band. The fusion center, or FC, receives observation data uploaded by each SU and uses it for unified decision-making. The fusion center is equipped with a PSO module and an SVM decision module. The SVM decision module is used for binary classification based on the energy features of SU; The PSO module is used in conjunction with the SVM decision module to jointly optimize the kernel parameters and penalty factor of the SVM using the particle swarm optimization algorithm.
2. A PSO-based SVM cooperative spectrum sensing method, used in the PSO-based SVM cooperative spectrum sensing system described in claim 1, characterized in that: At least the following steps are included: S1: Perform data collection and preprocessing. The data collection is performed by energy sampling through SU nodes. The preprocessing includes at least feature extraction, normalization, and dataset partitioning. S2: Transmit the feature vectors of the SU nodes obtained in S1 to the fusion center; S3: Establish the SVM classifier to be tuned and initialize the PSO search space and fitness function; S4: Optimize the PSO module, return the globally optimal parameters for SVM classification training, select the optimal parameter combination obtained from the PSO module, train the SVM classifier to obtain the SVM decision module. S5: Perform global decision-making, using a trained SVM decision module to make a decision on the test samples or real-time observation data, and output a global decision on whether the channel is occupied by the PU.
3. The SVM cooperative spectrum sensing method based on PSO optimization according to claim 2, characterized in that: The collection of the data includes at least the following steps: At each SU node, energy detection is performed on the received signal within a preset period, energy characteristic values are calculated, and sample feature vectors are formed. In the process of spectrum sensing, the first The signals received by each SU are described by the following two assumptions: in, Indicates the first The SU in the first The signal received at each sampling point; The signal emitted by the PU; Let G represent independent and identically distributed zero-mean Gaussian white noise with variance . , ; For PU to the first The channel coefficients of each SU, taking into account both path loss and Rayleigh fading, are described by formula (2):
4. Among them, The fast fading coefficient is represented by a complex Gaussian distribution. The distance between PU and SU is the Euclidean distance. This refers to the path loss factor. Energy detection methods achieve spectrum sensing by statistically analyzing signal energy. The normalized detection statistic of a single SU for the received signal within one sensing period is defined as follows: In the assumption In this case, the PU does not transmit a signal, and the SU only receives noise. Therefore, Follow the mean The central chi-square distribution, that is, ; In the assumption The PU transmits a signal, and the SU receives a signal consisting of a signal term and noise. Assume the transmitted PU signal has a variance. a zero-mean Gaussian random variable Will follow the shape as , scale is Gamma distribution: in Signal-to-noise ratio; Spectrum occupancy decisions are based on detection statistics and set thresholds. The comparison implementation, specifically the decision rules are as follows: 。 5. The SVM cooperative spectrum sensing method based on PSO optimization according to claim 3, characterized in that: The S3 includes at least the following steps: In the fusion center, the PSO module initializes several particles to form a particle swarm; Each particle represents a candidate combination of SVM parameters, with a kernel parameter of γ and a penalty factor of C; The particle swarm performs an iterative search using velocity and position update formulas.
6. Among them, It is a particle The current velocity at time t; It is a particle At the current position at time t; This represents the individual's historical optimal solution. The optimal solution for the population; Inertial weights are used to balance global and local search capabilities; and These are constants, which respectively modulate the effects on individual cognition and social cooperation; To add randomness to random numbers in the range [0,1]; It is a particle The new velocity at time t+1; Cross-validation accuracy or the area under the ROC curve is used as the fitness function; 7. Update the individual extrema and global extrema until convergence or the maximum number of iterations is reached.