A lightning radiation waveform classification system and method

By directly processing lightning radiation waveforms using convolutional neural networks and class activation methods, accurate and efficient classification of lightning radiation waveforms is achieved, solving the problems of weak versatility and low efficiency in existing technologies, and providing robustness and interpretability of the model.

CN116150652BActive Publication Date: 2026-01-27WUHAN NARI LIABILITY OF STATE GRID ELECTRIC POWER RES INST +3
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202211673315.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-12-26
Publication Date
2026-01-27
Estimated Expiration
2042-12-26

AI Technical Summary

Technical Problem

Existing lightning radiation waveform classification methods lack versatility under different climatic conditions, struggle to process raw waveforms, and lack interpretability, resulting in low classification efficiency and insufficient accuracy.

Method used

By employing a convolutional neural network (CNN) and class activation methods, the original lightning radiation waveform is directly input for classification. Adaptive feature extraction is performed by combining multi-size convolutional kernels of the CNN, and the adaptive features of the model are visualized using class activation maps, thus achieving accurate and efficient waveform classification.

Benefits of technology

It achieves accurate and efficient classification of lightning radiation waveforms, with strong model robustness, transparent and reliable classification process, and solves the problems of weak versatility and low efficiency. The classification accuracy can reach 97.8%.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116150652B_ABST
    Figure CN116150652B_ABST
Patent Text Reader

Abstract

The application discloses a lightning radiation waveform classification system and method, obtains lightning radiation waveform segment samples through a waveform segmentation method, and takes corresponding relationship samples of the lightning radiation waveform segment samples and a discharge event as training data sets; a convolutional neural network model is established, parameter optimization and training of the convolutional neural network model are carried out based on the training data sets, a completed classification model is acquired, the lightning energy spectrum of the lightning radiation waveform segment is calculated in a window, a waveform set to be classified is acquired, the data set to be classified is input into the completed classification model for classification, and a classification result is acquired. The application solves the problems of weak universality and low efficiency in lightning waveform classification, realizes accurate and efficient classification of lightning radiation waveforms, and has the advantages of strong model robustness and transparent and reliable classification process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of lightning classification technology, specifically relating to a lightning radiation waveform classification system and method. Background Technology

[0002] Lightning is a large-scale atmospheric discharge phenomenon that poses a significant threat to human production and daily life, making its research and protection increasingly important. During the initiation and development of lightning discharges, the charge transport processes at different stages excite electromagnetic field signals with different characteristics in space. These signals provide crucial indications of the lightning discharge type for location and are an important component of multi-physical quantity observation data for lightning. Furthermore, determining the type of lightning electromagnetic field discharge provides vital evidence for lightning parameter inversion, playing a key role in analyzing and statistically analyzing characteristic parameters such as discharge duration, discharge current amplitude, and number of discharges. Therefore, accurate and efficient classification of lightning radiation waveforms is of great significance for improving lightning detection capabilities and refining lightning mechanism research.

[0003] The differences in charge transport processes during lightning discharges result in distinct electromagnetic radiation waveforms for each event. However, the distribution of key waveform parameters is influenced by climatic conditions, leading to variations in parameter ranges across different regions. This can cause overlap in the distribution range of the same waveform parameter across different events. Furthermore, the diverse types of lightning discharges generate a variety of electromagnetic field radiation signals, potentially resulting in similar waveforms across different events. In summary, the overlapping waveform parameter ranges and the similarity of discharge event waveforms pose challenges to accurate waveform classification.

[0004] Currently, there are two main methods for classifying lightning electromagnetic radiation waveforms: criterion-based methods and machine learning methods. Criterion-based methods statistically analyze the distribution ranges of key waveform parameters such as rise and fall times, wavefront time, half-peak width, and amplitude for different discharge events. They then extract multi-parameter classification criteria based on the differences in these parameter distribution ranges to complete waveform classification. Patent CN104569624A proposes a method for identifying all-lightning cloud-to-ground lightning based on this, summarizing classification criteria for ground lightning, narrow bipolar pulses, and cloud-to-ground lightning signals using nine waveform parameters: rise and fall time, pulse width, front-to-back peak ratio, second-to-third peak ratio, signal-to-noise ratio, and front-to-back signal-to-noise ratio. Machine learning methods use Support Vector Machines (SVM) and Random Forests (RF) to classify waveforms. Before training the model, both methods require feature engineering to calculate waveform amplitude-frequency features and select key data points to form feature vectors. The essence of the SVM method is to find a hyperplane that maximizes the distance between the hyperplane and the feature vectors of positive and negative examples, thereby achieving classification. The RF method, through training, inductively derives a set of classification rules from the feature vector set, minimizing the discrepancy between the classification results under these rules and the dataset.

[0005] Both of the above methods are difficult to accurately classify the electromagnetic field waveforms radiated by lightning, for the following reasons:

[0006] 1) The multi-parameter criteria used in the criterion method are derived from long-term observation and collection of lightning activity radiation waveforms in a certain area by lightning monitoring stations. Currently, the detection range of wide-area lightning monitoring systems is usually at the national level, and the detection range includes various climatic conditions. Due to ① the overlapping range of waveform parameters generated by different discharge events and ② the inconsistent distribution range of waveform parameters of the same waveform under different climatic conditions, it is difficult to obtain appropriate and universal classification criteria.

