## 3 Our Proposed Work
### Forecast Module  
By evaluating load variations over several months, or between two consecutive days, or between consecutive hours over a day, [16] concluded that SG's load time series signal exhibits strong volatility and randomness. This result is obvious, because different users have different energy/power consumption patterns/habits. Thus, in terms of DLF, realization of an SG is more difficult as compared to its realization in terms of long-term load forecast. Therefore, the basic requirement of the forecast module is to forecast the load time series of an SG by taking into consideration its non-linear characteristics. In this regard, ANNs are widely used for two reasons; accurate forecast ability and the ability to capture the non-linear characteristics. Due to the aforementioned reasons, we choose an ANN-based implementation in our forecast module. Initially, the forecast module receives selected features \(SF(. )\) and then constructs training \"\(TS\)\" and validation samples \"\(VS\)\" from it as follows:  
\[TS=SF(i,j),\ \ \ \forall i\in\{2,3,\ldots,m\} \tag{8}\] \[and\ \ \ \forall j\in\{1,2,3,\ldots,n\}\]  
\[VS=SF(1,j),\ \ \ \forall j\in\{1,2,3,\ldots,n\} \tag{9}\]  
From Equations (8) and (9), it is clear that the ANN is trained by all of the historical load time series candidates, except the last one, which is used for validation purpose. This discussion leads us towards the explanation of the training mechanism. However, prior to the explanation, it is essential to describe the ANN. An ANN, inspired by the nervous system of humans, is a set of artificial neurons (ANs) to perform the tasks of interest (note: our task of interest is the DLF of SGs). Usually, an AN performs a non-linear mapping from \(\mathds{R}^{I}\) to \([0,1]\) that depends on the activation function used. \[f_{act}^{AN}:\ \mathds{R}^{I}\ \rightarrow\ [0,1] \tag{10}\]  
where \(I\) is the vector of the input signal to the AN (here, inputs are the selected features only). Figure 4 illustrates the structure of an AN that receives \(I=(I_{1},I_{2},\ldots,I_{n})\). In order to either deplete or strengthen the input signal, to each \(I_{i}\) is associated a weight \(w_{i}\). The ANN computes \(I\) and uses \(f_{act}^{AN}\) to compute the output signal \"\(y\)\". However, the strength of \(y\) is also influenced by a bias value (threshold) \"\(b\)\". Therefore, we can compute \(I\) as follows:  
\[I=\sum_{i=1}^{i_{max}}I_{i}\ w_{i} \tag{11}\]  
The \(f_{act}^{AN}\) receives \(I\) and \(b\) to determine \(y\). Generally, \(f_{act}^{AN}\)'s are mappings that monotonically increase (\(f_{act}^{AN}(-\infty=0)\) and \(f_{act}^{AN}(+\infty=1)\)). Among the typically used \(f_{act}^{AN}\)'s, we use sigmoid \(f_{act}^{AN}\). \[f_{act}^{AN}(I,b)=\frac{1}{1+e^{-\alpha(I-b)}} \tag{12}\]  
We choose sigmoid \(f_{act}^{AN}\) due for two reasons; \(f_{act}^{AN}\in(0,1)\), and the parameter \(\alpha\) has the ability to control the steepness of the \(f_{act}^{AN}\). In other words, the sigmoid \(f_{act}^{AN}\) choice enables the AN to capture the non-linear characteristic of load time series. Since this work aims at the DLF for SGs, and one day consists of \(24\) h, the ANN consists of \(24\) forecasters (one AN for an hour), where each forecaster predicts the load of one hour of the next day. In other words, \(24\) hourly load time series are separately modelledinstead of one complex forecaster. The whole process is repeated every day to forecast the load of the next day. The question that now needs to be answered is how to determine \(w_{i}\) and \(b\)? The answer is straight forward, _i.e._, via learning. In our case, prior knowledge of load-time series exists. Thereby, we use supervised learning; adjusting \(w_{i}\) and \(b\) values until a certain termination criterion is satisfied. The basic objective of supervised training is to adjust \(w_{i}\) and \(b\) such that the error signal \"\(e(k)\)\" between the target value \"\(\hat{y}(k)\)\" and real output of neuron \"\(y(k)\)\" is minimized. \[