Lightning damage prediction method based on logistic regression
By combining BP neural network and logistic regression model, PSO and LM algorithms are used to optimize weights, the shortcomings of existing lightning damage risk prediction methods in generalization capabilities and accuracy are solved, and more efficient and accurate lightning damage prediction are achieved.
Patent Information
- Application Number
- CN202411366030.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-02-14
AI Technical Summary
The existing neural network-based lightning risk prediction methods have shortcomings in generalization capabilities and prediction accuracy, especially when predicting lightning risk risks in transmission lines with different characteristics, there will be large deviations in prediction accuracy.
The lightning damage prediction method based on logistic regression is used to calculate the tripping probability through the BP neural network, and combined with the six-hour weather data and pole tower micro-terrain and other factors, the logistic regression model is used to predict the probability of lightning strike failure. This method optimizes the initial weight value through PSO and uses LM algorithm to optimize it, which improves the robustness and prediction accuracy of the model.
It significantly improves the accuracy and training speed of lightning damage prediction, enhances the robustness of tripping rate prediction under different line corridor widths, and reduces the local minimum value problem in the prediction accuracy of BP neural networks.
Smart Images

Figure CN119442165A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of lightning protection for power transmission lines, and more specifically to a lightning damage prediction method based on logistic regression. Background Art
[0002] Lightning tripping is the main cause of transmission line failures. According to statistics, in addition to human factors such as force damage and poor management, flashover tripping of high-voltage transmission lines caused by lightning strikes accounts for about 65% to 75% of natural factors each year. In recent years, with the continuous expansion of the operation scale of transmission lines, the continuous increase in voltage levels and tower heights, and the frequent occurrence of extreme weather, lightning protection issues have become increasingly prominent. Therefore, how to prevent lightning before it strikes and minimize damage after it strikes has become a key issue that must be paid attention to for the safe operation of the power grid.
[0003] After searching, the patent document with the existing announcement number CN108108520B provides a transmission line lightning damage risk prediction method based on neural network integration. This method determines the lightning damage risk index value according to the importance of the transmission line and the corresponding importance coefficient and lightning tripping rate, and calculates the lightning damage risk index value with the help of BP neural network. This prediction method does not carry out targeted robust training, resulting in poor generalization ability of the method. When predicting the lightning damage risk of transmission lines with different characteristics, there will be a large deviation in the prediction accuracy. In view of this, we propose a lightning damage prediction method based on logistic regression. Summary of the invention
[0004] 1. Technical issues to be solved
[0005] The purpose of the present invention is to provide a lightning damage prediction method based on logistic regression to solve the problems raised in the above background technology.
[0006] 2. Technical solution
[0007] The present invention is achieved through the following technical solutions:
[0008] A lightning damage prediction method based on logistic regression includes the following steps:
[0009] S1. Obtain the annual number of ground lightning, annual thunderstorm days, channel area, circuit lightning resistance level, and perform statistics on the current data, main discharge times, and return stroke times of the transmission corridor according to the set time step:
[0010] S2, input the annual ground lightning number, annual thunderstorm days, channel area, circuit lightning resistance level, set time step of the current data of the transmission corridor, main discharge number, and return stroke number into the BP neural network to calculate the tripping probability in the next time step;
[0011] S3, input the calculated trip probability and the collected six-hour temperature, humidity, rainfall, air pressure data, tower microtopography, ground inclination, height, protection angle, and insulator length into the logistic regression model to predict the probability of lightning failure;
[0012] S4. If the probability of a lightning fault is greater than a set threshold, a determination is made that a lightning fault exists.
[0013] As an optional solution of the technical solution of this application document, in S1, the current data, main discharge times and return stroke times of the transmission corridor are counted with a time step of 15 minutes.
[0014] As an optional solution of the technical solution of this application document, in S2, the format of the BP neural network input sample is:
[0015] xi=[x i1 ,x i2 ,x i3 ,x i4 ,x i5 ,x i6 ,x i7 ,-1];
[0016] Among them, x i1 is the annual number of ground-to-ground lightning, x i2 is the number of thunderstorm days per year, x i3 is the channel area; x i4 is the lightning resistance level of the circuit, x i5 t k Current data within a time period, x i6 t k The number of main discharges in a time period, x i7 t k The number of hitbacks during the time period.
[0017] As an optional solution of the technical solution of the present application document, the BP neural network is a single hidden layer structure, and a sigmoid function is used as the activation function of the hidden layer and the output layer; the BP neural network is trained in the following manner;
[0018] A1. Collect basic data on transmission line lightning risk, tripping conditions and line corridor width, and form a data set in the following format:
[0019] [xi,yi];
[0020] xi=[x i1 ,x i2 ,x i3 ,x i4 ,x i5 ,x i6,x i7 ,-1];
[0021] Among them, x i1 is the annual number of ground-to-ground lightning, x i2 is the number of thunderstorm days per year, x i3 is the channel area; x i4 is the lightning resistance level of the circuit, x i5 t k Current data within a time period, x i6 t k The number of main discharges in a time period, x i7 t k The number of responses within a time period; yi is t k+1 The tripping situation within the time period, 0 indicates no tripping, and 1 indicates tripping;
[0022] A2. According to the width of the line corridor, the collected basic data on transmission line lightning risk and tripping conditions are classified to form multiple sub-datasets;
[0023] A3. Combine multiple sub-datasets to form training sets, test sets, and validation sets;
[0024] A4. Use the training set to train the BP neural network, use the test set to test the BP neural network, and use the verification set to verify the BP neural network.
[0025] As an optional solution of the technical solution of this application document, in A4, the BP neural network uses the PSO method to optimize the initial value of the weight, including the following steps:
[0026] B1, generating a plurality of particles, wherein the particles contain all value information of the BP neural network;
[0027] B2. Calculate the fitness value of each particle:
[0028]
[0029] Among them, s represents the fitness value of the particle, n is the number of samples; y′ i is the actual output of the BP neural network when inputting xi, and yi is t k+1 Tripping conditions within a time period;
[0030] B3. According to the fitness value of each particle, determine the historical best position of the particle and the historical best position of the particle group, and update the position of the particle:
[0031] V i,k+1 =ωV i,k +c1r1(P i,k -M i,k )+c2r2(Pq,k -M i,k )
[0032] M i,k+1 =M i,k +V i,k+1
[0033] Among them, V i,k is the moving speed of the i-th particle in the k-th iteration; c1, c2 are acceleration factors, which are non-negative constants; r1, r2 are random numbers between 0 and 1; M i,k is the position of the i-th particle in the k-th iteration, P i,k is the best historical position of particle i, P q,k is the historical best position of the particle group; w is the non-negative variable inertia weight;
[0034] B4. Repeat B2 and B3 until the maximum number of iterations is reached.
[0035] As an optional solution of the technical solution of this application document, in B3, the non-negative variable inertia weight w is calculated using the following formula:
[0036]
[0037] Among them, w max , w min are the maximum and minimum inertia weights, which are 0.9 and 0.4 respectively.
[0038] As an optional solution of the technical solution of this application document, the LM algorithm is used to update the weights of the BP neural network, including the following steps:
[0039] C1. Calculate the loss value:
[0040]
[0041] Where: N is the number of neurons in the output layer; i is the error of the i-th neuron;
[0042] C2. Update the weights:
[0043] M k+1 =M k -[J T (x)+μI] -1 J(x)S(x)
[0044]
[0045] Where: M k is the vector composed of the weights of the neural network in the kth iteration; I is the unit matrix; μ is the proportional coefficient;
[0046] C3. Update the BP neural network and calculate the loss value after the weights are updated; if the loss value after the update is less than the loss value before the update, adjust the proportional coefficient according to the following formula:
[0047] μ = μβ;
[0048] If the updated loss value is not less than the loss value before the update, the proportional coefficient is adjusted according to the following formula:
[0049] μ = μβ;
[0050] Among them, β is the regulatory factor;
[0051] C4: Calculate the current loss value. If the loss value is less than the set loss threshold or the number of iterations is greater than the set number of iterations, the training ends; otherwise, repeat C1 and C3.
[0052] As an optional solution of the technical solution of this application document, in S3, the logistic regression model is as follows:
[0053]
[0054] Where P is the probability of a fault occurring due to lightning strike, x1-x 10 They are the trip probability, the temperature, humidity, rainfall, air pressure data for six hours, the microtopography of the tower, the ground inclination, height, protection angle, insulator length, β0-β 10 is the weight coefficient.
[0055] As an optional solution to the technical solution of the present application document, the logistic regression model first optimizes the initial weight value by the PSO method, and then optimizes it by the LM algorithm so that its loss value converges to a set range or reaches the set maximum number of iterations.
[0056] 3. Beneficial effects
[0057] Compared with the prior art, the present invention has the following beneficial effects:
[0058] 1. This application uses a combination of BP neural network and logical regression model to predict lightning damage, so that the BP neural network can perform trip rate prediction training alone, and the logistic regression model can perform lightning damage prediction alone, which simplifies the complexity of the prediction model and can significantly increase the training speed and prediction accuracy.
[0059] 2. This application classifies the collected basic data on lightning risk and tripping conditions of transmission lines according to the width of the line corridor to form multiple sub-data sets. By combining different sub-data sets for training, testing and verification of the BP neural network, the robustness of the application in predicting the tripping rate under different line corridor widths can be increased.
[0060] 3. This application uses the PSO method to optimize the initial value of the weight, and then uses the LM algorithm to optimize the BP neural network, which can speed up the training speed of the BP neural network, make the loss value of the BP neural network converge quickly, avoid the loss value of the BP neural network from falling into the local minimum, and reduce the prediction accuracy of the BP neural network. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 It is a logic diagram of a lightning damage prediction method based on logistic regression. DETAILED DESCRIPTION
[0062] The technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings.
[0063] See also Figure 1 , the present invention provides a technical solution:
[0064] A lightning damage prediction method based on logistic regression, including
[0065] S1. Obtain the annual number of ground lightning, annual thunderstorm days, channel area, circuit lightning resistance level, and perform statistics on the current data, main discharge times, and return stroke times of the transmission corridor according to the set time step:
[0066] S2, input the annual ground lightning number, annual thunderstorm days, channel area, circuit lightning resistance level, set time step of the current data of the transmission corridor, main discharge number, and return stroke number into the BP neural network to calculate the tripping probability in the next time step;
[0067] S3, input the calculated trip probability and the collected six-hour temperature, humidity, rainfall, air pressure data, tower microtopography, ground inclination, height, protection angle, and insulator length into the logistic regression model to predict the probability of lightning failure;
[0068] S4. If the probability of a lightning fault is greater than a set threshold, a determination is made that a lightning fault exists.
[0069] In S1, the current data, main discharge times, and return stroke times of the transmission corridor are counted with a time step of 15 minutes.
[0070] In S2, the format of the BP neural network input sample is:
[0071] xi=[x i1 ,x i2 ,x i3 ,x i4 ,x i5 ,x i6 ,x i7 ,-1];
[0072] Among them, x i1 is the annual number of ground-to-ground lightning, x i2 is the number of thunderstorm days per year, x i3 is the channel area; x i4 is the lightning resistance level of the circuit, x i5 t k Current data within a time period, x i6 t k The number of main discharges in a time period, x i7 t k The number of hits in the time period, the constant term -1 in the input sample is used as the bias term;
[0073] The BP neural network is a single hidden layer structure, and uses the sigmoid function as the activation function of the hidden layer and the output layer; the BP neural network is trained in the following way;
[0074] A1. Collect basic data on transmission line lightning risk, tripping conditions and line corridor width, and form a data set in the following format:
[0075] [xi,yi];
[0076] xi=[x i1 ,x i2 ,x i3 ,x i4 ,x i5 ,x i6 ,x i7 ,-1];
[0077] Among them, x i1 is the annual number of ground-to-ground lightning, x i2 is the number of thunderstorm days per year, x i3 is the channel area; x i4 is the lightning resistance level of the circuit, x i5 t k Current data within a time period, x i6 t k The number of main discharges in a time period, x i7 t k The number of responses within a time period; yi is t k+1 The tripping situation within the time period, 0 indicates no tripping, and 1 indicates tripping;
[0078] A2. According to the width of the line corridor, the collected basic data on the lightning damage risk and the tripping situation of the transmission line are classified to form multiple sub-datasets; for example, the line corridors with a width range of 1km to 5km are divided at intervals of 0.5km, and the basic data on the lightning damage risk and the tripping situation of the line corridors within each width range are recorded to form 8 sub-datasets;
[0079] A3. Combine multiple sub-datasets to form a training set, a test set, and a validation set; for example, use 6 of the 8 sub-datasets to form a training set, 1 to form a test set, and 1 to form a validation set;
[0080] A4. Use the training set to train the BP neural network, use the test set to test the BP neural network, and use the verification set to verify the BP neural network.
[0081] In A4, the BP neural network uses the PSO method to optimize the initial value of the weight, including the following steps:
[0082] B1, generating a plurality of particles, wherein the particles contain all value information of the BP neural network;
[0083] B2. Calculate the fitness value of each particle:
[0084]
[0085] Among them, s represents the fitness value of the particle, n is the number of samples; y′ i is the actual output of the BP neural network when inputting xi, and yi is t k+1 Tripping conditions within a time period;
[0086] B3. According to the fitness value of each particle, determine the historical best position of the particle and the historical best position of the particle group, and update the position of the particle:
[0087] V i,k+1 =ωV i,k +c1r1(P i,k -M i,k )+c2r2(P q,k -M i,k )
[0088] M i,k+1 =M i,k +V i,k+1
[0089] Among them, V i,k is the moving speed of the i-th particle in the k-th iteration, and its initial value can be set to 2; c1, c2 are acceleration factors, which are non-negative constants; r1, r2 are random numbers between 0 and 1; M i,kis the position of the i-th particle in the k-th iteration, P i,k is the best historical position of particle i, P q,k is the historical best position of the particle group; w is the non-negative variable inertia weight, which decreases linearly with the increase of the number of iterations;
[0090] The non-negative variable inertia weight w is calculated using the following formula:
[0091]
[0092] Among them, w max , w min are the maximum and minimum inertia weights, which can be 0.9 and 0.4 respectively; k max is the maximum number of iterations; a larger w in the early stage of iteration is conducive to exerting its global search ability, while a smaller w focuses on local search;
[0093] B4. Repeat B2 and B3 until the maximum number of iterations is reached.
[0094] After the initial weight value is optimized, the LM algorithm is used to update the weight of the BP neural network, including the following steps:
[0095] C1. Calculate the loss value:
[0096]
[0097] Where: N is the number of neurons in the output layer; i is the error of the i-th neuron;
[0098] C2. Update the weights:
[0099] M k+1 =M k -[J T (x)+μI] -1 J(x)S(x)
[0100]
[0101] Where: M k is the vector composed of the weights of the neural network in the kth iteration; I is the unit matrix; μ is the proportional coefficient. When μ is 0, the LM algorithm is the gradient descent method, and when μ is infinite, it is the Gauss-Newton method. Therefore, by reasonably adjusting the value of μ, the advantages of both can be fully utilized.
[0102] C3. Update the BP neural network and calculate the loss value after the weights are updated; if the loss value after the update is less than the loss value before the update, adjust the proportional coefficient according to the following formula:
[0103] μ = μ / β;
[0104] If the updated loss value is not less than the loss value before the update, the proportional coefficient is adjusted according to the following formula:
[0105] μ = μβ;
[0106] Among them, β is the regulatory factor;
[0107] C4: Calculate the current loss value. If the loss value is less than the set loss threshold or the number of iterations is greater than the set number of iterations, the training ends; otherwise, repeat C1 and C3.
[0108] In S3, the logistic regression model is as follows:
[0109]
[0110] Where P is the probability of a fault occurring due to lightning strike, x1-x 10 They are the trip probability, the temperature, humidity, rainfall, air pressure data for six hours, the microtopography of the tower, the ground inclination, height, protection angle, insulator length, β0-β 10 is the weight coefficient.
[0111] The logistic regression model can be trained in the same way as the BP neural network: first optimize the initial weight value by the PSO method, and then optimize it using the LM algorithm so that its loss value converges to a set range or reaches its set maximum number of iterations.
Claims
1. A lightning damage prediction method based on logistic regression, characterized in that: The following steps are involved: S1. Obtain the annual number of ground flashes, annual thunderstorm days, channel area, and circuit lightning resistance level, and perform statistics on the current data, main discharge times, and return stroke times of the transmission corridor according to the set time step: S2, input the annual ground lightning number, annual thunderstorm days, channel area, circuit lightning resistance level, set time step of the current data of the transmission corridor, main discharge number, and return stroke number into the BP neural network to calculate the tripping probability in the next time step; S3, input the calculated trip probability and the collected six-hour temperature, humidity, rainfall, air pressure data, tower microtopography, ground inclination, height, protection angle, and insulator length into the logistic regression model to predict the probability of lightning failure; S4. If the probability of a lightning fault is greater than a set threshold, a determination is made that a lightning fault exists.
2. The method for predicting lightning damage based on logistic regression according to claim 1, characterized in that: In S1, the current data, main discharge times, and return stroke times of the transmission corridor are counted with a time step of 15 minutes.
3. The method for predicting lightning damage based on logistic regression according to claim 1, characterized in that: In S2, the format of the BP neural network input sample is: xi=[x i1 ,x i2 ,x i3 ,x i4 ,x i5 ,x i6 ,x i7 ,-1]; Among them, x i1 is the annual number of ground-to-ground lightning, x i2 is the number of thunderstorm days per year, x i3 is the channel area; x i4 is the lightning resistance level of the circuit, x i5 t k Current data within a time period, x i6 t k The number of main discharges in a time period, x i7 t k The number of hitbacks during the time period.
4. The method for predicting lightning damage based on logistic regression according to claim 1, characterized in that: The BP neural network is a single hidden layer structure, and uses the sigmoid function as the activation function of the hidden layer and the output layer; the BP neural network is trained in the following way; A1. Collect basic data on transmission line lightning risk, tripping conditions and line corridor width, and form a data set in the following format: [xi, yi]; xi=[x i1 ,x i2 ,x i3 ,x i4 ,x i5 ,x i6 ,x i7 ,-1]; Among them, x i1 is the annual number of ground-to-ground lightning, x i2 is the number of thunderstorm days per year, x i3 is the channel area; x i4 is the lightning resistance level of the circuit, x i5 t k Current data within a time period, x i6 is the number of main discharges in the tk time period, x i7 t k The number of hitbacks within the time period; y i t k+1 The tripping situation within the time period, 0 indicates no tripping, and 1 indicates tripping; A2. According to the width of the line corridor, the collected basic data on transmission line lightning risk and tripping conditions are classified to form multiple sub-datasets; A3. Combine multiple sub-datasets to form training sets, test sets, and validation sets; A4. Use the training set to train the BP neural network, use the test set to test the BP neural network, and use the verification set to verify the BP neural network.
5. The method for predicting lightning damage based on logistic regression according to claim 4 is characterized in that: In A4, the BP neural network uses the PS0 method to optimize the initial value of the weight, including the following steps: B1, generating a plurality of particles, wherein the particles contain all value information of the BP neural network; B2. Calculate the fitness value of each particle: Among them, s represents the fitness value of the particle, n is the number of samples; y′ i is the actual output of the BP neural network when inputting xi, y i t k+1 Tripping conditions within a time period; B3. According to the fitness value of each particle, determine the historical best position of the particle and the historical best position of the particle group, and update the position of the particle: V i,k+1 =ωV i,k +c1r1(P i,k -M i,k )+c2r2(P q,k -M i,k ) M i,k+1 =M i,k +V i,k+1 Among them, V i,k is the moving speed of the i-th particle in the k-th iteration; c1, c2 are acceleration factors, which are non-negative constants; r1, r2 are random numbers between 0 and 1; M i,k is the position of the i-th particle in the k-th iteration, P i,k is the best historical position of particle i, P q,k is the historical best position of the particle group; w is the non-negative variable inertia weight; B4. Repeat B2 and B3 until the maximum number of iterations is reached.
6. The method for predicting lightning damage based on logistic regression according to claim 5 is characterized in that: In B3, the non-negative variable inertia weight w is calculated using the following formula: Among them, w max , w min are the maximum and minimum inertia weights, which are 0.9 and 0.4 respectively.
7. The method for predicting lightning damage based on logistic regression according to claim 1, characterized in that: The LM algorithm is used to update the weights of the BP neural network, including the following steps: C1. Calculate the loss value: Where: N is the number of neurons in the output layer; l i is the error of the i-th neuron; C2. Update the weights: M k+1 =M k -[J T (x)+μI] -1 J(x)S(x) Where: M k is the vector composed of the weights of the neural network in the kth iteration; I is the unit matrix; μ is the proportional coefficient; C3. Update the BP neural network and calculate the loss value after the weights are updated; if the loss value after the update is less than the loss value before the update, adjust the proportional coefficient according to the following formula: μ = μ / β; If the updated loss value is not less than the loss value before the update, the proportional coefficient is adjusted according to the following formula: μ = μβ; Among them, β is the regulatory factor; C4: Calculate the current loss value. If the loss value is less than the set loss threshold or the number of iterations is greater than the set number of iterations, the training ends; otherwise, repeat C1 and C3.
8. The method for predicting lightning damage based on logistic regression according to claim 1, characterized in that: In S3, the logistic regression model is as follows: Where P is the probability of a fault occurring due to lightning strike, x1-x 10 They are the trip probability, the temperature, humidity, rainfall, air pressure data for six hours, the micro-topography of the tower, the ground inclination, height, protection angle, insulator length, β0-β 10 is the weight coefficient.
9. The method for predicting lightning damage based on logistic regression according to claim 1, characterized in that: The logistic regression model first optimizes the initial weight value by the PSO method, and then optimizes it by the LM algorithm so that its loss value converges to a set range or reaches the set maximum number of iterations.
Citation Information
Patent Citations
A method for predicting lightning damage risk of transmission lines based on neural network ensemble
CN108108520B