A Method and Application for Probabilistic Forecasting of Household Electrical Loads
A hybrid offline-online learning approach using a sparse Gaussian process regression model and neural network addresses the challenge of predicting household power consumption uncertainty, ensuring accurate and efficient predictions by adapting to real-time usage patterns.
Patent Information
- Application Number
- CN202211632256.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-19
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-12-19
Smart Images

Figure CN115775051B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of household load forecasting, and more specifically, relates to a method and application for probabilistic forecasting of household electrical loads. Background Art
[0002] As one of the largest artificial systems in our modern society, the power system has become increasingly complex and uncertain on both the generation side and the demand side. The large-scale use of clean and renewable energy has brought more challenges to its effective penetration. In addition, the ratio of the peak value to the average value of modern electrical load demands has increased, resulting in increased costs for power generation, transmission, and distribution systems, and even endangering the stable operation of the power system. One of the ways to address these challenges is demand-side response. By encouraging and helping end-users to adjust their electricity consumption according to changing electricity prices and the operating conditions of the system, demand-side response promotes user interaction and response, bringing convenience to the safe, economic, and stable operation of the power system. In order to effectively design and implement demand-side response programs, household load forecasting is a key analytical task. In addition, accurate forecasting of household electrical loads helps to better perform load scheduling and the operation of energy storage systems, making the management of distribution networks more effective, and improving economic efficiency, component life, and system reliability. Therefore, it is of practical significance to study a method for probabilistic forecasting of household electrical loads.
[0003] With the development and application of artificial intelligence technology, a large number of artificial intelligence methods have been applied in the field of household load forecasting; however, the electricity consumption behavior of residents has a certain timeliness, and most existing technologies can only train prediction models offline based on historical data and cannot capture the changing electricity consumption habits of residents from real-time data. Therefore, on the basis of considering the time correlation of residents' electricity consumption behavior, how to fully characterize and learn the uncertainty of household load data is a difficult problem. Summary of the Invention
[0004] In view of the above deficiencies or improvement requirements of the prior art, the present invention provides a method and application for probabilistic forecasting of household electrical loads to solve the technical problem that it is difficult to accurately forecast household loads in the prior art.
[0005] To achieve the above object, in a first aspect, the present invention provides a method for probabilistic forecasting of household electrical loads, including the following steps:
[0006] S1. After preprocessing the load feature vector at the current moment t to be predicted, input it into a neural network model for non-linear mapping to obtain the mapping feature at moment t; wherein, the load feature vector at moment t includes: the household electrical load values within the T time periods before moment t and the calendar variables at the moment t to be predicted.
[0007] S2. Input the mapping features at time t into the sparse Gaussian process regression model to probabilistically predict the household electrical load at time t, obtaining the predicted mean and predicted variance of the household electrical load at time t;
[0008] Among them, the above neural network model and sparse Gaussian process regression model are trained through online learning, specifically: after predicting the predicted mean and predicted variance of the household electrical load at each time, collect the true load value at this time, and based on the mapping features at this time, as well as the predicted mean and predicted variance of the household electrical load at this time, online update the parameters of the sparse Gaussian process regression model. At the same time, by minimizing the difference between the true load value and the predicted mean at this time, online update the parameters in the neural network model;
[0009] The above neural network model is initialized through offline learning before online learning, specifically including: after preprocessing the load feature vectors at each historical time in the training dataset, input them into the load prediction model, and update the parameters in the load prediction model by minimizing the difference between the load prediction values at each historical time output by the load prediction model and the corresponding actual load values; among them, the load prediction model includes the above cascaded neural network model and fully connected layer.
[0010] Further preferably, the above neural network model is a soft spiking neural network; among them, the output of the l-th layer neuron of the soft spiking neural network at time t is:
[0011]
[0012] Among them, is the internal state of the l-th layer neuron of the soft spiking neural network at time t; W l is the weight parameter of the l-th layer of the soft spiking neural network; is the output of the (l - 1)-th layer neuron of the soft spiking neural network at time t; d l is the membrane potential decay amount of the l-th layer neuron of the soft spiking neural network; is the internal state of the l-th layer neuron of the soft spiking neural network at time t - 1; is the output of the l-th layer neuron of the soft spiking neural network at time t - 1; b l is the spike threshold of the l-th layer neuron of the soft spiking neural network; g(·) is the hyperbolic tangent activation function, and h(·) is the linear activation function; ⊙ represents the Hadamard product.
[0013] Further preferably, after predicting the predicted mean and predicted variance of the household power load at each moment, an online spatio-temporal learning algorithm is used to update the parameters in the neural network model online to minimize the difference between the true load value and the predicted mean at this moment.
[0014] Further preferably, after predicting the predicted mean and predicted variance of the household power load at each moment, based on the mapping features at this moment, as well as the predicted mean and predicted variance of the household power load at this moment, an online Bayesian learning algorithm is used to update the parameters of the sparse Gaussian process regression model online.
[0015] Further preferably, the load feature vector at time t is:
[0016] X t =[y t-T ,y t-T+1 ,…,y t-1 ,d,h,m]
[0017] where y t-1 is the household power load value at time t - 1; d, h, m are calendar variables, d is the day of the week corresponding to time t; h is the hour of the day corresponding to time t; m is the minute of the hour corresponding to time t.
[0018] Further preferably, the method for preprocessing the load feature vector includes: performing one-hot encoding on the calendar variables in the load feature vector; performing normalization processing on the load feature vector.
[0019] In a second aspect, the present invention provides a household power load probability prediction system, including: a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it executes the household power load probability prediction method provided in the first aspect of the present invention.
[0020] In a third aspect, the present invention provides a load scheduling method for a power system, including:
[0021] At each moment, the household power load probability prediction method provided in the first aspect of the present invention is used to obtain the predicted mean of the power loads of different households in the power system, aggregate the predicted means of the power loads of different households to obtain the total load prediction value of the microgrid, and perform optimal load scheduling of the microgrid based on this total load prediction value.
[0022] Fourthly, the present invention also provides a computer-readable storage medium, which includes a stored computer program. When the computer program is run by a processor, the device where the storage medium is located is controlled to execute the household power load probability prediction method provided in the first aspect of the present invention and / or the load scheduling method of the power system provided in the third aspect of the present invention.
[0023] Generally speaking, through the above technical solutions conceived by the present invention, the following beneficial effects can be achieved:
[0024] 1. The present invention provides a household power load probability prediction method. Considering the time correlation of household load data, a neural network model is used to model the time series; aiming at the strong uncertainty of household load, a sparse Gaussian process regression model is used to characterize the uncertainty; in addition, during the model training process, an offline-online dual-mode learning method is constructed. The initial performance of the neural network model is guaranteed through offline learning, and the posterior distribution in the sparse Gaussian process regression model and the parameters in the neural network model are updated in real time through online learning, enhancing the accuracy and adaptability of the neural network model and the sparse Gaussian process regression model, and fully utilizing real-time data to learn the uncertainty of residents' electricity consumption behavior; the present invention fully considers the time correlation and uncertainty of household load. During the prediction process, the load feature vector is input into the neural network model for time series modeling, and then the output feature is input into the sparse Gaussian process regression model to obtain the final prediction result, which can dynamically capture the change trend of household power load and accurately and efficiently predict household load.
[0025] 2. The household power load probability prediction method provided by the present invention considers the time correlation of household load data and uses a soft pulse neural network to perform time series modeling on the input load feature vector. The soft pulse neural network includes a feedforward structure and an internal state unit, with a small number of parameters and a simple structure, which can effectively perform time series modeling, has a low computational complexity during training, and can effectively improve the model learning efficiency and reduce the risk of overfitting when processing a large amount of household load data, further improving the accuracy of model training.
[0026] 3. The household power load probability prediction method provided by the present invention uses a sparse Gaussian process regression model to perform inferential learning on the high-level and abstract feature vectors output by the soft pulse neural network, with both low computational complexity and storage requirements, suitable for online scenario applications, and iteratively updated using online data under the Bayesian theory framework, which can minimize the information loss caused by sparsification, gradually construct an effective posterior distribution to capture residents' real-time electricity consumption behavior, and obtain the predicted probability density function of household load to characterize its uncertainty.
[0027] 4. The household power load probability prediction method provided by the present invention adopts an online spatio-temporal learning algorithm, uses real-time household load data to update the parameters in the neural network model online, improves the accuracy and adaptability of the neural network representation, and also avoids the need for massive data and high computing resources in traditional training methods, achieving learning of massive household load data streams at a relatively low computational cost. Additionally, compared with other online training algorithms for neural networks, the online spatio-temporal learning is highly compatible with the architectures and types of recurrent neural networks, thus avoiding the limitations of neural network design.
[0028] 5. After the offline training is completed, the household power load probability prediction method provided by the present invention behaves as an online algorithm. Its computing time grows linearly with the increase in data volume, and its storage capacity remains constant with the increase in data volume. Therefore, the household power load probability prediction method provided by the present invention can separately model and predict the massive electric energy consumption data of each residence on the premise of fully considering the characteristics of household load data. The training and prediction processes can be automatically executed, without the need to store massive real-time data, without human intervention and repeated training, and the prediction results can play a beneficial guiding role for residents or various participants in the power market. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 is a flowchart of the household power load probability prediction method provided by the present invention;
[0030] Figure 2 is the annual load curve of a certain user in the Ausgrid Resident dataset provided by an embodiment of the present invention;
[0031] Figure 3 is the annual load curve of a certain user in the UMass Smart Home dataset provided by an embodiment of the present invention;
[0032] Figure 4 is the error convergence curve of the offline learning provided by an embodiment of the present invention;
[0033] Figure 5 is a comparison graph of the prediction interval and the real load on the test data of four users in the Ausgrid Resident dataset of the present invention;
[0034] Figure 6 is a comparison graph of the prediction interval and the real load on the test data of four scenarios in the UMass Smart Home dataset of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0035] To make the objectives, technical solutions and advantages of the present invention more clear and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention. In addition, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0036] To achieve the above objectives, in a first aspect, the present invention provides a method for predicting the probability of household electrical loads, as Figure 1 shown, including:
[0037] Training stage:
[0038] The training stage of the model in the present invention includes offline learning and online learning.
[0039] 1) Offline learning:
[0040] Before online learning, the neural network model is initialized by offline learning to ensure the initial performance of the neural network model; specifically including: after preprocessing the load feature vectors at each historical moment in the training dataset, inputting them into the load prediction model, and updating the parameters in the load prediction model by minimizing the difference between the load prediction values at each historical moment output by the load prediction model and the corresponding actual load values; among them, the load prediction model includes the above-mentioned cascaded neural network model and fully connected layer.
[0041] The fully connected layer is used to linearly project the feature vector output by the neural network model into a single-dimensional prediction value (deterministic prediction), and its calculation method is:
[0042]
[0043] Among them, represents the parameter of the linear projection, represents the output vector of the neural network model at time t, represents the output prediction value of the fully connected layer at time t.
[0044] Calculate the prediction loss based on the prediction value and the true value. For M pairs of prediction values and true values y t , calculate the mean square error loss E:
[0045]
[0046] In an alternative embodiment, the above model parameters are updated by gradient descent, and the calculation method is:
[0047]
[0048] Among them, θ represents the parameters of the neural network model and the fully connected layer, including W l , b l , and η represents the learning rate.
[0049] Repeat the above gradient descent update steps until the loss function converges to complete offline learning. Considering the temporal correlation of data, the data is not shuffled and independently input into the soft pulse neural network. Instead, a batch of samples is input into the model in chronological order.
[0050] 2) Online learning:
[0051] Considering that there is a certain inertia in household electricity consumption habits in a short period of time and will not change much, the present invention trains the neural network model and the sparse Gaussian process regression model through online learning, further enhancing the accuracy and adaptability of the neural network model and the sparse Gaussian process regression model; specifically including: after predicting the predicted mean and predicted variance of the household electricity load at each moment t, collecting the true load value at this moment t, and based on the mapping features at this moment t, as well as the predicted mean and predicted variance of the household electricity load at this moment t, online update the parameters of the sparse Gaussian process regression model. At the same time, by minimizing the difference between the true load value and the predicted mean at this moment, online update the parameters in the neural network model;
[0052] It should be noted that after predicting the predicted mean and predicted variance of the household electricity load at each moment, based on the mapping features at this moment, as well as the predicted mean and predicted variance of the household electricity load at this moment, methods such as online Bayesian learning algorithm and variational inference can be used to online update the parameters of the sparse Gaussian process regression model.
[0053] Preferably, the online Bayesian learning algorithm is used to online update the parameters of the sparse Gaussian process regression model, specifically including:
[0054] (1) To avoid the infinite expansion of the basis vector set (BV set) and affect the computational efficiency during online deployment, first determine whether to add φ t to the BV set (sparsification). The evaluation criterion is whether the change υ of the posterior mean caused by sparsification exceeds a predetermined upper limit For φ t , calculate υ t as follows:
[0055]
[0056]
[0057] Among them, The inverse matrix of the covariance matrix (Gram matrix) K t-1 . The element in the i-th row and j-th column of the Gram matrix K t-1 is the value obtained by substituting the i-th and j-th basis vectors in the BV set at time t - 1 into the initial kernel k0
[0058] (2) If υ t is greater than The following update (expansion update) is performed on the parameters of the posterior function:
[0059] α t = ψ(α t-1 ) + q t s t
[0060]
[0061] s t = ψ(C t-1 k t-1 (φ t )) + e t
[0062]
[0063] In the formula, the symbol ψ represents expanding an additional dimension by padding with zeros.
[0064] At this time, φ t is added to the BV set.
[0065] Otherwise, the following update (soft update) is performed:
[0066]
[0067]
[0068]
[0069]
[0070]
[0071] At this time, φ t is not added to the BV set.
[0072] (3) For There is the following recursive update formula:
[0073]
[0074] (4) If an expansion update is performed, the number of vectors n in the updated BV set may exceed a preset threshold. At this time, the extra basis vectors are deleted by the following method:
[0075] 1) For all basis vectors in the BV set Calculate the score υ of the basis vector according to the calculation formula of υ t ; of the basis vector i ;
[0076] 2) Delete the basis vector with the smallest υ according to the following formula: i where (-i) represents that the i-th element of the vector is deleted, and (-i,·) and (·,-i) represent that the i-th row and the i-th column of the matrix are deleted.
[0077]
[0078]
[0079]
[0080]
[0081] Furthermore, it should be noted that after predicting the predicted mean and predicted variance of the household power load at each moment, online spatio-temporal learning algorithms such as the time forward propagation algorithm and the E-Prop algorithm are used to update the parameters in the neural network model to minimize the difference between the true load value and the predicted mean at that moment.
[0082] Preferably, an online spatio-temporal learning algorithm is used to update the parameters in the neural network model. By approximating the complex update gradient as the product of the time component and the space component, the computer gradient calculation is transformed into solving matrix multiplication, which greatly improves the update efficiency of the deep recurrent neural network. Among them, the derivative of the loss function with respect to each layer of parameter θ l can be approximated as:
[0083]
[0084] where represents the time component in the gradient, and is obtained by calculating the eligibility trace of each parameter θ in the neural network model during the process of predicting the predicted mean and predicted variance of the household power load at the prediction moment t; is called the learning signal and represents the space component in the gradient. For a κ-layer soft pulse neural network, the learning signal of any layer can be obtained by the following formula:
[0085]
[0086]
[0087] Among them, represents the learning signal received by the outer soft pulse neural network. For the inner network, the learning signal can be recursively solved as shown in the formula.
[0088] Finally, update the parameters of the soft pulse neural network:
[0089]
[0090] Among them, represents the learning rate.
[0091] Online application stage:
[0092] S1. After preprocessing the load feature vector X t at the current prediction time t, input it into the neural network model for non-linear mapping to obtain the mapped feature φ t at time t; among them, the load feature vector at time t includes: the household power load value within the T time period before time t and the calendar variable at the prediction time t.
[0093] Specifically, the load feature vector at time t is:
[0094] X t = [y t-T , y t-T+1 , …, y t-1 , d, h, m]
[0095] Among them, y t-1 is the household power load value at time t - 1; d, h, m are calendar variables, where d is the day of the week corresponding to time t, with a value range of 1 to 7; h is the hour of the day corresponding to time t, with a value range of 1 to 24; m is the minute of the hour corresponding to time t, with a value range of 1 to 60.
[0096] It should be noted that the above neural network model can adopt a long short-term memory artificial neural network or a gated recurrent unit artificial neural network to perform time series modeling on the load feature vector. The present invention preferably uses a soft pulse neural network. Compared with the units of an artificial neuron network, the biomimetic structure of the units of the soft pulse neural network is more biologically realistic for modeling human neurons, has a simpler architecture, and higher representation ability and computational efficiency. Specifically, the output of the l-th layer neuron of the soft pulse neural network at time t is
[0097]
[0098] Among them, is the internal state of the l-th layer neuron in the soft spiking neural network at time t; W l is the weight parameter of the l-th layer of the soft spiking neural network; is the output of the (l - 1)-th layer neuron in the soft spiking neural network at time t; d l is the membrane potential decay of the l-th layer neuron in the soft spiking neural network; is the internal state of the l-th layer neuron in the soft spiking neural network at time t - 1; is the output of the l-th layer neuron in the soft spiking neural network at time t - 1; b l is the spike threshold of the l-th layer neuron in the soft spiking neural network; g(·) is the hyperbolic tangent activation function, and h(·) is the linear activation function; ⊙ represents the Hadamard product.
[0099] For subsequent online spatio-temporal learning, it is necessary to calculate the eligibility trace of each parameter θ of the neural network model at this stage
[0100]
[0101]
[0102]
[0103]
[0104]
[0105]
[0106]
[0107] Among them, and respectively represent the eligibility trace and eligibility tensor of the l-th layer network parameter W; diag converts a vector into a diagonal matrix.
[0108] S2. Input the mapping features at time t into the sparse Gaussian process regression model to probabilistically predict the household electrical load at time t, obtaining the predicted mean and predicted variance of the household electrical load at time t;
[0109] Specifically, it includes:
[0110] Define the base kernel k0 and initialize the parameters C0, α0;
[0111] For time t, there is the following Gaussian posterior:
[0112]
[0113]
[0114] For and δ in the above formula, there are:
[0115]
[0116]
[0117] Among them, represents the amplitude of the white noise added to the covariance function.
[0118] For time t, substituting φ t the probability prediction result at this moment can be obtained Among them:
[0119]
[0120]
[0121] N represents the normal distribution, and represent the predicted mean and the predicted variance respectively.
[0122] Furthermore, in an alternative embodiment, a method for preprocessing the load feature vector includes: performing one-hot encoding on the calendar variables in the load feature vector; performing normalization processing on the load feature vector.
[0123] For example, performing one-hot encoding on the calendar variables in the load feature vector at time t to form an extended input feature vector. One-hot encoding is the representation of a categorical variable as a binary vector. This first requires mapping the categorical values to integer values, and then each integer value is represented as a binary vector, with the integer index marked as 1 and the rest marked as 0. Using D, H, M to represent the one-hot encoding vectors of d, h, m respectively, then there are:
[0124] X t = [y t-T , y t-T+1 , …, y t-1 , D, H, M]
[0125] At this time, D is a 7-dimensional vector, H is a 24-dimensional vector, and the dimension of M depends on the data resolution.
[0126] There are various ways of normalization processing, which can be linear function normalization, Z-score normalization, etc.; in this embodiment, the Z-score normalization method is adopted, specifically:
[0127]
[0128] Among them, μ and σ represent the mean and variance of each dimension of the training data respectively.
[0129] To further illustrate the household power load probability prediction method provided by the present invention, the present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0130] Taking the Ausgrid Resident dataset in Australia and the UMass Smart Home dataset in the United States as examples, the prediction model of the present invention is described in terms of operation and the effects are demonstrated. The Ausgrid Resident dataset records the smart meter data of 300 residential consumers in the Australian distribution network for 3 years starting from 2011 at a half-hour resolution. Here, we selected the electricity consumption data of 4 households in 2013 for experimental verification, and the data volume of each user is 17,520. The UMass Smart Home dataset records the electricity consumption data of each electricity meter of 7 households from 2014 to 2016. Due to the incompleteness of the data, we created 4 research scenarios based on this dataset for experimental verification. The detailed information is shown in Table 1. The single-scenario load curves of the two datasets are as Figure 2 and Figure 3 shown.
[0131] Table 1 Scenario construction information of the UMass Smart Home dataset
[0132]
[0133] The neural network model in this embodiment is a soft pulse neural network (soft spiking neural network).
[0134] The steps of the embodiment are as follows:
[0135] Implementation step 1: Offline training is performed on the deterministic prediction model based on the soft pulse neural network and the fully connected layer (FCN). Set H of the one-hot encoded load feature vector in step one to 12, and set the prediction target to the data read at the next time step, that is, predict the electricity meter reading half an hour later half an hour in advance. Set the first 80% of the data as training data and the last 20% as test data, and perform Z-score normalization on the training and prediction data. The calculation method is as follows:
[0136]
[0137] Among them, the subscript train represents that only the mean and variance of the training set are used for normalization of the training set and the test set.
[0138] Offline training is carried out using the normalized historical data. The architecture of the soft spiking neural network is set to three layers, with 64 soft spiking neurons in each layer. The activation functions g and h are set to the hyperbolic tangent function and the linear function respectively. The input dimension of the fully connected layer is set to 64, and the output dimension is set to 1. The learning rate is set to 0.001, and the number of iterations is set to 50 generations. The final error convergence curve is as Figure 4 shown.
[0139] Implement step 2. Inherit the soft spiking neural network trained offline to perform non-linear projection on the real-time feature vectors, and then input them into the sparse Gaussian process to generate the posterior predictive distribution, completing the single-step prediction.
[0140] Specifically, inherit the soft spiking neural network trained offline, initialize the parameters of all Gaussian processes as one-dimensional 0 vectors, and define the initial base kernel k0 as the Gaussian kernel:
[0141]
[0142] where is the parameter of the Gaussian kernel.
[0143] Create the initial feature vector Calculate the vector after non-linear mapping of the soft spiking neural network At the same time, calculate the eligibility trace of the parameters of each layer
[0144] Substitute into the sparse Gaussian process regression model to obtain the prediction result at time t0:
[0145]
[0146]
[0147] When the true load at time t0 is collected, implement step 3, and start to update the posterior function of the sparse Gaussian process using Bayesian online learning. For calculate Compare and If is greater than perform the above expansion update operation, otherwise perform the above soft update operation. Judge whether the number of basis vectors n in the BV set at this time exceeds the upper bound If it exceeds, perform the above operation of deleting the basis vector with the smallest i υ.
[0148] Implement step 4, and start the online spatio-temporal learning to update the soft spiking neural network. Calculate the learning signal of each layer and update the parameters of each layer in the soft spiking neural network.
[0149] The prediction and update for the first time period t0 are completed. From the start of the training set to the end of the test set, steps 2 - 4 are repeated for the data in each time period until the predicted values for all moments in the test phase are obtained.
[0150] The prediction effect of the present invention for a total of eight users in two data sets is as Figure 5 and Figure 6 shown, where three confidence intervals (ConfidenceLevel, CL) including 99%, 90% and 80% prediction intervals are presented therein. The illustration shows that the present invention can obtain effective prediction intervals to characterize the household load with high uncertainty.
[0151] To verify the performance of the present invention, three classical models are selected as comparison models: Gaussian Process (GP), Long Short - Term Memory Deep Network (LSTM), Least Absolute Shrinkage and Selection Operator (LASSO); two error metrics are selected to quantify the prediction performance: Root Mean Square Error (RMSE), Mean Absolute Error (MAE). The prediction performances of the present invention and the comparison algorithms for a total of eight users in two data sets are shown in Tables 2 and 3 as follows:
[0152] Table 2 Ausgrid Resident data set
[0153]
[0154] Table 3 UMass Smart Home data set
[0155]
[0156] Generally speaking, the prediction performance of the present invention is better than that of the three comparison models. Next, the performance improvement effects of offline learning and online learning on the present invention are verified. Two new comparison models are constructed, named Model 1 and Model 2 here. For Model 1, the offline learning phase is not executed. For Model 2, online learning is no longer executed on the test set. Therefore, Model 1 and Model 2 are the pure online and pure offline versions of the present invention. With the same experimental settings, the experimental results are shown in Tables 4 and 5.
[0157] Table 4 Ausgrid Resident data set
[0158]
[0159] Table 5 UMass Smart Home data set
[0160]
[0161] Tables 4 and 5 respectively verified the effects of offline learning and online learning on two datasets. The performance of the present invention on a total of 8 users in the two datasets is better than that of Model 1 and Model 2, verifying that both offline learning and online learning can further improve the accuracy of the model.
[0162] In summary, the present invention proposes a method for probabilistic prediction of household load considering offline learning and online learning. First, the artificially constructed feature vectors are input into a deep soft impulse neural network for time series modeling, and then the output features are input into a sparse Gaussian process for Bayesian inference to generate a posterior probability prediction function. For the update of the soft impulse neural network and the Gaussian process, the present invention constructs an offline-online dual-mode learning method: the soft impulse neural network is offline trained using gradient descent technology, and the posterior distribution and the parameters of the soft impulse neural network are updated in real time using online Bayesian learning and online spatio-temporal learning. This method ensures the initial performance of the model through offline learning, enhances the accuracy and adaptability of the model through online learning, can dynamically capture the changing consumption behavior patterns, and accurately and efficiently generates the probabilistic prediction values of household load, which has guiding significance for the research on time series prediction with high randomness.
[0163] In a second aspect, the present invention provides a system for probabilistic prediction of household electrical load, including: a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it executes the method for probabilistic prediction of household electrical load provided in the first aspect of the present invention.
[0164] The related technical solutions are the same as the method for probabilistic prediction of household electrical load provided in the first aspect of the present invention, and will not be elaborated here.
[0165] In a third aspect, the present invention provides a method for load scheduling of a power system, including:
[0166] At each moment, the method for probabilistic prediction of household electrical load provided in the first aspect of the present invention is used to obtain the predicted mean values of the electrical loads of different households in the power system, and the predicted mean values of the electrical loads of different households are aggregated to obtain the predicted value of the total load of the microgrid. Then, based on the predicted value of the total electrical load of the obtained microgrid, an objective function is constructed based on objects such as generation cost, network loss, and carbon emissions. Under the constraints of ensuring the safe and stable operation of the microgrid, methods such as linear programming, heuristic optimization, and reinforcement learning are used to solve the optimal load scheduling strategy, and then the obtained optimal load scheduling strategy is sent to the microgrid to execute the load scheduling of the microgrid.
[0167] The related technical solutions are the same as the method for probabilistic prediction of household electrical load provided in the first aspect of the present invention, and will not be elaborated here.
[0168] Fourthly, the present invention further provides a computer-readable storage medium, which includes a stored computer program. When the computer program is run by a processor, it controls the device where the storage medium is located to execute the household power load probability prediction method provided in the first aspect of the present invention and / or the load scheduling method of the power system provided in the third aspect of the present invention.
[0169] Those skilled in the art can easily understand that the above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for predicting the probability of household electrical load, characterized in that, It includes the following steps: S1. After preprocessing the load feature vector at the current moment t to be predicted, input it into the neural network model for non-linear mapping to obtain the mapped feature at moment t; the load feature vector at moment t includes: the household power load values within the T time period before moment t and the calendar variables at the moment t to be predicted; S2. Input the mapped feature at moment t into the sparse Gaussian process regression model, so as to perform probability prediction on the household power load at moment t, and obtain the predicted mean and predicted variance of the household power load at moment t; Among them, the neural network model and the sparse Gaussian process regression model are trained by means of online learning, specifically: after predicting the predicted mean and predicted variance of the household power load at each moment, collect the true load value at this moment, and based on the mapped feature at this moment, as well as the predicted mean and predicted variance of the household power load at this moment, perform online update on the parameters of the sparse Gaussian process regression model. At the same time, by minimizing the difference between the true load value and the predicted mean at this moment, perform online update on the parameters in the neural network model; The neural network model is initialized by means of offline learning before online learning, specifically including: after preprocessing the load feature vectors at each historical moment in the training dataset, input them into the load prediction model, and by minimizing the difference between the load prediction values at each historical moment output by the load prediction model and the corresponding actual load values, update the parameters in the load prediction model; the load prediction model includes the cascaded neural network model and the fully connected layer.
2. The household power load probability prediction method according to claim 1, characterized in that The neural network model is a soft spiking neural network; the output of the l-th layer neuron of the soft spiking neural network at time t is: Among them, is the internal state of the l-th layer neuron of the soft spiking neural network at time t; W l is the weight parameter of the l-th layer of the soft spiking neural network; is the output of the (l - 1)-th layer neuron of the soft spiking neural network at time t; d l is the membrane potential decay of the l-th layer neuron of the soft spiking neural network; is the internal state of the l-th layer neuron of the soft spiking neural network at time t - 1; is the output of the l-th layer neuron of the soft spiking neural network at time t - 1; b l is the spike threshold of the l-th layer neuron of the soft spiking neural network; g(·) is the hyperbolic tangent activation function, and h(·) is the linear activation function; ⊙ represents the Hadamard product.
3. The method for predicting the probability of household electrical load according to claim 1, wherein After predicting the predicted mean and predicted variance of the household power load at each moment, adopt the online spatio-temporal learning algorithm to perform online update on the parameters in the neural network model to minimize the difference between the true load value and the predicted mean at this moment.
4. The method for predicting the probability of household electrical load according to claim 1, wherein, After predicting the predicted mean and predicted variance of the household power load at each moment, based on the mapped feature at this moment, as well as the predicted mean and predicted variance of the household power load at this moment, adopt the online Bayesian learning algorithm to perform online update on the parameters of the sparse Gaussian process regression model.
5. The method for predicting the probability of household electrical load according to any one of claims 1-4, characterized in that, The load feature vector at moment t is: X t = [y t-T , y t-T+1 , …, y t-1 , d, h, m] where y t-1 is the household electricity load value at time t-1; d, h, m are calendar variables, d is the day of the week corresponding to time t; h is the hour of the day corresponding to time t; m is the minute of the hour corresponding to time t.
6. The method for predicting the probability of household electrical loads according to any one of claims 1-4, characterized in that, The method for preprocessing the load feature vector includes: performing one-hot encoding on the calendar variables in the load feature vector; performing normalization processing on the load feature vector.
7. A household electrical load probability prediction system, characterized in that, It includes: A memory and a processor, the memory stores a computer program, and when the processor executes the computer program, it executes the method for probabilistic prediction of household power load according to any one of claims 1-6.
8. A load scheduling method for a power system, characterized in that, It includes: At each moment, the mean value of the power load prediction of different households in the power system is obtained by using the household power load probability prediction method described in any one of claims 1-6, the total load prediction value of the microgrid is obtained by aggregating the mean values of the power load predictions of different households, and the optimal load scheduling of the microgrid is carried out based on the total load prediction value.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium includes a stored computer program, wherein when the computer program is run by a processor, it controls the device where the storage medium is located to execute the household power load probability prediction method described in any one of claims 1-6 and / or the load scheduling method of the power system described in claim 8.
Citation Information
Patent Citations
ForecastNet-based short-term power load interval prediction method
CN113822471A
Method for Forecasting Demand Load of Hybrid Electric Ship By Means of Working Condition Classification
US20220097809A1