Short-Term Multiple Load Forecasting Model of Regional Integrated Energy System Based on QWGRU-MTL

In order to improve the accuracy of the multiple load forecasting of a regional integrated energy system, a short-term multiple load forecasting model based on the quantum weighted GRU and multi-task learning framework is proposed in this paper. Firstly, correlation analysis is carried out using a maximum information coefficient to select the input of the model. Then, a multi-task learning architecture is constructed based on the quantum weighted GRU neural network, and the coupling information among multiple loads is learned through the sharing layer in order to improve the prediction accuracy of multiple loads. Finally, the PSO algorithm is used to optimize the parameters of the quantum weighted GRU. The simulation data of a regional integrated energy system in northern China are used to predict the power and cooling loads on summer weekdays and rest days, and the results show that, compared with the LSTM, GRU and single task learning QWGRU models, the proposed model is more effective in the multiple load forecasting of a regional integrated energy system.


Introduction
In recent years, energy consumption has increased continuously and energy problems have become increasingly prominent [1]. The traditional single energy system can no longer meet the development of today's economy and society, and the integrated energy system (IES) is in the ascendant. The regional integrated energy system (RIES) refers to the integrated energy system in a region, which integrates cooling, heating, electrical and gas energy. Its planning and dispatching considers the coupling of multiple energy sources, resulting in a higher energy utilization and a more flexible and reliable system operation [2]. The load forecasting of RIES is the basis of system operation and dispatching. Scientific and accurate forecasting is the premise of the safe and stable operation of RIES, so its necessity is self-evident. Obviously, the load forecasting of RIES cannot be limited to a single load, unlike the traditional power system. Cooling, heating, electrical and other multiple loads must be considered as a whole [3]. However, the multi-load in RIES has strong volatility and randomness, which puts forward higher requirements for load forecasting [4].
The neural network has been widely used in the field of load forecasting. The quantum neural network, as a new computing model combining quantum computation theory and the neural network model, has a better information processing ability and generalization ability and has been applied in the field of load forecasting. A load forecasting model of a double-layer quantum BP neural network is proposed in literature [5]. Combining the feature selection and quantum BP neural network, a short-term load forecasting model of the power system is constructed in the literature [6]. The above literature did not consider the combination of deep quantum neural networks and did not discuss the conversion formulas for the input of the model from a real state to a quantum state in depth [7].
Compared with traditional power load forecasting, the multiple load forecasting of RIES is still in its infancy. A stacked auto-encode extreme learning machine is used

Correlation Analysis Method of Load and Influencing Factors
Multiple energy sources in RIES interact with each other through energy conversion equipment, and there are strong correlations between multiple loads [16]. At the same time, weather and other factors also have a greater impact on the loads. In order to adequately analyze the degree of interaction between multiple loads and the correlation between loads and weather factors, and to effectively select the input of the short-term multiple load forecasting model, a correlation analysis between multiple loads and weather factors is required. The Pearson method is mostly used in correlation analyses, but it is mainly used to analyze the correlation between linear variables, and performs poorly on nonlinear variables [17]. The maximum information coefficient (MIC) is a correlation analysis method based on mutual information. It is applicable to both linear and non-linear data, and the abnormal values in the data will not affect its analysis results [18]. Therefore, MIC is suitable for analyzing the non-linear relationship between the multi-load of RIES and influencing factors in this paper.
For a group of two-dimensional variables (X, Y), m and n intervals are divided in their respective directions, and then the two-dimensional variables form a grid of m × n on the plane. For the two-dimensional variables sample dataset D, the MIC formulas are as follows [19]: M(D) m,n = I * (D, m, n) log 2 min{m, n} In the formulas, I * (D, m, n) is the maximum mutual information of two-dimensional variables for data set D, N is the number of samples and B(N) is a function of the sample  [20]. MIC(X, Y) takes the value in [0, 1], and the closer the value of MIC(X, Y) is to 1, the stronger the correlation between the two variables.
The data of the electrical load, cooling load and weather factors (temperature, solar radiation and humidity) in a RIES of a business office in the north of China in summer are used in this paper. Based on the above maximum information coefficient theory, the correlation between multiple loads and the relevance between loads and influencing factors in summer is analyzed. The results are shown in Table 1. E, C, T, F and HSL in the table represent the electrical load, cooling load, temperature, solar radiation and humidity, respectively. The results show that the MIC value between the electrical load and cooling load in summer is close to 1, which proves that there is a strong correlation between multiple loads of RIES that cannot be ignored in load forecasting. At the same time, the solar radiation, temperature and humidity also have a certain degree of influence on multiple loads, which should be taken into account in load forecasting.

