Lightning stroke prediction model training method

By constructing a lightning strike model and using a simulator to generate lightning induction voltage, preprocessing and feature extraction, and training prediction models, the problem of insufficient accuracy of lightning strike positioning and peak current prediction is solved, and the safety and stability of the power grid are improved.

CN120373151AInactive Publication Date: 2025-07-25STATE GRID SHANGHAI MUNICIPAL ELECTRIC POWER CO
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510855695.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-25
Publication Date
2025-07-25
Estimated Expiration
Not applicable · inactive patent

Smart Images

  • Figure CN120373151A_ABST
    Figure CN120373151A_ABST
Patent Text Reader

Abstract

The invention relates to a training method of a lightning stroke prediction model, and belongs to the field of lightning stroke protection of overhead transmission lines. Comprising the following steps: constructing first and second lightning stroke models, and simulating a plurality of first and second lightning stroke events by using a simulator to obtain first and second lightning induction voltages on the overhead transmission line; performing preprocessing, feature extraction and labeling on the first and second lightning induced voltages to obtain first and second data; a first prediction model and a second prediction model are constructed, the first prediction model is used for predicting the lightning stroke position, and the second prediction model is used for predicting the lightning stroke position and peak current; establishing a first sample set and a second sample set based on the first data and the second data, and training the first prediction model and the second prediction model through the first sample set and the second sample set to obtain the trained first prediction model and the trained second prediction model. According to the method, the training and verification data set is constructed through the simulator, the optimal parameters of the model are selected through cross validation, the model is trained through weight updating, and the accuracy of model prediction is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of lightning protection for overhead transmission lines, and particularly to a method for training a lightning strike prediction model. Background Art

[0002] Lightning strike is a phenomenon in which current hits the ground or an object on the ground during the lightning discharge process, and it is an important risk source that causes harm to people, facilities (such as power transmission and distribution systems, telecommunication systems), railway aviation, natural environment, etc.

[0003] In recent years, with the development of smart grids, the optimized operation level of the distribution network has been continuously improved. However, the operation environment of the distribution network is complex. Especially, the long-distance overhead transmission lines are located in relatively open areas and are vulnerable to lightning disasters, posing potential safety and stability hazards to the operation of the distribution network. Therefore, studying the location of cloud-to-ground lightning strikes on transmission lines and the peak current of their channels (i.e., the peak value of the return current waveform measured at the bottom of the lightning channel) is of great significance for preventing the impacts brought by disastrous weather, evaluating the lightning performance of transmission line facilities, and designing lightning protection systems, etc. Currently, cloud-to-ground lightning strikes on transmission lines are usually located through a lightning location system for positioning. It consists of a sensor network with a distance of 50 - 400 kilometers between sensors, and is used to detect cloud-to-ground discharge signals in the extremely low frequency / low frequency range. The sensors usually measure the radiated electric field and / or magnetic field, and use the magnetic direction finding method , the time-of-arrival method or a hybrid method of the two to locate lightning strikes. However, the positioning accuracy depends on the coverage range of the sensors, and the peak current is inferred based on the measured peak field strength, resulting in large errors in lightning strike location and estimated peak current.

[0004] It can be seen that constructing and training a prediction model that can accurately predict lightning strike location and peak current based on lightning induction signals is an urgent problem to be solved. Summary of the Invention

[0005] In view of the above analysis, the present invention aims to provide a method for training a lightning strike prediction model to solve the problem of the lack of a prediction model that can accurately predict lightning strike location and peak current based on lightning induction signals.

[0006] The present invention provides a method for training a lightning strike prediction model, and the method includes the following steps: Construct the first and second lightning strike models, and use the LIGHT-PESTO simulator based on the first and second lightning strike models to simulate a number of first and second lightning strike events to obtain the first and second lightning-induced voltages on the overhead transmission line; preprocess, extract features and label the first and second lightning-induced voltages to obtain the first and second data; Construct the first and second prediction models, where the first prediction model is used to predict the lightning strike location, and the second prediction model is used to predict the lightning strike location and peak current; Based on the first and second data, establish the first and second sample sets, and train the first and second prediction models respectively through the first and second sample sets to obtain the trained first and second prediction models.

[0007] Further, both the first lightning strike model and the second lightning strike model include a lightning strike channel and a grounding setting; The lightning strike channels of the first and second lightning strike models are typical straight vertical lightning strike channels, and the height and return propagation speed of the lightning strike channels are set; the exponential decay modified transmission line model is used to describe the characteristics of the current propagating along the lightning strike channel; the peak current of the first lightning strike model is a constant value, and the peak current of the second lightning strike model is extracted according to the lognormal distribution; the base currents of other lightning strike channels are all Functionally modeled and the typical parameter values of the first stroke are used; the grounding setting of the first lightning strike model is an ideal electrical conductor, and the grounding setting of the second lightning strike model has losses but is uniform.

[0008] Further, the use of the first and second lightning strike models by The simulator simulates a number of first and second lightning strike events to obtain the first and second lightning-induced voltages on the overhead transmission line, including: Construct the power system model of the overhead transmission line, and construct the lightning strike detection domain based on the power system model; Based on the first and second lightning strike models, use The simulator simulates a number of first and second lightning strike events in the lightning strike detection domain; Set the simulation parameters, and obtain the first and second lightning-induced voltages on the overhead transmission line corresponding to the first and second lightning strike events through The simulator according to the simulation parameters.

[0009] Further, the power system model of the overhead transmission line includes a straight single-line transmission line and two voltage sensors; set the length, diameter and height from the ground of the transmission line; assume that the terminal resistance at both ends of the transmission line is equal to the characteristic impedance of the transmission line; the voltage sensors are arranged on the transmission line at intervals; The lightning strike detection area is a square area with the length of the transmission line in the power system model as its side length; the transmission line in the power system model is located outside the lightning strike detection area and is parallel to two sides of the lightning strike detection area; the distance between the transmission line and the side of the lightning strike detection area closest to it is a preset distance.

