Power load prediction method under high temperature weather based on long short-term memory network
Patent Information
- Application Number
- CN202510502272.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-22
- Publication Date
- 2026-10-27
AI Technical Summary
[0004]传统的电力负荷预测方法,主要依赖于时间序列分析、回归分析和指数平滑法等简单的统计模型,这些方法在处理非线性和非平稳的时间序列数据时存在明显的局限性,特别是在极端天气条件下,它们难以准确捕捉电力负荷的动态变化
[0007]本发明通过一系列的数据增强策略,通过对同一城市不同地区的数据来进行训练与测试,以增强模型的泛化能力。这种方法不仅提高了电力负荷预测的精度和效率,还增强了模型的鲁棒性,使其能够快速适应新的数据分布和外部环境变化。
Smart Images

Figure CN122992656A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the application of deep learning technology in the field of power load forecasting, and in particular to a power load forecasting method based on Long Short-Term Memory (LSTM) networks under high-temperature weather conditions, which is used to complete intelligent power load forecasting based on monitoring time-series data under high-temperature weather conditions. Background Technology
[0002] With the acceleration of global climate change and urbanization, high-temperature weather events are becoming increasingly frequent, placing higher demands on power system load forecasting. Traditional power load forecasting methods often rely on simple statistical models, which struggle to accurately capture dynamic changes in power load, especially under extreme weather conditions. Therefore, developing a power load forecasting method that can adapt to changes in high-temperature weather is particularly important.
[0003] Electricity load forecasting is a crucial aspect of power system planning, operation, control, and dispatch. Under the new circumstances of power grid transformation and development and power system reform, short-term electricity load forecasting has become particularly important. The accuracy of electricity load forecasting directly affects the economy and reliability of the power system.
[0004] Traditional power load forecasting methods primarily rely on simple statistical models such as time series analysis, regression analysis, and exponential smoothing. These methods have significant limitations when handling nonlinear and non-stationary time series data, especially under extreme weather conditions, where they struggle to accurately capture dynamic changes in power load. These limitations manifest in several ways: poor adaptability, failing to adapt to rapid changes in power load and the uncertainties of renewable energy sources; weak generalization ability, requiring retraining and adjustment when data distribution changes; low computational efficiency, struggling to handle large-scale data and meet real-time forecasting requirements; limited forecasting accuracy, unable to handle complex nonlinear and fluctuating characteristics; strong data dependence, requiring high quality and completeness of historical data and susceptible to noise and outliers; and difficulty in handling multi-source data, unable to effectively integrate influencing factors such as weather and user behavior. Therefore, the effectiveness of traditional methods in modern power load forecasting is gradually decreasing, necessitating more advanced forecasting methods to improve accuracy and efficiency.
[0005] This invention proposes a time series analysis method based on Long Short-Term Memory (LSTM) networks, which can effectively perform in-depth analysis and prediction of power load data. This method is particularly suitable for processing nonlinear and non-stationary time series data in power systems, and can capture long-term dependencies and complex patterns in power load changes. Summary of the Invention
[0006] This invention addresses the limitations of existing power load forecasting technologies by proposing a power load forecasting method based on Long Short-Term Memory (LSTM) networks. This method leverages the powerful learning and time series analysis capabilities of the LSTM model to effectively handle the nonlinear and non-stationary characteristics of power load data. Through deep learning techniques, the LSTM model can automatically extract key features from power load time series data and learn long-term dependencies, thereby improving forecast accuracy under extreme weather conditions. The LSTM model uses a neural network architecture, enabling it to adaptively adjust network parameters to better adapt to changes in power load data.
[0007] This invention employs a series of data augmentation strategies, training and testing the model on data from different areas of the same city to enhance its generalization ability. This method not only improves the accuracy and efficiency of power load forecasting but also enhances the model's robustness, enabling it to quickly adapt to new data distributions and changes in the external environment.
[0008] The power load forecasting method of this invention is applicable to urban power grid load management and can be applied in various fields such as smart grid load forecasting, power market trading decisions, and power system dispatch optimization. By improving the accuracy of power load forecasting, this invention helps power operators better plan and adjust power resources, ensure the stability and economy of power supply, while reducing operating costs and improving energy utilization efficiency.
[0009] The technical solution adopted in this invention is as follows:
[0010] Step (1): Collect the power parameters of the air conditioner from the power monitoring terminal, including power, current, voltage, etc., and collect indoor and outdoor temperature and humidity data using temperature and humidity sensors; integrate the historical and real-time meteorological data provided, including temperature, humidity, etc.
[0011] Step (2) Perform data preprocessing, including: removing outliers and missing values, such as negative values of air conditioning power or unreasonable meteorological data; selecting meteorological parameters closely related to air conditioning usage and power load, such as daily average temperature, daily average relative humidity, and THI index; and standardizing all features so that their mean is 0 and their standard deviation is 1.
[0012] Step (3): Transform the non-numerical data and divide the processed data into training and test sets in an 8:2 ratio.
[0013] Step (4): Construct a power load prediction model based on a Long Short-Term Memory (LSTM) network. The model is trained using the training set data partitioned in step (3), and the model parameters are optimized using the backpropagation algorithm to improve prediction accuracy. During model training, the number of layers and hidden units of the LSTM network, as well as hyperparameters such as learning rate and batch size, are adjusted to obtain the best prediction results.
[0014] Step (5): Validate the trained LSTM model using the test set defined in step (3) to evaluate its predictive performance. Measure the model's accuracy by calculating prediction errors, such as mean squared error (MSE) and mean absolute error (MAE). Based on the test results, further adjust the model parameters to improve its generalization ability and prediction accuracy.
[0015] The beneficial effects of this invention lie in its proposal of a power load forecasting method based on Long Short-Term Memory (LSTM) networks, compared to traditional methods. This method is specifically optimized for the nonlinear and non-stationary characteristics of power load data. Through deep learning technology, this invention can automatically extract key features from time-series data and learn long-term dependencies, thereby significantly improving forecast accuracy under extreme weather conditions. Attached Figure Description
[0016] The present invention will be further described below with reference to the accompanying drawings and embodiments:
[0017] Figure 1 This is a flowchart illustrating a power load forecasting method based on Long Short-Term Memory (LSTM) networks according to an embodiment of the present invention. The flowchart details the complete steps from data collection, preprocessing, model training and testing to the final power load forecast, demonstrating the innovation and systematic nature of this invention in the field of power load forecasting.
[0018] Figure 2 A diagram illustrating a power load forecasting network structure according to an embodiment of the present invention. This diagram shows the LSTM network structure used in the present invention, including the configuration of the input layer, hidden layer, and output layer, as well as the connections between them, demonstrating the innovation of the present invention in network structure design.
[0019] Figure 3 This diagram illustrates the training process of an LSTM network according to an embodiment of the present invention. The diagram details the LSTM network training process, including key steps such as data input, network layer construction, and parameter optimization, demonstrating how the present invention utilizes deep learning technology to improve the accuracy of power load forecasting.
[0020] Figure 4This diagram illustrates an objective evaluation of the prediction performance according to an embodiment of the present invention. It demonstrates how objective evaluation indicators can be used to evaluate the effectiveness of the power load prediction method of the present invention, thereby verifying the model's predictive performance and generalization ability. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. These embodiments do not constitute a limitation of the invention. The embodiments described with reference to the accompanying drawings are exemplary and intended to explain the invention, and should not be construed as limiting the invention.
[0022] Figure 1 This is a flowchart of a power load forecasting method based on a Long Short-Term Memory (LSTM) network according to an embodiment of the present invention; as follows: Figure 1 As shown, the LSTM-based power load forecasting method includes the following steps:
[0023] S1010: Collects power parameters of the air conditioner from the power monitoring terminal, including power, current, and voltage, and simultaneously collects indoor and outdoor temperature and humidity data using temperature and humidity sensors. Integrates existing historical and real-time meteorological data, including temperature and humidity.
[0024] S1020: Perform data preprocessing on the collected data, including removing outliers and missing values, selecting meteorological parameters closely related to air conditioning usage and power load, such as daily average temperature, daily average relative humidity, and THI index, and performing standardization processing.
[0025] S1030: Divide the processed dataset into training and testing sets according to the proportions to prepare for model training and validation.
[0026] S1040: Construct an LSTM-based power load forecasting model and adjust the network structure and hyperparameters to adapt to the characteristics of power load data.
[0027] S1050: The LSTM model is trained using the training set data, and the model parameters are optimized through the backpropagation algorithm to improve prediction accuracy.
[0028] S1060: Use test set data to validate the trained LSTM model, evaluate the model's predictive performance, and further adjust the model parameters based on the test results.
[0029] Figure 2 This diagram illustrates the feature extraction structure for LSTM-based power load forecasting. It demonstrates how to process and analyze power load data using a Long Short-Term Memory (LSTM) network model, and how to extract key features from this data for power load forecasting.
[0030] An LSTM model consists of an input layer, multiple LSTM layers, and an output layer. The input layer receives preprocessed power load data, including power, current, voltage, and meteorological parameters such as temperature and humidity. This data is first standardized to ensure the model can process it effectively. The LSTM layers are responsible for extracting features from the time-series data and controlling the flow of information through their gating mechanisms (including input gate, forget gate, and output gate) to capture long-term and short-term dependencies.
[0031] Forget Gate: The forget gate determines which information should be forgotten from the cell state, i.e., which information should not be retained to the next time step. It is calculated based on the current input and the output of the previous time step. The formula for calculating the forget gate is usually as follows:
[0032] f t =σ(W f ·[h t-1 ,x t ]+b f (1)
[0033] Among them, (f t ) is the forget gate output at the current time step, σ is the sigmoid activation function, (W f ) is the weight matrix of the forget gate, (h t-1 (x) is the output of the previous time step. t (b) is the input for the current time step. f ) is the bias term of the forget gate.
[0034] Input Gate: The input gate is responsible for deciding which new information should be stored in the cell state. It consists of two parts: a sigmoid layer that determines which values need to be updated, and a tanh layer that creates a new candidate value vector, which will be used to update the cell state. The calculation formula for the input gate is as follows:
[0035] i t =σ(W i ·[h t-1 ,x t ]+b i (2)
[0036]
[0037] Among them, i t It is the input gate output of the current time step. It is a candidate value vector, W i and W C These are the weight matrices for the input gate and the candidate values, respectively. i and bC These are the corresponding bias terms.
[0038] Output Gate: The output gate determines which information from the cell state will be output to the next hidden state. It is calculated based on the current cell state and the output of the previous time step. The formula for calculating the output gate is typically as follows:
[0039] o t =σ(W o ·[h t-1 ,x t ]+b o (4)
[0040] h t =o t ·tanh(C t (5)
[0041] Among them, o t It is the output gate output of the current time step, h t It is the output of the hidden state at the current time step, W. o It is the weight matrix of the output gate, b o It is the bias term of the output gate, C t This refers to the cell state at the current time step. Cell state (C t The update of ) combines the forget gate, the input gate, and the previous cell state (C). t-1 ) is used for calculation:
[0042]
[0043] Gating mechanisms enable LSTM networks to selectively retain or forget information, thus performing well in tasks such as time series prediction.
[0044] Figure 3 This paper demonstrates the key steps in the LSTM network training process. In the power load forecasting method of this invention, data preprocessing is a crucial step before training begins. All collected power load data and related meteorological data, including parameters such as power, current, voltage, temperature, and humidity, undergo thorough cleaning and standardization. This process ensures data consistency and comparability, laying a solid foundation for subsequent model training. The processed data is divided into a feature set and a label set. The feature set contains the input parameters used for model training, while the label set corresponds to future power load values. The data is divided into training and test sets at a ratio of 80% and 20%, respectively, which helps ensure the robustness of the model during training, tuning, and evaluation, enabling the model to effectively generalize on unseen data.
[0045] During network initialization, the weights and biases of the LSTM network are set through random initialization or pre-training. This step is crucial for the model's convergence speed and final performance. Subsequently, the input data is propagated forward through the LSTM network. In this process, each LSTM unit updates its cell state and hidden state according to the control of the input gate, forget gate, and output gate, thereby capturing long-term and short-term dependencies in the time-series data.
[0046] During the loss calculation phase, the difference between the predicted and actual values output by the model is calculated using the Huber loss function. The Huber loss function defines a threshold parameter δ (delta), employing different loss calculation methods depending on the magnitude of the error. When the absolute value of the error is less than δ, the Huber loss function exhibits squared error (similar to MSE), which helps to accurately optimize model parameters when the error is small. When the absolute value of the error is greater than δ, the Huber loss function exhibits linear error (similar to MAE), which reduces sensitivity to outliers and improves the model's robustness.
[0047]
[0048] in, Represents the difference between the actual value y and the predicted value The differences lie in the following: During the backpropagation phase, the weights and biases in the LSTM network are updated using the Adam optimization algorithm based on the gradient calculated from the loss function. Parameter optimization is performed in each iteration; based on the gradient calculated from backpropagation, the network parameters are adjusted using an optimization algorithm to minimize the loss function, thereby improving the model's predictive performance.
[0049] Model evaluation is another crucial step in the training process. After each training cycle, the model's performance is evaluated using a test set to prevent overfitting. Based on the test results, adjustments to the model structure or training parameters may be necessary to further improve the model's accuracy. Figure 4 The model was tested within a certain error range. The test showed that the model had a high accuracy rate and could basically predict the power load accurately.
[0050] The specific embodiments described herein are merely illustrative of the spirit of the invention. Those skilled in the art to which this invention pertains may make various modifications or additions to the described specific embodiments or use similar methods to substitute them, without departing from the spirit of the invention or exceeding the scope defined by the appended claims.
Claims
1. A method for predicting power load under high-temperature weather based on long short-term memory networks, characterized in that, include: The system collects air conditioner power parameters, including power, current, and voltage, using a power monitoring terminal. It also collects indoor and outdoor temperature and humidity data using temperature and humidity sensors. Historical and real-time meteorological data, including temperature and humidity, are integrated. The data undergoes preprocessing, including: removing outliers and missing values; selecting meteorological parameters closely related to air conditioner usage and power load, such as daily average temperature, daily average relative humidity, and THI index; and standardizing all features to achieve a mean of 0 and a standard deviation of 1. The non-numerical data is transformed, and the processed data is divided into training and test sets in an 8:2 ratio; A power load forecasting model based on Long Short-Term Memory (LSTM) network is constructed. The LSTM model includes an input layer, one or more LSTM layers, and an output layer. The input layer receives preprocessed power parameters and meteorological data. The LSTM layers are used to extract features from the time series data and capture long-term dependencies. The output layer is used to output the predicted power load value. The constructed LSTM model is trained using the training set, and the model parameters are optimized through backpropagation to improve the prediction accuracy. During model training, the number of layers and hidden units of the LSTM network, as well as hyperparameters such as learning rate and batch size, are adjusted to obtain the best prediction results. The trained LSTM model is validated using the test set to evaluate its predictive performance. Prediction accuracy is measured by calculating prediction errors such as mean squared error (MSE), mean absolute error (MAE), and a combination of MSE and MAE (HUber). Based on the test results, model parameters are further adjusted to improve generalization ability and prediction accuracy. The model is then optimized based on the validation results, including but not limited to adjusting the network structure, adding regularization terms, and employing early stopping to prevent overfitting and improve stability and reliability in practical applications. The optimized model is then applied to actual power load forecasting, predicting power load under high-temperature conditions based on real-time collected power parameters and meteorological data, providing decision support for power system planning, operation, control, and scheduling.
2. The method for predicting power load under high-temperature weather based on long short-term memory networks according to claim 1, characterized in that, The input features include power data and meteorological data acquired by multiple sensors and monitoring devices, wherein: The power data mainly comes from power monitoring terminals, recording power-related parameters such as phase A voltage, phase A current, phase A active power, phase A apparent power, and reactive power. This data is stored in CSV file format with a timestamp as an index, and is recorded every 10 seconds to identify the acquisition time of each record. Meteorological data includes environmental factors such as temperature and humidity, acquired through temperature and humidity sensors, and has the same storage format and timestamp field as the power data. By fusing power and meteorological data, the impact of high-temperature weather on power load is analyzed.
3. The method for predicting power load under high-temperature weather based on long short-term memory networks according to claim 2, characterized in that, Data preprocessing methods are used to preprocess the raw power load data and meteorological data to ensure the stability and accuracy of model training. Specifically, this includes: Power and meteorological data are read and merged using a left join based on timestamps to ensure that each power load data point corresponds to a meteorological data point. Outliers in the data are identified and removed using box plots or Z-score methods within a set reasonable threshold range. For missing values in the data, linear interpolation, spline interpolation, or time series-based prediction methods are used to impute them, ensuring data integrity and consistency. Meteorological parameters closely related to air conditioning usage and power load, such as daily average temperature, daily average relative humidity, and THI index, are selected from the raw data, along with key features of power parameters such as phase A voltage, phase A current, phase A active power, and phase A apparent power. Simultaneously, since power data changes relatively little over a short period, the data is divided and merged according to time to introduce temporal features, thereby capturing the periodic changes in power load. Correlation analysis is employed to remove redundant features with low correlation to the prediction target, reducing data dimensionality and improving model training efficiency. All selected features are standardized using the Z-score standardization method, transforming the data into a distribution with a mean of 0 and a standard deviation of 1. For certain specific features, such as phase A current and phase A active power, MinMaxScaler normalization is applied based on their physical meaning and dimensions, scaling the data to the [0,1] interval to further eliminate differences in dimensions and orders of magnitude between different features. This allows the model to treat each feature more fairly, accelerates convergence, and improves prediction accuracy. For time series data, a sliding window transformation is used to extract local features and trend information, enhancing the model's ability to model time series data. The preprocessed data is divided into training and test sets in an 8:2 ratio to ensure that the data distribution of the training and test sets is representative, providing sufficient and representative samples for model training and validation. The model is trained and validated multiple times to evaluate its performance on different data subsets, select the optimal model parameters and structure, and improve the model's stability and generalization ability.
4. The method for predicting power load under high-temperature weather based on long short-term memory networks according to claim 3, characterized in that, The preprocessed data is serialized using time series methods to capture the time dependence of power load, specifically including: The preprocessed data is rearranged in chronological order to form a time series dataset. Each data point contains feature values for multiple time steps and the corresponding power load value, constructing a data structure with a time dimension to provide a foundation for the model to capture time dependencies. A sliding window is used, with a fixed-size time window that slides across the time series data. Each slide extracts data within the window as a sample. The data points within the window are arranged in chronological order to form a sample set with time series characteristics. The size of the window can be adjusted according to the changing characteristics of power load and prediction needs to capture the changing patterns of power load at different time scales. During the serialization process, important time-related features are extracted, and time information is converted into continuous numerical features, which facilitates the model's learning of the impact of time periodicity on power load. At the same time, statistical features of time series data, such as mean, variance, standard deviation, maximum value, and minimum value, are calculated to reflect the distribution and changing trend of power load in different time windows, providing the model with richer information and enhancing the model's ability to capture time dependencies. The serialized data is normalized to scale it to the [0,1] interval or a distribution with a mean of 0 and a standard deviation of 1. This further eliminates differences in units and orders of magnitude between different features, enabling the model to treat each feature more fairly and improving its convergence speed and prediction accuracy. Since the sliding window technique may lead to inconsistent sequence lengths, padding is used for insufficiently long sequences; for excessively long sequences, truncation is performed to retain a fixed length, ensuring that the input data to the model has a uniform format and length, thus improving the model's training efficiency and stability.
5. The method for predicting power load under high-temperature weather based on long short-term memory networks according to claim 4, characterized in that, Feature extraction from time series data using the LSTM model includes: An LSTM model consists of an input layer, multiple LSTM layers, and an output layer. The input layer receives preprocessed power load data, including power, current, voltage, and meteorological parameters such as temperature and humidity. This data is first standardized to ensure the model can process it effectively. The LSTM layers are responsible for extracting features from the time-series data and controlling the flow of information through their gating mechanisms (including input gate, forget gate, and output gate) to capture long-term and short-term dependencies. Forget Gate: The forget gate determines which information should be forgotten from the cell state, i.e., which information should not be retained to the next time step. It is calculated based on the current input and the output of the previous time step. The formula for calculating the forget gate is usually as follows: f t =σ(W f ·[h t-1 ,x t ]+b f ) (1) Among them, f t It is the forget gate output at the current time step, σ is the sigmoid activation function, and W is the output of the forget gate at the current time step. f It is the weight matrix of the forget gate, h t-1 It is the output of the previous time step, (x t ) is the input for the current time step, b f It is the bias term of the forget gate. Input Gate: The input gate is responsible for deciding which new information should be stored in the cell state. It consists of two parts: a sigmoid layer that determines which values need to be updated, and a tanh layer that creates a new candidate value vector, which will be used to update the cell state. The calculation formula for the input gate is as follows: i t =σ(W i ·[h t-1 ,x t ]+b i ) (2) Among them, i t It is the input gate output of the current time step. It is a candidate value vector, W i and W C These are the weight matrices for the input gate and the candidate values, respectively. i and b C These are the corresponding bias terms. Output Gate: The output gate determines which information from the cell state will be output to the next hidden state. It is calculated based on the current cell state and the output of the previous time step. The formula for calculating the output gate is typically as follows: the t =σ(W o ·[h t-1 ,x t ]+b o ) (4) h t = no t ·fish(C) t ) (5) Among them, o t It is the output gate output of the current time step, h t It is the output of the hidden state at the current time step, W. o It is the weight matrix of the output gate, b o It is the bias term of the output gate, C t This refers to the cell state at the current time step. Cell state (C t The update of ) combines the forget gate, the input gate, and the previous cell state (C). t-1 ) is used for calculation: Gating mechanisms enable LSTM networks to selectively retain or forget information, thus performing well in tasks such as time series prediction.
6. The method for predicting power load under high-temperature weather based on long short-term memory networks according to claim 5, characterized in that, Using LSTM models for training and prediction of time series data specifically includes: During network initialization, the weights and biases of the LSTM network are set through random initialization or pre-training. This step is crucial for the model's convergence speed and final performance. Subsequently, the input data is propagated forward through the LSTM network. In this process, each LSTM unit updates its cell state and hidden state according to the control of the input gate, forget gate, and output gate, thereby capturing long-term and short-term dependencies in the time-series data. During the loss calculation phase, the difference between the predicted and actual values output by the model is calculated using the Huber loss function. The Huber loss function defines a threshold parameter δ (delta), employing different loss calculation methods depending on the magnitude of the error. When the absolute value of the error is less than δ, the Huber loss function exhibits squared error (similar to MSE), which helps to accurately optimize model parameters when the error is small. When the absolute value of the error is greater than δ, the Huber loss function exhibits linear error (similar to MAE), which reduces sensitivity to outliers and improves the model's robustness. in, Represents the difference between the actual value y and the predicted value The differences lie in the following: During the backpropagation phase, the weights and biases in the LSTM network are updated using the Adam optimization algorithm based on the gradient calculated from the loss function. Parameter optimization is performed in each iteration; based on the gradient calculated from backpropagation, the network parameters are adjusted using an optimization algorithm to minimize the loss function, thereby improving the model's predictive performance. Model evaluation is another crucial step in the training process. After each training cycle, the model's performance is evaluated using a test set to prevent overfitting. Based on the test results, adjustments to the model structure or training parameters may be necessary to further improve the model's accuracy.