## 4 Results and Discussion  
### Day-Ahead Hourly STLF  
#### 4.1.1 Electrical Demand's Feature Analysis Results  
In this study, the four-years hourly electrical demand of NEPCO between 2016 and 2019 is used to train the deep learning model to predict the day-ahead hourly STLF for the Jordanian power grid, which is shown in Figure 9. It can be observed that, the highest peaks out of all the years happened in 2019, reaching 3380 MW in winter. It is due to the increase in urbanization, growth in population, as well as the rise in penetration of different types of electrical appliances to households, while for the same year, the lowest demand was recorded at 1195 MW in spring.  
Figure 8: Day-ahead deep learning model for demand prediction at hour h.  
The electrical demand is a highly complex time series that is a function of human daily and seasonal behaviors and weather conditions, making it heterogeneous and uncertain. In Figure 10 the weekly variation of the electrical demand is represented by the probability density distribution for different days of the week. An apparent increase in peak demand occurs from Saturday through Wednesday, then declining towards Friday, where Friday and Saturday represent the weekend holidays. As previously shown in Figure 1 the daily demand is also affected by the hour of the day, where the peak demand occurred for that specific day at 6 PM, while the lowest occurred at 4 AM. Hence, time-series features such as an hour of the day, day of the week, as well day of the year carry essential information for the STLF [63]. In Figure 11, and for each quarter of the year (Q1-Q4), where Q1 represents the first three months starting from January, the variation of hourly demand with the change of temperature is shown. Electrical demand peaks at winter (end of Q4-Q1) and summer (end of Q2-Q3) temperatures, as consumers are more likely to use space heating and cooling. On days characterized with thermal comfort between 20 and 30 \({}^{\circ}\)C, the average demand is lower. The curves on top and to the right of the figure show the probability density distribution for demand and temperatures per quarter, where it can be observed that the third quarter depicting two thirds of the summer season, had the highest demands on average.  
Figure 10: Weekly variation electrical demand, 2016–2019.  
Figure 9: Yearly variation in Jordan’s electrical demand.  
Finally, the autocorrelation analysis represents the correlation of the demand at a certain hour to its lagged values shown in Figure 12 indicating which previous hours of the demand hold the highest correlation to be used as predictive features in STLF [21, 58].  
Lagged demands at (\(-1\), \(-24\), \(-168\), \(-48\)) hours showed the highest correlation, respectively, representing the demand at the same hour in the previous two days in the current week and the same day in the prior week. Table 5 illustrates the exogenous features related to demand at the hour to be predicted. The endogenous features related to the demand at previous hours of the week are given in Table 6.  
Figure 11: Demand vs. morning peak load temperatures, 2016–2019.  
Figure 12: Autocorrelation of the electrical time-series signal with previous hours.  
In the above tables, the first three features are assumed to be collected from day-ahead weather predictions at the times of the expected morning, evening, and minimum peak times of the day where the demand is to be predicted. Features 4 to 16 represent the time series features, specifying the hour of the day, day of the week, day of the year, week of the year, and whether the day is a national holiday, the month of Ramadan, or a typical day [28, 63]. The lagged demand features were selected according to the autocorrelation analysis, where [28] considered the previous two days only, which can make a problem when weekends are involved as discussed by [63], hence, the same day and its previous day from the last week were used as inputs to the model.