# Methods for Aggregation and Remuneration of Distributed Energy Resources
## 3 Scheduling Formulation  
In the present section the mathematical formulation is defined, which performs the resource scheduling. In this way, we begin with the objective function presented in Equation (1). For each period t, the operation costs are minimized according to the resource availability. Since load shifting considers changes and/or transfers of consumption amongst distinct periods, the optimization is made for all periods at the same time, which increases the methodological complexity and amount of input data. \[ \begin{array}{l}MinOC=\\ \sum\limits_{p=1}^{P}P_{(p,t)}^{DG}\cdot C_{(p,t)}^{DG}+\sum\limits_{s=1}^{S}P_ {(s,t)}^{Sup}\cdot C_{(s,t)}^{Sup}\\ +\sum\limits_{c=1}^{C}\left[\begin{array}{c}P_{(c,t)}^{pred}\cdot C_{(c,t)}^ {pred}+P_{(c,t)}^{cut}\cdot C_{(c,t)}^{cut}+P_{(c,t)}^{ens}\cdot C_{(c,t)}^{ ens}\\ -\sum\limits_{d=1}^{T}\left(P_{(c,t,d)}^{shift}+P_{(c,d,t)}^{shift}\right) \cdot C_{(c,d)}^{shift}\\ \forall t\in\{1,\ldots,T\}\end{array}\right]\\ \end{array}  \tag{1}\]  
Equations presented in (2) and (3) are related to the network operation conditions defining the power flows, active and reactive, respectively. \[ \begin{array}{l}P_{(i,t)}^{inj}=\sum\limits_{j=1\
eq i}^{B}V_{(i,t)}\cdot V _{(j,t)}\\ \cdot\left[\begin{array}{c}G_{(i,t)}\cdot\cos\left(\theta_{(i,t)}-\theta_{( i,t)}\right)\\ +B_{(i,j)}\cdot\sin\left(\theta_{(i,t)}-\theta_{(j,t)}\right)\end{array} \right],\,\forall t\in\{1,\ldots,T\}\\ \\ Q_{(i,t)}^{inj}=\sum\limits_{j=1\
eq i}^{B}V_{(i,t)}\cdot V_{(j,t)}\\ \cdot\left[\begin{array}{c}G_{(i,t)}\cdot\sin\left(\theta_{(i,t)}-\theta_{( j,t)}\right)\\ -B_{(i,j)}\cdot\cos\left(\theta_{(i,t)}-\theta_{(j,t)}\right)\end{array} \right],\,\forall t\in\{1,\ldots,T\}\end{array}  \tag{2}\]  
These equations take into account the voltage and respective angle limits, assuring quality in the energy delivery to the consumers--Equation (4). Equation (5) shows how the energy transitions occur in each bus, maintaining the balance of the network. For this, the aggregator can use several \begin{table}
\begin{tabular}{c l l l} \hline \hline  & **Methods** & **Description** & **\#** \\ \hline \multirow{4}{*}{**Aggregation**} & Observation Average & Only one observation of the variables considered & 1 \\  & (individual) & will enter the aggregation algorithm & 1 \\ \cline{2-4}  & N\({}^{\text{s}}\) periods = N\({}^{\text{o}}\) & All observations from the variables considered & 2 \\  & of observations & will enter the aggregation algorithm & \\ \cline{2-4}  & Type & The resources are grouped based on their type & \\  & Type & (domestic, wind, etc.), thus without application & 3 \\  & of K-Means algorithm & & \\ \hline \multirow{4}{*}{**Remeneration**} & Individual Price & The resources in any group are remunerated at & 1 \\  & their cost considered in the scheduling & & 1 \\ \cline{2-4}  & Max. Price in Group & The resources in each group are remunerated & 2 \\  & based on the highest price in that group & & \\ \cline{2-4}  & Price average in & The resources in each group are remunerated & \\ \cline{2-4}  & group & based on the average price in that group & 3 \\ \cline{2-4}  & Type & The resources in any group are remunerated & \\ \cline{2-4}  & Type & according to their type, as in the third & 4 \\ \cline{2-4}  & aggregation method & & \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Considerations for the application of the aggregation and remuneration methods. available resources, such as DR and distributed generators. The equations in (6) reflect the operation conditions of the distributed generators, regarding active and reactive components. The same applies to the equations presented in (7), in relation to the external suppliers. \[