[0010] Further, the training of the first and second prediction models respectively using the first and second sample sets to obtain the trained first and second prediction models includes: Step S301: Divide the first and second sample sets into a number of first and second subsets; Step S302: Set the hyperparameter grids of the first and second prediction models, and based on the first and second subsets, use cross-validation to select the optimal hyperparameters of the first and second prediction models from the hyperparameter grids, and train the first and second prediction models with the optimal hyperparameters respectively to obtain the trained first and second prediction models.

[0011] Further, randomly divide the first and second sample sets into ten mutually exclusive subsets of equal size; The hyperparameter grids of the first and second prediction models refer to the selectable values of the hyperparameters that need to be optimized in the first and second prediction models. The hyperparameter grids include at least one hyperparameter that needs to be optimized, and the hyperparameters that need to be optimized include at least two selectable values.

[0012] Further, the selection of the optimal hyperparameters of the first and second prediction models from the hyperparameter grids based on the first and second subsets using cross-validation includes: For each set of hyperparameters in the hyperparameter grid: Select one subset as the validation set, and combine the remaining nine subsets as the training set. Train the first and second prediction models with this set of hyperparameters using the training set, and calculate the performance metrics of the model using the validation set; successively select ten subsets as the validation set, and train the first and second prediction models with this set of hyperparameters according to the above method, and obtain the error of the model corresponding to each validation set; calculate the average value of the errors of the model corresponding to the ten validation sets to obtain the average error of the model; Select the set of hyperparameters with the smallest average error as the optimal hyperparameters of the first and second prediction models.

[0013] Further, the training of the first prediction model with the training set using this set of hyperparameters includes: Step S311: Initialize the first prediction model and its weights and biases according to this set of hyperparameters; Step S312: Input the samples in the training set into the first prediction model to obtain predicted values, and calculate the errors of the predicted values according to the labels marked by the samples; Step S313: Determine whether the stop condition is satisfied. If so, stop the training; otherwise, update the weights of the first prediction model based on the error, and return to step S312 to continue execution.

[0014] Further, training the second prediction model with the set of hyperparameters using the training set includes: Step S321: Initialize the second prediction model, its weights, and biases according to the set of hyperparameters; Step S322: Use the training set to train in the second prediction model to obtain the trained ; Step S323: Based on the trained and the training set, train NN2 in the second prediction model to obtain the trained .

[0015] Further, the expression of the i-th sample in the first sample set is: , where represents the data value corresponding to the n-th element of the first reduced-dimensional vector of the i-th sample, n is the dimension of the first reduced-dimensional vector, represents the labeled label of the i-th sample, that is, the coordinates of the lightning strike point corresponding to this sample; The expression of the i-th sample in the second sample set is: , where represents the data value corresponding to the m-th element of the second reduced-dimensional vector of the i-th sample, m is the dimension of the second reduced-dimensional vector, , both represent the labeled label of the i-th sample, where represents the coordinates of the lightning strike point corresponding to this sample, represents the peak current corresponding to this sample.

[0016] Compared with the prior art, the present invention can at least achieve one of the following beneficial effects: 1. The present invention constructs a power system model, a lightning strike detection area, and a lightning strike event of an overhead transmission line through a simulator, and then simulates a lightning strike event and the corresponding lightning-induced voltage to construct a data set for a prediction model. Compared with the traditional method of generating a data set using a simplified formula, it can simulate a more complex and real transmission line, making the data set used for model training and verification more in line with the actual situation, thereby improving the accuracy of model prediction.

[0017] 2. The present invention provides a basis for improving the prediction accuracy of the first and second prediction models by setting the hyperparameter grids of the first and second prediction models and selecting the optimal hyperparameters of the first and second prediction models from the hyperparameter grids through cross-validation based on the first and second subsets, and then training the first and second prediction models with the optimal hyperparameters.

[0018] 3. The present invention updates the weights of the first and second prediction models through the training error, and trains the first and second prediction models by weight update, thereby improving the prediction accuracy of the first and second prediction models.

[0019] 4. For the second prediction model, based on the predicted peak current after training, the training set is normalized. Through normalization, the lightning strike position and the peak current can be decoupled, only the features related to the lightning strike position are retained, the interference of the peak current is eliminated, the number of parameters that the model needs to learn is reduced, the risk of overfitting is reduced, and the prediction accuracy is improved; it enables to adapt to the prediction of lightning strike positions under different peak currents, enhances the generalization ability of the model to different peak currents, and improves the adaptability of the model; and it can avoid the direct transmission of prediction errors to thereby improving the robustness of the prediction.

[0020] 5. The present invention can flexibly choose to only predict the lightning strike position or simultaneously predict the peak current and the lightning strike position by selecting to use the first prediction model or the second prediction model according to the actual situation; by preprocessing and feature extraction of the lightning-induced voltage to obtain a dimensionality-reduced vector, and simultaneously predicting the peak current and the lightning strike position based on the second prediction model through the dimensionality-reduced vector, the accuracy of lightning strike positioning and the correctness of lightning strike peak current estimation are improved, thereby enhancing the ability of the power system to cope with lightning disasters and ensuring the safety and stability of the power grid operation.

[0021] In the present invention, the above technical solutions can also be combined with each other to achieve more preferred combination schemes. Other features and advantages of the present invention will be described in the subsequent specification, and some advantages can be made obvious from the specification or understood by implementing the present invention. The objectives and other advantages of the present invention can be realized and obtained from the content specifically pointed out in the specification and the drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] The drawings are only for the purpose of showing specific embodiments and are not considered to be a limitation of the present invention. Throughout the drawings, the same reference numerals represent the same components; Figure 1 is a flowchart of the training method of the lightning strike prediction model according to the embodiment of the present invention;​ Figure 2 Schematic diagram of the power system model and lightning strike detection area of the overhead transmission line in the embodiment of the present invention; Figure 3 Schematic diagram of the structure of the second prediction model in the embodiment of the present invention. Detailed implementation manners

[0023] The following will specifically describe the preferred embodiments of the present invention with reference to the accompanying drawings. The accompanying drawings form a part of this application and are used together with the embodiments of the present invention to explain the principles of the present invention, rather than to limit the scope of the present invention.

