## 3 Context and Background Information
### Regulation for Self-Consumption and Small-Production  
In Portugal, the current legislation for self-consumption of energy is defined by the Decree-law 162/2019 of 25 October 2019.  
Presently, one or more self-consumption units are defined as UPACs (the term we refer to in this paper). UPACs are divided into individual (the final consumer who produces renewable energy for own consumption) and collective (renewable energy communities where at least two UPACs are organized for collective production and consumption). There is another modality in Portugal besides UPACs, which is called UPP (a unit of small production). UPPs are regulated by the Decree-Law 76/2019 of 3 June 2019. All the electric power produced by a UPP is injected in the Public Service Electric Grid (RESP), at a pre-established feed-in tariff.  
Compared to UPPs, UPACs are units of production that can either be off-grid or grid-connected, and the energy produced is mainly for self-consumption and only the surplus can be sold to the grid.  
\begin{table}
\begin{tabular}{l c c c} \hline \hline
**Period** & **Single-Rate** & **2-TOU** & **3-TOU** \\ \hline Off-peak & & 0.0982 \(\upxi\) & 0.0982 \(\upxi\) \\ Half-peak & 0.1629 \(\upxi\) & 0.1894 \(\upxi\) & 0.1716 \(\upxi\) \\ Peak & & 0.2153 \(\upxi\) \\ \hline \hline \end{tabular}
\end{table}
Table 2: Active energy prices, in Euros per kWh, according to each tariff and billing period as of 2018.  
Figure 1: Daily variation of active energy rates per kWh according to the available tariffs as of 2018.  
Regarding Madeira Island, despite the National decree-law, since 2014, only new UPACs are allowed, and only in full self-consumption mode, i.e., any excess generation must be curtailed.  
However, since 30 June 2020, the regional directorate of economy and transports (DRETT) have adopted new procedures associated with the SC of RES in the Madeira Autonomous Region (RAM), by the Order 12/2020/DRETT (Order 12/2020/DRETT (Portuguese only), [[https://joram.madeira.gov.pt/joram/2](https://joram.madeira.gov.pt/joram/2) serie/Ano%20 de%202020/IISerie-124-2020-06-30.pdf]([https://joram.madeira.gov.pt/joram/2](https://joram.madeira.gov.pt/joram/2) serie/Ano%20 de%202020/IISerie-124-2020-06-30.pdf)). This order adapts the National Decree-Law 162/2019 of 25 October 2019 to RAM and describes the procedures associated with SC of RES.  
The key aspects of the new local regulation are:  
1. If previously allowed by DRETT and the DSO, a UPAC can now sell the production surplus. The feed-in tariff is calculated on a monthly basis, and is given by: \(T_{feed\_in}(m)=E_{PV\_Grid}(m)\times OMIE(m)\times 0.9\). \(E_{PV\_Grid}(m)\) is the energy supplied to the grid in month \(m\) (in kWh), \(OMIE(m)\) is the average daily price of the closing prices of the Iberian Energy Operator Market (OMIE) during the month \(m\) (in Euros per kWh) and 0.9 is a calibration factor.
2. If the surplus production of a particular UPAC leads to the violation of the grid's operational limits or the quality indicators in place, the DSO can reduce the power or temporarily disconnect the production facility without, in any case, a right for monetary compensation.  
As of this writing, the feed-in tariff for August 2020 is set to 0.041 Euro/kWh (OMIE price values of August 2020, [[https://www.omie.es/pt/market-results/monthly/average-final-prices/prices-spanishmarket?scope=monthly&year=2020&month=8](https://www.omie.es/pt/market-results/monthly/average-final-prices/prices-spanishmarket?scope=monthly&year=2020&month=8)]([https://www.omie.es/pt/market-results/monthly/average-final-prices/prices-spanishmarket?scope=monthly&year=2020&month=8](https://www.omie.es/pt/market-results/monthly/average-final-prices/prices-spanishmarket?scope=monthly&year=2020&month=8))), which is about four times less than the flat-rate buying price. Therefore, since this is a negligible value and considering that not all the UPACs will be allowed this option, we consider a zero feed-in tariff in this work.