## 2 Developed Methodology
### Proposed IPIF Model  
Let us suppose any electric power system's energy demand (\(y\)), no matter its size, can be expressed through the combination of an unknown function (\(f\)) and a set of input parameters (\(x\)), as in Equation (3),  
\[y=f(x). \tag{3}\]  
Because it is difficult to obtain the energy demand's analytical expression (\(f\)), the purpose is to use the most accurate PPF presented in the previous section, so an approximation of the real system can be analyzed. Therefore, the system's energy demand approach is mathematically expressed as,  
\[y=q(x;\beta^{*})+\delta. \tag{4}\]  
where \((\delta)\) refers to the deviation between the actual value and the IPIF's predicted value and \((\beta^{*})\) represent the PPF's set of real system parameters, which will be optimized during the training step \((\hat{\beta})\). Thus, the PPF model is described as,  
\[\hat{y}=q\big{(}x;\hat{\beta}\big{)}. \tag{5}\]  
By combining Equations (4) and (5), as well as [PERSON]'s first-order polynomial approximation, deviation \((\delta)\) can be expressed in terms of,  
\[\delta=y-q(x;\beta^{*})\approx y-\hat{y}-\big{(}\beta^{*}-\hat{\beta}\big{)}^ {T}G\big{(}\hat{\beta}\big{)}. \tag{6}\]  
where \(G(\hat{\beta})\) is the gradient of the PPF's function \(q\) and can be described as,  
\[G\big{(}\hat{\beta}\big{)}=\left(\frac{\partial q\big{(}x;\hat{\beta}\big{)}} {\partial\hat{\beta}_{1}},\ \ldots,\ \frac{\partial q\big{(}x;\hat{\beta}\big{)}}{ \partial\hat{\beta}_{L}}\right)^{T} \tag{7}\]  
where \(L\) is the number of \(\beta^{*}\) parameters. In addition, Equation (6) can we reordered as follows,  
\[y-\hat{y}=\delta-\big{(}\hat{\beta}-\beta^{*}\big{)}^{T}G\big{(}\hat{\beta} \big{)}. \tag{8}\]  
As we developed a parametric IPIF, the following assumptions are made: in our statistical analysis, \(y\) and \(\hat{y}\) behave as random variables and \((\delta)\) deviation also behaves as a random variable described through a Normal distribution \(N\big{(}0,\sigma^{2}\big{)}\) and is independent from \((\beta^{*}-\hat{\beta})\). Therefore, Equation (8) can be expressed in root mean square error terms as,  
\[E\big{[}\big{(}y-\hat{y}\big{)}^{2}\big{]}=E\Big{[}\delta^{2}\big{]}+\big{(}G \big{(}\hat{\beta}\big{)}\big{)}^{T}E\Big{[}\big{(}\hat{\beta}-\beta^{*}\big{)} \big{(}\hat{\beta}-\beta^{*}\big{)}^{T}\Big{]}G\big{(}\hat{\beta}\big{)}. \tag{9}\]  
where \(E\) denotes the expectation, that can also be mathematically expressed as,  
\[E\Big{[}\big{(}\hat{\beta}-\beta^{*}\big{)}^{T}\big{(}\hat{\beta}-\beta^{*} \big{)}\Big{]}=\sigma^{2}\big{[}\mathrm{J}\big{(}\hat{\beta}\big{)}^{T} \mathrm{J}\big{(}\hat{\beta}\big{)}\Big{]}^{-1}, \tag{10}\]  
\(\mathrm{J}_{FxL}\big{(}\hat{\beta}\big{)}\) is the Jacobian matrix where \(F>L\) condition must be fulfilled. While \(L\) is the number of \(\beta^{*}\) parameters, \(F\) is a set of the training database used to fit PPF model. Combining Equations (9) and (10) yields,  
\[ \begin{split} E\Big{[}\big{(}y-\hat{y}\big{)}^{2}\Big{]}=E\big{[} \delta^{2}\big{]}+\big{(}G\big{(}\hat{\beta}\big{)}\big{)}^{T}E\Big{[}\big{(} \hat{\beta}-\beta^{*}\big{)}\big{(}\hat{\beta}-\beta^{*}\big{)}^{T}\Big{]}G \big{(}\hat{\beta}\big{)}\ =\\ \sigma^{2}\bigg{(}1+\big{(}G\big{(}\hat{\beta}\big{)}\big{)}^{T} \Big{[}\mathrm{J}\big{(}\hat{\beta}\big{)}\Big{]}^{-1}G\big{(}\hat{\beta} \big{)}\bigg{)}=\mathrm{s}^{2}\bigg{(}1+\big{(}G\big{(}\hat{\beta}\big{)}^{T} \big{[}\mathrm{J}\big{(}\hat{\beta}\big{)}^{T}\big{(}\hat{\beta}\big{)}\Big{]}^ {-1}G\big{(}\hat{\beta}\big{)}\bigg{)}.\end{split}  \tag{11}\]  
where \(\mathrm{s}^{2}\) is the unbiased estimator of \(\sigma^{2}\) and its value is computed as,  
\[\mathrm{s}^{2}=\frac{1}{F-L}\sum_{i=1}^{F}\big{(}y_{i}-q\big{(}x_{i};\hat{ \beta}\big{)}\big{)}^{2} \tag{12}\]  
It must be kept in mind that the \(\mathrm{s}^{2}\) estimator only can be properly calculated if the \(F>L\) condition is satisfied.