[0024] A specific embodiment of the present invention discloses a method for training a lightning strike prediction model. As Figure 1 shown, the method includes the following steps: Step S1: Construct the first and second lightning strike models. Based on the first and second lightning strike models, use a simulator to simulate a number of first and second lightning strike events to obtain the first and second lightning-induced voltages on the overhead transmission line; perform preprocessing, feature extraction, and annotation on the first and second lightning-induced voltages to obtain the first and second data; Step S2: Construct the first and second prediction models. The first prediction model is used to predict the lightning strike position, and the second prediction model is used to predict the lightning strike position and the peak current; Step S3: Establish the first and second sample sets based on the first and second data, and train the first and second prediction models respectively through the first and second sample sets to obtain the trained first and second prediction models.

[0025] Specifically, in step S1, both the first lightning strike model and the second lightning strike model include a lightning strike channel and a grounding setting.

[0026] Furthermore, the lightning strike channels of the first and second lightning strike models are typical straight vertical lightning strike channels. Set the height (denoted by H) and the return stroke propagation speed of the lightning strike channels; use the exponential decay modified transmission line ( ) model to describe the characteristics of the current propagation along the lightning strike channel; the peak current of the first lightning strike model is a constant value, and the peak current of the second lightning strike model is extracted according to the lognormal distribution; the other lightning strike channel base currents are all modeled using functions and use the typical parameter values of the first stroke; the grounding setting of the first lightning strike model is an ideal electrical conductor (PEC), and the grounding setting of the second lightning strike model has losses but is uniform.

[0027] Exemplarily, set the height of the lightning strike channels of the first and second lightning strike models to 8 kilometers, and its return stroke propagation speed to 0.4c0, where c0 is the speed of light in a vacuum ; Set the peak current of the first lightning strike model to 30 kA, and the peak current of the second lightning strike model follows a lognormal distribution. Set its median to 31.1 kA and its logarithmic standard deviation to 0.485 kA; Set the ground conductivity of the first lightning strike model to infinity and the relative permittivity of the ground to 1; The ground conductivity of the second lightning strike model is 10 ms / m and the relative permittivity of the ground is 10.

[0028] It should be noted that in the second lightning strike model, the peak current is extracted according to a lognormal distribution, which reflects the magnitude information of the peak current at different lightning strike positions and provides a basis for improving the accuracy of the model in predicting the peak current and lightning strike position in the follow-up.

[0029] It can be understood that relevant parameters of the lightning strike channels and grounding settings of the first and second lightning strike models are set according to the actual situation.

[0030] Specifically, the lightning strike model is used to simulate the lightning strike discharge process. When the charge in the thundercloud accumulates to a certain extent and the electric field strength between the cloud and the ground or between clouds is large enough, the air will be ionized into a conductive plasma, thus forming a lightning strike channel. The lightning strike channel represents the conductive channel formed during the lightning strike discharge process. During the lightning strike discharge, the negative charge at the cloud base triggers a downward leader discharge, called a stepped leader. When the stepped leader approaches the ground, the positive charge on the ground is attracted to form an upward streamer. When the streamer meets the stepped leader, a complete conductive channel, that is, the lightning strike channel, is formed. The return stroke propagation speed represents the speed at which the current returns upward along the lightning strike channel during the return stroke stage; The return stroke stage refers to the stage when the main discharge occurs after the streamer meets the stepped leader to form a complete discharge channel.

[0031] Specifically, the exponential decay modified transmission line model combines the transmission line theory and the current decay characteristics, and can more accurately reflect the situation of the current propagating along the lightning strike channel. In the lightning strike channel, the mathematical models of the current and voltage propagating along the lightning strike channel are represented by the following formulas: , where V represents voltage, I represents current, z represents the distance along the lightning strike channel, t represents time, L represents the inductance per unit length of the lightning strike channel, R represents the resistance per unit length of the lightning strike channel, C represents the capacitance per unit length of the lightning strike channel, and G represents the conductance per unit length of the lightning strike channel.

[0032] The current decay characteristics are represented by the following formula: , where represents the initial current, represents the decay factor.

[0033] Specifically, the expression of the function is: , where represents the peak current, n represents the current steepness factor, and represent the time constant, and t represents time.

[0034] Specifically, the base current of the lightning strike channel refers to the current at the bottom of the lightning strike channel (i.e., the part of the lightning strike channel close to the ground or ground objects). The first stroke refers to the first current pulse from the cloud to the ground during the lightning strike discharge process, and it is the first main current pulse during the lightning strike discharge process. In cloud-to-ground lightning strikes, the first stroke is usually the most intense discharge, and its peak current and energy release are significantly higher than those of subsequent strokes. Therefore, the first stroke has the most significant impact on the surrounding environment and objects. Through statistical analysis of a large number of measurement data of lightning strike discharge processes, the typical parameter values of the first stroke are obtained. The typical parameters of the first stroke include peak current, wavefront time, half-peak time, and average rise rate.

[0035] Furthermore, the first and second lightning-induced voltages on the overhead transmission line obtained by simulating a number of first and second lightning strike events using the simulator based on the first and second lightning strike models include: Construct a power system model of the overhead transmission line, and construct a lightning strike detection domain based on the power system model; Based on the first and second lightning strike models, use the simulator to simulate a number of first and second lightning strike events in the lightning strike detection domain; Set the simulation parameters, and obtain the first and second lightning-induced voltages on the overhead transmission line corresponding to the first and second lightning strike events through the simulator according to the simulation parameters.

[0036] Specifically, the power system model of the overhead transmission line includes a straight single-line transmission line and two voltage sensors; set the length, diameter, and height from the ground of the transmission line; assume that the terminal resistance at both ends of the transmission line is equal to the characteristic impedance of the transmission line; the voltage sensors are arranged on the transmission line at intervals.

[0037] Exemplarily, as Figure 3 shown, set the transmission line to be 10 km long, 1 cm in diameter, and 10 m high from the ground; assume that the terminal resistance at both ends of the transmission line is equal to the characteristic impedance of the transmission line, i.e., 498 ; the voltage sensors and They are located at 4 kilometers and 6 kilometers of the transmission line respectively.