[0007] 2) Machine learning methods mainly suffer from the following three problems: ① Machine learning methods such as SVM and RF require prior knowledge to determine the composition of feature vectors. Too few features result in inaccurate classification and underfitting. Too many features may lead to overfitting due to the model overemphasizing a particular feature during classification. Because of climate differences in different regions, feature engineering is needed to adjust the feature vector composition when the dataset source changes to maintain good classification performance. ② Machine learning methods such as SVM and RF struggle with long waveform segments, requiring additional effort for waveform preprocessing. Downsampling and feature engineering are used to reduce the complexity of the input data. The duration of waveforms generated by different discharge events such as cloud flashes and ground flashes varies, ranging from microseconds to milliseconds, making it difficult to determine a uniform and suitable data preprocessing scheme, increasing the processing difficulty of these methods. ③ In low-dimensional linear models, the weight parameters of SVM can be interpreted as the importance of features, thus explaining the classification process. However, for lightning radiation waveforms, the feature vector dimension is high, and the weight parameters are mapped to a high-dimensional space via kernel functions, losing their intuitive interpretability. The Random Forest (RF) method decomposes the classification process into multiple threshold judgments and outputs the classification result in a decision tree format. While the process is clear, it fails to explain the source of the thresholds used for the judgments, and also fails to provide an intuitive basis for classification. This lack of interpretability of the classification basis reduces the model's reliability and makes it difficult to use the model as a reference for classification decisions.

[0008] In summary, current lightning radiation waveform classification methods suffer from three main problems: ① Existing methods cannot directly process the original waveform, requiring the introduction of prior knowledge to extract features. This process results in some loss of waveform information, and the manually selected features may not comprehensively and accurately represent all types of lightning radiation waveforms. ② Existing methods lack generality across different datasets. The multi-parameter criteria in criterion-based methods often originate from one or a few regions, making them unsuitable for all climatic conditions. Different types of discharge events also exhibit certain similarities in their waveforms. These two points make it difficult to establish a universal composite criterion for lightning waveform classification. Furthermore, classification performance in machine learning heavily relies on pre-selected features; the optimal feature combination for one dataset may not perform best on others, requiring additional adjustments and lacking efficiency and generality. ③ Existing methods can reveal the results of each step of the algorithm; however, these results cannot explain, in a way that is commonly understood, which part of the model significantly influences the classification result, nor can they explain how changes in the input waveform affect the output. The lack of interpretability in models leads to a certain degree of blindness in model training, making it difficult to address potential issues such as low generalizability and reducing the efficiency of model training. Summary of the Invention

[0009] The purpose of this invention is to provide an interpretable artificial intelligence classification method for lightning radiation waveforms based on Convolutional Neural Networks (CNN) and class activation methods, aiming to solve the problems of weak generality and low efficiency of other classification methods.

[0010] To achieve this objective, the present invention designs a lightning radiation waveform classification system, which includes a training dataset establishment module, a convolutional neural network model training module, a dataset to be classified establishment module, and a waveform intelligent classification module. The training dataset establishment module obtains lightning radiation waveform segment samples through waveform segmentation and uses the correspondence between these samples and discharge events as the training dataset. The convolutional neural network model training module establishes a convolutional neural network model, performs parameter tuning and training based on the training dataset, and obtains a trained classification model. The dataset to be classified establishment module obtains lightning radiation waveform segments from the original lightning radiation waveform transmitted back by the detector through waveform segmentation, calculates the lightning energy spectrum of the waveform segments by windowing, and determines the lightning radiation waveform segment as noise when the energy distribution of all windows is less than a threshold, discarding the segment and using the remaining segments as the set of waveforms to be classified. The waveform intelligent classification module inputs the dataset to be classified into the trained classification model for classification and obtains the classification result.

[0011] A method for classifying lightning radiation waveforms includes the following steps:

[0012] Step 1: Obtain lightning radiation waveform segment samples using waveform segmentation method, and use the correspondence between the lightning radiation waveform segment samples and discharge events as training dataset;

[0013] Step 2: Build a convolutional neural network model, and perform parameter tuning and training of the convolutional neural network model based on the training dataset to obtain the trained classification model;

[0014] Step 3: Obtain lightning radiation waveform segments from the original lightning radiation waveform returned by the detector using the waveform segmentation method. Calculate the lightning energy spectrum of the lightning radiation waveform segments by windowing. When the energy distribution of all windows is less than the threshold, determine that the lightning radiation waveform segment is a noise waveform and discard the lightning radiation waveform segment. Use the lightning radiation waveform segments that are not discarded as the set of waveforms to be classified.

[0015] Step 4: Input the dataset to be classified into the trained classification model for classification and obtain the classification result.

[0016] The beneficial effects of this invention are as follows:

[0017] (1) Convolutional neural networks support classification by directly inputting the original waveform. They perform convolution operations through multi-size convolutional kernels to complete adaptive scale feature extraction. Convolutional neural networks (CNNs) complete classification by learning the core physical features of the waveform. They do not need to repeatedly adjust training parameters on different datasets, and have higher training efficiency compared to other current classification methods.

[0018] (2) The class activation map is based on the high-dimensional feature map and the fully connected layer weight coefficient inversion visualization model to adapt to the learned features, verify the reliability and generality of the classification basis, break the black box characteristics of the neural network model, and guide the specific process of model training.

