A method for identifying cloud-to-ground lightning based on lightning electric field signals
By using variational pattern decomposition and maximum entropy core learning in the lightning electric field signal recognition method, combined with mutual information feature selection, the problem of low recognition accuracy of small samples is solved, and the accuracy of recognition of lightning signals and the effectiveness of the lightning warning system is improved. .
Patent Information
- Application Number
- CN202310997171.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-09
- Publication Date
- 2024-12-03
- Estimated Expiration
- 2043-08-09
AI Technical Summary
The prior art recognizes cloud-ground flash signals, especially in small samples, and lacks comprehensive understanding of the complex lightning discharge process, resulting in limited identification efficiency and accuracy.
The recognition method based on lightning electric field signals is adopted, including data preprocessing, feature extraction and feature selection, denoising and normalization using variational mode decomposition, time domain, frequency domain and entropy features are extracted, and the maximum entropy kernel learning is constructed Identify the model and combine mutual information to perform feature selection to reduce model complexity.
It improves the recognition accuracy in small samples, enhances the feature extraction and classification accuracy of lightning signals, reduces false alarms and missed reports, improves the accuracy of the lightning warning system, and reduces the computational complexity.
Smart Images

Figure CN117195097B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of lightning signal recognition, and in particular to a cloud-to-ground lightning recognition method based on lightning electric field signals. Background Art
[0002] Lightning is one of the major serious natural disasters, which can cause forest and oil depot fires, power supply and communication information system failures or damage, and pose a major threat to aerospace, mining and some important and sensitive high-tech equipment. After the 1980s, the hazards caused by lightning increased significantly, especially in areas closely related to high-tech, such as aerospace, national defense, communications, electricity, computers, and the electronics industry. The widespread use of large-scale and ultra-large-scale integrated circuits that are extremely sensitive to lightning electromagnetic interference has greatly increased the probability of being struck by lightning.
[0003] Compared with cloud-to-ground lightning, ground-to-ground lightning poses a greater threat to the safety of people and property on the ground and is the main type of disaster. Distinguishing cloud-to-ground lightning plays a vital role in lightning protection and lightning risk level assessment. In the past, cloud-to-ground lightning was distinguished based on the characteristics of lightning electric field waveforms [Analysis of Time Domain Characteristics of Lightning Electric Field Change Waveforms and Identification of Discharge Types] (Meteorology (2009)), such as electric field pulse rise time, pulse width, etc. However, this method has high requirements on the quality of the waveform, which can easily lead to misjudgment and affect the recognition efficiency. Moreover, the current understanding of the lightning transmission process and its corresponding discharge characteristics is not comprehensive enough, and the signal characteristics of lightning cloud-to-ground lightning cannot be completely distinguished by researchers manually. If a ground-to-ground lightning return waveform with a relatively small current is encountered, it will increase the difficulty of judging and identifying its characteristics. If the cloud-to-ground lightning signal is synchronously identified with the lightning optical signal [Synchronous Observation of Lightning Photoelectric Signals and Lightning Type Pattern Recognition] (Meteorology (2007)), the recognition rate will be improved to a certain extent, but the demand for experimental equipment will also be relatively increased.
[0004] The use of machine learning methods can more effectively extract lightning signal features. At present, neural network algorithms are often used to train lightning signal data and extract feature information, such as the document "Neural Network Recognition Algorithm to Remove Lightning Interference in Nuclear Explosion Electromagnetic Pulse Detection" ("Nuclear Electronics and Detection Technology" (2021)). However, the lightning discharge process is relatively complex, especially the cloud flash signal has many features, and the recognition rate of neural networks alone is not high. In addition, using waveform features for data training and classification requires a large number of training samples. For the identification of different types of cloud and ground flashes, enough samples are needed for training to improve the accuracy of the classification model.
[0005] How to solve the above problems is the subject of the present invention. Summary of the invention
[0006] The purpose of the present invention is to provide a cloud-to-ground lightning recognition method based on lightning electric field signals. The recognition method for identifying cloud-to-ground lightning signals is different from conventional classifiers and can maintain a high recognition accuracy even in small sample conditions.
[0007] In order to achieve the above-mentioned invention object, the technical solution adopted by the present invention is specifically as follows:
[0008] A cloud-to-ground lightning recognition method based on lightning electric field signals, the method comprising the following steps:
[0009] Step S1, data preprocessing, denoising and normalizing the original input data; data preprocessing is an important step in signal processing, which can reduce the impact of noise in the signal and improve the accuracy of subsequent feature extraction and classification recognition.
[0010] Step S2, feature extraction, extracting a series of features related to ground-to-ground lightning and cloud-to-cloud lightning identification from the preprocessed signal;
[0011] Step S3, feature selection: Feature selection is an important step in machine learning. Its purpose is to select the most important and informative feature subset from the extracted features so as to reduce the complexity of the lightning recognition model without sacrificing model performance. On the basis of feature extraction, a feature selection module is added to filter out the feature subset most relevant to signal classification. This will help reduce the complexity of the model and improve generalization ability.
[0012] Step S4, lightning recognition model construction: using the screened features, construct a lightning recognition model based on the maximum entropy kernel learning (MEKL) method.
[0013] Step S5: training and verification: training and verification of the lightning recognition model.
[0014] Step S1 specifically includes:
[0015] S11. Denoising, using variational mode decomposition for denoising; Variational Mode Decomposition (VMD) is an adaptive signal decomposition technology based on variational methods. Compared with traditional methods such as Empirical Mode Decomposition (EMD), VMD has better frequency resolution and lower mode aliasing. Variational mode decomposition decomposes the signal by solving a constrained optimization problem, and its goal is to minimize the bandwidth of each decomposition mode;
[0016] Using variational mode decomposition, the optimization problem is defined by the following formula:
[0017]
[0018] st∑uk(t)=x(t)
[0019] Where x(t) is the original signal, uk(t) is the decomposed mode, ωk represents the center frequency of the corresponding mode, and Π(ω) is the rectangular window function. By solving this optimization problem, a set of separated mode signals are obtained, each of which represents an independent frequency component. min{uk(t)}: the objective function to be minimized. is the specific form of the objective function, where represents the spectrum of mode uk(t), Π(ω-ωk) represents the rectangular window function with center frequency ωk, and the whole formula represents the spectrum The square of the difference from the rectangular window function with a center frequency of ωk is integrated over all frequencies; ∑uk(t) = x(t): is a constraint that the sum of all modes uk(t) should be equal to the original signal x(t); this ensures that the decomposed mode is complete and does not miss any information of the original signal. ωk: is the center frequency of mode uk(t);
[0020] De-noising can be achieved by retaining the main pattern signal and ignoring the noise pattern.
[0021] S12, Normalization, Normalization is to adjust the amplitude range of the signal to a standard range, the standard range is [0,1]. This process can eliminate the impact of amplitude differences between different signals on feature extraction and classification, making subsequent analysis more stable and accurate. The calculation formula for normalization is:
[0022] x normalized =(x-min(x)) / (max(x)-min(x))
[0023] Among them, x represents the original signal, x normalized represents the normalized signal, min(x) and max(x) are the minimum and maximum values of the original signal respectively. Through this formula, the amplitude range of the original signal can be mapped to [0,1].
[0024] In step S2, features related to ground-to-ground lightning and cloud-to-cloud lightning identification are extracted from the preprocessed signals; the features are divided into time domain features and frequency domain features; the time domain features are directly extracted from the time series of the signal, reflecting the basic statistical characteristics of the signal on the time axis;
[0025] Time domain features include maximum value max(x), minimum value min(x), mean value mean(x), and standard deviation std(x);
[0026] The mean value mean(x) is calculated as follows: mean(x) = (1 / N)*∑xi, where N is the signal length and xi is the i-th sample in the signal;
[0027] Standard deviation std(x), calculated as: std(x) = sqrt((1 / N)*∑(xi-mean(x))^2), where N is the signal length and xi is the i-th sample in the signal;
[0028] Sqrt is the abbreviation of the English word "square root", which means square root;
[0029] Frequency domain features are extracted by analyzing the spectral components of the signal, reflecting the characteristics of the signal in the frequency domain. The following are some frequency domain features related to ground lightning identification:
[0030] Frequency domain features include power spectrum density and spectrum peak;
[0031] Among them, Power Spectral Density (PSD): PSD of the signal is calculated using Fourier transform; the calculation formula is: PSD = |FFT(x)|2 / N, where N is the signal length;
[0032] Spectral Peaks: Extracts the main peaks in the PSD and their corresponding frequencies. This is done by finding the local maximum of the PSD.
[0033] Step S2: The features also include entropy features, and the entropy features include complexity network entropy and multi-scale entropy;
[0034] Complex Network Entropy (CNE): Convert the signal into a complex network and calculate its degree distribution P(k); calculate the network entropy H, the formula is:
[0035] H = -∑[P(k)*log(P(k))];
[0036] Multiscale Entropy (MSE): Decompose the signal into subsequences of different scales and calculate the sample entropy at each scale; the formula for calculating sample entropy is:
[0037] SE = -ln(P(m+1) / P(m))
[0038] Among them, P(m) and P(m+1) represent the conditional probabilities of similar subsequences of length m and m+1 respectively;
[0039] The steps for calculating multiscale entropy are as follows:
[0040] A1: Generate subsequences of different scales: average the original signal x by the scale factor t to obtain a new subsequence x t ;
[0041] A2: Calculate sample entropy for each scale subsequence: For each x t Calculate its sample entropy SE t ;
[0042] A3: Combine the sample entropy of all scales: Combine the sample entropy SE of all scales t Combined into a multi-scale entropy feature vector.
[0043] Step S2 also includes joint features, and the joint features are extracted using Hilbert-Huang transform. The calculation steps of Hilbert-Huang transform are as follows:
[0044] B1: Empirical Mode Decomposition (EMD): decomposes the signal into a series of Intrinsic Mode Functions (IMFs).
[0045] B2: Perform Hilbert transform on each IMF to obtain its analytical signal;
[0046] B3: Calculate the instantaneous frequency and instantaneous energy of each IMF based on the analytical signal.
[0047] Step S3 adopts feature selection based on mutual information, and the specific steps are as follows:
[0048] S31. Calculate the joint probability distribution P(x,y) between each feature and class label: For discrete features and discrete class labels, directly count the frequency of occurrence of each feature value and class label combination; for continuous features or continuous class labels, use the Kernel Density Estimation (KDE) method to estimate the joint probability distribution; for discrete variables, count the number of occurrences of each (x,y) combination, divide it by the total number of samples, and get P(x,y); for continuous variables, use kernel density estimation to estimate the joint probability distribution; the expression of kernel density estimation is:
[0049] P(x,y)=(1 / Nh)*∑K((xx i ) / h,(yy i ) / h)
[0050] Where N is the total number of samples, h is the bandwidth of the kernel function, K is the kernel function, and (xi,yi) is the sample point;
[0051] S32. Calculate the marginal probability distribution P(x) of each feature and the marginal probability distribution P(y) of the class label: obtain by counting the frequency of occurrence of each feature value and class label; for discrete variables, count the number of occurrences of each x or y, divide by the total number of samples, and obtain P(x) or P(y); for continuous variables, use kernel density estimation to estimate the marginal probability distribution; the expression of kernel density estimation is:
[0052] P(x)=(1 / Nh)*∑K((xx i ) / h)
[0053] P(y)=(1 / Nh)*∑K((yy i ) / h)
[0054] Where N is the total number of samples, h is the bandwidth of the kernel function, K is the kernel function, and xi or yi is the sample point;
[0055] S33. Calculate the mutual information I(X;Y) between each feature and the class label: Substitute P(x,y), P(x) and P(y) into the calculation; the formula for mutual information is:
[0056] I(X;Y)=∑∑P(x,y)log(P(x,y) / (P(x)P(y)))
[0057] Among them, ∑∑ means summing all possible (x,y) combinations;
[0058] S34. Sort by the mutual information value of each feature: the higher the mutual information value, the higher the correlation between the feature and the class label, and the more useful it is for classification;
[0059] S35, select the feature with the highest mutual information value: select the first k features with the highest mutual information value according to actual needs, set a threshold of the mutual information value, and select all features whose mutual information values exceed the threshold; this process can be expressed as:
[0060] selected features =sort(features,key=I,reverse=True)[:k]
[0061] or
[0062] selected features =[feature for feature in features ifI(feature,Y)>threshold]
[0063] Among them, selected featuresrepresents the selected feature subset, that is, the feature list you want to use for training the model; sort(features,key=I,reverse=True)[:k] represents sorting all features in descending order according to the mutual information value I, and then selecting the first k features, where features is the list of all features; I is a function, the input is a feature, and the output is the mutual information value between this feature and the class label; k is the number of selected features; [feature for featurein features if I(feature,Y)>threshold] is used to select all features whose mutual information values exceed a certain threshold, where: feature is a feature in the feature list; features is the list of all features; Y represents the class label; threshold is the threshold of the mutual information value, and only when the mutual information value between a feature and the class label exceeds this threshold will this feature be selected.
[0064] Step S4 includes:
[0065] S41: Construct kernel function K: Construct kernel matrix according to the feature vector of data sample, select different kernel functions (radial basis function, polynomial kernel function); map the feature vector of data sample to a high-dimensional space (dimension greater than 3), this mapping process is realized by kernel function; select different kernel functions; the role of kernel function is to calculate the similarity of two samples in high-dimensional space; for RBF kernel function, its formula is:
[0066] K(x i ,x j )=exp(-γ||x i ,-x j || 2 )
[0067] Among them, γ is the bandwidth parameter of the RBF kernel function, ||xi,-xj|| represents the Euclidean distance between samples xi and xj in the original feature space;
[0068] S42: Solve the optimization problem: Based on the maximum entropy principle, construct an optimization problem and solve the optimal weight vector α; the objective function of the optimization problem is:
[0069] min L(α)=1 / 2∑∑α i α j y i y j K(x i ,x j )-∑α i
[0070] st0≤α i ≤C,∑αi y i =0
[0071] Among them, yi and yj represent the class labels of data samples i and j respectively, and C is the penalty factor of the slack variable, which is used to control the trade-off between model complexity and misclassification;
[0072] S43: Classification decision: For the new input signal xnew, calculate its predicted class label ypred, the formula is:
[0073] y pred =sign(∑α i y i K(x new ,x i )+b)
[0074] Among them, b is the intercept term of the decision boundary, which is solved by the following formula:
[0075] b=y k -∑α i y i K(x i ,x k )
[0076] Among them, k satisfies 0<α_k <C。
[0077] Step S5 includes:
[0078] S51: Divide the training set and validation set: Divide the labeled cloud-to-ground lightning and cloud-to-cloud lightning signal data into a training set and a validation set.
[0079] S52: training model: using the training set data, according to the Maximum Entropy Kernel Learning (MEKL) method in step 3, training the model to obtain the optimal weight vector α and intercept term b;
[0080] S53: Verification model: Use the verification set data to evaluate the recognition performance of the model and calculate the classification accuracy, precision, and recall indicators.
[0081] The signal is a lightning electric field signal.
[0082] Compared with the prior art, the present invention has the following beneficial effects:
[0083] 1. The present invention has comprehensive preprocessing steps: Due to the characteristics of lightning signals, such as signal complexity, noise interference, etc., a powerful preprocessing step is required to improve signal quality. The present invention uses variational mode decomposition (VMD) for denoising and normalization. VMD is an adaptive signal decomposition technology that can effectively process complex, multi-scale, nonlinear and non-stationary lightning signals and improve the accuracy of subsequent analysis.
[0084] 2. The present invention can extract comprehensive features: Lightning signals contain rich information, which is distributed in the time domain, frequency domain, entropy features and joint features. Traditional lightning recognition methods may only extract partial features, while this patent extracts more comprehensive features, including entropy features and joint features, which makes it possible to obtain more information from lightning signals and further improves the accuracy of lightning recognition.
[0085] 3. The present invention can effectively perform feature selection: After comprehensive feature extraction, a large number of features may be generated, and not all features are helpful for lightning recognition. The present invention adopts feature selection based on mutual information, which can automatically screen out the features most relevant to the lightning type, which not only reduces the complexity of the model, but also enhances the generalization ability of the model, prevents overfitting, and improves the accuracy of lightning recognition.
[0086] 4. The invention has advanced machine learning technology: Lightning signal recognition is a complex classification problem that requires a powerful model to solve. This patent uses a machine learning model constructed by the maximum entropy kernel learning (MEKL) method. MEKL has excellent nonlinear fitting capabilities and can find the optimal classification boundary in a complex feature space, thereby improving the accuracy of classification.
[0087] 5. The present invention improves recognition accuracy: through powerful preprocessing, comprehensive feature extraction and effective feature selection, the model can more accurately identify different types of lightning, thereby reducing false positives and false negatives and enhancing the accuracy of the lightning warning system.
[0088] 6. The present invention reduces computational complexity: By reducing computational complexity: Through feature selection based on mutual information, this method can reduce the number of features that need to be processed, thereby reducing computational complexity and computing resource requirements. This is particularly important for real-time or near real-time lightning monitoring systems because they need to process a large amount of signal data in a limited time. BRIEF DESCRIPTION OF THE DRAWINGS
[0089] The accompanying drawings are used to provide further understanding of the present invention and constitute a part of the specification. They are used to explain the present invention together with the embodiments of the present invention and do not constitute a limitation of the present invention.
[0090] Figure 1 It is a flow chart of the present invention.
[0091] Figure 2 A schematic diagram for classifying and identifying cloud-to-ground lightning is provided for the invention. DETAILED DESCRIPTION
[0092] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. Of course, the specific embodiments described here are only used to explain the present invention and are not used to limit the present invention.
[0093] Example 1
[0094] See also Figure 1 The present invention provides a technical solution, which is a cloud-to-ground lightning identification method based on lightning electric field signals, the method comprising the following steps:
[0095] Step S1, data preprocessing, denoising and normalizing the original input data; data preprocessing is an important step in signal processing, which can reduce the impact of noise in the signal and improve the accuracy of subsequent feature extraction and classification recognition.
[0096] Step S2, feature extraction, extracting a series of features related to ground-to-ground lightning and cloud-to-cloud lightning identification from the preprocessed signal;
[0097] Step S3, feature selection: Feature selection is an important step in machine learning. Its purpose is to select the most important and informative feature subset from the extracted features so as to reduce the complexity of the lightning recognition model without sacrificing model performance. On the basis of feature extraction, a feature selection module is added to filter out the feature subset most relevant to signal classification. This will help reduce the complexity of the model and improve generalization ability.
[0098] Step S4, lightning recognition model construction: using the screened features, construct a lightning recognition model based on the maximum entropy kernel learning (MEKL) method.
[0099] Step S5: training and verification: training and verification of the lightning recognition model.
[0100] Step S1 specifically includes:
[0101] S11. Denoising, using variational mode decomposition for denoising; Variational Mode Decomposition (VMD) is an adaptive signal decomposition technology based on variational methods. Compared with traditional methods such as Empirical Mode Decomposition (EMD), VMD has better frequency resolution and lower mode aliasing. Variational mode decomposition decomposes the signal by solving a constrained optimization problem, the goal of which is to minimize the bandwidth of each decomposition mode;
[0102] Using variational mode decomposition, the optimization problem is defined by the following formula:
[0103]
[0104] st∑uk(t)=x(t)
[0105] Where x(t) is the original signal, uk(t) is the decomposed mode, ωk represents the center frequency of the corresponding mode, and Π(ω) is the rectangular window function. By solving this optimization problem, a set of separated mode signals are obtained, each of which represents an independent frequency component. min{uk(t)}: the objective function to be minimized. is the specific form of the objective function, where represents the spectrum of mode uk(t), Π(ω-ωk) represents the rectangular window function with center frequency ωk, and the whole formula represents the spectrum The square of the difference from the rectangular window function with a center frequency of ωk is integrated over all frequencies; ∑uk(t) = x(t): is a constraint that the sum of all modes uk(t) should be equal to the original signal x(t); this ensures that the decomposed mode is complete and does not miss any information of the original signal. ωk: is the center frequency of mode uk(t);
[0106] De-noising can be achieved by retaining the main pattern signal and ignoring the noise pattern.
[0107] S12, Normalization, Normalization is to adjust the amplitude range of the signal to a standard range, the standard range is [0,1]. This process can eliminate the impact of amplitude differences between different signals on feature extraction and classification, making subsequent analysis more stable and accurate. The calculation formula for normalization is:
[0108] x normalized =(x-min(x)) / (max(x)-min(x))
[0109] Among them, x represents the original signal, x normalizedrepresents the normalized signal, min(x) and max(x) are the minimum and maximum values of the original signal respectively. Through this formula, the amplitude range of the original signal can be mapped to [0,1].
[0110] In step S2, features related to ground-to-ground lightning and cloud-to-cloud lightning identification are extracted from the preprocessed signals; the features are divided into time domain features and frequency domain features; the time domain features are directly extracted from the time series of the signal, reflecting the basic statistical characteristics of the signal on the time axis;
[0111] Time domain features include maximum value max(x), minimum value min(x), mean value mean(x), and standard deviation std(x);
[0112] The mean value mean(x) is calculated as follows: mean(x) = (1 / N)*∑xi, where N is the signal length and xi is the i-th sample in the signal;
[0113] Standard deviation std(x), calculated as: std(x) = sqrt((1 / N)*∑(xi-mean(x))^2), where N is the signal length and xi is the i-th sample in the signal;
[0114] Sqrt is the abbreviation of the English word "square root", which means square root;
[0115] Frequency domain features are extracted by analyzing the spectral components of the signal, reflecting the characteristics of the signal in the frequency domain. The following are some frequency domain features related to ground lightning identification:
[0116] Frequency domain features include power spectrum density and spectrum peak;
[0117] Among them, Power Spectral Density (PSD): PSD of the signal is calculated using Fourier transform; the calculation formula is: PSD = |FFT(x)|2 / N, where N is the signal length;
[0118] Spectral Peaks: Extracts the main peaks in the PSD and their corresponding frequencies. This is done by finding the local maximum of the PSD.
[0119] Step S2: The features also include entropy features, and the entropy features include complexity network entropy and multi-scale entropy;
[0120] Complex Network Entropy (CNE): Convert the signal into a complex network and calculate its degree distribution P(k); calculate the network entropy H, the formula is:
[0121] H = -∑[P(k)*log(P(k))];
[0122] Multiscale Entropy (MSE): Decompose the signal into subsequences of different scales and calculate the sample entropy at each scale; the formula for calculating sample entropy is:
[0123] SE = -ln(P(m+1) / P(m))
[0124] Among them, P(m) and P(m+1) represent the conditional probabilities of similar subsequences of length m and m+1 respectively;
[0125] The steps for calculating multiscale entropy are as follows:
[0126] A1: Generate subsequences of different scales: average the original signal x by the scale factor t to obtain a new subsequence x t ;
[0127] A2: Calculate sample entropy for each scale subsequence: For each x t Calculate its sample entropy SE t ;
[0128] A3: Combine the sample entropy of all scales: Combine the sample entropy SE of all scales t Combined into a multi-scale entropy feature vector.
[0129] Step S2 also includes joint features, and the joint features are extracted using Hilbert-Huang transform. The calculation steps of Hilbert-Huang transform are as follows:
[0130] B1: Empirical Mode Decomposition (EMD): decomposes the signal into a series of Intrinsic Mode Functions (IMFs).
[0131] B2: Perform Hilbert transform on each IMF to obtain its analytical signal;
[0132] B3: Calculate the instantaneous frequency and instantaneous energy of each IMF based on the analytical signal.
[0133] Step S3 adopts feature selection based on mutual information, and the specific steps are as follows:
[0134] S31. Calculate the joint probability distribution P(x,y) between each feature and class label: For discrete features and discrete class labels, directly count the frequency of occurrence of each feature value and class label combination; for continuous features or continuous class labels, use the Kernel Density Estimation (KDE) method to estimate the joint probability distribution; for discrete variables, count the number of occurrences of each (x,y) combination, divide it by the total number of samples, and get P(x,y); for continuous variables, use kernel density estimation to estimate the joint probability distribution; the expression of kernel density estimation is:
[0135] P(x,y)=(1 / Nh)*∑K((xx i ) / h,(yy i ) / h)
[0136] Where N is the total number of samples, h is the bandwidth of the kernel function, K is the kernel function, and (xi,yi) is the sample point;
[0137] S32. Calculate the marginal probability distribution P(x) of each feature and the marginal probability distribution P(y) of the class label: obtain by counting the frequency of occurrence of each feature value and class label; for discrete variables, count the number of occurrences of each x or y, divide by the total number of samples, and obtain P(x) or P(y); for continuous variables, use kernel density estimation to estimate the marginal probability distribution; the expression of kernel density estimation is:
[0138] P(x)=(1 / Nh)*∑K((xx i ) / h)
[0139] P(y)=(1 / Nh)*∑K((yy i ) / h)
[0140] Where N is the total number of samples, h is the bandwidth of the kernel function, K is the kernel function, and xi or yi is the sample point;
[0141] S33. Calculate the mutual information I(X;Y) between each feature and the class label: Substitute P(x,y), P(x) and P(y) into the calculation; the formula for mutual information is:
[0142] I(X;Y)=∑∑P(x,y)log(P(x,y) / (P(x)P(y)))
[0143] Among them, ∑∑ means summing all possible (x,y) combinations;
[0144] S34. Sort by the mutual information value of each feature: the higher the mutual information value, the higher the correlation between the feature and the class label, and the more useful it is for classification;
[0145] S35, select the feature with the highest mutual information value: select the first k features with the highest mutual information value according to actual needs, set a threshold of the mutual information value, and select all features whose mutual information values exceed the threshold; this process can be expressed as:
[0146] selected features =sort(features,key=I,reverse=True)[:k]
[0147] or
[0148] selected features =[feature for feature in features ifI(feature,Y)>threshold]
[0149] Among them, selected features represents the selected feature subset, that is, the feature list you want to use for training the model; sort(features,key=I,reverse=True)[:k] represents sorting all features in descending order according to the mutual information value I, and then selecting the first k features, where features is the list of all features; I is a function, the input is a feature, and the output is the mutual information value between this feature and the class label; k is the number of selected features; [feature for featurein features if I(feature,Y)>threshold] is used to select all features whose mutual information values exceed a certain threshold, where: feature is a feature in the feature list; features is the list of all features; Y represents the class label; threshold is the threshold of the mutual information value, and only when the mutual information value between a feature and the class label exceeds this threshold will this feature be selected.
[0150] Step S4 includes:
[0151] S41: Construct kernel function K: Construct kernel matrix according to the feature vector of data sample, select different kernel functions (radial basis function, polynomial kernel function); map the feature vector of data sample to a high-dimensional space (dimension greater than 3), this mapping process is realized by kernel function; select different kernel functions; the role of kernel function is to calculate the similarity of two samples in high-dimensional space; for RBF kernel function, its formula is:
[0152] K(x i ,x j )=exp(-γ||x i ,-x j || 2 )
[0153] Among them, γ is the bandwidth parameter of the RBF kernel function, ||xi,-xj|| represents the Euclidean distance between samples xi and xj in the original feature space;
[0154] S42: Solve the optimization problem: Based on the maximum entropy principle, construct an optimization problem and solve the optimal weight vector α; the objective function of the optimization problem is:
[0155] min L(α)=1 / 2∑∑α i α j y i y j K(x i ,x j )-∑α i
[0156] st0≤α i ≤C,∑α i y i =0
[0157] Among them, yi and yj represent the class labels of data samples i and j respectively, and C is the penalty factor of the slack variable, which is used to control the trade-off between model complexity and misclassification;
[0158] S43: Classification decision: For the new input signal xnew, calculate its predicted class label ypred, the formula is:
[0159] y pred =sign(∑α i y i K(x new ,x i )+b)
[0160] Among them, b is the intercept term of the decision boundary, which is solved by the following formula:
[0161] b=y k -∑α i y i K(x i ,x k )
[0162] Among them, k satisfies 0<α_k <C。
[0163] Step S5 includes:
[0164] S51: Divide the training set and the validation set: divide the labeled cloud-to-ground lightning and cloud-to-cloud lightning signal data into a training set and a validation set. In this embodiment, 70% of the data is used as the training set and 30% of the data is used as the validation set.
[0165] S52: training model: using the training set data, according to the Maximum Entropy Kernel Learning (MEKL) method in step 3, training the model to obtain the optimal weight vector α and intercept term b;
[0166] S53: Verification model: Use the verification set data to evaluate the recognition performance of the model and calculate the classification accuracy, precision, and recall indicators.
[0167] The signal in the present invention is a lightning electric field signal.
[0168] Example 2
[0169] On the basis of Example 1, the algorithm of the present invention is adopted based on the lightning electric field signal detected by the Shandong artificial lightning induction base in the summer of 2018. The lightning detection frequency range is 1.5kHz-2 MHz, the antenna integration circuit time constant is 100μs, and the detection sampling length is 1S, which is approximately the length of a lightning time. Figure 2 As shown. Through the present invention, the signal characteristics obtained by detection are used to identify them as cloud-to-ground lightning. From multiple characteristic quantities such as time-frequency and entropy, the permutation entropy and root mean square frequency are selected to successfully classify the cloud-to-ground lightning signals. The characteristic quantity values in the figure are all normalized.
[0170] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. A cloud-to-ground lightning identification method based on lightning electric field signals. It is characterized in that The method comprises the following steps: Step S1: data preprocessing, denoising and normalizing the original input data; Step S2, feature extraction, extracting a series of features related to ground-to-ground lightning and cloud-to-cloud lightning identification from the preprocessed signal; Step S3: feature selection; Step S4, building a lightning recognition model; Step S5: training and verification; Step S1 specifically includes: S11, denoising, using variational mode decomposition for denoising; Using variational mode decomposition; the optimization problem is defined by the following formula: st∑uk(t)=x(t) Where x(t) is the original signal, uk(t) is the decomposed mode, ωk represents the center frequency of the corresponding mode, and Π(ω) is the rectangular window function. By solving this optimization problem, a set of separated mode signals are obtained, each of which represents an independent frequency component. min{uk(t)}: the objective function to be minimized. is the specific form of the objective function, where represents the spectrum of mode uk(t), Π(ω-ωk) represents the rectangular window function with center frequency ωk, and the whole formula represents the spectrum The square of the difference from the rectangular window function with the center frequency ωk is integrated over all frequencies; ∑uk(t) = x(t): is a constraint that the sum of all modes uk(t) should be equal to the original signal x(t); ωk: is the center frequency of mode uk(t); S12, normalization, normalization processing is to adjust the amplitude range of the signal to a standard range, the calculation formula for normalization processing is: xnormalized=(x-min(x)) / (max(x)-min(x)) Where x represents the original signal, xnormalized represents the normalized signal, min(x) and max(x) are the minimum and maximum values of the original signal respectively; In step S2, features related to ground-to-ground lightning and cloud-to-cloud lightning identification are extracted from the preprocessed signals; the features are divided into time domain features and frequency domain features; Time domain features include maximum value max(x), minimum value min(x), mean value mean(x), and standard deviation std(x); The mean value mean(x) is calculated as follows: mean(x) = (1 / N)*∑xi, where N is the signal length and xi is the i-th sample in the signal; Standard deviation std(x), calculated as: std(x) = sqrt((1 / N)*∑(xi-mean(x))^2), where N is the signal length and xi is the i-th sample in the signal; sqrt means square root; Frequency domain features include power spectrum density and spectrum peak; Among them, power spectral density: PSD of the signal is calculated using Fourier transform; the calculation formula is: PSD = |FFT(x)|2 / N, where N is the signal length; Spectrum peak: extract the main peaks in PSD and their corresponding frequencies; Step S2: The features also include entropy features, and the entropy features include complexity network entropy and multi-scale entropy; Complex network entropy: Convert the signal into a complex network and calculate its degree distribution P(k); calculate the network entropy H, the formula is: H = -∑[P(k)*log(P(k))]; Multi-scale entropy: Decompose the signal into subsequences of different scales and calculate the sample entropy at each scale; the formula for calculating sample entropy is: SE = -ln(P(m+1) / P(m)) Among them, P(m) and P(m+1) represent the conditional probabilities of similar subsequences of length m and m+1 respectively; The steps for calculating multiscale entropy are as follows: A1: Generate subsequences of different scales: average the original signal x by the scale factor t to obtain a new subsequence x t ; A2: Calculate sample entropy for each scale subsequence: For each x t Calculate its sample entropy SE t ; A3: Combine the sample entropy of all scales: Combine the sample entropy SE of all scales t Combined into a multi-scale entropy feature vector; Features also include joint features, which are extracted using Hilbert-Huang transform. The calculation steps of Hilbert-Huang transform are as follows: B1: Empirical mode decomposition: decompose the signal into a series of intrinsic mode functions; B2: Perform Hilbert transform on each IMF to obtain its analytical signal; B3: Calculate the instantaneous frequency and instantaneous energy of each IMF according to the analytical signal; Step S3 adopts feature selection based on mutual information, and the specific steps are as follows: S31. Calculate the joint probability distribution P(x,y) between each feature and class label: For discrete features and discrete class labels, directly count the frequency of occurrence of each feature value and class label combination; for continuous features or continuous class labels, use the kernel density estimation method to estimate the joint probability distribution; for discrete variables, count the number of occurrences of each (x,y) combination, divide it by the total number of samples, and get P(x,y); for continuous variables, use kernel density estimation to estimate the joint probability distribution; the expression of kernel density estimation is: P(x,y)=(1 / Nh)*∑K((x-x i ) / h,(y-y i ) / h) Where N is the total number of samples, h is the bandwidth of the kernel function, K is the kernel function, and (xi,yi) is the sample point; S32. Calculate the marginal probability distribution P(x) of each feature and the marginal probability distribution P(y) of the class label: obtain by counting the frequency of occurrence of each feature value and class label; for discrete variables, count the number of occurrences of each x or y, divide by the total number of samples, and obtain P(x) or P(y); for continuous variables, use kernel density estimation to estimate the marginal probability distribution; the expression of kernel density estimation is: P(x)=(1 / Nh)*∑K((x-x i ) / h) P(y)=(1 / Nh)*∑K((y-y i ) / h) Where N is the total number of samples, h is the bandwidth of the kernel function, K is the kernel function, and xi or yi is the sample point; S33. Calculate the mutual information I(X;Y) between each feature and the class label: Substitute P(x,y), P(x) and P(y) into the calculation; the formula for mutual information is: I(X;Y)=∑∑P(x,y)log(P(x,y) / (P(x)P(y))) Among them, ∑∑ means summing all possible (x,y) combinations; S34. Sort by the mutual information value of each feature: the higher the mutual information value, the higher the correlation between the feature and the class label, and the more useful it is for classification; S35, select the feature with the highest mutual information value: select the first k features with the highest mutual information value according to actual needs, set a threshold of the mutual information value, and select all features whose mutual information values exceed the threshold; this process is expressed as: selected features =sort(features,key=I,reverse=True)[:k] or selected features =[feature for feature in features ifI(feature,Y)>threshold] Among them, selectedfeatures represents the selected feature subset, that is, the feature list that you want to use for training the model; sort(features,key=I,reverse=True)[:k] means sorting all features in descending order according to the mutual information value I, and then selecting the first k features, where features is the list of all features; I is a function, the input is a feature, and the output is the mutual information value between this feature and the class label; k is the number of selected features; [feature forfeature in features if I(feature,Y)>threshold] is used to select all features whose mutual information values exceed a certain threshold, where: feature is a feature in the feature list; features is the list of all features; Y represents the class label; threshold is the threshold of the mutual information value, and only when the mutual information value between a feature and the class label exceeds this threshold, the feature will be selected; Step S4 includes: S41: Construct kernel function K: Construct kernel matrix according to the feature vector of data sample, select different kernel functions; map the feature vector of data sample to a high-dimensional space, this mapping process is realized by kernel function; select different kernel functions; the role of kernel function is to calculate the similarity of two samples in high-dimensional space; for RBF kernel function, its formula is: K(x i ,x j )=exp(-γ||x i ,-x j || 2 ) Among them, γ is the bandwidth parameter of the RBF kernel function, ||xi,-xj|| represents the Euclidean distance between samples xi and xj in the original feature space; S42: Solve the optimization problem: Based on the maximum entropy principle, construct an optimization problem and solve the optimal weight vector α; the objective function of the optimization problem is: min L(α)=1 / 2∑∑α i a j y i y j K(x i ,x j )-∑a i s.t.0≤α i ≤C,∑α i y i =0 Among them, yi and yj represent the class labels of data samples i and j respectively, C is the penalty factor of the slack variable, S43: Classification decision: For the new input signal xnew, calculate its predicted class label ypred, the formula is: and pred =sign(∑α i and i K(x new ,x i )+b) Among them, b is the intercept term of the decision boundary, which is solved by the following formula: b=y k -∑α i y i K(x i ,x k ) Among them, k satisfies 0<α_k <C; Step S5 includes: S51: Divide the training set and validation set: Divide the labeled cloud-to-ground lightning and cloud-to-cloud lightning signal data into a training set and a validation set. S52: training model: using the training set data, according to the maximum entropy kernel learning method in step 3, training the model to obtain the optimal weight vector α and intercept term b; S53: Validation model: Use validation set data to evaluate the recognition performance of the model.
2. According to the cloud-to-ground lightning identification method based on lightning electric field signals according to claim 1, It is characterized in that The signal is a lightning electric field signal.