[0038] It should be noted that the overhead transmission line is an important facility for transmitting electric energy in the power system. It transmits electric energy from the power generation station to the substation or the user end through the transmission line (i.e., the conductor) erected in the air. The power system model of the overhead transmission line represents the equivalent circuit of the transmission line and is used to describe the electrical characteristics of the transmission line.

[0039] Specifically, the lightning strike detection area is a square area with the length of the transmission line in the power system model as the side length; the transmission line of the power system model is located outside the lightning strike detection area and is parallel to two sides of the lightning strike detection area; the transmission line and the side of the lightning strike detection area closest to it are separated by a preset distance.

[0040] Exemplarily, as Figure 2 shown, the lightning strike detection area is a square area with a side length of 10 kilometers; the transmission line is located below the lightning strike detection area and is 100 meters away from the bottom side of the lightning strike detection area.

[0041] It can be understood that the length, diameter, height from the ground, distance between voltage sensors, and distance between the transmission line and the lightning strike detection area are set according to the actual situation.

[0042] Furthermore, based on the first and second lightning strike models, the simulator simulates a certain number of first and second lightning strike events in the lightning strike detection area.

[0043] Preferably, 2000 first and second lightning strike events are simulated in the lightning strike detection area.

[0044] Specifically, the simulator is used to simulate the first and second lightning strike events, randomly generate lightning strike points in the lightning strike detection area, and simulate the first and second lightning induced voltages at the voltage sensors on the overhead transmission line caused by the first and second lightning strike events. The simulator uses the second-order finite-difference time domain of the model to solve the field-line coupling problem in the

[0045] It should be noted that when simulating the first and second lightning strike events, the coordinates of the randomly generated lightning strike points follow a uniform distribution. The model is based on the transmission line theory and the electromagnetic field theory, and is used to analyze the interaction problem between the electromagnetic field and the transmission line. When lightning strikes occur near an overhead transmission line, due to the strong electromagnetic field generated during the lightning discharge process, an induced voltage will be generated on the overhead transmission line, which has an important impact on the overhead transmission line, namely field-line coupling. The second-order finite difference in time domain refers to a method for solving the electromagnetic field by second-order finite difference in the time domain. The environment is used to simulate electromagnetic transient phenomena.

[0046] Furthermore, the simulation parameters include the time step, the time range, the height of the lightning strike channel, and the return stroke propagation speed.

[0047] Specifically, the time range is expressed as [0, T], where , v represents the return stroke propagation speed, and H represents the height of the lightning strike channel.

[0048] Preferably, the time step is set to .

[0049] Specifically, for a first and a second lightning strike event, according to the simulation parameters, through the simulator simulates the first and second lightning-induced voltages corresponding to the voltage sensors of the power system model of the overhead transmission line; wherein, the first and second lightning-induced voltages corresponding to each voltage sensor are arrays with n elements, where , represents the time step.

[0050] It should be noted that through the simulator, each voltage sensor obtains a corresponding lightning-induced voltage value at each time step, thereby converting the continuously changing lightning-induced voltage into a series of discrete data points, which is convenient for subsequent storage and preprocessing.

[0051] It can be understood that using the simulator to simulate a first and a second lightning strike event and the corresponding lightning-induced voltages only takes about 3 seconds, ensuring high efficiency. The present invention passes through The simulator constructs a power system model, a lightning strike detection area, and lightning strike events of an overhead transmission line, and then simulates lightning strike events and the corresponding lightning-induced voltages to construct a dataset for a prediction model. Compared with the traditional method of generating a dataset using simplified formulas, it can simulate a more complex and realistic transmission line, and the dataset used for model training and verification is more in line with the actual situation, thus improving the accuracy of model prediction; the lightning-induced voltage is measured by voltage sensors on the overhead transmission line. Since the overhead transmission line has a long transmission distance and a wide coverage area, compared with the traditional direct measurement on the tower, it can obtain lightning-induced data in a wider area, thereby realizing the prediction of lightning strike positions and peak currents in a wider area; the lightning-induced voltage is measured by the existing voltage sensors on the overhead transmission line without adding new measurement equipment. Compared with the traditional method of relying on a dedicated sensor network for lightning strike positioning through a lightning location system, it not only reduces costs but also is more practical, especially suitable for areas with dense power transmission lines.

[0052] Further, the preprocessing, feature extraction, and annotation of the first and second lightning-induced voltages to obtain the first and second data include: Preprocessing the first and second lightning-induced voltages to obtain first and second initial vectors; Performing feature extraction on the first and second initial vectors to obtain first and second dimensionality-reduced vectors; For the first dimensionality-reduced vector, it is annotated with the coordinates of the lightning strike point to obtain the first data; for the second dimensionality-reduced vector, it is annotated with the coordinates of the lightning strike point and the peak current to obtain the second data.

[0053] Specifically, the preprocessing of the first and second lightning-induced voltages includes: removing leading zeros, truncating, and performing discrete Fourier transform on the lightning-induced voltages corresponding to each voltage sensor in the first and second lightning-induced voltages.

[0054] Specifically, the removal of leading zeros means finding the first non-zero element in the array corresponding to the lightning-induced voltage and removing all zero elements before this non-zero element.

[0055] It should be noted that due to different lightning strike points, the distances between each voltage sensor and the lightning strike point are different, so the starting times of the lightning-induced voltages obtained by each voltage sensor are also different. The farther the voltage sensor is from the lightning strike point, the longer the time required for the electromagnetic field to propagate, and the later the starting time of the lightning-induced voltage obtained by the voltage sensor. By removing the leading zeros, the lightning-induced voltages corresponding to each voltage sensor have the same starting time.

[0056] Specifically, the truncation means obtaining the minimum array dimension corresponding to the lightning-induced voltage after removing the leading zeros, and truncating the array corresponding to the lightning-induced voltage at the tail according to this minimum array dimension.

[0057] It should be noted that after removing the leading zero values, the dimensions of the arrays corresponding to the lightning-induced voltages will be inconsistent. Therefore, the arrays corresponding to the lightning-induced voltages need to be truncated from the tail according to the smallest array dimension to make the lengths of all arrays corresponding to the lightning-induced voltages uniform.