[0019] (3) The combination of convolutional neural network (CNN) model and class activation method solves the problems of weak generality and low efficiency in lightning waveform classification, realizes accurate and efficient classification of lightning radiation waveform, and has the advantages of strong model robustness and transparent and reliable classification process. Attached Figure Description

[0020] Figure 1 This is a system structure diagram of the present invention;

[0021] Figure 2 The original lightning radiation waveform, the EMD waveform, and the waveform after normalization are shown.

[0022] Figure 3 Schematic diagram of four types of lightning radiation waveforms;

[0023] Figure 4 This is a schematic diagram of a convolutional neural network structure;

[0024] Figure 5 The changes in loss function and accuracy during the training of the four-class classification model;

[0025] Figure 6 a is a schematic diagram of the RS waveform classification results;

[0026] Figure 6 b is a visualization of the RS waveform classification criteria;

[0027] Figure 7 a is a schematic diagram of the NB waveform classification results;

[0028] Figure 7 b is a visualization of the NB waveform classification criteria;

[0029] Figure 8 a is a schematic diagram of the PB waveform classification results;

[0030] Figure 8 b is a visualization of the PB waveform classification criteria;

[0031] Figure 9 a is a schematic diagram of the IC waveform classification results;

[0032] Figure 9 b is a visualization of the IC waveform classification criteria.

[0033] Among them, 1-training dataset establishment module, 2-convolutional neural network model training module, 3-dataset to be classified establishment module, and 4-waveform intelligent classification module. Detailed Implementation

[0034] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments:

[0035] A lightning radiation waveform classification system, such as Figure 1 As shown, it includes a training dataset creation module 1, a convolutional neural network model training module 2, a dataset creation module 3, and a waveform intelligent classification module 4;

[0036] The training dataset establishment module 1 is used to obtain lightning radiation waveform segment samples through waveform segmentation method, and to use the correspondence between the lightning radiation waveform segment samples and the discharge event samples as the training dataset.

[0037] The convolutional neural network model training module 2 is used to establish a convolutional neural network model, perform parameter tuning and training of the convolutional neural network model based on the training dataset, and obtain a training-completed classification model.

[0038] The dataset establishment module 3 is used to preprocess the original lightning radiation waveform returned by the detector using a waveform segmentation method to obtain lightning radiation waveform segments, calculate the lightning energy spectrum of the lightning radiation waveform segments by windowing, and determine that the lightning radiation waveform segment is a noise waveform when the energy distribution of all windows is less than the threshold. The lightning radiation waveform segment is then discarded, and the remaining lightning radiation waveform segments are used as the set of waveforms to be classified.

[0039] The waveform intelligent classification module 4 is used to input the dataset to be classified into the trained classification model for classification, obtain the classification result, and confirm the reliability of the classification result by calculating the model contribution weight value interpretability module.

[0040] In the above technical solution, the specific implementation method of the waveform segmentation method in the training dataset establishment module 1 is as follows:

[0041] S11, Waveform Filtering: The empirical mode decomposition method is used to filter out low-frequency signals in the original lightning radiation waveform, making the waveform flat and highlighting the pulse characteristics;

[0042] S12, Waveform segmentation: The filtered lightning radiation waveform is segmented into several overlapping lightning radiation waveform segments based on the sliding window method.

[0043] S13, Normalization processing: The lightning radiation waveform segment is projected into the [-1,1] interval using the min-max normalization method to obtain the normalized lightning radiation waveform segment;

[0044] In this embodiment, the lightning radiation waveform segment obtained through waveform segmentation contains 2500 data points and has a duration of 500μs. Figure 2 The images show the original lightning radiation waveform and the filtered and normalized lightning radiation waveform. It can be seen that the low-frequency components have been removed, and the pulse components have been fully highlighted, which is more conducive to subsequent waveform segmentation and recognition.

[0045] The method for generating the training dataset in the training dataset creation module 1 is as follows:

[0046] Lightning radiation waveform samples are extracted from normalized lightning radiation waveform segments based on a criterion method. After manual screening and verification, the discharge event types of the lightning radiation waveform samples are labeled. The correspondence between the lightning radiation waveform segment samples S and the discharge event type labels L is used as the training dataset.

[0047] In this embodiment, the waveforms after initial screening are confirmed and labeled by manual judgment. The dataset after manual screening contains a total of 8000 samples, with 2000 samples for each discharge event category. The dataset is saved in ARFF format, with 8000 rows and 2501 columns, where columns 1-2500 are data columns and column 2501 is the label column. Typical waveforms for the four types of discharge events are shown below. Figure 3 As shown, the duration of the four types of waveform samples is 500us. To demonstrate the typical characteristics of the four types of waveforms, only the waveforms from 0-250us are shown in the figure.

[0048] In the above technical solution, the criterion method in the training dataset establishment module 1 is a comprehensive criterion formed by waveform feature parameters, which extracts different categories of lightning radiation waveform samples from the normalized lightning radiation waveform segments. The waveform feature parameters include waveform rise time, waveform fall time, pulse width, waveform front-to-back inversion peak ratio, second peak ratio, and signal-to-noise ratio. The criterion threshold comes from the statistical results of the normalized lightning radiation waveform segments.

[0049] The lightning radiation waveform sample types include return stroke (RS), pre-breakdown (PB), narrow bipolar pulse (NB), and cloud flash (IC).

[0050] In the above technical solution, the specific implementation method of the empirical mode decomposition method in the training dataset establishment module 1 is as follows:

