KPI can provide a broad range of useful information to validate the costs of investment, operation, and efficiency of a given solution or proposal. In the SG context, it is common to use KPIs to reflect in a quantitate manner specific aspects or objectives in a project, such as economic viability, environmental impact, reliability, and power quality. In the next subsections, some common indicators related to these goals are summarized.
Economic viability
The economic viability objective can be determined with the help of different indicators depending on the microgrid area to be assessed. For instance, in (Honarmand 2015), 5 secondclass indicators, namely capital cost, replacement cost, maintenance cost, operation/generation cost, and power loss cost, are used to evaluate this objective.

a)
Capital cost: this indicator should reflect the economic feasibility of a system, allowing the selection of microgrid implementations with the lowest capital cost (Yang et al. 2009):
$$ {C}_{acap}={C}_{cap}\bullet CRF\left( iR,{Y}_{proj}\right)={C}_{cap}\bullet \frac{iR\bullet {\left(1+ iR\right)}^{Y_{proj}}}{{\left(1+ iR\right)}^{Y_{proj}}1} $$
(1)
where C_{cap} is the initial capital cost of a component, m.u.; Y_{proj} is the component lifetime, month/year; CRF is the capital recovery factor (i.e., a ratio to represent the value of an annuity); iR is the interest rate which is related to the nominal interest rate and the annual inflation rate.

b)
Replacement cost: This indicator represents the value of all the replacements costs occurring throughout the lifetime of a given project (Yang et al. 2009):
$$ {C}_{arep}={C}_{rep}\bullet SFF\left( iR,{\mathrm{Y}}_{rep}\right)={C}_{rep}\bullet \frac{iR}{{\left(1+ iR\right)}^{Y_{rep}}1} $$
(2)
where C_{rep} is the replacement cost of a component (e.g., a battery or metering), m.u.; Y_{rep} is the component lifetime, month/year; SFF is the sinking fund factor (i.e., a ratio to represent the future value of a series of equal period cash flows); iR is the interest rate.

iii)
Maintenance cost: The system maintenance cost can be fixed as a constant, in m.u., every specified time (i.e., monthly or yearly depending on the duration of the project).

iv)
Operation/generation cost: DGs generation costs are related to fuel consumption and fuel price of DGs that consume coal or gas (e.g., micro gas turbines and diesel engines):
$$ {C}_{ope}=\sum \limits_{t=1}^T\sum \limits_{i=1}^N\left[{K}_{f\left(i,t\right)}\bullet {P}_{DG\left(i,t\right)}+{K}_{o\left(i,t\right)}\bullet {P}_{DG\left(i,t\right)}\right] $$
(3)
where K_{f(i, t)} is the fuel coefficient of ith DG, m.u./kWh; K_{o(i, t)} is the operation coefficient of ith DG, m.u./kWh; and P_{DG(i, t)} is the power generated (in kW) by ith DG at time t.

e)
Power loss cost: Power loss indicators include both active and reactive power loss. Active power loss considers AC and DC components, namely AC transformers, AC distribution lines, DC converters and so on. Reactive power loss only refers to AC components (Honarmand 2015):
$$ \Delta {P}_{active}=\Delta {P}_{AC loss}+\Delta {P}_{DC loss}=\sum \limits_{l=1}^L{I}_l^2R $$
(4)
$$ \Delta {P}_{reactive}=\sum \limits_{l=1}^L{I}^2X $$
(5)
Environmental impact
The objective related to the environmental impact requires indicators that measure greenhouse emissions produced by DGs units.

a)
CO2 emission: in (Honarmand 2015) the following indicator to assess CO2 emission is suggested:
$$ {E}_{ann}=\sum \limits_{t=1}^T\sum \limits_{i=1}^N{K}_i\bullet {M}_i\bullet {P}_{DG\left(i,t\right)} $$
(6)
where K_{i} is the Emission coefficient of ith unit of DG, kg/kWh; and M_{i} represents the Greenhouse gas emission cost, m.u./kg.

b)
CO2 emissions in buildings with external suppliers consideration: when external suppliers are also considered, CO2 emissions (e.g., in buildings) can be modeled as (Soares 2017):
$$ {E}_{ann}=\sum \limits_{t=1}^T\left(\sum \limits_{i=1}^N{P}_{DG\left(i,t\right)}\bullet {K}_i+\sum \limits_{s=1}^S{P}_{sp\left(s,t\right)}\bullet {K}_s\right) $$
(7)
where P_{sp(s, t)} is the power acquired throughout an external supplier s, kW; K_{i} and K_{s} are the CO2 emissions coefficients of DG and external suppliers, kgCO2/kWh.
Reliabilityrelated objectives
Reliability indicators can be categorized into load point reliability and system reliability (Honarmand 2015). Load point indexes cover the following three aspects: i) Frequency of load interruptions (occurrence per year); ii) Average duration of load interruptions (period per occurrence): iii) Average annual duration of load interruptions (hours per year). On the other hand, a list of commonly system indexes includes (Grigsby 2012; Atwa and ElSaadany 2009):