[0058] Exemplarily, assume that there are two voltage sensors V1 and V2 on the overhead transmission line, and the array dimension corresponding to the lightning-induced voltage of V1 is the smallest, equal to n1. Then, the array corresponding to the lightning-induced voltage of voltage sensor V2 is truncated from the tail to make their lengths uniform to n1.

[0059] Specifically, the expression of the discrete Fourier transform is: , where represents the array corresponding to the lightning-induced voltage with a length of N, j represents the imaginary part, and k represents the frequency component.

[0060] It should be noted that through the above expression of the discrete Fourier transform, the truncated lightning-induced voltage is transformed into the frequency domain to obtain a set of complex values that form the lightning-induced voltage vector, which is convenient for subsequent feature extraction.

[0061] Furthermore, the preprocessing of the lightning-induced voltage further includes: After the discrete Fourier transform, the lightning-induced voltage vector is obtained. The real and imaginary parts of the lightning-induced voltage vectors corresponding to each voltage sensor are respectively stacked to obtain the initial vector.

[0062] Exemplarily, after the discrete Fourier transform, the lightning-induced voltage vector corresponding to voltage sensor V1 is expressed as , where has a real part and an imaginary part, and the numbers of both the real part and the imaginary part are ones. The real part is expressed as , and the imaginary part is expressed as ; similarly, the lightning-induced voltage vector corresponding to voltage sensor V2 is expressed as , and the numbers of both its real part and its imaginary part are ones. The real part is expressed as , and the imaginary part is expressed as . The real and imaginary parts of the lightning-induced voltage vectors corresponding to voltage sensors V1 and V2 are respectively expanded into one-dimensional vectors and stacked in sequence to obtain the initial vector, expressed as , where the initial vector is a one-dimensional vector containing 2n1 elements.

[0063] It should be noted that for a first and a second lightning strike event, a corresponding initial vector is obtained.

[0064] Further, the obtaining of the first and second dimensionality-reduced vectors by performing feature extraction on the first and second initial vectors includes: Constructing a feature matrix based on the first and second initial vectors and calculating the covariance matrix of the feature matrix; Performing eigenvalue decomposition on the covariance matrix to obtain a number of eigenvalues and corresponding eigenvectors, and arranging the eigenvalues in descending order; Setting a variance threshold, accumulating the eigenvalues in descending order, and when the accumulated result reaches the variance threshold, obtaining the corresponding eigenvalues and eigenvectors as the principal components; Projecting the first and second initial vectors onto the selected principal components to obtain the first and second dimensionality-reduced vectors.

[0065] Specifically, extracting the elements of the first and second initial vectors to construct a feature matrix, where one row in the feature matrix is all the elements in the first and second initial vectors corresponding to a first and a second lightning strike event. The covariance matrix of the feature matrix is calculated by the following formula: , where, represents the covariance matrix; N is the number of columns of the feature matrix; is the i-th column vector of the feature matrix.

[0066] Specifically, performing eigenvalue decomposition on the covariance matrix by the following formula: , where, represents the i-th eigenvalue, represents the corresponding i-th eigenvector, and m represents the total number of eigenvalues.

[0067] Specifically, arranging the above eigenvalues in descending order such that .

[0068] Further, setting a variance threshold, accumulating the eigenvalues in descending order, and when the accumulated result reaches the variance threshold, obtaining the accumulated corresponding eigenvalues and eigenvectors as the principal components. Preferably, the variance threshold is set to 99.52%.

[0069] Specifically, accumulating the eigenvalues in descending order by the following formula: , where, It represents the cumulative result, and P represents the number of eigenvalues for which the accumulation is performed.

[0070] Exemplarily, the variance threshold is set to 99.52%. When reaches 99.52%, to and to are obtained as the principal components.

[0071] Specifically, the first and second initial vectors are projected onto the selected principal components through the following formula to obtain the first and second dimensionality-reduced vectors: , where represents the first and second dimensionality-reduced vectors, represents the first and second initial vectors, to represent the eigenvectors in the principal components.

[0072] It should be noted that in order to avoid the curse of dimensionality, the dimension of the initial vector needs to be reduced. In the present invention, the dimensionality-reduced vectors are obtained by extracting the eigenvectors corresponding to the principal components, which not only retains the key features of the initial vector but also realizes the dimensionality reduction of the initial vector, not only improving the computational efficiency but also providing a basis for improving the accuracy of model prediction.

[0073] It should be noted that the first dimensionality-reduced vector and the second dimensionality-reduced vector may have different dimensions.

[0074] Exemplarily, the first data is the first lightning-induced voltage corresponding to voltage sensors VS1 and VS2, and is labeled with the coordinates of the lightning strike point corresponding to the first lightning strike event. The second data is the second lightning-induced voltage corresponding to voltage sensors VS1 and VS2, and is labeled with the coordinates of the lightning strike point corresponding to the second lightning strike event and the peak current.

[0075] Specifically, in step S2, the first prediction model includes a shallow feedforward neural network, and the shallow feedforward neural network includes an input layer, a hidden layer, and an output layer; where the hidden layer uses the activation function, and the output layer uses a linear activation function.

[0076] It should be noted that the hidden layer of the first prediction model processes the non-linear relationship between the eigenfeatures of each principal component in the dimensionality-reduced vector through the activation function, thereby improving the prediction accuracy; the output layer directly outputs the coordinates of the lightning strike point through the linear activation function.

[0077] Furthermore, as Figure 3As shown, the second prediction model includes a current prediction module and a coordinate prediction module. The current prediction module includes a shallow feedforward neural network , which is used to receive the input dimensionality-reduced vector, output the peak current, and send the output peak current to the coordinate prediction module; The coordinate prediction module includes a divider and a shallow feedforward neural network . The divider is used to output the normalized dimensionality-reduced vector based on the input dimensionality-reduced vector and the peak current, and send it to the shallow feedforward neural network ; The shallow feedforward neural network is used to receive the input normalized dimensionality-reduced vector and output the coordinates of the lightning strike point.