[0051] Empirical mode decomposition (EMD) methods obtain a series of intrinsic mode functions (IMFs) that characterize the signal by decomposing nonlinear and non-stationary time-series signals. Each IMF reflects the variation pattern of the data itself and has strong adaptability.

[0052] S11.1 The original lightning radiation waveform signal returned by the detector is x(t). Mark the local maxima and local minima of the original lightning radiation waveform signal x(t).

[0053] S11.2, the local maxima points are connected by cubic spline function interpolation to form the upper envelope e. max (t), connecting the local minimum points, forms the lower envelope e. min h1(t) can be obtained by subtracting the mean of the upper and lower envelopes from the original radiation waveform signal x(t):

[0054]

[0055] S11.3, determine whether h1(t) meets the IMF component condition. If not, replace x(t) with h1(t) and repeat steps S11.1 and S11.2 k times until h1(t) meets the IMF component condition. 1k (t) satisfies the IMF component condition, and at this time, let h be... 1k (t) represents the IMF component imf i (t);

[0056] S11.4, Subtract the IMF component imf from the original lightning radiation waveform signal x(t). i (t), repeat steps S11.1, S11.2, and S11.3 N times until the termination condition is met; the original lightning radiation waveform signal x(t) is decomposed into a series of IMF components imf1, imf2, imf3…, imf N with the residual amount r n Linear superposition of (t):

[0057]

[0058] S11.5, Use Fourier transform to analyze the IMF components imf1, imf2, imf3…, imf N The frequency domain distribution is obtained by removing the IMF components whose main frequency is lower than the set frequency threshold of 1 kHz, and then accumulating and recombining the remaining IMF components to obtain the filtered lightning radiation waveform.

[0059] In the above technical solution, the IMF component condition is as follows: within the time period of the original radiation waveform signal, the number of any two of the three local maximum points, local minimum points, and zero points must be equal or differ by at most one; at any time of the original radiation waveform signal, the average value of the upper envelope obtained by connecting the local maximum points and the lower envelope obtained by connecting the local minimum points is zero.

[0060] The termination conditions include two types: the first termination condition is the nth IMF component or the residual r. n (t) is less than the set threshold; the second termination condition is the residual r. n (t) is a constant or a monotonic function. In this embodiment, the first termination condition is used, which is to calculate the standard deviation S of two consecutive decomposition results. d Less than 0.3.

[0061] In the above technical solution, the specific implementation of the sliding window method in step S12 of the training dataset establishment module 1 is as follows:

[0062] The sliding window length is set to 2500 data points. The starting point of the sliding window is aligned with the starting point of the filtered lightning radiation waveform. A segment of lightning radiation waveform data within the sliding window is extracted to obtain the first lightning radiation waveform segment sample p1. The sliding window is moved forward by a set length, and another segment of lightning radiation waveform data within the sliding window is extracted to obtain the second lightning radiation waveform segment sample p2. The sliding window is moved forward by the same set length, and corresponding lightning radiation waveform segment samples are obtained, until the segmentation of the filtered lightning radiation waveform is completed, resulting in lightning radiation waveform segments p1, p2, p3...p m m is the number of lightning radiation waveform segments;

[0063] The condition for moving forward by a set length is to ensure that two adjacent lightning radiation waveform segments contain a suitable overlapping area; in this embodiment, the size of the forward movement set length is half the size of the sliding window.

[0064] Based on the min-max normalization method, p' = p / (max(p) - min(p)) is used to project the segments into the interval [-1, 1] to obtain the normalized waveform segments p1', p2', p3'...p m '.

[0065] In the above technical solution, the lightning radiation waveform segment p m The method for obtaining it is as follows:

[0066] If the lightning radiation waveform segment p m The duration of the lightning radiation waveform segment p is different from the duration of the sliding window.m When the time length is greater than or equal to 2 / 3 of the sliding window time length, i.e., 1500 points, the lightning radiation waveform segment p is resampled using the nearest neighbor interpolation method. m The time length is increased to the time length of the sliding window; when the lightning radiation waveform segment p m If the duration of the lightning radiation waveform segment p is less than 2 / 3 of the duration of the sliding window, i.e., 1500 points, then the lightning radiation waveform segment p is discarded. m .

[0067] For each lightning radiation waveform segment, it is divided into 25 data frames with a width of 100 data points. For each frame, the average energy value is calculated as the mean of the squares of the data point values. If the average value of all frames in the sample is less than a threshold, the sample is considered noise and needs to be discarded. The waveforms to be classified can be saved in arff format after filtering, consisting of n rows and 2500 columns, where n is the same as the number of waveforms to be classified, and columns 1-2500 are the data columns.

[0068] In the above technical solution, the specific implementation method of the convolutional neural network model training module 2 is as follows:

[0069] S21, Model Establishment: (e.g.) Figure 4 As shown, the input of the convolutional neural network model is 2500×1 one-dimensional time series data. The input layer receives the correspondence sample data between the lightning radiation waveform segment sample S and the discharge event type label L. The sample data is convolved through multiple special convolutional layers, then pooled in a global pooling layer, and finally entered a fully connected layer, activated by the Softmax activation function to obtain the probability that the sample data belongs to the lightning radiation waveform sample type. The lightning radiation waveform sample type corresponding to the maximum probability is the waveform category L'.