QWGRU-MTL Load Forecasting Model
The quantum neural network has a stronger generalization capability and information processing ability, whereas multi-task learning can effectively learn the coupling information of the input. Combining the advantages of both, a QWGRU-MTL multiple load forecasting model is constructed in this paper.

GRU Neural Network Model
LSTM and GRU appear successively in order to deal with the long-term dependence problem that the simple recurrent neural network cannot solve. GRU is an improvement of LSTM and contains two gates: a reset gate and update gate. The update gate controls whether to retain the state of the previous moment and how much to retain. The reset gate can determine whether to combine the current state with the previous information. Its forward propagation formulas are as follows [21]: where: r t is the reset gate, z t is the update gate and h t is the output of the hidden layer. W r and U r are weights of the reset gate, W z and U z are weights of the update gate and W and U are weights of candidate hidden state. tanh is the hyperbolic tangent function, represents the Hadamard product of two matrices and σ is the sigmoid function. The structure of GRU is shown in Figure 1. where: t r is the reset gate, t z is the update gate and t h is the output of the hidden layer. r W and r U are weights of the reset gate, z W and z U are weights of the update gate and W and U are weights of candidate hidden state. tanh is the hyperbolic tangent function,  represents the Hadamard product of two matrices and σ is the sigmoid function. The structure of GRU is shown in Figure 1.

Quantum Weighted Neuron
In the quantum computing system, a quantum state can be represented as follows [7]: where a and b are the probability amplitudes of a quantum state, are a pair of complex numbers and satisfy the normalization conditions, and is the Dirac symbol, Quantum weighted neurons simulate the transmission of transmitters between cells through four parts: weighting, aggregating, activating and stimulating. Figure 2 shows a diagram of the quantum weighted neuron model.

Quantum Weighted Neuron
In the quantum computing system, a quantum state can be represented as follows [7]: where a and b are the probability amplitudes of a quantum state, are a pair of complex numbers and satisfy the normalization conditions, and | is the Dirac symbol, Quantum weighted neurons simulate the transmission of transmitters between cells through four parts: weighting, aggregating, activating and stimulating. Figure 2 shows a diagram of the quantum weighted neuron model.
where: t r is the reset gate, t z is the update gate and t h is the output of the hidden layer. r W and r U are weights of the reset gate, z W and z U are weights of the update gate and W and U are weights of candidate hidden state. tanh is the hyperbolic tangent function,  represents the Hadamard product of two matrices and σ is the sigmoid function. The structure of GRU is shown in Figure 1.

Quantum Weighted Neuron
In the quantum computing system, a quantum state can be represented as follows [7]: where a and b are the probability amplitudes of a quantum state, are a pair of complex numbers and satisfy the normalization conditions, and is the Dirac symbol, Quantum weighted neurons simulate the transmission of transmitters between cells through four parts: weighting, aggregating, activating and stimulating. Figure 2 shows a diagram of the quantum weighted neuron model.
is the input of a neuron, y is the output of a neuron and F performs the internal product operation in this model. In the diagram, |φ i is the weight of x i , |ϕ is the active value, ∑ is the aggregation operator, F is the activation function and f is the excitation function. The input-output relationship of the quantum weighted neurons is [22]: x m ] T is the input of a neuron, y is the output of a neuron and F performs the internal product operation in this model. |φ i = [cos α i , sin α i ] T is the weight quantum state and α i is its phase, and |φ = [|φ 1 , |φ 2 , · · · , |φ m ] T is the activity value quantum state and β is its phase. |φ = [|φ 1 , |φ 2 , · · · , |φ m ] T is the weighted quantum state vector. Thus, the input-output relationship of n quantum-weighted neurons is [15]: . . .

