• Output Layer

The prediction model in this paper adopts the one-step prediction. Only the load value at the next moment is predicted at a given time. Therefore, after the load time series is projected to the moving point in the phase space, the model must output the position vector of the point in the phase space of the next time. In fact, if the input of the model is *<sup>p</sup><sup>i</sup>* (1 ≤ *i* ≤ *M*) in the phase space reconstruction matrix of Formula (15), only *pi*<sup>+</sup>1+(*m*−1)*<sup>t</sup>* is unknown in position vector *<sup>p</sup>i*+<sup>1</sup> at the next moment. Therefore, the output layer must only output the predicted value of load *<sup>p</sup>*ˆ*i*+1+(*m*−1)*t*. If *<sup>i</sup>* + <sup>1</sup> > *<sup>M</sup>*, the phase space reconstruction matrix of Formula (15) must be extended downward, and *<sup>p</sup>i*+<sup>1</sup> is added as a new line. The expression of *<sup>p</sup>i*+<sup>1</sup> is shown in Formula (16), where *pi*<sup>+</sup>1+(*m*−1)*<sup>t</sup>* is the true value of the newly measured load.

$$p\_{i+1} = \begin{bmatrix} p\_{i+1} & p\_{i+1+t} & \cdots & p\_{i+1+(m-1)t} \end{bmatrix} \tag{16}$$

*<sup>p</sup>i*+<sup>1</sup> is used as the input of the model to obtain the predicted value of *pi*<sup>+</sup>2+(*m*−1)*t*; then, the matrix is augmented, and the predicted value of *pi*<sup>+</sup>3+(*m*−1)*<sup>t</sup>* is obtained, and the process continues until the end of the prediction. The activation function of the output layer is a linear function. The DNN structure is shown in Figure 3.

**Figure 3.** Deep neural network structure.

DNN can be widely used in different areas. In addition to load forecasting, DNN can also solve the problems including image processing, speech recognition, and fault diagnosis. The training method and network structure are basically the same. The difference is the training data. For the prediction of time series load data, the output layer is the actual load data. For the image processing and fault diagnosis, the output layer is the data label. The structure of DNN is basically the same as the traditional ANN, but the training method is improved which make it have better performance.

#### **4. Analysis of Prediction Results**

To verify the validity of the model, the proposed model was validated in MATLAB R2018a. In this paper, the net load data of the upper bus of a city's PV substation in the first 15 days of May 2017 were used. The sampling interval of the net load data is 5 min, and the installed capacity of the distributed PV power station is approximately 50 MW. The data from 1–11 May were selected as the training set to model the prediction model, and the parameters of the model were adjusted by cross-validation. The data from 12–15 May were selected as the samples of the prediction test, where 12 May was sunny, and 13–15 May were cloudy.

#### *4.1. Result of the Phase Space Reconstruction by the C-C Method*

The net load data from 1–11 May were processed by the C-C method. The corresponding statistics of Δ*S*(*t*) and *Scor*(*t*) are shown in Figure 4. The first extremum point of Δ*S*(*t*) was *t* = 7. *Scor*(*t*) had no obvious minimum point, and the optimal embedded window *tω* was not obtained. According to the BDS statistics, when *N* > 3000, *m* ∈ {2, 3, 4, 5}, so the maximum value of *m* could only take 5. According to Formula (6), the final optimal embedding dimension *mopt* = 5 and optimal delay *topt* = 7 were obtained.

**Figure 4.** Curves of Δ*S*(*t*) and *Scor*(*t*). (**a**) Curve of statistic Δ*S*(*t*); (**b**) Curve of statistic *Scor*(*t*).

#### *4.2. Prediction Results of the Deep Neural Network*

Since the embedding dimension is *m* = 5 as determined by the C-C method, there were five input neurons in the DNN. The cross-validation shows that when the number of layers in the hidden layer was 5, the predicted value showed a significant over-fitting. Therefore, the number of layers of the hidden layer was taken as 4, and the neurons of each hidden layer were taken as 5, 4, 3, and 2. The DNN used the single-step prediction and only predicted the next 5 min load value at a time. The predicted result is shown in Figure 5. The black solid line is the actual net load, the red solid line is the ultrashort-term prediction value based on the phase space reconstruction and DNN, and the blue dotted line is the ultrashort-term prediction value based on the traditional BP neural network.

**Figure 5.** Load forecasting results based on different models: (**a**) 12 May; (**b**) 13 May; (**c**) 14 May; (**d**) 15 May.

In Figure 5, at approximately 12:00 noon on a clear day (12th), a negative power was present in the payload due to an increase in the amount of PV power generation. The prediction results based on the phase space reconstruction and DNN were closer to the actual net load value, which was obviously better than the prediction results using the traditional BP neural network.

On cloudy days (13–15 May), when the net load sharply fluctuated due to the fluctuation of the PV output, although the actual net load value was stable, the predicted value of the traditional BP neural network still had large fluctuations, which resulted in a large deviation. However, the prediction results based on the phase space and DNN did not strongly deviate and basically conformed to the actual trend of the net load.

To accurately evaluate the accuracy of the model prediction and the accuracy of prediction, the mean absolute percentage error (MAPE) and root mean square error (RMSE) were used as evaluation indicators. In Formulas (17) and (18), *n* is the number of predicted samples, *pi* is the actual value of the net load at time *i*, and *p*ˆ*<sup>i</sup>* is the predicted value of the net load at time *i*.

$$\text{MAPE} = \frac{1}{n} \sum\_{i=1}^{n} \left| \frac{p\_i - \hat{p}\_i}{p\_i} \right| \times 100\% \tag{17}$$

$$\text{RMSE} = \sqrt{\frac{1}{n} \sum\_{i=1}^{n} \left(p\_i - \not p\_i\right)^2} \tag{18}$$

The prediction accuracy is shown in Table 1. Compared with the prediction model based on the traditional BP neural network, the forecasting scheme proposed in this paper improved the accuracy of net load forecasting under different weather conditions. On a cloudy day (15 May), the power of PV power generation was very small. The accuracy of the prediction model based on the phase space reconstruction and the deep neural network was basically identical to that based on the traditional BP neural network. However, on a sunny day (12 May), the PV power was relatively high, and the difference of MAPE between the two models was nearly 10%. The predictive models based on the phase space reconstruction and DNN still had higher prediction accuracy even in the case of large distributed PV power access and large power fluctuation.


**Table 1.** Prediction accuracy of different models.