[0070] S22, Model Training and Testing: Divide the training dataset proportionally to obtain a training set and a test set; set the hyperparameters used for model training; deploy the model on a high-performance graphics card for training; determine whether the model has converged based on the fluctuation of the model's output accuracy; when the model converges, save the parameter weights within the model; and test whether the model's classification performance is balanced by metrics such as classification speed, accuracy, precision, recall, and F1 coefficient.

[0071] The method for determining whether the model has converged is that the model converges when the classification accuracy fluctuation does not exceed a set threshold within a certain number of consecutive iterations. In this embodiment, the number of iterations is preferably 5, and the set threshold is preferably 0.5%.

[0072] In the above technical solution, the special convolutional layer uses a convolutional kernel to scan the sample data to obtain a feature distribution matrix;

[0073] The global pooling layer is used to perform secondary processing on the feature distribution matrix, reducing the feature dimension and cutting the computational load.

[0074] The special convolutional layer uses max pooling to retain the most prominent features in the feature distribution matrix;

[0075] The output of the multi-layer special convolutional layer also includes a high-dimensional feature map. The high-dimensional feature map is multiplied and summed with the weight matrix in the fully connected layer to obtain the contribution weight value of each data point of the lightning radiation waveform segment sample S to the classification probability, and the classification process is visualized in the form of a heat map.

[0076] The multi-layer special convolutional layer includes two convolutional blocks, each containing three convolutional layers. The input of each convolutional block is directly connected to the second convolutional layer of that block via a shortcut link, which accelerates the convergence speed and avoids degradation.

[0077] The convolutional layer contains four types of convolutional kernels: 40×1, 20×1, 10×1, and 1×1. The input data of the convolutional layer enters two paths. The first path involves the input data being convolved by the 1×1 kernel to obtain the first convolution result. This first convolution result is then convolved with the 40×1 kernel to obtain the second convolution result. Finally, this second convolution result is convolved with the 20×1 kernel to obtain the first path. The third convolution result of the first link is obtained by convolving the first convolution result of the first link with the 10×1 convolution kernel. The second link is the input data of the convolutional layer, which is passed through a 3×1 max pooling layer to obtain the pooling result of the second link. The pooling result of the second link is convolved with the 1×1 convolution kernel to obtain the convolution result of the second link. The second, third, and fourth convolution results of the first link are concatenated with the convolution result of the second link to form the output data of the convolutional layer.

[0078] The high-dimensional feature map output by the multi-layer special convolutional layer is an n-layer feature map, where the value at data point x in the k-th layer feature map is f. k (x); After the n-layer feature maps pass through the global pooling layer, each feature map will be converted into a single value F. k The output, due to the use of global average pooling, therefore F k It can be calculated using the following formula:

[0079] F k =∑ x f k (x)

[0080] Ignoring the activation function, it can be assumed that for any category C, the probability S of the waveform belonging to category C is... C It can be obtained from the following formula:

[0081]

[0082] Among them, a k c The weight represents the contribution of the feature map of the k-th layer to the model's decision category C, corresponding to the fully connected coefficient of category C in the fully connected layer;

[0083] Therefore, the class activation graph for category C can be defined as follows:

[0084]

[0085] M C (x) represents the contribution weight value (CAM value) of the lightning radiation waveform segment sample S under category C. The contribution weight value can directly indicate the importance of any time series data point in the lightning radiation waveform segment sample S to the model's determination of the waveform's belonging to category C through a heatmap.

[0086] The model compares the result L' of the activation function with the discharge event type label L to calculate the loss function, and updates the weights and biases in the model through backpropagation to complete the iteration;

[0087] After the model is established, the model established in S21 is used to train the training dataset. The waveform training results under the hyperparameters in S22 are shown in Table 1.

[0088] Table 1 Classification Indicators of the Four-Classification Model for Lightning Radiation Waveforms

[0089]

[0090] Figure 5 The changes in loss function value and accuracy during the training process of the four-class lightning radiation waveform classification model are shown. It can be seen that the model converges after 5 iterations, and the final classification accuracy is about 97.8%. At this point, the model training is complete, and the model is saved as a model.pkl file.

[0091] The hyperparameters used in the model training include the optimizer, loss function, number of iterations, and learning rate variation strategy.

[0092] In this embodiment, the ratio of the training set to the test set in the training dataset is 8:2; the optimizer is set to stochastic gradient descent (SGD), the loss function is selected as cross-entropy, the size of the training data fed in each time is 64 parts, and the training performs 40 forward and backward propagation processes. The initial value of the learning rate is set to 0.01, and the learning rate is dynamically adjusted using cosine annealing. Within a complete training cycle, the learning rate gradually decreases from the initial value of 0.01 to 0 according to the cosine function, and then gradually increases back to 0.01. When the classification accuracy fluctuation does not exceed 0.5% within five consecutive iterations, the model converges. The model parameter file with the highest accuracy on the test set is taken and saved, thus obtaining the optimal model parameter file.

[0093] The accuracy rate is calculated as follows:

[0094]

[0095] The accuracy (Precision) is calculated as follows:

[0096]

[0097] The recall rate is calculated as follows:

[0098]

[0099] The F1 coefficient is calculated as follows:

[0100]

[0101] in:

[0102] TP (True Positive): Represents an example that is actually positive and is judged as positive by the model;

[0103] FP (False Positive): This represents an example that is actually positive, but the model judges it as a negative example.

