Power system source and load joint prediction method based on variational autoencoder
Patent Information
- Application Number
- CN202510670670.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-22
- Publication Date
- 2026-09-11
- Estimated Expiration
- 2045-05-22
AI Technical Summary
[0007]本发明提供了基于变分自编码器的电力系统源荷联合预测方法,拟解决们目前预测方法只是考虑线性变化,导致预测结果不准确的技术问题
[0047] This invention collects and cleans power load, generation, and meteorological data, and extracts relevant features to ensure high-quality and multi-dimensional input data. The feature standardization process further eliminates scale differences between different features, improving model training stability and prediction accuracy. In the model building phase, an encoder employing an LSTM network structure captures the long-term and short-term dependencies of time-series data and models the data using latent variables in a variational autoencoder, thereby better capturing nonlinear relationships in the power system. Furthermore, the decoder generates load and generation forecasts for future time steps, effectively improving the predictive ability for future uncertainties and complex changes. Finally, the model is evaluated and optimized based on a test dataset, ensuring its accuracy and robustness. This approach better addresses nonlinear changes in power system source-load joint forecasting, significantly improving prediction accuracy and solving the problem that existing methods can only handle linear changes.
Smart Images

Figure CN120657725B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of power system technology, and more specifically, relates to a power system source-load joint prediction method based on variational autoencoders. Background Technology
[0002] With economic development and social progress, global electricity demand is increasing year by year. To meet this demand, power systems must possess high operational efficiency and reliability. A power system consists of generation, transmission, distribution, and load demand; the synergistic effect of each component directly impacts the safety and stability of the entire power system.
[0003] In modern power systems, changes in electricity load are influenced by a variety of factors, including climate change, social activities, and industrial demand. At the same time, power generation is also constrained by these factors, especially the uncertainty of renewable energy sources (such as wind and solar power), which makes power generation forecasting more complex.
[0004] Therefore, accurate forecasting of power load and generation, especially forecasting under uncertain future conditions, has become one of the core technical issues for ensuring the safe operation of the power system.
[0005] In power systems, load forecasting and generation forecasting are two key tasks. Load forecasting aims to accurately predict electricity demand over a future period, while generation forecasting estimates the future generating capacity of power plants, especially the generation of renewable energy (such as wind and solar power). Traditional load and generation forecasting methods mainly include statistical regression analysis, time series analysis (such as the ARIMA model), and machine learning methods (such as support vector machines and random forests).
[0006] Many traditional methods (such as ARIMA) assume that the system changes linearly, which limits their application to complex, nonlinear relationships. Electricity load and power generation are often influenced by a variety of complex factors, such as seasonal variations, weather changes, and social activities. The relationships between these factors are not simple linear, leading to technical problems such as inaccurate prediction results. Summary of the Invention
[0007] This invention provides a power system source-load joint prediction method based on variational autoencoders, which aims to solve the technical problem that current prediction methods only consider linear changes, resulting in inaccurate prediction results.
[0008] The power system source-load joint prediction method based on variational autoencoder includes the following steps:
[0009] Step 1: Collect power load data, power generation data, and meteorological data, and clean the collected data to obtain cleaned data;
[0010] Step 2: Based on the cleaned data, feature extraction is performed, including time features, historical data features, and meteorological features. The extracted features are then standardized to obtain standardized features.
[0011] Step 3: Use the standardized features as input to the constructed variational autoencoder and train the variational autoencoder to obtain a trained variational autoencoder. The encoder part of the variational autoencoder adopts an LSTM network structure and maintains training differentiability through latent variable sampling. The decoder receives latent variables and generates load and power generation predictions for future time steps.
[0012] Step 4: Test the trained variational autoencoder based on the test dataset, and use evaluation metrics to quantify the accuracy of the prediction;
[0013] Step 5: Optimize the variational autoencoder based on the evaluation results, and apply the optimized variational autoencoder to the prediction of load and power generation.
[0014] This invention collects and cleans power load, generation, and meteorological data, and extracts relevant features to ensure high-quality and multi-dimensional input data. The feature standardization process further eliminates scale differences between different features, improving model training stability and prediction accuracy. In the model building phase, an encoder employing an LSTM network structure captures the long-term and short-term dependencies of time-series data and models the data using latent variables in a variational autoencoder, thereby better capturing nonlinear relationships in the power system. Furthermore, the decoder generates load and generation forecasts for future time steps, effectively improving the predictive ability for future uncertainties and complex changes. Finally, the model is evaluated and optimized based on a test dataset, ensuring its accuracy and robustness. This approach better addresses nonlinear changes in power system source-load joint forecasting, significantly improving prediction accuracy and solving the problem that existing methods can only handle linear changes.
[0015] Preferably, the time features include hourly, weekly, monthly, and holiday / holiday characteristics; and a periodic time feature extension is introduced into the time features, that is, a time-differentiated feature is introduced to identify peak demand patterns within the period, calculated as follows:
[0016] time_since_last_peak=t-last_peak_time;
[0017] In the formula: last_peak_time represents the time of the highest point of power load in the past period; time_since_last_peak represents the time since the last peak; t represents the current time.
[0018] Preferably, the historical data features include historical load data and historical power generation data, and the historical load data and historical power generation data are weighted using a lag window:
[0019]
[0020] Where: load t-i This represents the load data at time ti; w i Indicates weight; weighted load This represents the weighted historical load data;
[0021]
[0022] Where: Generation t-i This represents the power generation data at time ti; weighted generation This represents the weighted historical power generation data;
[0023] The weight calculation formula is as follows:
[0024]
[0025] In the formula: λ represents the smoothing factor; i represents the lag step size; β represents the seasonal adjustment coefficient; and P represents the seasonal cycle length.
[0026] Preferably, the meteorological characteristics include temperature characteristics, humidity characteristics, wind speed characteristics, and a joint influencing factor constructed from temperature and humidity characteristics, wherein the joint influencing factor is as follows:
[0027]
[0028] In the formula: α, β, and γ are the learned regression coefficients; T represents temperature; H represents humidity; This indicates the joint impact factor.
[0029] Preferably, the variational autoencoder includes an encoder and a decoder;
[0030] The encoder consists of LSTM layers and fully connected layers. The LSTM layers are stacked with multiple LSTM layers to extract temporal features from the data. The extracted temporal features are input into the fully connected layers and mapped to the mean and variance of the latent space. The latent vector is obtained by sampling from the normal distribution of the latent space using the reparameterization technique.
[0031] The decoder includes an LSTM layer and a fully connected layer. The latent vector is input into the LSTM layer to predict the load and power generation at future time steps, and then the output of the LSTM is mapped to the predicted load and power generation values through the fully connected layer.
[0032] Preferably, the loss function of the variational autoencoder is as follows:
[0033]
[0034] In the formula: Reconstruction Loss represents the reconstruction error; KL Divergence represents the KL divergence;
[0035]
[0036] In the formula: x represents the input data, and z represents the latent vector; This represents the expectation of the conditional probability distribution q(z|x) of the latent variable z; q(z|x) is the conditional probability distribution of the latent variable z given the input x; p(x|z) represents the conditional probability distribution of the data x given the latent variable z.
[0037]
[0038] In the formula: σ 2 represents the variance of the latent space; μ represents the mean of the latent space.
[0039] Preferably, the LSTM layer adopts a multi-scale LSTM structure, including a short-term LSTM model, a medium-term LSTM model, and a long-term LSTM model, wherein the short-term LSTM model is used to process hourly data, the medium-term LSTM model is used to process daily data, and the long-term LSTM model is used to process weekly data.
[0040] For the outputs of the short-term, medium-term, and long-term LSTM models, a weighted average is used to fuse features at different scales, which are then used as the output feature h of the LSTM layer. fused :
[0041] h fused =α hour h hour +α day h day +α week h week ;
[0042] Where: h fused h represents the output features of the LSTM layer. hour h represents the output of the short-term LSTM model. dayIndicates the output of the intermediate LSTM model; h week Represents the output of the long-term LSTM model; α hour α day α week Weighting coefficients corresponding to the time scale;
[0043] The weighting coefficients are learned by weighting the features at each time scale using a fully connected layer.
[0044] α = softmax(W) α ·[h hour ,h day ,h week ]+b α );
[0045] In the formula: W α and b α The parameters are learned; the softmax function is used to ensure that the sum of all weight coefficients is 1.
[0046] The beneficial effects of the invention include:
[0047] This invention collects and cleans power load, generation, and meteorological data, and extracts relevant features to ensure high-quality and multi-dimensional input data. The feature standardization process further eliminates scale differences between different features, improving model training stability and prediction accuracy. In the model building phase, an encoder employing an LSTM network structure captures the long-term and short-term dependencies of time-series data and models the data using latent variables in a variational autoencoder, thereby better capturing nonlinear relationships in the power system. Furthermore, the decoder generates load and generation forecasts for future time steps, effectively improving the predictive ability for future uncertainties and complex changes. Finally, the model is evaluated and optimized based on a test dataset, ensuring its accuracy and robustness. This approach better addresses nonlinear changes in power system source-load joint forecasting, significantly improving prediction accuracy and solving the problem that existing methods can only handle linear changes. Attached Figure Description
[0048] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0049] Figure 1 This is an overall step diagram provided for an embodiment of the present invention. Detailed Implementation
[0050] To make the technical problems, technical solutions, and beneficial effects to be solved by this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of this application.
[0051] See Figure 1 As shown, the preferred embodiment of the present invention will be further described;
[0052] The power system source-load joint prediction method based on variational autoencoder includes the following steps:
[0053] Step 1: Collect power load data, power generation data, and meteorological data, and clean the collected data to obtain cleaned data;
[0054] For example:
[0055] Power load data acquisition:
[0056] Electricity load data refers to the electricity demand of a power system at different points in time. This type of data is typically collected by power companies or grid operators through monitoring equipment (such as smart meters, substation load monitoring systems, etc.). The frequency of load data collection should cover different time scales, usually minute-level, hourly-level, or daily-level data, selected based on forecast demand.
[0057] This data should include historical electricity load variation curves, typically requiring at least several months to several years of historical data to capture seasonality, periodicity, and other patterns.
[0058] Power generation data acquisition:
[0059] Electricity generation data refers to the power output of each generator unit in a power system, especially data on renewable energy generation (such as wind and solar power). This data is typically collected in real time using automated equipment such as SCADA (Supervisory and Data Acquisition Systems).
[0060] The data should include the power generation, power output, and start-up / shutdown information of the generating equipment. The time span of the data should be consistent with the load data, and it should include power generation data under different power generation modes.
[0061] Meteorological data collection:
[0062] Meteorological data is crucial for forecasting electricity load and power generation, especially factors such as temperature, humidity, wind speed, and solar radiation, which have a significant impact on electricity load and renewable energy generation. Meteorological data can be obtained from weather stations, meteorological sensors, or third-party meteorological service providers (such as national meteorological bureaus and meteorological data companies).
[0063] The meteorological data to be collected includes, but is not limited to, temperature, humidity, wind speed, wind direction, air pressure, precipitation, and sunshine duration. This data can be collected hourly or daily and should be aligned with power load and generation data.
[0064] Data cleaning:
[0065] Missing value handling: In actual data acquisition, some data may be missing, such as due to equipment failure or data transmission problems. Missing data should be interpolated, filled (e.g., using the mean, median, or preceding and following values), or deleted to ensure the accuracy of subsequent analysis and modeling.
[0066] Outlier detection and correction: Outliers in the data (such as sudden abnormally high or low values) can severely affect the training performance of the model. Statistical methods (such as Z-score and box plot methods) can be used to detect and correct these outliers, ensuring data quality through smoothing, correction, or removal of outliers.
[0067] Deduplication: During data collection, duplicate records may occur. By checking timestamps and data content, duplicate records are removed to avoid unnecessary impact on the model.
[0068] Data format standardization: Different data sources may have inconsistent data formats, such as different timestamp formats or units. It is necessary to standardize the formatting of data from different data sources to ensure data alignment along the time dimension and consistency of units for all data items.
[0069] Data integration and alignment:
[0070] Electricity load, power generation, and meteorological data come from different data sources, making alignment along the time dimension crucial. Typically, data is merged using timestamps, aligning the various data sources (electricity load, power generation, and meteorological data) in chronological order to form a unified time-series dataset.
[0071] If the time granularity of data collection is different, data interpolation or downsampling is required. For example, when aligning minute-level load data with daily-level meteorological data, the meteorological data can be interpolated based on daily averages or hourly data.
[0072] Step 2: Based on the cleaned data, feature extraction is performed, including time features, historical data features, and meteorological features. The extracted features are then standardized to obtain standardized features.
[0073] The time features include hourly, weekly, monthly, and holiday / holiday characteristics; and a periodic time feature extension is introduced into the time features, that is, a time-differentiated feature is introduced to identify peak demand patterns within a period, calculated as follows:
[0074] time_since_last_peak=t-last_peak_time;
[0075] In the formula: last_peak_time represents the time of the highest point of power load in the past period; time_since_last_peak represents the time since the last peak; t represents the current time.
[0076] Preferably, the historical data features include historical load data and historical power generation data, and the historical load data and historical power generation data are weighted using a lag window:
[0077]
[0078] Where: load t-i This represents the load data at time ti; w i Indicates weight; weighted load This represents the weighted historical load data;
[0079]
[0080] Where: Generation t-i This represents the power generation data at time ti; weighted generation This represents the weighted historical power generation data;
[0081] The weight calculation formula is as follows:
[0082]
[0083] In the formula: λ represents the smoothing factor; i represents the lag step size; β represents the seasonal adjustment coefficient; and P represents the seasonal cycle length.
[0084] Preferably, the meteorological characteristics include temperature characteristics, humidity characteristics, wind speed characteristics, and a joint influencing factor constructed from temperature and humidity characteristics, wherein the joint influencing factor is as follows:
[0085]
[0086] In the formula: α, β, and γ are the learned regression coefficients; T represents temperature; H represents humidity; This indicates the joint impact factor.
[0087] Step 3: Use the standardized features as input to the constructed variational autoencoder and train the variational autoencoder to obtain a trained variational autoencoder. The encoder part of the variational autoencoder adopts an LSTM network structure and maintains training differentiability through latent variable sampling. The decoder receives latent variables and generates load and power generation predictions for future time steps.
[0088] The variational autoencoder includes an encoder and a decoder;
[0089] The encoder consists of LSTM layers and fully connected layers. The LSTM layers are stacked with multiple LSTM layers to extract temporal features from the data. The extracted temporal features are input into the fully connected layers and mapped to the mean and variance of the latent space. The latent vector is obtained by sampling from the normal distribution of the latent space using the reparameterization technique.
[0090] The decoder includes an LSTM layer and a fully connected layer. The latent vector is input into the LSTM layer to predict the load and power generation at future time steps, and then the output of the LSTM is mapped to the predicted load and power generation values through the fully connected layer.
[0091] Preferably, the loss function of the variational autoencoder is as follows:
[0092]
[0093] In the formula: ReconstructionLoss represents the reconstruction error; KLDivergence represents the KL divergence;
[0094]
[0095] In the formula: x represents the input data, and z represents the latent vector; This represents the expectation of the conditional probability distribution q(z|x) of the latent variable z; q(z|x) is the conditional probability distribution of the latent variable z given the input x; p(x|z) represents the conditional probability distribution of the data x given the latent variable z.
[0096]
[0097] In the formula: σ 2 represents the variance of the latent space; μ represents the mean of the latent space.
[0098] Preferably, the LSTM layer adopts a multi-scale LSTM structure, including a short-term LSTM model, a medium-term LSTM model, and a long-term LSTM model, wherein the short-term LSTM model is used to process hourly data, the medium-term LSTM model is used to process daily data, and the long-term LSTM model is used to process weekly data.
[0099] For the outputs of the short-term, medium-term, and long-term LSTM models, a weighted average is used to fuse features at different scales, which are then used as the output feature h of the LSTM layer. fused :
[0100] h fused =α hour h hour +α day h day +α week h week ;
[0101] Where: h fused h represents the output features of the LSTM layer. hour h represents the output of the short-term LSTM model. day Indicates the output of the intermediate LSTM model; h week Represents the output of the long-term LSTM model; α hour α day α week Weighting coefficients corresponding to the time scale;
[0102] The weighting coefficients are learned by weighting the features at each time scale using a fully connected layer.
[0103] α = softmax(W) α ·[h hour ,h day ,h week ]+b α );
[0104] In the formula: W α and b α The parameters are learned; the softmax function is used to ensure that the sum of all weight coefficients is 1.
[0105] Step 4: Test the trained variational autoencoder based on the test dataset, and use evaluation metrics to quantify the accuracy of the prediction;
[0106] The evaluation metrics include mean square error, root mean square error, mean absolute error, and coefficient of determination. Using these metrics to evaluate the model is a conventional technique in this field, and therefore will not be elaborated further.
[0107] Step 5: Optimize the variational autoencoder based on the evaluation results, and apply the optimized variational autoencoder to the prediction of load and power generation.
[0108] This invention collects and cleans power load, generation, and meteorological data, and extracts relevant features to ensure high-quality and multi-dimensional input data. The feature standardization process further eliminates scale differences between different features, improving model training stability and prediction accuracy. In the model building phase, an encoder employing an LSTM network structure captures the long-term and short-term dependencies of time-series data and models the data using latent variables in a variational autoencoder, thereby better capturing nonlinear relationships in the power system. Furthermore, the decoder generates load and generation forecasts for future time steps, effectively improving the predictive ability for future uncertainties and complex changes. Finally, the model is evaluated and optimized based on a test dataset, ensuring its accuracy and robustness. This approach better addresses nonlinear changes in power system source-load joint forecasting, significantly improving prediction accuracy and solving the problem that existing methods can only handle linear changes.
[0109] The above are merely preferred embodiments of this application and are not intended to limit this application. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the protection scope of this application.
Claims
1. A power system source-load joint prediction method based on variational autoencoders, characterized in that, Includes the following steps: Step 1: Collect power load data, power generation data, and meteorological data, and clean the collected data to obtain cleaned data; Step 2: Based on the cleaned data, feature extraction is performed, including time features, historical data features, and meteorological features. The extracted features are then standardized to obtain standardized features. The time features include hourly, weekly, monthly, and holiday / holiday characteristics; and a periodic time feature extension is introduced into the time features, that is, a time-differentiated feature is introduced to identify peak demand patterns within a period, calculated as follows: ; In the formula: This indicates the time of peak electricity load over a past period. Indicates the time elapsed since the last peak; Indicates the current time; The historical data features include historical load data and historical power generation data, and the historical load data and historical power generation data are weighted using a lag window: ; In the formula: This represents the load data at time ti; Indicates weight; This represents the weighted historical load data; ; In the formula: This represents the power generation data at time ti; This represents the weighted historical power generation data; The weight calculation formula is as follows: ; In the formula: Indicates the smoothing factor; Indicates the lag step size; This represents the seasonal adjustment factor; Indicates the length of the seasonal cycle; The meteorological characteristics include temperature characteristics, humidity characteristics, wind speed characteristics, and a joint influencing factor constructed from temperature and humidity characteristics, wherein the joint influencing factor is as follows: ; In the formula: , , These are the learned regression coefficients; Indicates temperature; Indicates humidity; Indicates the joint impact factor; Step 3: Use the standardized features as input to the constructed variational autoencoder and train the variational autoencoder to obtain a trained variational autoencoder. The encoder part of the variational autoencoder adopts an LSTM network structure and maintains training differentiability through latent variable sampling. The decoder receives latent variables and generates load and power generation predictions for future time steps. Step 4: Test the trained variational autoencoder based on the test dataset, and use evaluation metrics to quantify the accuracy of the prediction; Step 5: Optimize the variational autoencoder based on the evaluation results, and apply the optimized variational autoencoder to the prediction of load and power generation.
2. The power system source-load joint prediction method based on variational autoencoder according to claim 1, characterized in that, The variational autoencoder includes an encoder and a decoder; The encoder consists of LSTM layers and fully connected layers, where multiple LSTM layers are stacked together to extract temporal features of the data; The extracted temporal features are input into a fully connected layer, which maps them to the mean and variance of the latent space. The latent vector is then sampled from the normal distribution of the latent space using a reparameterization technique. The decoder includes an LSTM layer and a fully connected layer. The latent vector is input into the LSTM layer to predict the load and power generation at future time steps, and then the output of the LSTM is mapped to the predicted load and power generation values through the fully connected layer.
3. The power system source-load joint prediction method based on variational autoencoder according to claim 2, characterized in that, The loss function of the variational autoencoder is as follows: ; In the formula: Indicates reconstruction error; Indicates KL divergence; ; In the formula: x represents the input data, and z represents the latent vector; Represents the conditional probability distribution of the latent variable z. Calculate the expected value; Given an input x, the conditional probability distribution of the latent variable z; This represents the conditional probability distribution of data x given a latent variable z; ; In the formula: Represents the variance of the latent space; This represents the mean of the potential space.
4. The power system source-load joint prediction method based on variational autoencoder according to claim 2, characterized in that, The LSTM layer adopts a multi-scale LSTM structure, including a short-term LSTM model, a medium-term LSTM model, and a long-term LSTM model. The short-term LSTM model is used to process hourly data, the medium-term LSTM model is used to process daily data, and the long-term LSTM model is used to process weekly data. For the outputs of the short-term, medium-term, and long-term LSTM models, a weighted average is used to fuse features at different scales, which are then used as the output features of the LSTM layer. : ; In the formula: This represents the output features of the LSTM layer; This represents the output of the short-term LSTM model; This represents the output of the mid-term LSTM model; This represents the output of a long-term LSTM model; , , Weighting coefficients corresponding to the time scale; The weighting coefficients are learned by weighting the features at each time scale using a fully connected layer. ; In the formula: and The learned parameters; The function is used to ensure that the sum of all weight coefficients is 1.
Citation Information
Patent Citations
Power load probability prediction method and system based on conditional variation auto-encoder
CN114511159A
Short-term power load prediction method based on DDPM and BVAE
CN118646001A