Quantum Weighted GRU Model
The above quantum weighted neurons are introduced into the input, reset gate, update gate and hidden layer states of the GRU model to form the QWGRU neural network model. Compared with the classical GRU, the introduction of quantum weighted neurons makes it have the superposition property of quantum states, and makes the network simulate the information processing mechanism of the biological nervous system more sufficiently. Each weight and activity value of the network will participate in the process of network optimization so that it can obtain a stronger information processing and optimization ability. At the same time, the real input and output form of the classical neural network is retained, which avoids the errors caused by the mutual conversion of the real state and quantum state. The forward propagation formulas of the QWGRU neural network with m − s − n structure are as follows: where j = 1, 2, . . . , s. φ wr is the weight quantum state constituting the weight matrix W r and ϕ wr is the active quantum state constituting the weight matrix W r . α wr is the phase of the φ wr and β wr is the phase of ϕ wr . Similarly, φ ur , φ wz , φ uz , φ w , φ u are weight quantum states of weight matrices and ϕ ur , ϕ wz , ϕ uz , ϕ w , ϕ u are quantum states of activity values, and α ur , α wz , α uz , α w , α u , β ur , β wz , β uz , β w , β u are their phase angles. The QWGRU model is shown in Figure 3.

Multi-Task Learning
Multi-task learning is an inductive transfer mechanism in the field of machine learning, with the main goal of improving the generalization ability of models [23]. The multitask learning framework enables the simultaneous learning of multiple related tasks, each of which can share and complement the learning content through the sharing layer, thus enabling each task to learn input information better. In the feature sharing mechanism of

Multi-Task Learning
Multi-task learning is an inductive transfer mechanism in the field of machine learning, with the main goal of improving the generalization ability of models [23]. The multi-task learning framework enables the simultaneous learning of multiple related tasks, each of which can share and complement the learning content through the sharing layer, thus enabling each task to learn input information better. In the feature sharing mechanism of multi-task learning, there are two ways: hard sharing and soft sharing. In the soft sharing mechanism, each task has its own model parameters, which can partially share the hidden layer, so the information sharing is more flexible. The structure of the hard sharing mechanism is relatively simple, and common features can be obtained by multiple tasks sharing the hidden layer, which is suitable for tasks with a strong coupling [24]. As a result of the strong coupling between multiple loads in RIES, the parameter hard sharing mechanism is adopted in this paper.

QWGRU-MTL Load Forecasting Model
In the traditional multi-task learning model, different tasks are separated only in the output layer, which makes it difficult to effectively learn their own unique characteristics. The multi-task learning model built in this paper deals with this problem. The QWGRU-MTL model built in this paper consists of an input layer, sharing layer, branch layer and output layer, and its structure is shown in Figure 4. The sharing layer is composed of several QWGRU neurons that are combined by recurrent structures. There are two branches in the branch layer, Tower A and Tower B, each of which is composed of several quantum weighted neurons described in Section 3.2. Based on Equation (12), the output of the tasks is derived as follows: where k = 1, 2, . . . , q, T A and T B are the outputs of Tower A and Tower B, respectively and y A t and y B t are outputs of task A and task B, respectively. Refer to Sections 3.2 and 3.3 for the meaning of the parameters φ, ϕ, α, β.  In the training and forecasting process of the QWGRU-MTL model, firstly, the multitask data are normalized to form the training set matrix and input it into the input layer of the model. Then, the data enter the sharing layer to learn common characteristics and  In the training and forecasting process of the QWGRU-MTL model, firstly, the multitask data are normalized to form the training set matrix and input it into the input layer of the model. Then, the data enter the sharing layer to learn common characteristics and coupling relations, followed by learning the unique characteristics of each task through the branch layer. Finally, the output of each task is obtained in the output layer. The mean square error function is used as the loss function, and each task firstly seeks its own loss, and then the weighted sum is carried out to obtain the total loss. The PSO algorithm [25] is adopted to optimize α wr , α ur , α wz , α w , α wy , α uz , α u , α w TA , α w TB , α w yA , α w yB , β wr , β wr , β wz , β w , β ur , β uz , β u , β wy , β w TA , β w TB , β w yA , β w yB in order to obtain the parameters with the smallest total loss, which are substituted into the model to realize short-term multiple load forecasting. The multiple load forecasting process is shown in Figure 5.  Figure 5. Flow chart of multiple short-term load forecasting.

Example Simulation
The data set used in this paper includes the cooling load, electrical load and weather factors (temperature, solar radiation and humidity) for 365 days throughout a year, and the sampling step of each type of data is 1 h. The curves of the electrical load and cooling load in a certain period of summer are shown as Figure 6.

Example Simulation
The data set used in this paper includes the cooling load, electrical load and weather factors (temperature, solar radiation and humidity) for 365 days throughout a year, and the sampling step of each type of data is 1 h. The curves of the electrical load and cooling load in a certain period of summer are shown as Figure 6.