[0104] TN (True Negative): This indicates that the actual instance is a negative example, and the model also identifies it as a negative example.

[0105] FN(False Negative): This means that the actual example is a negative example, but the model judges it as a positive example.

[0106] Table 1 shows the classification performance indicators of the trained four-class lightning radiation waveform classification model. It can be seen that the model can achieve high classification accuracy in the four types of discharge events: RS, PB, IC, and NB. At the same time, the precision, recall, and F1 coefficient values ​​are all close to 1, indicating that the model does not have an imbalance problem and the classification accuracy is reliable.

[0107] The model building, parameter training and tuning, and performance optimization described in the technical solution all utilize the PyTorch 1.9.1 framework, and the model training is deployed on a Tesla A100 GPU released by NVIDIA. Upon model convergence, the classification accuracy reaches 97.8%, and the single waveform classification time is 0.0397 seconds.

[0108] In the above technical solution, the specific implementation method of the waveform intelligent classification module 4 is as follows:

[0109] S41, Input the waveform to be classified and obtain the classification result: Call the model.pkl file saved in the classification model S2 that has been trained in the convolutional neural network model training module 2, use the predict function to complete the prediction of the input data classification, and obtain the waveform category and corresponding probability given by the model;

[0110] S42, Calculate the class activation map of the model classification result: Call the model.pkl file saved in the classification model S2 that has been trained in the convolutional neural network model training module 2, and use the calculate_CAM function to complete the waveform visualization, and show the importance of any data point in the waveform data to the model's determination that the waveform belongs to a certain discharge event category in the form of a heat map.

[0111] Figures 6 to 9 Examples of classification results and class activation graphs for typical waveform types RS, NB, PB, and IC. Figure 6-9 (a) is a schematic diagram of the waveform classification results. In the text above the image, RS represents the true category of the sample, max-CAM represents the visualization processing of the sample using the max-CAM method, and the text below the image represents the probability of the waveform sample belonging to different lightning event categories calculated by the CNN model. Figure 6-9(b) A heatmap is used to show the weight of each data point in the sample in the model's classification process. Colors closer to red indicate greater importance in the classification process, while colors closer to blue indicate lower weight. As shown in the figure: 1) The model can focus on the main pulse portion of the waveform in different discharge events, proving that the model's classification basis is correct and reasonable. 2) The distribution of the parts of high model attention varies in different discharge event waveforms, corresponding to the core physical processes of that type of discharge event. For example, in the RS waveform, the model's red high-attention portion is located at the main pulse peak; in the NB waveform, the model's red high-attention portion is distributed along bipolar peaks and steep polarity changes; in the PB waveform, the model's red high-attention portion is located in the continuous bipolar portion; and in the IC waveform, the model's red high-attention portion is located in the relatively sparse unipolar waveform portion. These distributions all correspond to key physical processes, proving that the model has higher versatility because it captures the core features of the waveform.

[0112] A method for classifying lightning radiation waveforms includes the following steps:

[0113] Step 1: Obtain lightning radiation waveform segment samples using waveform segmentation method, and use the correspondence between the lightning radiation waveform segment samples and discharge events as training dataset;

[0114] Step 2: Build a convolutional neural network model, and perform parameter tuning and training of the convolutional neural network model based on the training dataset to obtain the trained classification model;

[0115] Step 3: Preprocess the original lightning radiation waveform returned by the detector using the waveform segmentation method to obtain lightning radiation waveform segments. Calculate the lightning energy spectrum of the lightning radiation waveform segments by windowing. When the energy distribution of all windows is less than the threshold, determine that the lightning radiation waveform segment is a noise waveform and discard the lightning radiation waveform segment. Use the lightning radiation waveform segments that are not discarded as the set of waveforms to be classified.

[0116] Step 4: Input the dataset to be classified into the trained classification model for classification and obtain the classification result.

[0117] The contents not described in detail in this specification are prior art known to those skilled in the art. Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0118] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0119] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0120] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0121] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and not to limit its scope of protection. Although the present invention has been described in detail with reference to the above embodiments, those skilled in the art should understand that after reading the present invention, they can still make various changes, modifications or equivalent substitutions to the specific implementation of the invention, but these changes, modifications or equivalent substitutions are all within the scope of protection of the pending claims of the invention.

Claims

1. A lightning radiation waveform classification system, characterized in that: It includes a training dataset creation module (1), a convolutional neural network model training module (2), a dataset creation module (3), and a waveform intelligent classification module (4); The training dataset establishment module (1) is used to obtain lightning radiation waveform segment samples through waveform segmentation method, and to use the correspondence between the lightning radiation waveform segment samples and the discharge event samples as the training dataset. The convolutional neural network model training module (2) is used to establish a convolutional neural network model, perform parameter tuning and training of the convolutional neural network model based on the training dataset, and obtain the training completed classification model; The dataset establishment module (3) is used to obtain lightning radiation waveform segments from the original lightning radiation waveform returned by the detector through waveform segmentation, calculate the lightning energy spectrum of the lightning radiation waveform segments by window, and determine that the lightning radiation waveform segments are noise waveforms when the energy distribution of all windows is less than the threshold. The lightning radiation waveform segments are discarded and the non-discarded lightning radiation waveform segments are used as the set of waveforms to be classified. The waveform intelligent classification module (4) is used to input the dataset to be classified into the trained classification model for classification and obtain the classification result; The specific implementation method of the waveform segmentation method in the training dataset establishment module (1) is as follows: S11, the empirical mode decomposition method is used to filter out low-frequency signals in the original lightning radiation waveform; S12, The filtered lightning radiation waveform is cut into several overlapping lightning radiation waveform segments based on the sliding window method. S13, and the lightning radiation waveform segment is projected into the [-1,1] interval using the min-max normalization method to obtain the normalized lightning radiation waveform segment; The method for generating the training dataset in the training dataset creation module (1) is as follows: Lightning radiation waveform samples are extracted from normalized lightning radiation waveform segments based on a criterion method. After manual screening and verification, the discharge event types of the lightning radiation waveform samples are labeled. The correspondence between the lightning radiation waveform segment samples S and the discharge event type labels L is used as the training dataset.