[0078] It can be understood that for the second prediction model, first, the lightning point induced voltage contains lightning strike position and peak current information. Through normalization, the lightning strike position and peak current can be decoupled, only the features related to the lightning strike position are retained, the interference of the peak current is eliminated, the number of parameters that the model needs to learn is reduced, the risk of overfitting is reduced, and the prediction accuracy is improved; second, through normalization, it can adapt to the prediction of lightning strike positions under different peak currents, enhancing the generalization ability of the model to different peak currents and improving the adaptability of the model; finally, through normalization, it can avoid the direct transmission of prediction errors to , thereby improving the robustness of the prediction.

[0079] Specifically, the shallow feedforward neural network and both include an input layer, a hidden layer, and an output layer; among them, the hidden layer uses the activation function, and the output layer uses the linear activation function.

[0080] Specifically, normalization is performed through the following formula: , where represents the peak current, represents the dimensionality-reduced vector, represents the normalized dimensionality-reduced vector.

[0081] Specifically, in step S3, the expression of the i-th sample in the first sample set is: , where represents the data value corresponding to the n-th element of the first dimensionality-reduced vector of the i-th sample, n is the dimension of the first dimensionality-reduced vector, represents the labeled label of the i-th sample, that is, the coordinates of the lightning strike point corresponding to this sample; The expression of the i-th sample in the second sample set is: , where represents the data value corresponding to the m-th element of the second dimensionality reduction vector of the i-th sample, m is the dimension of the second dimensionality reduction vector, , both represent the labeled label of the i-th sample, where represents the coordinates of the lightning strike point corresponding to this sample, represents the peak current corresponding to this sample.

[0082] Furthermore, the process of training the first and second prediction models respectively with the first and second sample sets to obtain the trained first and second prediction models includes: Step S301: Divide the first and second sample sets into several first and second subsets; Step S302: Set the hyperparameter grids of the first and second prediction models, and based on the first and second subsets, use cross-validation to select the optimal hyperparameters of the first and second prediction models from the hyperparameter grids, and train the first and second prediction models with the optimal hyperparameters respectively to obtain the trained first and second prediction models.

[0083] Specifically, in step S301, the first and second sample sets are randomly divided into ten mutually exclusive subsets of equal size.

[0084] Specifically, in step S302, the hyperparameter grids of the first and second prediction models refer to the selectable values of the hyperparameters to be optimized in the first and second prediction models. The hyperparameter grids include at least one hyperparameter to be optimized, and the hyperparameters to be optimized include at least two selectable values.

[0085] Exemplarily, set the hyperparameter grids of the first and second prediction models as [10, 20, 30, 40, 50]. This hyperparameter grid includes one hyperparameter to be optimized, that is, the number of neurons in the hidden layer of the shallow feedforward neural network of the first and second prediction models; this hyperparameter to be optimized includes five selectable values.

[0086] Furthermore, the process of selecting the optimal hyperparameters of the first and second prediction models from the hyperparameter grids based on the first and second subsets using cross-validation includes: For each set of hyperparameters in the hyperparameter grid: Select a subset as the validation set, and combine the remaining 9 subsets as the training set. Train the first and second prediction models with the hyperparameters using the training set, and calculate the performance metrics of the model using the validation set. Select ten subsets as the validation set in turn, train the first and second prediction models with the hyperparameters according to the above method, and obtain the error of the model corresponding to each validation set. Calculate the average value of the errors of the model corresponding to the ten validation sets to obtain the average error of the model. Select the set of hyperparameters with the smallest average error as the optimal hyperparameters for the first and second prediction models.

[0087] It should be noted that for each set of hyperparameters in the hyperparameter grid, ten rounds of training are performed. For each round of training, select a subset as the validation set, and combine the remaining 9 subsets as the training set, that is, use 90% of the samples in the sample set for training and use the remaining 10% of the samples for validation to obtain the corresponding performance metrics of the model.

[0088] It can be understood that the present invention provides a basis for improving the prediction accuracy of the first and second prediction models by setting the hyperparameter grid of the first and second prediction models, and selecting the optimal hyperparameters of the first and second prediction models from the hyperparameter grid by cross-validation based on the first and second subsets, and then training the first and second prediction models with the optimal hyperparameters.

[0089] Furthermore, the training of the first prediction model with the hyperparameters using the training set includes: Step S311: Initialize the first prediction model and its weights and biases according to the hyperparameters. Step S312: Input the samples in the training set into the first prediction model to obtain predicted values, and calculate the error of the predicted values according to the labels marked by the samples. Step S313: Determine whether the stopping condition is satisfied. If so, stop training; otherwise, update the weights of the first prediction model based on the error, and return to step S312 to continue execution.

[0090] Specifically, in step S311, randomly initialize the weights and biases of the first prediction model according to the hyperparameters.

[0091] Specifically, in step S312, calculate the error of the predicted value through the following formula: , where represents the error of the k-th sample in the training set, represents the predicted value of the k-th sample in the training set, that is, the coordinates of the predicted lightning strike point; The label representing the annotation of the k-th sample in the training set, i.e., the coordinates of the lightning strike point marked; Represents The Euclidean distance between and

[0092] Specifically, in step S313, the stopping condition includes error convergence or reaching the maximum number of iterations.

[0093] Furthermore, the weights of the first prediction model are updated through the following formula: , where is the Jacobian matrix, and the elements in the Jacobian matrix are the first-order derivatives of the error with respect to the weights or biases; is the error vector; is the positive scalar parameter.

[0094] It should be noted that if the error decreases during iterative training, then is decreased, otherwise, is increased. By adjusting value, when the training approaches the minimum error, the convergence speed of the model and the prediction accuracy are balanced.

[0095] Furthermore, the training of the second prediction model with this set of hyperparameters using the training set includes: Step S321, initialize the second prediction model and its weights and biases according to this set of hyperparameters; Step S322, train NN1 in the second prediction model with this training set to obtain the trained NN1; Step S323, based on the trained NN1 and this training set, train NN2 in the second prediction model to obtain the trained NN2.

[0096] Specifically, in step S322, the training of NN1 in the second prediction model with this training set to obtain the trained NN1 includes: Step S401, input the samples in this training set into NN1 in the second prediction model to obtain the predicted peak current, and calculate the predicted peak current error according to the peak current marked in the samples; Step S402, determine whether the stopping condition is satisfied. If so, stop training; otherwise, update the weights of NN1 in the second prediction model based on the peak current error, and return to step S401 to continue execution.