Data Processing
Based on the results of the above correlation analysis, the input features are shown in Figure 7, where represents the electrical load at k moment on the day before the forecast date, represents the cooling load at k moment on the day before the forecast date and d k T 、 d k S 、 d k H , respectively, represent the temperature, solar radiation and humidity at k moment on the day before the forecast date, and so on, for each of the symbols.

Data Processing
Based on the results of the above correlation analysis, the input features are shown in Figure 7, where P d−1 k represents the electrical load at k moment on the day before the forecast date, C d−1 k represents the cooling load at k moment on the day before the forecast date and T d k , S d k , H d k , respectively, represent the temperature, solar radiation and humidity at k moment on the day before the forecast date, and so on, for each of the symbols.

Evaluating Indicator
Since this paper studies short-term multiple load forecasting, not only the single task, but also the overall effect of the forecasting model, needs to be analyzed; the mean absolute percentage error ( mape E ), mean accuracy (MA) and weighted mean accuracy (WMA) Figure 7. Features of the input.

Evaluating Indicator
Since this paper studies short-term multiple load forecasting, not only the single task, but also the overall effect of the forecasting model, needs to be analyzed; the mean absolute percentage error (E mape ), mean accuracy (MA) and weighted mean accuracy (WMA) are selected as evaluation indexes. Their calculation formulas are as follows: where α 1 and α 2 are the weights of the electrical load and cooling load, respectively. According to the data of the summer electrical load and cooling load, the critic weighting method in reference [26] is used to calculate them. The result shows that the weight of the electrical load is 0.54 and the weight of the cooling load is 0.46.

Results and Analysis
In order to verify the validity of the proposed QWGRU-MTL model, the QWGRU-MTL model, GRU model and LSTM model are used to forecast the electrical load and cooling load in summer. In the prediction of the weekday, the training set includes the cooling load, electrical load and weather factors of 19 weekdays, whereas, in the prediction of the rest day, the training set contains the cooling load, electrical load and weather factors of 17 rest days. The particle number of the PSO algorithm is set at 200, the range of speed is [−0.36, 0.707], the range of linear decreasing inertia coefficient is [0.4455, 1.172] and the learning rate c 1 = 1.85, c 2 = 2.15. The prediction effects of the three models are shown in Table 2. It can be seen from the table that the weighted mean accuracy of the prediction results of the QWGRU-MTL model proposed in this paper on the weekday in summer can reach 96.99%, which is 1.42% and 1.00% higher than that of the GRU model and LSTM model, respectively, and the weighted mean accuracy of the prediction results of the QWGRU-MTL model on the rest day in summer is 96.74%, which is 1.52% and 1.05% higher than that of the GRU model and LSTM model, respectively. Focusing solely on the two sub tasks of electricity and cooling, the prediction error of the model proposed in this paper is reduced to a certain extent compared with the other two models. Compared with the GRU and LSTM models, the E mape of the electrical load of the QWGRU-MTL model in the summer weekday is reduced by 1.23% and 0.56%, respectively, the E mape of the cooling load is reduced by 1.65% and 1.39%, respectively, the E mape of the electrical load in the summer rest day is reduced by 1.34% and 1.07%, respectively and the E mape of the cooling load is reduced by 1.72% and 1.02%, respectively. At the same time, the accuracy of the cooling load of the three models is lower than that of the electrical load, because there is a large gap in demand for cooling in different months, so the change law of the cooling load is not as easy to capture as the relatively stable electrical load. Figures 8 and 9 show the forecasting curves of the electrical and cooling loads on a weekday and a rest day in summer. It can be seen from the diagram that the load forecasting curve of QWGRU-MTL proposed in this paper is closer to the actual load curve and that the forecasting effect is better. On the whole, the forecast errors of the three models are large near the peak of multiple loads. This is because there is more extreme weather in summer in the north of China than in other seasons, and the effect of meteorological factors on the peak loads is more obvious, which both makes the fluctuation of peak loads larger and makes it difficult to capture the change law, resulting in large forecast errors of peak loads. mape is reduced by 1.65% and 1.39%, respectively, the mape E of the electrical load in the summer rest day is reduced by 1.34% and 1.07%, respectively and the mape E of the cooling load is reduced by 1.72% and 1.02%, respectively. At the same time, the accuracy of the cooling load of the three models is lower than that of the electrical load, because there is a large gap in demand for cooling in different months, so the change law of the cooling load is not as easy to capture as the relatively stable electrical load. Figures 8 and 9 show the forecasting curves of the electrical and cooling loads on a weekday and a rest day in summer. It can be seen from the diagram that the load forecasting curve of QWGRU-MTL proposed in this paper is closer to the actual load curve and that the forecasting effect is better. On the whole, the forecast errors of the three models are large near the peak of multiple loads. This is because there is more extreme weather in summer in the north of China than in other seasons, and the effect of meteorological factors on the peak loads is more obvious, which both makes the fluctuation of peak loads larger and makes it difficult to capture the change law, resulting in large forecast errors of peak loads.