2. The lightning radiation waveform classification system based on claim 1, characterized in that: The criterion method in the training dataset establishment module (1) is a comprehensive criterion formed by waveform feature parameters. Different categories of lightning radiation waveform samples are extracted from the normalized lightning radiation waveform segments. The waveform feature parameters include waveform rise time, waveform fall time, pulse width, waveform front-to-back inverse peak ratio, sub-peak ratio and signal-to-noise ratio. The criterion threshold comes from the statistical results of the normalized lightning radiation waveform segments. The lightning radiation waveform sample types include return stroke (RS), pre-breakdown (PB), narrow bipolar pulse (NB), and cloud flash (IC).

3. The lightning radiation waveform classification system based on claim 1, characterized in that: The specific implementation method of the empirical mode decomposition method in the training dataset establishment module (1) is as follows: S11.1 The original lightning radiation waveform signal returned by the detector is x(t). Mark the local maxima and local minima of the original lightning radiation waveform signal x(t). S11.2, the local maxima points are connected by cubic spline function interpolation to form the upper envelope e. max (t), connecting the local minimum points, forms the lower envelope e. min h1(t) can be obtained by subtracting the mean of the upper and lower envelopes from the original radiation waveform signal x(t): S11.3, determine whether h1(t) meets the IMF component condition. If not, replace x(t) with h1(t) and repeat steps S11.1 and S11.2 k times until h1(t) meets the IMF component condition. 1k (t) satisfies the IMF component condition, and at this time, let h be... 1k (t) represents the IMF component imf i (t); S11.4, Subtract the IMF component imf from the original lightning radiation waveform signal x(t). i (t), repeat steps S11.1, S11.2, and S11.3 N times until the termination condition is met; the original lightning radiation waveform signal x(t) is decomposed into a series of IMF components imf1, imf2, imf3…, imf N with the residual amount r n Linear superposition of (t): S11.5, Use Fourier transform to analyze the IMF components imf1, imf2, imf3…, imf N The frequency domain distribution is obtained by removing the IMF components whose main frequency is lower than the set frequency threshold, and then accumulating and recombining the remaining IMF components to obtain the filtered lightning radiation waveform.

4. The lightning radiation waveform classification system based on claim 3, characterized in that: The IMF component conditions are as follows: within the time period of the original radiation waveform signal, the number of any two of the three local maximum points, local minimum points, and zero points must be equal or differ by at most one; at any time of the original radiation waveform signal, the average value of the upper envelope obtained by connecting the local maximum points and the lower envelope obtained by connecting the local minimum points is zero. The termination conditions include two types: the first termination condition is the Nth IMF component or the residual r. N (t) is less than the set threshold; the second termination condition is the residual r. N (t) is a constant or a monotonic function.

5. The lightning radiation waveform classification system based on claim 1, characterized in that: The specific implementation of the sliding window method in step S12 of the training dataset establishment module (1) is as follows: Align the starting point of the sliding window with the starting point of the filtered lightning radiation waveform, and extract lightning radiation waveform segments within the sliding window to obtain the first lightning radiation waveform segment sample p1. Move the sliding window forward by a set length and extract lightning radiation waveform segments within the sliding window to obtain the second lightning radiation waveform segment sample p2. Continue moving the sliding window forward by the same set length and obtaining corresponding lightning radiation waveform segment samples until the filtered lightning radiation waveform is completely segmented, obtaining lightning radiation waveform segments p1, p2, p3...p m m is the number of lightning radiation waveform segments; The condition for moving forward by a set length is to ensure that two adjacent lightning radiation waveform segments contain a suitable overlapping area. Based on the min-max normalization method, p' = p / (max(p) - min(p)) is used to project the segments into the interval [-1, 1] to obtain the normalized waveform segments p1', p2', p3'...p m '.

6. The lightning radiation waveform classification system based on claim 5, characterized in that: The lightning radiation waveform segment p m The method for obtaining it is as follows: If the lightning radiation waveform segment p m The duration of the lightning radiation waveform segment p is different from the duration of the sliding window. m When the time length is greater than or equal to 2 / 3 of the time length of the sliding window, the lightning radiation waveform segment p is resampled using the nearest neighbor interpolation method. m The time length is increased to the time length of the sliding window; When the lightning radiation waveform segment p m If the duration of the lightning radiation waveform segment p is less than 2 / 3 of the duration of the sliding window, then the lightning radiation waveform segment p is discarded. m .