[0097] Specifically, in step S323, the training of NN2 in the second prediction model based on the trained NN1 and this training set to obtain the trained NN2 includes: Step S411: Input the samples in the training set into the trained NN1 to obtain the predicted peak current. Normalize the samples using the predicted peak current, and then input the normalized samples into NN2 in the second prediction model to obtain the coordinates of the predicted lightning strike point. Calculate the error of the predicted lightning strike point based on the coordinates of the lightning strike point labeled for the sample. Step S412: Determine whether the stop condition is satisfied. If so, stop the training; otherwise, update the weights of NN2 in the second prediction model based on the lightning strike point error, and return to step S411 to continue execution.

[0098] Further, the error of the model corresponding to each validation set is obtained through the following formula: , where N represents the number of samples in the validation set, represents the predicted value of the k-th sample in the validation set, represents the label labeled for the k-th sample in the validation set.

[0099] It can be understood that in the present invention, the weights of the first and second prediction models are updated through the training error, and the first and second prediction models are trained through weight update, improving the prediction accuracy of the first and second prediction models.

[0100] After the above steps, the optimal hyperparameters of the first prediction model and the second prediction module can be determined. Then, the model parameters need to be set to the above optimal hyperparameters. Under the condition that the hyperparameters are determined, the first sample set and the second sample set are used to train the trained first prediction model and the second prediction module again to obtain the trained first prediction model and the second prediction model. Specifically as follows: Further, the training of the first prediction model using the optimal hyperparameters to obtain the trained first prediction model includes: Referring to steps S311 - S313, initialize the first prediction model and its weights and biases according to the optimal hyperparameters, input the samples in the first sample set into the first prediction model for training, and obtain the trained first prediction model.

[0101] Further, the training of the second prediction model using the optimal hyperparameters to obtain the trained second prediction model includes: Referring to steps S321 - S323, initialize the weights and biases of the second prediction model according to the optimal hyperparameters, input the samples in the second sample set into the second prediction model for training, and obtain the trained second prediction model.

[0102] It should be noted that when both NN1 and NN2 are trained, the trained second prediction model is obtained. In specific applications, when a lightning strike occurs near an overhead transmission line, due to the strong electromagnetic field generated during the lightning discharge process, an induced voltage will be generated on the overhead transmission line. The lightning-induced voltage is collected by the voltage sensor on the overhead transmission line according to the set sampling time and sampling frequency, and preprocessed and feature-extracted to obtain a dimensionality-reduced vector. Based on the dimensionality-reduced vector, according to the actual situation, the first prediction model is selected to predict the lightning strike position, or the second prediction model is selected to predict the lightning strike position and peak current.

[0103] It can be understood that in the present invention, by adopting a shallow feedforward neural network, its network structure is relatively simple and the training time is usually shorter. By selecting to use the first prediction model or the second prediction model according to the actual situation, the present invention can flexibly choose to only predict the lightning strike position or simultaneously predict the peak current and the lightning strike position. By preprocessing and feature-extracting the lightning-induced voltage to obtain a dimensionality-reduced vector, and based on the second prediction model, the peak current and the lightning strike position are simultaneously predicted through the dimensionality-reduced vector, which improves the accuracy of lightning strike positioning and the correctness of lightning strike peak current estimation, thereby enhancing the ability of the power system to cope with lightning disasters and ensuring the safety and stability of the power grid operation.

[0104] Compared with the prior art, the beneficial effects of the training method of the lightning strike prediction model provided by the present invention are as follows: 1. In the present invention, The simulator constructs a power system model, a lightning strike detection area, and a lightning strike event of an overhead transmission line, and then simulates the lightning strike event and the corresponding lightning-induced voltage to construct a data set for the prediction model. Compared with the traditional method of generating a data set using a simplified formula, it can simulate a more complex and real transmission line, and the data set used for model training and verification is more in line with the actual situation, thereby improving the accuracy of model prediction.

[0105] 2. In the present invention, by setting the hyperparameter grids of the first and second prediction models, and based on the first and second subsets, cross-validation is used to select the optimal hyperparameters of the first and second prediction models from the hyperparameter grids, and then the first and second prediction models with the optimal hyperparameters are trained, which provides a basis for improving the prediction accuracy of the first and second prediction models.

[0106] 3. In the present invention, the weights of the first and second prediction models are updated through the training error, and the first and second prediction models are trained through weight update, which improves the prediction accuracy of the first and second prediction models.

[0107] 4. For the second prediction model of the present invention, based on the peak current predicted by the trained NN1, the training set is normalized. Through normalization, the lightning strike position and the peak current can be decoupled, only the features related to the lightning strike position are retained, the interference of the peak current is eliminated, the number of parameters that the model needs to learn is reduced, the risk of overfitting is reduced, and the accuracy of the NN2 prediction is improved; enabling NN2 to adapt to the prediction of lightning strike positions under different peak currents, enhancing the generalization ability of the model to different peak currents, and improving the adaptability of the model; and it can avoid the direct transmission of the error of the NN1 prediction to NN2, thereby improving the robustness of the NN2 prediction.

[0108] 5. By selecting to use the first prediction model or the second prediction model according to the actual situation, the present invention can flexibly choose to only predict the lightning strike position or simultaneously predict the peak current and the lightning strike position; by preprocessing and feature extraction of the lightning-induced voltage to obtain a dimensionality-reduced vector, and based on the second prediction model, the peak current and the lightning strike position are simultaneously predicted through the dimensionality-reduced vector, improving the accuracy of lightning strike positioning and the correctness of the estimation of the lightning strike peak current, and further enhancing the ability of the power system to cope with lightning disasters, and ensuring the safety and stability of the power grid operation.

[0109] Those skilled in the art can understand that all or part of the processes for implementing the methods of the above embodiments can be completed by instructing relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. Among them, the computer-readable storage medium is a magnetic disk, an optical disk, a read-only memory, or a random access memory, etc.

[0110] The above is only a preferred specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any changes or substitutions that can be easily thought of by those skilled in the art within the technical scope disclosed by the present invention should be covered by the protection scope of the present invention.

