A method for identifying radiation source individuals based on adaptive black spider monkey algorithm
The adaptive black spider monkey algorithm optimizes CNN network weights to enhance radiation source identification accuracy and reliability by integrating deviation and clustering losses, addressing the limitations of existing methods in complex electromagnetic environments.
Patent Information
- Application Number
- CN202210767193.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-06-30
- Publication Date
- 2024-12-31
- Estimated Expiration
- 2042-06-30
AI Technical Summary
Existing methods for identifying individual radiation sources face challenges with low accuracy, poor reliability, and weak generalization due to complex electromagnetic environments and fuzzy classification boundaries, with existing loss functions and algorithms not adequately addressing these issues.
A method using an adaptive black spider monkey algorithm to optimize hyperparameter weights in a CNN network, integrating quadruple and center clustering losses, and constructing intra-class and inter-class deviation matrices to enhance the reliability and adaptability of radiation source identification.
The method improves network convergence speed, generalization, and accuracy in identifying radiation sources by optimizing weight changes and expanding search ranges, ensuring reliable and adaptable identification.
Smart Images

Figure CN115114960B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of signal recognition, and in particular relates to a method for identifying individual radiation sources based on an adaptive black spider monkey algorithm. Background Art
[0002] Traditional methods for identifying individual radiation sources usually extract radiation source features, input them into neural networks for classification, and obtain identification results. As the electromagnetic environment and modulation methods become increasingly complex, traditional methods can no longer meet the needs of practical applications for identifying individual radiation sources. Feature extraction and identification methods based on abnormal data detection and metric learning have emerged.
[0003] Anomaly detection of radiation sources can be based on models, proximity or density to find outliers. This method often relies on expert experience to determine the threshold, resulting in weak adaptability and poor generalization. Metric learning uses sample distance in feature space to achieve classification, which enhances adaptability, but the classification boundaries are fuzzy, and there are problems of poor reliability and low recognition efficiency.
[0004] In his patent application "Open Set Radiation Source Individual Identification Method Based on Deep Learning" (patent number: CN202010723991.1), Wang Qing constructed open and closed set activation vectors to extract inter-class difference features and intra-class common features, thereby achieving the classification of known radiation sources and the discrimination of unknown radiation sources. However, the loss function used in this method has the defect of low intra-class aggregation, resulting in poor performance in the individual identification of radiation sources. In his paper "Research on Individual Identification of Unknown Radiation Sources Based on Deep Learning", Lin Wanjie improved the triple loss function and optimized the direction of gradient descent, but this method only uses the distance between sample classes to obtain the classification boundary, which is not reliable enough. If the multiple relationships of the samples can be weighted when constructing the loss function, and an intelligent algorithm is designed to intelligently optimize their weights, the generalization and adaptability of the network can be enhanced, and the accuracy of individual identification of radiation sources can be effectively improved. Summary of the invention
[0005] The object of the present invention is to provide a method for identifying individual radiation sources based on an adaptive black spider monkey algorithm.
[0006] A radiation source individual identification method based on an adaptive black spider monkey algorithm comprises the following steps:
[0007] Step 1: Obtain known radiation source signals to form a training set sample = {sig1(t), sig2(t), ..., sig i (t),...,sig N (t)}; Get the signal containing the unknown radiation source to form a test set test = {signal1(t), signal2(t), ..., signal i(t),...,signal N (t)};
[0008] Among them, sig i (t) is the i-th signal in the sample set, signal i (t) is the i-th signal in the test set, i = 1, 2, ..., N, N is the number of radiation source signals, and t represents the time domain;
[0009] Step 2: Perform short-time Fourier transform on the radiation source signals in the training set sample to obtain the time-frequency diagram corresponding to each radiation source signal, denoted as TF = {TF1, TF2, ..., TF i ,...,TF N}; Perform short-time Fourier transform on the radiation source signals in the test set test to obtain the time-frequency diagram corresponding to each radiation source signal, denoted as TTF = {TTF1, TTF2, ..., TTF i ,...,TTF N};
[0010] Step 3: Build a CNN network as a feature extraction module, extract features from the time-frequency diagram of the known radiation source signals in the training set, and obtain the embedding vector corresponding to each known radiation source signal to form a vector distribution E = {e1, e2, ..., e i ,...,e N}; e i For TF i The corresponding embedding vector;
[0011] Step 4: Divide E into k subsets according to the radiation source category, denoted as E = {E1, E2, ..., E c ,...,E k},c=1,2,...,k,E c is the set of vectors belonging to the cth type of radiation source; all N embedded vectors in E are constructed into N / 2 quadruplets;
[0012] The rule for forming a quaternion is: randomly select a subset E c The two different vectors in are set as fixed samples a and positive samples p, and then two different vectors of any other subset are randomly selected as negative samples n1 and n2 to form a<a,p,n1,n2> Quadruple;
[0013] Step 5: Construct the loss function Loss in the training phase, and optimize the hyperparameter weights λ1, λ2, and λ3 of Loss through the adaptive black spider monkey algorithm to obtain the optimal parameter combination;
[0014] The loss function Loss is:
[0015] Loss = λ1loss Quadruplet +λ2loss Center +λ3loss Dispersi on
[0016] Among them, λ1, λ2, λ3 are hyperparameter weights of [0,1], and λ1+λ2+λ3=1;
[0017] loss Quadruplet is the quadruple loss;
[0018]
[0019]
[0020] Among them, loss Quad is the loss of the Quadth quadruple; D a,p is the Euclidean distance between a and p in the quadruple, D a,p =||ap||2; is the Euclidean distance between a and n1 in the quaternion, is the Euclidean distance between n1 and n2 in the quaternion, max(·) represents the maximum value function; α and β are the set thresholds;
[0021] loss Center is the center clustering loss;
[0022]
[0023]
[0024] in, For each E c The mean vector of the median vector;
[0025] loss Dispersion is the deviation loss;
[0026]
[0027] Among them, Tr[·] is the trace of the matrix; Indicates S W Find the inverse, S W is the total intra-class dispersion matrix, For each E c The intra-class dispersion matrix of S D is the total deviation matrix, S D =S W +S B ; S B is the total inter-class dispersion matrix, C all is the mean vector of all vectors,
[0028] Step 6: Set TF = {TF1, TF2, ..., TF i ,...,TF N} as the training set, train the CNN network built in step 3, and use the loss function Loss constructed in step 5 to obtain the optimal model;
[0029] Step 7: Set TF = {TF1, TF2, ..., TF i ,...,TF N} is input into the trained CNN network, and E = {e1, e2, ..., e i ,...,e N}; Calculate each vector e i To the center of the vector The Euclidean distance Determine each vector e i Corresponding to the minimum Euclidean distance, e i Classify it into this category to realize the classification of known radiation source individuals, and set the maximum value of all Euclidean distances obtained as the maximum distance threshold;
[0030]
[0031]
[0032] Among them, e b For subset E c The bth sample in, b=1,2,..,m c , m c For subset E c The number of samples in the equation; ||·||2 is the L2 norm operation;
[0033] Step 8: Set TTF = {TTF1, TTF2, ..., TTF i ,...,TTF N} Input into the trained CNN network to obtain the distribution of the test set embedding vector and calculate the center of any vector to the known class vector The Euclidean distance is compared with the maximum distance threshold to identify the unknown radiation source individual;
[0034] Step 8.1: Set TTF = {TTF1, TTF2, ..., TTF i ,...,TTF N} Input into the trained CNN network to obtain the test set embedding vector distribution Etest :
[0035] E test ={e 1t ,e 2t ,...,e it ,...,e Nt}
[0036] Among them, e it TTF i The corresponding embedding vector;
[0037] Step 8.2: Calculate the vector e it To the center of the known class vector The Euclidean distance
[0038]
[0039] Step 8.3: If Then determine signal i (t) is an unknown radiation source individual:
[0040] Step 8.4: Use agglomerative hierarchical clustering method to achieve the final identification of unknown radiation source individuals.
[0041] Furthermore, in step 5, the method of optimizing the hyperparameter weights λ1, λ2, and λ3 of Loss by using the adaptive black spider monkey algorithm to obtain the optimal parameter combination is specifically as follows:
[0042] Step 5.1: Initialize the black spider monkey population parameters and location information, set the population size Z, the number of groups Group, the maximum number of groups MG, the search space dimension D, the local count maximum LCM = D × Z, the global count maximum GCM ∈ [Z / 2, 2Z], the perturbation rate pr ∈ (0, 1], and the maximum number of iterations MaxIt: initialize the local counter LCC and the global counter GCC to 0;
[0043] The position of each black spider monkey is composed of the hyperparameter weights λ1, λ2 and λ3 to be optimized. The position of the h-th black spider monkey is initialized as:
[0044]
[0045] in, represents the position of the h-th black spider monkey in the j-th dimension; U(0,1) is a random number uniformly distributed within (0,1); and are the minimum and maximum values of the h-th black spider monkey in the j-th dimension search interval, h=1,2,...,Z,j=1,2,...,D;
[0046] Step 5.2: Calculate the fitness value fit corresponding to the hth black spider monkey h ;
[0047]
[0048] Among them, Loss h is the loss function corresponding to the h-th black spider monkey;
[0049] Step 5.3: Calculate the potential position of the h-th black spider monkey;
[0050]
[0051] in, is the potential position of the h-th black spider monkey in the j-th dimension; is the position of the local leader of the s-th group in the j-th dimension, s∈(1,Group); is the position of the rth randomly selected black spider monkey in the jth dimension, r≠i; δ is a random number between [-1,1];
[0052] Step 5.4: Calculate the potential position fitness value newq_fit h , update the position of the black spider monkey;
[0053]
[0054] in, is the updated position of the h-th black spider monkey in the j-th dimension;
[0055] Step 5.5: Calculate the fitness value new_fit after updating the position h , calculate the probability prob of each black spider monkey being selected as the global leader h ;
[0056]
[0057] Among them, max_new_fit h Indicates all black spider monkeys new_fit h The maximum value of
[0058] Step 5.6: Randomly select a dimension for some black spider monkeys to update their positions;
[0059]
[0060] in, represents the position of the h-th black spider monkey after updating in the j-th dimension; GL j is the position of the global leader in the jth dimension; ζ is a random number between [-1,1]; B is the balance parameter between exploration and exploitation;
[0061]
[0062] Where iter is the current iteration number, iter = 1, 2, ..., MaxIt;
[0063] Step 5.7: Repeat step 5.6 until the number of position updates is greater than Z; if the global leader position is updated, set GCC to 0, otherwise increase the count by 1; if the local leader position is updated, set the local counter to 0, otherwise increase LCC by 1; compare the fitness values of all black spider monkeys to determine the global leader and the local leader;
[0064] Step 5.8: The local leader makes a decision. If all local leaders change, this step is not executed. If the LCC reaches the LCM, the LCC is reset to 0 and the position of the black spider monkeys in the group is updated.
[0065]
[0066] in, This is the position of the hth black spider monkey after it is updated again in the jth dimension at this stage; F is the sign of changing the search direction,
[0067] Step 5.9: The global leader makes a decision; if GCC exceeds GCM, GCC is reset to 0, and the current number of groups is compared with MG. If the number of groups is less than MG, a group is randomly split, otherwise all black spider monkeys are combined into one group;
[0068] Step 5.10: Repeat steps 5.2 to 5.9 for the new group until the number of iterations reaches the maximum number of iterations MaxIt, and the global optimal solution is obtained. The λ1, λ2, and λ3 corresponding to the optimal solution are used as the hyperparameter weights of the loss function.
[0069] Furthermore, in step 2, the short-time Fourier transform STFT i The formula is:
[0070]
[0071] Where f represents the frequency domain; τ is the integral variable; g(τ) is the window function; (·) * represents the conjugate transformation operation; e (·) To take the index operation.
[0072] Furthermore, the CNN network in step 3 has a total of 13 layers, including an input layer, 3 CNN modules, a fully connected layer, a softmax layer and an embedding layer; wherein the 0th layer is the input layer, the 1st to 9th layers are CNN modules, the 10th layer is the fully connected layer, the 11th layer is the softmax layer, and the 12th layer is the embedding layer; each CNN module includes 3 network layers, namely the 1st convolutional layer, the 2nd convolutional layer, and the 3rd pooling layer.
[0073] The beneficial effects of the present invention are:
[0074] The present invention constructs intra-class and inter-class deviation matrices, designs deviation loss, and integrates quadruple and center clustering losses, so that the construction of loss function is more reliable; the adaptive black spider monkey algorithm is designed to optimize the weight of loss function, construct a sign of changing the search direction, use spiral optimization search, expand the search range, introduce exploration and balanced development factors, make the weight change with the number of iterations, reduce the blindness of weight change, and enhance the generalization, accuracy and adaptability of the radiation source individual identification method. The present invention can not only improve the network convergence speed, increase the generalization and reliability of the network, but also accurately realize the individual identification of radiation sources, and has good applicability. BRIEF DESCRIPTION OF THE DRAWINGS
[0075] Figure 1 It is a schematic diagram of the overall process of the present invention.
[0076] Figure 2 Schematic diagram of the adaptive black spider monkey algorithm in Example 1 of the present invention. DETAILED DESCRIPTION
[0077] The present invention is further described below in conjunction with the accompanying drawings.
[0078] The purpose of the present invention is to design a new method for identifying individual radiation sources based on an adaptive black spider monkey algorithm to address the problems of low accuracy, poor reliability, and weak generalization in existing methods when identifying individual radiation sources.
[0079] To achieve the above object, the technical solution of the present invention comprises the following steps:
[0080] Step 1: Generate signals of known radiation sources to form a training set, and obtain signals containing unknown radiation sources to form a test set.
[0081] Step 2: Perform short-time Fourier transform on the radiation source signal in step 1 to obtain a time-frequency diagram.
[0082] Step 3: Build a CNN network as a feature extraction module to extract features from the time-frequency diagram of the known radiation source signal obtained in step 2.
[0083] Step 4: Construct the loss function of the training phase, take the embedding vector in step 3 as input, build the inter-class and intra-class deviation matrices, design the deviation loss, integrate the quadruple loss and the center clustering loss, and control the degree of aggregation of samples of the same class and the degree of separation of samples of different classes.
[0084] Step 5: Design an adaptive black spider monkey algorithm, optimize the hyperparameter weights of the loss function in step 4, construct a sign to change the search direction, use spiral optimization search, introduce exploration and development balance factors, and obtain the optimal parameter combination.
[0085] Step 6: Use the time-frequency diagram of the known radiation source signal generated in step 2 as a training set, train the network designed in step 3, use the loss function constructed in step 4 to obtain the optimal network model, calculate the Euclidean distance, and realize the individual identification of the known radiation source.
[0086] Step 7: Input the test set frequency graph generated in step 2 into the network trained in step 6 to obtain the test set embedding vector distribution, calculate the Euclidean distance from any vector to the center of the known class, compare it with the maximum distance threshold, and combine the clustering method to realize the individual identification of unknown radiation sources.
[0087] The present invention also includes some structural features:
[0088] Step 1 includes: generating a known radiation source signal to form a training set sample, and obtaining a signal containing an unknown radiation source to form a test set test:
[0089] sample={sig1(t),sig2(t),...,sig i (t),...,sig N (t)} (1)
[0090] test={signal1(t),signal2(t),...,signal i (t),...,signal N (t)} (2)
[0091] In the formula, sig i (t) is the i-th signal in the sample set, signal i (t) is test The i-th signal is concentrated, i=1,2,...,N, N is the number of radiation source signals, and t represents the time domain.
[0092] Step 3 includes: building a CNN network as a feature extraction module, and taking the known radiation source signal time-frequency map TF generated in step 2 as input. The CNN network structure has 13 layers, including an input layer, 3 CNN modules, a fully connected layer, a softmax layer, and an embedding layer. Among them, the 0th layer is the input layer; the 1st to 9th layers are CNN network layers, and each CNN module includes 3 network layers. Taking the first CNN module as an example, it includes the 1st convolution layer, the 2nd convolution layer, and the 3rd pooling layer; the 10th layer is a fully connected layer, the 11th layer is a softmax layer, and the 12th layer is an embedding layer.
[0093] The output g of the 10th fully connected layer 10 , input to the softmax layer, calculate the output of the softmax layer:
[0094]
[0095] In the formula, g i,10 is the output vector of the i-th data in the 10th layer, is the classification probability of the i-th sample label, v represents the predicted category, v∈(1,k), k represents the number of actual radiation sources, and softmax(·) is the softmax activation function.
[0096] Furthermore, the embedding layer embedding vector of each training set sample is obtained to form the vector distribution E:
[0097] E={e1,e2,...,e i ,...,e N} (4)
[0098] In the formula, e i is the embedding vector of the i-th sample.
[0099] Furthermore, the classification probability obtained by formula (3) is used to divide E into k subsets according to the radiation source category, denoted as E = {E1, E2, ..., E c ,...,E k},c=1,2,...,k,E c is the set of vectors belonging to the cth type of radiation source. Calculate E c Normalized vector center
[0100]
[0101] In the formula, e b For subset E c The bth sample in, b=1,2,..,m c , m cFor this subset E c The number of samples, ||·||2 is the L2 norm operation.
[0102] Step 4 includes: forming N / 2 quadruplets from all N embedding vectors in E according to the rule, and the formation rule of each quadruplet is: randomly taking a subset E c The two different vectors in are set as fixed samples a and positive samples p, and then two different vectors of any other subset are randomly selected as negative samples n1 and n2 to form a<a,p,n1,n2> Quadruplet.
[0103] Furthermore, the Euclidean distance D between a and p, a and n1, and n1 and n2 in each quadruple is calculated. a,p , and
[0104] D a,p =||ap||2 (6)
[0105]
[0106]
[0107] Furthermore, the loss of the Quadth quadruple is calculated using formulas (6), (7) and (8): Quad :
[0108]
[0109] Wherein, Quad = 1, 2, ..., N / 2, max(·) represents the maximum value function, and α and β are the set thresholds.
[0110] Further, calculate the loss loss of all quadruplets Quadruplet :
[0111]
[0112] Calculate each E c The mean vector of the vector samples in
[0113]
[0114] Further, calculate the center clustering loss loss Center :
[0115]
[0116] Furthermore, we calculate each E c The intra-class dispersion matrix
[0117]
[0118] In the formula, (·) T Performs a matrix transpose operation.
[0119] Further, calculate the total intra-class deviation matrix S W :
[0120]
[0121] Calculate the mean vector C of all vector samples all :
[0122]
[0123] Furthermore, according to formulas (11) and (15), the total inter-class dispersion matrix S is calculated B :
[0124]
[0125] Further, calculate the total deviation matrix S D :
[0126] S D =S W +S B (17) Further, according to the total intra-class deviation matrix S W and the total deviation matrix S D Calculate the deviation loss Dispersion :
[0127]
[0128] In the formula, Indicates S W Find the inverse, Tr[·] is the trace of the matrix.
[0129] Furthermore, according to formulas (9), (12) and (18), the final loss function Loss is constructed:
[0130] Loss = λ1loss Quadruplet +λ2loss Center +λ3loss Dispersion (19)
[0131] Where λ1, λ2, and λ3 are hyperparameter weights in [0,1], and λ1+λ2+λ3=1.
[0132] Step 5 includes: designing an adaptive black spider monkey algorithm, solving λ1, λ2 and λ3 in formula (19). Initializing the black spider monkey population parameters and location information. Set the population size Z, the number of groups Group, the maximum number of groups MG, the search space dimension D, the local counter LCC and the global counter GCC, the local count maximum LCM, LCM = D × Z, the global count maximum GCM, GCM ∈ [Z / 2, 2Z], the perturbation rate pr, pr ∈ (0, 1], the maximum number of iterations MaxIt, and LCC and GCC are both initially 0.
[0133] The position of each black spider monkey consists of the hyperparameter weights λ1, λ2, and λ3 to be optimized, and the position of the h-th black spider monkey is initialized:
[0134]
[0135] In the formula, represents the position of the h-th black spider monkey in the j-th dimension, U(0,1) is a random number uniformly distributed within (0,1), and are the minimum and maximum values of the h-th black spider monkey in the j-th dimension search interval, h=1,2,...,Z,j=1,2,...,D.
[0136] Further, calculate the fitness value fit corresponding to the hth black spider monkey h :
[0137]
[0138] In the formula, Loss h is the loss function in formula (19) corresponding to the hth black spider monkey. The black spider monkey with the largest fitness value in each group is regarded as the local leader, and the black spider monkey with the largest fitness value in the population is regarded as the global leader.
[0139] Furthermore, the potential position of the h-th black spider monkey is calculated as follows:
[0140]
[0141] In the formula, is the potential position of the h-th black spider monkey in the j-th dimension, is the position of the local leader of the sth group in the jth dimension, s∈(1,Group), is the position of the rth randomly selected black spider monkey in the jth dimension, r≠i, and δ is a random number between [-1,1].
[0142] Furthermore, the potential position fitness value newq_fit is obtained using formula (21): h , and fith For comparison, the position of the black spider monkey is updated. The position update formula is:
[0143]
[0144] In the formula, is the updated position of the h-th black spider monkey in the j-th dimension.
[0145] Further, the fitness value new_fit of the updated position is obtained using formula (21): h , calculate the probability prob that the black spider monkey is selected as the global leader h :
[0146]
[0147] Where max_new_fit h Indicates all black spider monkeys new_fit h The maximum value of .
[0148] Furthermore, a dimension is randomly selected for the black spider monkey to update its position:
[0149]
[0150] In the formula, It represents the updated position of the h-th black spider monkey in the j-th dimension. j is the position of the global leader in the jth dimension, ζ is a random number between [-1,1]. B is the balance parameter between exploration and exploitation:
[0151]
[0152] Where iter is the current iteration number, iter = 1, 2, ..., MaxIt.
[0153] Further, formula (25) is repeated until the number of position updates is greater than Z. If the position of the global leader is updated, GCC is set to 0, otherwise the count is increased by 1. If the position of the local leader is updated, the local counter is set to 0, otherwise the LCC is increased by 1. The fitness values of all black spider monkeys are compared to determine the global leader and the local leader.
[0154] Further, enter the local leader decision phase. If all local leaders have changed, this step is not executed. If LCC reaches LCM, reset LCC to 0 and update the position of the black spider monkey in the group:
[0155]
[0156] In the formula, is the position of the h-th black spider monkey after it is updated again in the j-th dimension, and F is the sign of changing the search direction:
[0157]
[0158] Then, the global leader decision phase is entered. If GCC exceeds GCM, GCC is reset to 0, and the current number of groups is compared with MG. If the number of groups is less than MG, a group is randomly split, otherwise all black spider monkeys are combined into one group.
[0159] Furthermore, Formula (21) to Formula (28) are repeated for the new group until the number of iterations reaches MaxIt, and the global optimal solution is obtained. The λ1, λ2, and λ3 corresponding to the optimal solution are used as the hyperparameter weights of the loss function.
[0160] Step 6 includes: using the known radiation source signal time-frequency diagram obtained in step 2 as a training set, training the network designed in step 3, forward propagating to obtain the embedded vector distribution, using the loss function in step 4 to update the network weights and bias coefficients until the network has learned all samples, terminating the training, and saving the optimal network model.
[0161] Furthermore, we calculate each vector e i To the center of the vector The Euclidean distance
[0162]
[0163] Furthermore, we determine each vector e i The corresponding minimum Euclidean distance is e i Classified into this category, the known radiation source individual identification is realized, and the maximum value of all Euclidean distances is set to the maximum distance threshold.
[0164] Step 7 includes: inputting the test set time-frequency diagram obtained in step 2 into the network trained in step 6 to obtain the embedded vector distribution E test :
[0165] E test ={e 1t ,e 2t ,...,e it ,...,e Nt} (30)
[0166] In the formula, e it is the embedding vector of the i-th sample in the test set.
[0167] Furthermore, we calculate each vector e it To the center of the known class vector The Euclidean distance
[0168]
[0169] Furthermore, samples that satisfy the following formula are determined as unknown radiation source individuals:
[0170]
[0171] In the formula, is the i-th embedding vector e it With any known class vector center The minimum Euclidean distance.
[0172] Furthermore, the agglomerative hierarchical clustering method is used to realize the individual identification of unknown radiation sources.
[0173] The present invention constructs intra-class and inter-class deviation matrices, designs deviation loss, and integrates quadruple and center clustering losses, so that the construction of loss function is more reliable; at the same time, an adaptive black spider monkey algorithm is designed to optimize the weight of the loss function, a sign of changing the search direction is constructed, spiral optimization search is used, the search range is expanded, and exploration and balanced development factors are introduced to change the weight with the number of iterations, thereby reducing the blindness of weight change and enhancing the generalization, accuracy and adaptability of the radiation source individual identification method.
[0174] Embodiment 1:
[0175] The purpose of the present invention is to propose a new radiation source individual identification method based on an adaptive black spider monkey algorithm, which mainly solves the problems of low recognition accuracy, poor reliability, and weak generalization of existing identification methods. The present invention constructs intra-class and inter-class deviation matrices, designs deviation loss, integrates quadruple and center clustering losses, designs an adaptive black spider monkey algorithm to optimize the weight of the loss function, constructs a sign to change the search direction, uses spiral optimization search, expands the search range, introduces exploration and development balance factors, changes the weight with the number of iterations, further designs and trains a CNN neural network, migrates the network model to obtain an embedded vector, and realizes radiation source individual identification by comparing the Euclidean distance between vectors with a threshold.
[0176] As attached Figure 1 , which is a schematic flow chart of a radiation source individual identification method based on an adaptive black spider monkey algorithm according to the present invention.
[0177] Step 1: Generate known radiation source signals to form a training set sample, and obtain signals containing unknown radiation sources to form a test set test:
[0178] sample={sig1(t),sig2(t),...,sig i (t),...,sigN (t)} (33)
[0179] test={signal1(t),signal2(t),...,signal i (t),...,signal N (t)} (34)
[0180] In the formula, sig i (t) is the i-th signal in the sample set, signal i (t) is the i-th signal in the test set, i=1,2,...,N, N is the number of radiation source signals, and t represents the time domain.
[0181] Step 2: Perform short-time Fourier transform on each signal in the sample set in step 1 to obtain a time-frequency diagram, denoted as TF = {TF1, TF2, ..., TF i ,...,TF N Similarly, perform short-time Fourier transform on the test set signal to obtain a time-frequency diagram, denoted as TTF = {TTF1, TTF2, ..., TTF i ,...,TTF N}. Short-time Fourier transform STFT i The formula is:
[0182]
[0183] In the formula, f represents the frequency domain, τ is the integral variable, g(τ) is the window function, (·) * represents the conjugate transformation operation, e (·) To take the index operation.
[0184] Step 3: Build a CNN network as a feature extraction module to extract features from the time-frequency graph TF in step 2. The CNN network structure has 13 layers, including an input layer, three CNN modules, a fully connected layer, a softmax layer, and an embedding layer. Among them, the 0th layer is the input layer; the 1st to 9th layers are CNN network layers, and each CNN module includes 3 network layers. Taking the first CNN module as an example, it includes the 1st convolution layer, the 2nd convolution layer, and the 3rd pooling layer; the 10th layer is a fully connected layer; the 11th layer is a softmax layer; and the 12th layer is an embedding layer.
[0185] Step 3.1: Initialize the weight matrix u of the CNN network input layer 0 and the bias coefficient matrix q 0 , and get the output g of layer 0 0 =TF sample , TF sampleTF is a random training sample i .
[0186] Step 3.2: Use the output of step 3.1 as the input of the CNN module and calculate the output g of the first convolutional layer 1 :
[0187]
[0188] In the formula, u 1 and q 1 are the weight matrix and bias coefficient matrix of the first layer respectively, “*” is the convolution operation, g i,0 is the output vector of the i-th data in the 0th layer, and ψ(·) is the ReLU activation function.
[0189] Step 3.3: Use the output of step 3.2 as the input of the second convolutional layer and repeat formula (36) to obtain the output g of the second convolutional layer. 2 .
[0190] Step 3.4: g 2 As the input of the pooling layer, the third layer network output g is obtained 3 :
[0191] g 3 =maxpool(g 2 ) (37)
[0192] In the formula, maxpool(·) indicates the maximum pooling operation.
[0193] Step 3.5: Repeat steps 3.2 to 3.4 twice to get the 9th layer network output g 9 .
[0194] Step 3.6: g 9 Input to the fully connected layer and get the 10th layer network output g 10 :
[0195]
[0196] In the formula, g i,9 is the output vector of the i-th data in the 9th layer, u 10 and q 10 They are the weight matrix and bias coefficient matrix of the 10th layer respectively.
[0197] Step 3.7: g 10 Input to the softmax layer and calculate the output of the softmax layer:
[0198]
[0199] In the formula, gi,10 is the output vector of the i-th data in the 10th layer, is the classification probability of the i-th sample, v represents the predicted class, v ∈ (1, k), k represents the number of actual radiation sources, and softmax(·) is the softmax activation function.
[0200] Step 3.8: Obtain the embedding vector of each sample in the embedding layer to form a vector distribution E:
[0201] E = {e1, e2,..., e i ,..., e N} (40)
[0202] where e i is the embedding vector of the i-th sample.
[0203] Step 3.9: Use the classification probability obtained by formula (39) to divide E into k subsets according to the radiation source category, denoted as E = {E1, E2,..., E c ,..., E k}, c = 1, 2,..., k, and E c is the vector set belonging to the c-th type of radiation source. Calculate the c vector center after normalization of E
[0204]
[0205] where e b is the b-th sample in the subset E c , b = 1, 2,.., m c , m c is the number of samples in this subset E c , and ||·||2 is the L2 norm operation.
[0206] Step 4: Construct the loss function in the training stage. Use the embedding vectors in Step 3 as the input, construct the between-class and within-class scatter matrices, design the scatter loss, fuse the quadruple and center clustering losses, and control the within-class aggregation degree and between-class separation degree of the vectors.
[0207] Step 4.1: Construct N / 2 quadruples from all N embedding vectors in E according to the rule. The construction rule of each quadruple is: randomly select two different vectors in a certain subset E c , and set them as the fixed sample a and the positive sample p respectively. Then randomly select two different vectors from any other subset as the negative samples n1 and n2 to form a <a, p, n1, n2> quadruple.
[0208] Step 4.2: Calculate the Euclidean distances D between a and p, a and n1, and n1 and n2 in each quadruplea,p , and
[0209] D a,p =||ap||2 (42)
[0210]
[0211]
[0212] Step 4.3: According to formulas (42), (43) and (44), calculate the loss loss of the Quadth quadruple Quad :
[0213]
[0214] Wherein, Quad = 1, 2, ..., N / 2, max(·) represents the maximum value function, and α and β are the set thresholds.
[0215] Step 4.4: Calculate the loss of all quadruplets Quadruplet :
[0216]
[0217] Step 4.5: Calculate each E c Mean vector of the median vector
[0218]
[0219] Step 4.6: Calculate the center clustering loss loss Center :
[0220]
[0221] Step 4.7: According to formula (47), calculate each E c The intra-class dispersion matrix
[0222]
[0223] In the formula, (·) T Performs a matrix transpose operation.
[0224] Step 4.8: Calculate the total intra-class dispersion matrix S W :
[0225]
[0226] Step 4.9: Calculate the mean vector C of all vectors all :
[0227]
[0228] Step 4.10: According to formulas (47) and (51), calculate the total inter-class dispersion matrix S B :
[0229]
[0230] Step 4.11: Calculate the total deviation matrix S D :
[0231] S D =S W +S B (53) Step 4.12: Based on the total intra-class deviation matrix S W and the total deviation matrix S D Calculate the deviation loss Dispersion :
[0232]
[0233] In the formula, Indicates S W Find the inverse, Tr[·] is the trace of the matrix.
[0234] Step 4.13: According to formulas (45), (48) and (54), construct the final loss function Loss:
[0235] Loss = λ1loss Quadruplet +λ2loss Center +λ3loss Dispersion (55)
[0236] Where λ1, λ2, and λ3 are hyperparameter weights in [0,1], and λ1+λ2+λ3=1.
[0237] Step 5: Design an adaptive black spider monkey algorithm, optimize the hyperparameter weights λ1, λ2, and λ3 of Loss in step 4.13, construct a sign to change the search direction, use spiral optimization search, introduce exploration and development balance factors, and obtain the optimal parameter combination.
[0238] As attached Figure 2 , which is a schematic diagram of an adaptive black spider monkey algorithm according to Embodiment 1 of the present invention.
[0239] Step 5.1: Initialize the black spider monkey population parameters and location information. Set the population size Z, the number of groups Group, the maximum number of groups MG, the search space dimension D, the local counter LCC and the global counter GCC, the local count maximum LCM, LCM = D × Z, the global count maximum GCM, GCM ∈ [Z / 2, 2Z], the perturbation rate pr, pr ∈ (0, 1], the maximum number of iterations MaxIt, and both LCC and GCC are initially 0.
[0240] The position of each black spider monkey consists of the hyperparameter weights λ1, λ2, and λ3 to be optimized, and the position of the h-th black spider monkey is initialized:
[0241]
[0242] In the formula, represents the position of the h-th black spider monkey in the j-th dimension, U(0,1) is a random number uniformly distributed within (0,1), and are the minimum and maximum values of the h-th black spider monkey in the j-th dimension search interval, h = 1, 2, ..., Z, j = 1, 2, ..., D. In this example 1, the search space dimension is set to 3, the population size is set to 40, the number of small groups is set to 3, the maximum number of groups is set to 4, the global count maximum is set to 60, the perturbation rate is set to 0.6, and the maximum number of iterations is set to 500.
[0243] Step 5.2: Calculate the fitness value fit corresponding to the hth black spider monkey h :
[0244]
[0245] In the formula, Loss h is the loss function in formula (55) corresponding to the hth black spider monkey. In this example 1, the positions of the black spider monkey in the three dimensions are the values of λ1, λ2, and λ3, respectively. The black spider monkey with the largest fitness value in each group is regarded as the local leader, and the black spider monkey with the largest fitness value in the population is regarded as the global leader.
[0246] Step 5.3: Calculate the potential position of the hth black spider monkey using the formula:
[0247]
[0248] In the formula, is the potential position of the h-th black spider monkey in the j-th dimension, is the position of the local leader of the sth group in the jth dimension, s∈(1,Group), is the position of the rth randomly selected black spider monkey in the jth dimension, r≠i, and δ is a random number between [-1,1].
[0249] Step 5.4: Use formula (57) to get the potential position fitness value newq_fit h , and fit h For comparison, the position of the black spider monkey is updated. The position update formula is:
[0250]
[0251] In the formula, is the updated position of the h-th black spider monkey in the j-th dimension.
[0252] Step 5.5: Use formula (57) to get the fitness value new_fit of the updated position h , calculate the probability prob of each black spider monkey being selected as the global leader h :
[0253]
[0254] Where max_new_fit h Indicates all black spider monkeys new_fit h The maximum value of .
[0255] Step 5.6: Randomly select a dimension for some black spider monkeys to update their positions:
[0256]
[0257] In the formula, It represents the updated position of the h-th black spider monkey in the j-th dimension. j is the position of the global leader in the jth dimension, ζ is a random number between [-1,1]. B is the balance parameter between exploration and exploitation:
[0258]
[0259] Where iter is the current iteration number, iter = 1, 2, ..., MaxIt.
[0260] Step 5.7: Repeat step 5.6 until the number of position updates is greater than Z. If the global leader position is updated, set GCC to 0, otherwise increase the count by 1. If the local leader position is updated, set the local counter to 0, otherwise increase LCC by 1. Compare the fitness values of all black spider monkeys to determine the global leader and the local leader.
[0261] Step 5.8: The local leader makes a decision. If all local leaders have changed, this step is not executed. If the LCC reaches the LCM, the LCC is reset to 0 and the position of the black spider monkeys in the group is updated:
[0262]
[0263] In the formula, This is the position of the hth black spider monkey after it is updated again in the jth dimension at this stage, and F is the sign of changing the search direction:
[0264]
[0265] Step 5.9: The global leader makes a decision. If GCC exceeds GCM, GCC is reset to 0, and the current number of groups is compared with MG. If the number of groups is less than MG, a group is randomly split, otherwise all black spider monkeys are combined into one group.
[0266] Step 5.10: Repeat steps 5.2 to 5.9 for the new group until the number of iterations reaches the maximum number of iterations MaxIt, and the global optimal solution is obtained. The λ1, λ2, and λ3 corresponding to the optimal solution are used as the hyperparameter weights of the loss function.
[0267] Step 6: Use the time-frequency graph TF in step 2 as the training set, train the network designed in step 3, and use the loss function constructed in step 4 to obtain the optimal model to achieve individual identification of known radiation sources.
[0268] Step 6.1: Initialize CNN network parameters.
[0269] Step 6.2: Send TF into the model for forward propagation to obtain the embedded vector distribution.
[0270] Step 6.3: Use step 5 to optimize the loss function parameters, and use the back-propagation gradient algorithm to update the network weights and bias coefficients until the network has learned all samples, terminate the training, and save the optimal network model.
[0271] Step 6.4: Calculate each vector e i To the center of the vector The Euclidean distance
[0272]
[0273] Step 6.5: Determine each vector e i Corresponding to the minimum Euclidean distance, e i Classify it into this category to realize the classification of known radiation source individuals, and set the maximum value of all Euclidean distances obtained as the maximum distance threshold threshold.
[0274] Step 7: Input the time-frequency graph TTF in step 2 as the test set into the network trained in step 6 to obtain the embedding vector distribution of the test set and calculate the center of any vector to the known class vector The Euclidean distance is compared with the maximum distance threshold to identify the unknown radiation source individual.
[0275] Step 7.1: Input TTF into the network trained in step 6 to obtain the embedding vector distribution E test :
[0276] E test ={e 1t ,e 2t ,...,e it ,...,e Nt} (66)
[0277] In the formula, e it is the embedding vector of the i-th sample in the test set.
[0278] Step 7.2: Calculate the vector e it To the center of the known class vector The Euclidean distance
[0279]
[0280] Step 7.3: Determine the samples that satisfy the following formula as unknown radiation source individuals:
[0281]
[0282] In the formula, is the i-th embedding vector e it With any known class vector center The minimum Euclidean distance.
[0283] Step 7.4: Use agglomerative hierarchical clustering method to achieve the final identification of unknown radiation source individuals.
[0284] Embodiment 2:
[0285] Table 1 is a parameter table for generating individual signals of known radiation sources, where the intentional modulation signal is LFM, the carrier frequency is 40MHz, the pulse width is 7us, the sampling frequency is 100MHz, the signal bandwidth is 10MHz, and the number of sampling points is 1024; Table 2 is a comparison table of fitness values obtained after training the loss function parameters using the spider monkey algorithm and the adaptive black spider monkey algorithm of the present invention. Table 3 is a comparison table of network recognition rates of the test set under this loss function and the improved triplet loss function, and the test was repeated 500 times.
[0286] Table 1
[0287]
[0288] Table 2
[0289] Intelligent Algorithm Fitness value Spider Monkey Algorithm 0.831 Adaptive Black Spider Monkey Algorithm 0.985
[0290] Table 3
[0291] Loss Function Recognition rate <![CDATA[Loss=λ1loss Quadruplet +λ2loss Center +λ3loss Dispersion ]]> 96% Improved Triplet loss function 92.5%
[0292] In Example 2 of the present invention, 800 known radiation source signals are generated as a training set through signal modeling, 800 signals containing unknown radiation sources are obtained as a test set, the experiment is repeated 500 times, the method in Example 1 of the present invention is used to solve, the neural network is trained with the training set, and then the radiation source recognition rate is obtained with the test set. Compared with the original spider monkey algorithm, the designed adaptive black spider monkey algorithm has a higher fitness value of 0.985, and the designed loss function makes the network recognition rate as high as 96%.
[0293] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A radiation source individual identification method based on an adaptive black spider monkey algorithm, characterized in that: The following steps are involved: Step 1: Obtain known radiation source signals to form a training set sample = {sig1(t), sig2(t), ..., sig i (t),...,sig N (t)}; Get the signal containing the unknown radiation source to form a test set test = {signal1(t), signal2(t), ..., signal i (t),...,signal N (t)}; Among them, sig i (t) is the i-th signal in the sample set, signal i (t) is the i-th signal in the test set, i = 1, 2, ..., N, N is the number of radiation source signals, and t represents the time domain; Step 2: Perform short-time Fourier transform on the radiation source signals in the training set sample to obtain the time-frequency diagram corresponding to each radiation source signal, denoted as TF = {TF1, TF2, ..., TF i ,...,TF N }; Perform short-time Fourier transform on the radiation source signals in the test set test to obtain the time-frequency diagram corresponding to each radiation source signal, denoted as TTF = {TTF1, TTF2, ..., TTF i ,...,TTF N }; Step 3: Build a CNN network as a feature extraction module, extract features from the time-frequency diagram of the known radiation source signals in the training set, and obtain the embedding vector corresponding to each known radiation source signal to form a vector distribution E = {e1, e2, ..., e i ,...,e N };e i For TF i The corresponding embedding vector; Step 4: Divide E into k subsets according to the radiation source category, denoted as E = {E1, E2, ..., E c ,...,E k },c=1,2,...,k,E c is the set of vectors belonging to the cth type of radiation source; all N embedded vectors in E are constructed into N / 2 quadruplets; The rule for forming a quaternion is: randomly select a subset E c The two different vectors in are set as fixed samples a and positive samples p, and then two different vectors of any other subset are randomly selected as negative samples n1 and n2 to form a<a,p,n1,n2> Quadruple; Step 5: Construct the loss function Loss in the training phase, and optimize the hyperparameter weights λ1, λ2, and λ3 of Loss through the adaptive black spider monkey algorithm to obtain the optimal parameter combination; The loss function Loss is: Loss=λ1loss Quadruplet +λ2loss Center +λ3loss Dispersion Among them, λ1, λ2, λ3 are hyperparameter weights of [0,1], and λ1+λ2+λ3=1; loss Quadruplet is the quadruple loss; Among them, loss Quad is the loss of the Quadth quadruple; D a,p is the Euclidean distance between a and p in the quadruple, D a,p =||ap||2; is the Euclidean distance between a and n1 in the quaternary, is the Euclidean distance between n1 and n2 in the quaternion, max(·) represents the maximum value function; α and β are the set thresholds; loss Center is the center clustering loss; in, For each E c The mean vector of the median vector; loss Dispersion is the deviation loss; Among them, Tr[·] is the trace of the matrix; Indicates S W Find the inverse, S W is the total intra-class dispersion matrix, For each E c The intra-class dispersion matrix of S D is the total deviation matrix, S D =S W +S B ; S B is the total inter-class dispersion matrix, C all is the mean vector of all vectors, Step 6: Set TF = {TF1, TF2, ..., TF i ,...,TF N } as the training set, train the CNN network built in step 3, and use the loss function Loss constructed in step 5 to obtain the optimal model; Step 7: Set TF = {TF1, TF2, ..., TF i ,...,TF N } is input into the trained CNN network, and E = {e1, e2, ..., e i ,...,e N }; Calculate each vector e i To the center of the vector The Euclidean distance Determine each vector e i Corresponding to the minimum Euclidean distance, e i Classify it into this category to realize the classification of known radiation source individuals, and set the maximum value of all Euclidean distances obtained as the maximum distance threshold; Among them, e b For subset E c The bth sample in, b=1,2,..,m c , m c For subset E c The number of samples in the equation; ||·||2 is the L2 norm operation; Step 8: Set TTF = {TTF1, TTF2, ..., TTF i ,...,TTF N } Input into the trained CNN network to obtain the distribution of the test set embedding vector and calculate the center of any vector to the known class vector The Euclidean distance is compared with the maximum distance threshold to identify the unknown radiation source individual; Step 8.1: Set TTF = {TTF1, TTF2, ..., TTF i ,...,TTF N } Input into the trained CNN network to obtain the test set embedding vector distribution E test : AND test ={and 1t ,And 2t ,...,And it ,...,And Nt } Among them, e it TTF i The corresponding embedding vector; Step 8.2: Calculate the vector e it To the center of the known class vector The Euclidean distance Step 8.3: If Then determine signal i (t) is an unknown radiation source individual: Step 8.4: Use agglomerative hierarchical clustering method to achieve the final identification of unknown radiation source individuals.
2. The method for identifying radiation sources based on the adaptive black spider monkey algorithm according to claim 1, characterized in that: In step 5, the method for optimizing the hyperparameter weights λ1, λ2, and λ3 of Loss by using the adaptive black spider monkey algorithm to obtain the optimal parameter combination is specifically as follows: Step 5.1: Initialize the black spider monkey population parameters and location information, set the population size Z, the number of groups Group, the maximum number of groups MG, the search space dimension D, the local count maximum LCM = D × Z, the global count maximum GCM ∈ [Z / 2, 2Z], the perturbation rate pr ∈ (0, 1], and the maximum number of iterations MaxIt: initialize the local counter LCC and the global counter GCC to 0; The position of each black spider monkey is composed of the hyperparameter weights λ1, λ2 and λ3 to be optimized. The position of the h-th black spider monkey is initialized as: in, represents the position of the h-th black spider monkey in the j-th dimension; U(0,1) is a random number uniformly distributed within (0,1); and are the minimum and maximum values of the h-th black spider monkey in the j-th dimension search interval, h=1,2,...,Z,j=1,2,...,D; Step 5.2: Calculate the fitness value fit corresponding to the hth black spider monkey h ; Among them, Loss h is the loss function corresponding to the h-th black spider monkey; Step 5.3: Calculate the potential position of the h-th black spider monkey; in, is the potential position of the h-th black spider monkey in the j-th dimension; is the position of the local leader of the s-th group in the j-th dimension, s∈(1,Group); For the r The position of a randomly selected black spider monkey in the jth dimension, r≠i; δ is a random number between [-1,1]; Step 5.4: Calculate the potential position fitness value newq_fit h , update the position of the black spider monkey; in, is the updated position of the h-th black spider monkey in the j-th dimension; Step 5.5: Calculate the fitness value new_fit after updating the position h , calculate the probability prob of each black spider monkey being selected as the global leader h ; Among them, max_new_fit h Indicates all black spider monkeys new_fit h The maximum value of Step 5.6: Randomly select a dimension for some black spider monkeys to update their positions; in, represents the position of the h-th black spider monkey after updating in the j-th dimension; GL j is the position of the global leader in the jth dimension; ζ is a random number between [-1,1]; B is the balance parameter between exploration and exploitation; Where iter is the current iteration number, iter = 1, 2, ..., MaxIt; Step 5.7: Repeat step 5.6 until the number of position updates is greater than Z; if the global leader position is updated, set GCC to 0, otherwise increase the count by 1; if the local leader position is updated, set the local counter to 0, otherwise increase LCC by 1; compare the fitness values of all black spider monkeys to determine the global leader and the local leader; Step 5.8: The local leader makes a decision. If all local leaders change, this step is not executed. If the LCC reaches the LCM, the LCC is reset to 0 and the position of the black spider monkeys in the group is updated. in, This is the position of the hth black spider monkey after it is updated again in the jth dimension at this stage; F is the sign of changing the search direction, Step 5.9: The global leader makes a decision; if GCC exceeds GCM, GCC is reset to 0, and the current number of groups is compared with MG. If the number of groups is less than MG, a group is randomly split, otherwise all black spider monkeys are combined into one group; Step 5.10: Repeat steps 5.2 to 5.9 for the new group until the number of iterations reaches the maximum number of iterations MaxIt, and the global optimal solution is obtained. The λ1, λ2, and λ3 corresponding to the optimal solution are used as the hyperparameter weights of the loss function.
3. The method for identifying radiation sources based on the adaptive black spider monkey algorithm according to claim 1, characterized in that: In step 2, the short-time Fourier transform STFT i The formula is: Where f represents the frequency domain; τ is the integral variable; g(τ) is the window function; (·) * represents the conjugate transformation operation; e (·) To take the index operation.
4. The method for identifying radiation sources based on the adaptive black spider monkey algorithm according to claim 1, characterized in that: The CNN network in step 3 has a total of 13 layers, including an input layer, 3 CNN modules, a fully connected layer, a softmax layer and an embedding layer; wherein, the 0th layer is the input layer, the 1st to 9th layers are CNN modules, the 10th layer is the fully connected layer, the 11th layer is the softmax layer, and the 12th layer is the embedding layer; each CNN module includes 3 network layers, namely, the 1st convolutional layer, the 2nd convolutional layer, and the 3rd pooling layer.
Citation Information
Patent Citations
Open set radiation source individual identification method based on deep learning
CN111914919A
Extension spring optimization method based on improved black widow spider algorithm
CN113688573A
Open set identification method for radiation source individuals
CN113705446A
Multifaceted radiation detection and classification system
US20190353822A1