7. The lightning radiation waveform classification system based on claim 1, characterized in that: The specific implementation method of the convolutional neural network model training module (2) is as follows: S21, Model Establishment: The input layer receives the correspondence sample data between the lightning radiation waveform segment sample S and the discharge event type label L. The sample data is convolved through multiple special convolutional layers, then pooled in a global pooling layer, and finally entered a fully connected layer and activated by an activation function to obtain the probability that the sample data belongs to the lightning radiation waveform sample type. The lightning radiation waveform sample type corresponding to the maximum probability is the waveform category L'. S22, Model Training and Testing: Divide the training dataset proportionally to obtain the training set and the test set; set the hyperparameters used for model training; determine whether the model has converged based on the fluctuation of the model's output accuracy; when the model converges, save the parameter weights within the model; and test whether the model's classification performance is balanced by the classification speed, accuracy, precision, recall, and F1 coefficient indicators. The method for determining whether the model has converged is that the model converges when the classification accuracy fluctuation does not exceed a set threshold within a number of consecutive iterations.

8. The lightning radiation waveform classification system based on claim 7, characterized in that: The special convolutional layer uses convolutional kernels to scan the sample data to obtain a feature distribution matrix; The global pooling layer is used to perform secondary processing on the feature distribution matrix; The special convolutional layer uses max pooling to retain the most prominent features in the feature distribution matrix; The output of the multi-layer special convolutional layer also includes a high-dimensional feature map. The high-dimensional feature map is multiplied and summed with the weight matrix in the fully connected layer to obtain the contribution weight value of each data point of the lightning radiation waveform segment sample S to the classification probability. The multi-layer special convolutional layer includes two convolutional blocks, each containing three convolutional layers. The input of each convolutional block is directly connected to the second convolutional layer of that block via a shortcut link. The convolutional layer contains four types of convolutional kernels: 40×1, 20×1, 10×1, and 1×1. The input data of the convolutional layer enters two paths. The first path involves the input data being convolved by the 1×1 kernel to obtain the first convolution result. This first convolution result is then convolved with the 40×1 kernel to obtain the second convolution result. Finally, this second convolution result is convolved with the 20×1 kernel to obtain the first path. The third convolution result of the first link is obtained by convolving the first convolution result of the first link with the 10×1 convolution kernel. The second link is obtained by passing the input data of the convolutional layer through a 3×1 max pooling layer. The pooling result of the second link is then convolved with the 1×1 convolution kernel to obtain the convolution result of the second link. The second, third, and fourth convolution results of the first link are concatenated with the convolution result of the second link to form the output data of the convolutional layer. The high-dimensional feature map output by the multi-layer special convolutional layer is an n-layer feature map, where the value at data point x in the k-th layer feature map is f. k (x); After the n-layer feature maps pass through the global pooling layer, each feature map will be converted into a single value F. k Output, F k It can be calculated using the following formula: F k =∑ x f k (x) Ignoring the activation function, it can be assumed that for any category C, the probability S of the waveform belonging to category C is... C It can be obtained from the following formula: Among them, a k c The weight represents the contribution of the feature map of the k-th layer to the model's decision category C, corresponding to the fully connected coefficient of category C in the fully connected layer; Therefore, the class activation graph for category C can be defined as follows: M C (x) represents the contribution weight value of the lightning radiation waveform segment sample S under category C; the hyperparameters used for model training include optimizer, loss function, number of iterations, and learning rate variation strategy; The accuracy rate is calculated as follows: The accuracy rate is calculated as follows: The recall rate is calculated as follows: The F1 coefficient is calculated as follows: in: TP: Represents an example that is actually positive and is judged as positive by the model; FP: Represents an example that is actually positive but is judged as negative by the model; TN: Represents an example that is actually a counterexample and is also identified as a counterexample by the model; FN: This represents an example that is actually a negative example, but the model judges it as a positive example.

9. The lightning radiation waveform classification system based on claim 1, characterized in that: The specific implementation method of the waveform intelligent classification module (4) is as follows: S41, call the classification model trained in the convolutional neural network model training module (2) to complete the classification of the predicted input data and obtain the waveform category and corresponding probability given by the model; S42, call the classification model trained in the convolutional neural network model training module (2) to complete waveform visualization, and display the importance of any data point in the waveform data to the model's determination that the waveform belongs to a certain discharge event category in the form of a heat map; The waveform intelligent classification module (4) is also used to confirm the reliability of the classification results by calculating the interpretability of the model contribution weight value.

10. A method for classifying lightning radiation waveforms based on the system of claim 1, characterized in that: It includes the following steps: Step 1: Obtain lightning radiation waveform segment samples using waveform segmentation method, and use the correspondence between the lightning radiation waveform segment samples and discharge events as training dataset; Step 2: Build a convolutional neural network model, and perform parameter tuning and training of the convolutional neural network model based on the training dataset to obtain the trained classification model; Step 3: Obtain lightning radiation waveform segments from the original lightning radiation waveform returned by the detector using the waveform segmentation method. Calculate the lightning energy spectrum of the lightning radiation waveform segments by windowing. When the energy distribution of all windows is less than the threshold, determine that the lightning radiation waveform segment is a noise waveform and discard the lightning radiation waveform segment. Use the lightning radiation waveform segments that are not discarded as the set of waveforms to be classified. Step 4: Input the dataset to be classified into the trained classification model for classification, obtain the classification result, and confirm the reliability of the classification result by calculating the model contribution weight value interpretability module.

Citation Information

Patent Citations

  • Full lightning cloud cloud-to-ground lightning recognition method

    CN104569624A