Electric quantity prediction method in extreme weather
By building the TTAO-KAN-LSTM model and utilizing the combined characteristics of historical electricity consumption and meteorological conditions, the problem of electricity consumption forecast deviation under extreme weather conditions was solved, the prediction accuracy and processing efficiency were improved, and the amount of calculation was reduced.
Patent Information
- Application Number
- CN202511093923.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-06
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-08-06
AI Technical Summary
Existing technologies have large deviations in power consumption prediction under extreme weather conditions, and the neural network based on multi-layer perceptrons has low efficiency in processing high-dimensional data.
The KAN network is used to replace the LSTM fully connected layer. By building a TTAO-KAN-LSTM model, the combined features of historical electricity consumption and meteorological conditions are used to predict electricity consumption, including feature extraction, nonlinear transformation, and dynamic adjustment of weights to optimize the KAN network.
It improves the accuracy of power consumption forecasting under extreme weather conditions and the efficiency of processing high-dimensional features, reduces the amount of computation, and improves the interpretability of the model.
Smart Images

Figure CN120597937A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of power forecasting, and in particular to a method for forecasting power under extreme weather conditions. Background Art
[0002] With global warming, extreme weather and climate events such as high temperatures and cold snaps are becoming more frequent. To address rapid and dramatic fluctuations in electricity consumption over short periods of time and improve the climate adaptability of power systems, there is an urgent need to forecast electricity consumption during extreme weather events. Electricity consumption fluctuations during extreme weather events exhibit significant uncertainty, and single forecasting models have inherent flaws. Long-term time-lapse prediction (LSTM) is widely used for its ability to capture nonlinear relationships in time series data. However, in neural networks based on multi-layer perceptrons, the computational complexity of fully connected layers increases significantly with increasing input dimensions. Furthermore, these networks rely on linear transformations and nonlinear activation functions, making them inefficient for processing high-dimensional data. The KAN (Kanold-like network) is derived from the Kolmogorov–Arnold representation theorem, proposed by Andrey Kolmogorov and Vladimir Arnold in the mid-20th century. This theorem states that any continuous multivariate function can be represented as a finite combination of continuous single-variable functions and addition operations. Researchers have used KANs for time series forecasting and achieved good results. Summary of the Invention
[0003] The purpose of the present invention is to provide a method for predicting electricity consumption under extreme weather conditions, which solves the problem of large deviations in predictions under extreme weather conditions in the prior art.
[0004] To achieve the above object, the present invention provides a method for predicting electricity consumption under extreme weather conditions, comprising the following steps: Step 1: Obtain the user's electricity consumption data and filter out the electricity consumption data corresponding to extreme weather conditions to obtain four extreme weather data sets. Extreme weather includes high temperature weather, cold wave weather, heavy rain weather, and typhoon weather. Step 2: Use four extreme weather data sets to construct historical electricity characteristics and meteorological combination characteristics; Step 3: Use historical electricity characteristics and meteorological combination characteristics to build an electricity forecasting model based on TTAO-KAN-LSTM, and perform training and forecasting.
[0005] Preferably, the historical electricity feature is calculated by calculating the average historical electricity consumption at each moment in the three days before each extreme weather condition to capture the volatility at each moment. The calculation formula is as follows: (1); Where, Indicates the first three days h The average value of electricity at each moment is the new characteristic of the structure. For the d skyh The historical electricity at the moment, h=0,1,2,3…23; Finally, the historical power characteristics corresponding to each moment are generated through the sliding window.
[0006] Preferably, the meteorological combination feature includes a linear combination feature and a nonlinear combination feature, and the calculation formula is as follows: (2); Where, u , k =1,2, ,M, 、 、 、 Respectively h The additive, subtractive, multiplicative and divisible characteristics of the samples at each moment, M is the number of meteorological characteristics, For the h The first moment sample k Features, For the h The first moment sample u Features.
[0007] Preferably, the power consumption prediction model based on TTAO-KAN-LSTM is constructed by utilizing historical power consumption characteristics and meteorological combination characteristics, including the following steps: The input historical electricity characteristics and meteorological combination characteristics are extracted to obtain time series characteristics at different time steps. The extracted time series characteristics are subjected to the first nonlinear transformation to obtain the first nonlinear data feature. The first nonlinear data features at different time steps are additively summed to obtain the hidden layer intermediate variables, the hidden layer intermediate variables are subjected to a second nonlinear transformation to obtain the second nonlinear data features, and the second nonlinear feature data is output to obtain the power under extreme weather conditions.
[0008] Preferably, a hidden layer is provided between the two nonlinear transformations to form a KAN network, and the KAN network is optimized using the TTAO algorithm, including the following steps: Construct an initial grid based on the activation function parameters of KAN, and treat each grid point as a topological node; The adjacency relationship is generated by the triangulation algorithm to form a set of triangular units, each of which represents the associated area of the local feature; Calculate the connection weight between nodes. The formula is: ; in, Representation node r and nodes s The connection weights between αand β is a hyperparameter used to control the weight distribution; The features in each triangular unit are weighted and aggregated, and the weight is determined by the connection strength between nodes. The global features Expressed as: ; in, Representation node r The weight of is the node feature; Dynamically adjust weights, remove nodes with weights below the threshold, and reduce the number of grids; Perform differential operations on the features of adjacent time steps, extract local trends, and retain the differential results as refined features. The local feature change for: ; in, express q The local characteristics of the moment, express q -1 local characteristics at moment; Dynamically update grid points: Based on the activation status of the input data, only the activated grid areas are retained and the inactivated redundant grids are deleted.
[0009] Therefore, the present invention adopts the above-mentioned method for predicting electricity consumption under extreme weather conditions, introduces the KAN network to replace the LSTM fully connected layer, and realizes nonlinear mapping through spline functions. While ensuring the time series modeling capability, it improves the model's processing efficiency and interpretability for high-dimensional features. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 This is an overall flow chart of a method for predicting power consumption under extreme weather conditions according to the present invention; Figure 2 This is a KAN structure diagram of a method for predicting power consumption under extreme weather conditions according to the present invention; Figure 3 It is a structural diagram of the power prediction model of the present invention. DETAILED DESCRIPTION
[0011] The technical solution of the present invention is further described below with reference to the accompanying drawings and embodiments.
[0012] Unless otherwise defined, technical or scientific terms used in the present invention shall have the same meaning as commonly understood by one of ordinary skill in the art to which the present invention belongs.
[0013] Example 1
[0014] like Figures 1 to 3As shown, a method for predicting power consumption under extreme weather conditions includes the following steps: Step 1: Obtain the user's electricity consumption data and filter out the electricity consumption data corresponding to extreme weather conditions to obtain four extreme weather data sets. Extreme weather includes high temperature weather, cold wave weather, heavy rain weather, and typhoon weather. High temperature weather is defined as the maximum temperature rising to 35℃ or above; cold wave weather is defined as the minimum temperature dropping to 4℃ or below; heavy rain weather is defined as the total precipitation reaching 50mm or above in 24 hours; typhoon weather is based on the typhoon warning time.
[0015] Step 2: Use four extreme weather data sets to construct historical electricity characteristics and meteorological combination characteristics; The historical electricity characteristics are calculated by calculating the average historical electricity consumption at each moment in the three days before each extreme weather condition to capture the volatility at each moment. The calculation formula is as follows: (1); Where, Indicates the first three days h The average value of electricity at each moment is the new characteristic of the structure. For the d sky h The historical power at the moment, h =0,1,2,3…23; Finally, the historical power characteristics corresponding to each moment are generated through the sliding window.
[0016] Meteorological combination features include linear combination features and nonlinear combination features, and the calculation formula is as follows: (2); Where, u , k =1,2, , M , 、 、 、 Respectively h The additive, subtractive, multiplicative and divisible characteristics of the samples at each moment, M is the meteorological characteristic number, For the h The first moment sample k Features, For the h The first moment sample u Features.
[0017] The average value of electricity consumption over three historical days, additive meteorological characteristics, subtractive meteorological characteristics, multiplicative meteorological characteristics, and divisive meteorological characteristics are obtained; the average value of electricity consumption over three historical days, additive meteorological characteristics, subtractive meteorological characteristics, multiplicative meteorological characteristics, and divisive meteorological characteristics form a feature set; Copula theory is used to analyze the correlation of feature sets and filter out the factors with high correlation to form the optimal feature set. It is more suitable for extreme weather electricity data with volatility and randomness. The Copula function theory is as follows: Assume that 1 n Meta random variable.
[0018] Distribution function H The marginal probability distribution functions of (·) are , ,…, ,in , ,…, for n dimensional random variable, then there exists a Copula function C (·)satisfy (3); Once the marginal probability distribution functions of power and influencing factors are determined, the joint probability distribution function of the random variables can be obtained using the Copula function, and the correlation between the two can be obtained by applying the rank correlation coefficient. The Kendall rank correlation coefficient τ is used to measure the correlation.
[0019] Step 3: Use historical electricity consumption characteristics and meteorological combination characteristics to build a TTAO-KAN-LSTM-based electricity consumption prediction model, perform training and prediction, including the following steps: The input historical electricity characteristics and meteorological combination characteristics are extracted to obtain time series characteristics at different time steps. The extracted time series characteristics are subjected to the first nonlinear transformation to obtain the first nonlinear data feature. The first nonlinear data features at different time steps are additively summed to obtain the hidden layer intermediate variables, the hidden layer intermediate variables are subjected to a second nonlinear transformation to obtain the second nonlinear data features, and the second nonlinear feature data is output to obtain the power under extreme weather conditions.
[0020] A hidden layer is set between the two nonlinear transformations to form a KAN network. The TTAO algorithm is used to optimize the KAN network, including the following steps: Construct an initial grid based on the activation function parameters of KAN, and treat each grid point as a topological node; The adjacency relationship is generated by the triangulation algorithm to form a set of triangular units, each of which represents the associated area of the local feature; Calculate the connection weight between nodes. The formula is: (4); in, Representation node r and nodes s The connection weights between α and β is a hyperparameter used to control the weight distribution; The features in each triangular unit are weighted and aggregated, and the weight is determined by the connection strength between nodes. The global features Expressed as: (5); in, Representation node r The weight of is the node feature; Dynamically adjust weights, remove nodes with weights below the threshold, and reduce the number of grids; Perform differential operations on the features of adjacent time steps, extract local trends, and retain the differential results as refined features. The local feature change for: (6); in, express q The local characteristics of the moment, express q -1 local characteristics at moment; Dynamically update grid points: Based on the activation status of the input data, only the activated grid areas are retained and the inactivated redundant grids are deleted.
[0021] The TTAO optimization algorithm includes three processes: triangular topology unit formation; generalization aggregation; local aggregation.
[0022] The formation process of the triangle topology unit is as follows: In the spherical coordinate system, take the first vertex as the starting vertex and use trigonometric functions to convert it into the ordinary coordinate system to obtain a length of lf The length of the generated new direction vector is lf The direction vector is rotated counterclockwise by π / 3, and then the third vertex is obtained by coordinate system transformation: (7); Where, represents the first vertex of the triangle, represents the second vertex of the triangle, represents the third vertex of the triangle, Indicates direction θ vector, lRepresents the size of the triangular topological unit, which can be expressed as: (8); Where, t Indicates the current iteration number, T Indicates the maximum number of iterations.
[0023] (9); Where, , ,..., Represents a random number between [0,π].
[0024] Each set of triangular topological units is internally aggregated into a fourth vertex: (10); in, Indicates the fourth vertex of the internal aggregation of the triangular topological unit, , , is a random number between [0,1], + + = 1. Therefore, the fourth search agent is located in each triangle topology unit. At the beginning of each iteration, a new similar triangle topology unit is obtained from a vertex of the same length and two edges of the same length.
[0025] The generalization aggregation process is as follows: Generalization aggregation emphasizes the exploration phase, which collects information about outstanding individuals in different triangular units and creates new feasible solutions. Information exchange occurs between the best individuals in each triangular topological unit and the best individuals in any selected unit set. Inspired by genetic crossover in genetic algorithms, new individuals are generated between two good vertex connections: (11); in, is a random number between [0, 1], X t i,best , X t rand,best Representing units i The best individual and t The optimal individual of the iteration, is the newly generated individual. In addition, the greedy strategy is used to update the optimal agent, and the mathematical expression is: (12); Where, represents the suboptimal vertex produced by t+1 iterations, represents the suboptimal vertex produced by t iterations, Represents the direction vector of the newly generated individual in t+1 iterations, Represents the direction vector of the optimal vertex produced by t iterations, Represents the direction vector of the optimal vertex produced by t+1 iterations.
[0026] The local aggregation process is as follows: Local aggregation mainly emphasizes the development stage, and the triangular topology units are aggregated internally. After the previous stage, a triangular topology is temporarily formed between the updated optimal or suboptimal individual and two vertices in the group with better fitness values. The calculation formula for the new vertex is: (13); in, To decrease the parameter, adjust the aggregation range size: (14); The purpose of using suboptimal individual information is to prevent the optimal individual from falling into a local extreme value, and to ensure that the guide point of the temporary triangular unit is optimal within the unit: (15); Where, For the new individual that is finally generated, Represents the direction vector of the new individual finally generated.
[0027] The KAN network is used to replace the LSTM fully connected layer. Specifically, the superposition operation of fixed activation function and linear weight in the traditional fully connected layer is converted into a nonlinear combination based on the Kolmogorov-Arnold representation theorem.
[0028] The shape of KAN can be expressed as: (16); Where, n m For the m The number of nodes in the layer, .
[0029] The activation value of the last layer of neurons x l+1,v is the sum of all incoming post-activation values, which can be expressed as: (17); Where, l,p Indicates the l Layer p neurons, x l,p Activate its value; For connection l,p and l+1,v The activation function of for The post-activation value of . Converted into matrix form: (18); Where, x l+1 Represents the matrix form of activation values.
[0030] Given input , the output of KAN can be expressed as: (19); Where R represents a real number, represents the activation function matrix, Represents a compound operation, x Represents input.
[0031] KAN adopts a residual activation strategy by introducing basis functions , activation function It can be expressed as a basis function and spline functions The sum of: (20); (twenty one); (twenty two); Where: c i is the weight coefficient, silu ( x ) represents the activation function, B i ( x ) represents the predefined spline basis function, and For learnable parameters, during the KAN training process, by continuously optimizing c i , transform the spline shape.
[0032] The number of KAN layers is set to 2, the order of spline function is set to 3, and the activation function is set to SiLU.
[0033] Therefore, the present invention adopts the above-mentioned method for predicting electricity consumption under extreme weather conditions, which solves the problem of large deviations in predictions under extreme weather conditions in the prior art.
[0034] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention rather than to limit the same. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that they can still modify or replace the technical solutions of the present invention with equivalents, and these modifications or equivalent replacements cannot cause the modified technical solutions to deviate from the spirit and scope of the technical solutions of the present invention.
Claims
1. A method for predicting electricity consumption under extreme weather conditions, characterized in that: The following steps are involved: Step 1: Obtain the user's electricity consumption data and filter out the electricity consumption data corresponding to extreme weather conditions to obtain four extreme weather data sets. Extreme weather includes high temperature weather, cold wave weather, heavy rain weather, and typhoon weather. Step 2: Use four extreme weather data sets to construct historical electricity characteristics and meteorological combination characteristics; Step 3: Use historical electricity characteristics and meteorological combination characteristics to build an electricity forecasting model based on TTAO-KAN-LSTM, and perform training and forecasting.
2. The method for predicting electricity consumption under extreme weather conditions according to claim 1, characterized in that: The historical electricity characteristics are calculated by calculating the average historical electricity consumption at each moment in the three days before each extreme weather condition to capture the volatility at each moment. The calculation formula is as follows: (1); Where, Indicates the first three days The average value of electricity at each moment is the new characteristic of the structure. For the d sky The historical power at the moment, ; Finally, the historical power characteristics corresponding to each moment are generated through the sliding window.
3. The method for predicting electricity consumption under extreme weather conditions according to claim 1, characterized in that: Meteorological combination features include linear combination features and nonlinear combination features, and the calculation formula is as follows: (2); Where, , , 2, ,M, 、 、 、 Respectively The additive, subtractive, multiplicative and divisible characteristics of the samples at each moment, M is the number of meteorological characteristics, For the The first moment sample Features, For the The first moment sample Features.
4. The method for predicting electricity consumption under extreme weather conditions according to claim 1, characterized in that: The power consumption prediction model based on TTAO-KAN-LSTM is constructed by using historical power consumption characteristics and meteorological combination characteristics. The following steps are included: The input historical electricity characteristics and meteorological combination characteristics are extracted to obtain time series characteristics at different time steps. The extracted time series characteristics are subjected to the first nonlinear transformation to obtain the first nonlinear data feature. The first nonlinear data features at different time steps are additively summed to obtain the hidden layer intermediate variables, the hidden layer intermediate variables are subjected to a second nonlinear transformation to obtain the second nonlinear data features, and the second nonlinear feature data is output to obtain the power under extreme weather conditions.
5. The method for predicting electricity consumption under extreme weather conditions according to claim 4, characterized in that: A hidden layer is set between the two nonlinear transformations to form a KAN network. The TTAO algorithm is used to optimize the KAN network, including the following steps: Construct an initial grid based on the activation function parameters of KAN, and treat each grid point as a topological node; The adjacency relationship is generated by the triangulation algorithm to form a set of triangular units, each of which represents the associated area of the local feature; Calculate the connection weight between nodes. The formula is: ; in, Representation node r and nodes s The connection weights between α and β is a hyperparameter used to control the weight distribution; The features in each triangular unit are weighted and aggregated, and the weight is determined by the connection strength between nodes. The global features Expressed as: ; in, Representation node r The weight of is the node feature; Dynamically adjust weights, remove nodes with weights below the threshold, and reduce the number of grids; Perform differential operations on the features of adjacent time steps, extract local trends, and retain the differential results as refined features. The local feature change for: ; in, express q The local characteristics of the moment, express q -1 local characteristics at moment; Dynamically update grid points: Based on the activation status of the input data, only the activated grid areas are retained and the inactivated redundant grids are deleted.
Citation Information
Patent Citations
Solar energy generating capacity prediction method and system
CN116894214A
Hydroelectric power generation prediction method and system based on VMD-LSTM-KAN model
CN119651589A
Systems and methods for load forecasting for improved forecast results based on tuned weather data
US20240280618A1
Remote embedded device update platform apparatuses, methods and systems
WO2017007510A1