**3. Ultrashort-Term Load Forecasting Model Based on Phase Space Reconstruction and Deep Neural Network**

The traditional load fluctuation is mainly caused by user fluctuations in power usage. Although the electricity consumption of the user is uncertain, there are certain rules in general, and the fluctuation range is not large. For ultrashort-term prediction, linear extrapolation, time series prediction, and other methods can usually achieve the required accuracy. With the massive access of distributed energy sources such as PV power plants, the net load can be expressed by Formula (14). *pt* is the actual net load, *p* is the user's electricity load, and *p*PV *<sup>t</sup>* is the opposite number of PV power generation.

$$p\_t = p\_t' + p\_t^{\text{PV}}.\tag{14}$$

Since the amount of PV power generation is as uncertain as the power load and different from the traditional power supply with a known power output, the PV power generation can be considered a load, which reduces the dispatching burden of the system. As a result, the uncertainty of load increases, and the range of fluctuation enlarges, even the situation of power reversal will occur at noon on sunny days. If the traditional forecasting method is also used, it will produce larger errors and cannot accurately predict the load.

Since the load is a non-linear time series with large fluctuations after the distributed energy access, it is difficult to directly predict. Therefore, the complex short-term prediction model may not satisfy the real-time requirements. In this paper, the phase space reconstruction is used to project the load time series into a time-varying and short-term regularity point in the high-dimensional phase space. Then, the non-linear fitting ability and fast convergence speed of LMBP DNN are used to fit and predict the locus of the points in the phase space to realize the ultrashort-term prediction of the load considering the distributed energy.

#### *3.1. Modelling Steps of Prediction Model*

For a series of net load time series *<sup>p</sup>* <sup>=</sup> {*p*1, *<sup>p</sup>*<sup>2</sup> ··· *pN*} considering the PV power generation, the modelling, and forecasting steps of ultrashort-term forecasting model based on phase space reconstruction and DNN are as follows:


• Step 3: The load time series are reconstructed according to the embedding dimension *m* and delay *t* obtained in Step 2. The phase space matrix of the reconstructed load time series is as follows. In Formula (15), *M* = *N* − (*m* − 1)*t*.

$$
\begin{bmatrix} p\_1 \\ p\_2 \\ \vdots \\ p\_M \end{bmatrix} = \begin{bmatrix} p\_1 & p\_{1+t} & \cdots & p\_{1+(m-1)t} \\ p\_2 & p\_{2+t} & \cdots & p\_{2+(m-1)t} \\ \vdots & \vdots & \cdots & \vdots \\ p\_M & p\_{M+t} & \cdots & p\_N \end{bmatrix} \tag{15}
$$


**Figure 2.** Forecasting model flow chart.

#### *3.2. Determination of the Structure of Deep Neural Networks*

The determination of the structure of the DNN is a link of the neural network hyper-parameter adjustment. An unreasonable structure can make the prediction results of the DNN seriously deviate. If the training time is too long, the work is half the effort. The specific method of determination is as follows:

• Input layer

If the DNN is directly trained using the original load data, the determination of the number of neurons in the input layer can be very difficult and requires a lot of debugging to obtain the optimal value. Moreover, when the training set data changes, previous optimal values may no longer be applicable, and the structure of the input layer must be re-debugged. In this model, the input data of the DNN is the phase space reconstructed matrix. Therefore, the number of neurons in the input layer is directly determined by the embedding dimension *m* obtained by the C-C method without artificial designation or after debugging to select the optimal value.

• Hidden layer

The number of hidden layers can be heuristically determined. When there are few hidden layers, the model will have an under-fitting and cause a large deviation in the predicted value. Conversely, too many hidden layers can cause a model overfitting. The number of hidden layers can be gradually increased during the trial until the predicted value shows a significant over-fitting. Then, we gradually reduce the number of hidden layers so that the predicted value and true value of the model are as similar as possible on the verification set to determine the optimal number of hidden layers. The number of neurons in each hidden layer can be taken as 75% of the number of neurons in the upper layer but generally more than the number of neurons in the output layer. The activation function of the hidden layer neurons usually uses the tanh function and rectified linear unit (ReLU) function. The tanh function is used in this paper.