Electrical load forecasting curve on weekdays
Electrical load forecasting curve on rest days   In order to further analyze the advantages of multi-task learning, the prediction effects of the QWGRU-MTL model in this paper are compared with those of the quantum weighted GRU model using single-task learning (QWGRU-STL). The results of the comparison are shown in Table 3. Compared with single task learning, the multi-task learning model has a higher accuracy in forecasting electrical and cooling loads on the weekday and the rest day. The mean accuracy of the electrical load of QWGRU-MTL in the summer weekday is 1.68% higher than that of QWGRU-STL, and the mean accuracy of the cooling load of QWGRU-MTL is 1.93% higher than that of QWGRU-STL; the mean accuracy of the electrical load of QWGRU-MTL in the summer rest day is 2.72% higher than that of QWGRU-STL, and the mean accuracy of the cooling load of QWGRU-MTL is 2.62% higher than that of QWGRU-STL. This is because the QWGRU-STL model separates the relationship between the electrical load and cooling load. The input data only contain the information of a single load and lacks the coupling information with another load, so the model cannot fully learn effective information. However, the coupling characteristics between multiple loads can be used by QWGRU-MTL to improve the prediction accuracy. Table 3. Comparison of the effects of multi-task learning and single task learning. In order to further analyze the advantages of multi-task learning, the prediction effects of the QWGRU-MTL model in this paper are compared with those of the quantum weighted GRU model using single-task learning (QWGRU-STL). The results of the comparison are shown in Table 3. Compared with single task learning, the multi-task learning model has a higher accuracy in forecasting electrical and cooling loads on the weekday and the rest day. The mean accuracy of the electrical load of QWGRU-MTL in the summer weekday is 1.68% higher than that of QWGRU-STL, and the mean accuracy of the cooling load of QWGRU-MTL is 1.93% higher than that of QWGRU-STL; the mean accuracy of the electrical load of QWGRU-MTL in the summer rest day is 2.72% higher than that of QWGRU-STL, and the mean accuracy of the cooling load of QWGRU-MTL is 2.62% higher than that of QWGRU-STL. This is because the QWGRU-STL model separates the relationship between the electrical load and cooling load. The input data only contain the information of a single load and lacks the coupling information with another load, so the model cannot fully learn effective information. However, the coupling characteristics between multiple loads can be used by QWGRU-MTL to improve the prediction accuracy. In addition, a branch layer has been added into the multi-task learning framework in this paper. The model in this paper is recorded as QWGRU-MTL1, and the quantum weighted GRU multi-task learning model without a branch layer is recorded as QWGRU-MTL2. The prediction effects of the two models are shown in Table 4. As can be seen from Table 4, compared with the QWGRU-MTL2 model without the branch layer, the QWGRU-MTL1 model proposed in this paper improves the accuracy of short-term multiple load forecasting on the weekday in summer by 1.06%, and improves the accuracy of short-term multiple load forecasting on the rest day in summer by 1.73%, indicating that the branch layer plays a certain role in improving the prediction accuracy. Finally, the time required to train the above five models is shown in Table 5. Due to the fact that the particle swarm optimization algorithm needs repeated iterations in the parameter optimization, the model proposed in this paper needs a long training time, but it is still suitable for off-line learning and on-line prediction.

Conclusions
This paper presents a short-term multiple load forecasting model of RIES based on the QWGRU neural network and multi-task learning. After the simulation analysis on summer weekdays and rest days, the following conclusions are drawn: (1) The multiple loads of RIES have a strong coupling, and the correlation between multiple loads and the relevance between loads and weather factors should be considered in the short-term multiple load forecasting; (2) The quantum state superposition characteristics and multi-task learning mechanism of the QWGRU-MTL model can make the model fully learn the effective information in the input sequence and effectively improve the accuracy of multiple load forecasting. The simulation results show that, compared with other models, the proposed model has a higher forecast accuracy.
In the future, the structure of RIES will be more complex and the energy access will be more diverse. How to cope with the strong coupling and fluctuation of multiple loads of RIES in this case is a problem that needs further research in the future.