a)
System Average Interruption Frequency Index (SAIFI):
$$ \mathrm{SAIFI}=\frac{\sum {\lambda}_i{N}_i}{\sum {N}_i} $$
(8)

b)
System Average Interruption Duration Index (SAIDI):
$$ \mathrm{SAIDI}=\frac{\sum {U}_i{N}_i}{\sum {N}_i} $$
(9)

iii)
Average Service Availability Index (ASAI):
$$ \mathrm{ASAI}=\frac{T_{total}\bullet \sum {N}_i\sum {U}_i{N}_i}{T_{total}\bullet \sum {N}_i} $$
(10)
where N_{i} is the number of consumers at load point I; λ_{i} represents the failure rate at load point I; U_{i} is the average duration of load interruption at load point I; T_{total} is the number of hours considered for the assessment.
Power quality
Power quality objectives can be measured by three indicators, namely voltage qualified rate (VQ), power supplied from DGs (P_{sup}) and total harmonic distortion (THD) (Hossam et al. 2014).

a)
Voltage Qualified Rate: this indicator is related to the voltage limitations in electricity grids. Voltage deviations can be evaluated at each bus to judge the voltage quality V_{q}%. For each node, the higher value of V_{q}% the better:
$$ {V}_q\%=\frac{\sum_{t=1}^T{T}_{q(t)}}{T} $$
(11)
where ∑T_{q}% is the accumulated time that voltage is qualified, calculated as:
$$ {T}_{q(t)}=\left\{\begin{array}{c}1, if\ Vlower<{V}_{\left(i,t\right)}< Vupper\ \\ {}0\ otherwise\end{array}\right. $$
(12)

b)
Power Supplied from DERs: this indicator reflects the total power generation, i.e. DGs and Energy storage systems:
$$ {P}_{\mathit{\sup}(t)}=\sum \limits_{t=1}^T\sum \limits_{u=1}^{N_{DER}}{P}_{DER\left(u,t\right)} $$
(13)

a)
Total Harmonic Distortion: Harmonic distortions depend on both load levels and system conditions. Harmonic distortion can be defined as (Honarmand 2015):
$$ {V}_{THD}=\frac{\sqrt{\sum_{n2}^{\infty }{V}_n^2}}{V_1} $$
(14)
$$ {I}_{THD}=\frac{\sqrt{\sum_{n2}^{\infty }{I}_n^2}}{I_1} $$
(15)
where V_{n} and I_{n} are the different time voltage and current, respectively.
Related works
The KPI subject has been analyzed in the literature for different scopes, motivating the work presented in this paper. In (Li et al. 2017), different stakeholders are identified for the implementation of multilevel KPIs. The selection of KPIs is made for energy performance. In (Del Pero et al. 2018), the focus is given to energy storage in buildings, testing KPIs in several casestudies. Adding PV to the storage, the work in (Kourkoumpas et al. 2018) performs the life cycle analysis regarding stakeholders’ needs. The building’s perspective is addressed in (Al Dakheel et al. 2020), where KPIs are proposed to evaluate the performance of the building as a smart building.
Looking at the grid perspective, namely in the context of autonomous island grids, the work in (Pramangioulis et al. 2019) focuses on legal KPIs related to barriers for the implementation of smart grids. The overall smart grid economic and environmental evaluation is made in (Moretti et al. 2017), making a seventeen studies review where energy efficiency is included.
In a more general perspective, the work in (Van Gorp 2005) describes a method for the definition of KPIs driven to the success of energy management plans. Finally, in (Giordano et al. 2014), a European expert group defines a set of KPIs for the costbenefit analysis of smart grid projects.
The works mentioned above are mostly focused on KPIs specific for resources (PV and storage, for example), for buildings, for island grids, and for project evaluation. These works lack a simple approach that can be used to any kind of data, with clear identification of the baseline calculation phase. Also, the continuous evaluation of KPIs is an important aspect that deserved exploration in the literature. Finally, in the present paper, these aspects are combined with a case study of an energy community with different types of consumers and PV generation.