## 5 Experiment Results and Analysis
### Improvement Based on Forecasting Methods  
Since we found that the action delay had a great impact on the power losses, in order to eliminate such impact as much as possible, we tried to adopt some forecasting method to help predict the future data as accurately as possible. Figure 5: The impact of different flexibility values. Figure 6: The impact of datacenter action delays. We used the neural network to forecast the solar generation power on July 14 th and December 19 th. Considering that July 14 th was a sunny day, in order to improve the accuracy of the prediction, we chose data obtained from June 1 st, 14 th, 15 th, 26 th 2018, which were four sunny days, as the training set and the power data of 5 time points were used as a group of historical data to obtain the power data of the next time point for training. Considering that December 19 th was a cloudy day, we chose data obtained from Dec 2 th, 5 th, 7 th, 8 th, 9 th, 10 th, 11 th, 15 th 2018 which were also cloudy/rainy/snowy days as a group of historical data to obtain the power data for the next time point for training. In addition, by adjusting the number of iterations, we obtained the forecasting results of different errors and obtained the loss values of the grid according to different settings of prediction accuracy. In the following experiments, we adopted the framework \"Keras\" based on neural networks to forecast the generation of power. Figure 7 shows that forecasting results under sunny weather conditions, in which Figure 7a shows the comparison of the predicted values and the actual values, and Figure 7b shows the average power losses under three different accuracy settings. It can be observed that leveraging forecasting techniques are helpful to eliminate the negative impact of action delay time. Figure 8 shows the forecasting results under a 10-min action delay of the datacenters, in which the forecasting average error in Figure 8a,c was 5% and 10% respectively. Figure 8b,d show the average power losses under different accuracy settings, including 5%/10% forecasting error, accurate forecasting and without forecasting. From the results in Figures 7 and 8, we can see that improving the forecasting accuracy can effectively reduce the extra power losses. In order to verify the effectiveness of our prediction method, we also carried out the same experiments under cloudy/snowy weather conditions and the results are shown in Figure 9. The forecasting average error in Figure 9a,c is 10% and 15% respectively. Figure 9b,d shows the average power losses under different accuracy settings, including 10%/15% forecasting error, accurate forecasting and without forecasting. Figure 9 also illustrates that although on cloudy/snowy days the data fluctuations make the forecasting difficult and less accurate, we can still see the advantages of leveraging the forecasting techniques to help reduce extra power losses. To sum up, a reasonable forecasting method can eliminate extra losses from the action delay of the datacenters as much as possible, so it is meaningful to adopt an appropriate forecasting method to improve the impact of datacenter reaction on the grid. Figure 7: Forecasting results under 5-min action delay on a sunny day. (**a**) Comparison of the actual generation power and predicted values after 150 iteration times of one day; (**b**) comparison of the average power losses under different forecasting accuracy. In addition, we also examined the relationship between forecasting accuracy and the computation time. In general, in order to get more accurate prediction results, it has to spend more time on the computation process. Figure 10 illustrates the evaluation results for both the sunny and cloudy/rainy/snowy weather conditions under a 10-min action delay. From Figure 10a we can see that nearly-accurate forecasting takes more than twice the time compared to achieving 95% accuracy, while in contrast, to achieve 95% accuracy only takes 3 s more than to achieve 90% accuracy.