Claims

1. A training method for a lightning strike prediction model, characterized in that, The method includes the following steps: Construct the first and second lightning strike models, and based on the first and second lightning strike models, use a simulator to simulate a number of first and second lightning strike events to obtain the first and second lightning-induced voltages on the overhead transmission line; preprocess, extract features and label the first and second lightning-induced voltages to obtain the first and second data; Construct a first and a second prediction model. The first prediction model is used to predict the lightning strike location, and the second prediction model is used to predict the lightning strike location and the peak current. Based on the first and second data, establish a first and a second sample set, and train the first and second prediction models respectively through the first and second sample sets to obtain the trained first and second prediction models.

2. The training method of the lightning strike prediction model according to claim 1, wherein Both the first lightning strike model and the second lightning strike model include a lightning strike channel and a grounding setting. The lightning strike channels of the first and second lightning strike models are typical straight vertical lightning strike channels, and the height and return stroke propagation speed of the lightning strike channels are set; the exponential decay modified transmission line model is used to describe the characteristics of the current propagating along the lightning strike channel; the peak current of the first lightning strike model is a constant value, and the peak current of the second lightning strike model is extracted according to the lognormal distribution; the base currents of other lightning strike channels are all modeled by a function and the typical parameter values of the first stroke are used; The grounding setting of the first lightning strike model is an ideal electrical conductor, and the grounding setting of the second lightning strike model has losses but is uniform.

3. The training method of the lightning strike prediction model according to claim 1, characterized in that Based on the first and second lightning strike models, using a simulator to simulate a number of first and second lightning strike events to obtain the first and second lightning-induced voltages on the overhead transmission line, including: Construct a power system model of an overhead transmission line, and construct a lightning strike detection area based on the power system model. Based on the first and second lightning strike models, the simulator simulates a number of first and second lightning strike events in the lightning strike detection domain; Set simulation parameters, and according to the simulation parameters, obtain the first and second lightning-induced voltages on the overhead transmission line corresponding to the first and second lightning strike events through the simulator.

4. The training method of the lightning strike prediction model according to claim 3, characterized in that, The power system model of the overhead transmission line includes a straight single-line transmission line and two voltage sensors; set the length, diameter, and height from the ground of the transmission line; assume that the terminal resistance at both ends of the transmission line is equal to the characteristic impedance of the transmission line; the voltage sensors are arranged on the transmission line at intervals. The lightning strike detection area is a square area with the length of the transmission line in the power system model as the side length; the transmission line of the power system model is located outside the lightning strike detection area and is parallel to two sides of the lightning strike detection area; the transmission line is at a preset distance from the side of the lightning strike detection area closest to it.

5. The training method of the lightning strike prediction model according to claim 1, characterized in that The training of the first and second prediction models respectively through the first and second sample sets to obtain the trained first and second prediction models includes: Step S301: Divide the first and second sample sets into a number of first and second subsets. Step S302: Set the hyperparameter grids of the first and second prediction models. Based on the first and second subsets, use cross-validation to select the optimal hyperparameters of the first and second prediction models from the hyperparameter grids, and train the first and second prediction models with the optimal hyperparameters respectively to obtain the trained first and second prediction models.

6. The training method of the lightning strike prediction model according to claim 5, wherein Randomly divide the first and second sample sets into ten mutually exclusive subsets of equal size. The hyperparameter grids of the first and second prediction models refer to the selectable values of the hyperparameters that need to be optimized in the first and second prediction models. The hyperparameter grids include at least one hyperparameter that needs to be optimized, and the hyperparameters that need to be optimized include at least two selectable values.

7. The training method of the lightning strike prediction model according to claim 6, wherein The selection of the optimal hyperparameters of the first and second prediction models from the hyperparameter grids based on the first and second subsets using cross-validation includes: For each set of hyperparameters in the hyperparameter grid: Select one subset as the validation set, and combine the remaining nine subsets as the training set. Train the first and second prediction models with this set of hyperparameters using the training set, and calculate the performance index of the model using the validation set; sequentially select ten subsets as the validation set, train the first and second prediction models with this set of hyperparameters according to the above method, and obtain the error of the model corresponding to each validation set; calculate the average value of the errors of the model corresponding to the ten validation sets to obtain the average error of the model. Select the set of hyperparameters with the smallest average error as the optimal hyperparameters of the first and second prediction models.

8. The training method of the lightning strike prediction model according to claim 7, wherein Training the first prediction model with the set of hyperparameters includes: Step S311: Initialize the first prediction model and its weights and biases according to the set of hyperparameters; Step S312: Input the samples in the training set into the first prediction model to obtain predicted values, and calculate the errors of the predicted values according to the labels marked for the samples; Step S313: Determine whether the stopping condition is met. If so, stop the training; otherwise, update the weights of the first prediction model based on the errors, and return to Step S312 to continue execution.

9. The training method of the lightning strike prediction model according to claim 7, wherein Training the second prediction model with the set of hyperparameters includes: Step S321: Initialize the second prediction model and its weights and biases according to the set of hyperparameters; Step S322: Use this training set for the in the second prediction model for training to obtain the trained ; Step S323, based on the trained and this training set, train NN2 in the second prediction model to obtain the trained .

10. The training method of the lightning strike prediction model according to claim 1, characterized in that The expression of the i-th sample in the first sample set is as follows: , where represents the data value corresponding to the n-th element of the first dimensionality-reduced vector of the i-th sample, and n is the dimension of the first dimensionality-reduced vector. represents the annotation label of the i-th sample, that is, the coordinates of the lightning strike point corresponding to this sample; The expression of the i-th sample in the second sample set is: , where represents the data value corresponding to the m-th element of the second dimensionality reduction vector of the i-th sample, and m is the dimension of the second dimensionality reduction vector. , both represent the annotation label of the i-th sample, where represents the coordinates of the lightning strike point corresponding to this sample, represents the peak current corresponding to this sample.

Citation Information

Patent Citations

  • Substation lightning overvoltage simulation analysis method and device, terminal and medium

    CN113962097A

  • External multi-gap lightning arrester volt-second characteristic curve estimation method, device and medium

    CN119757996A