# A Multi-Criteria Computer Package-Based Energy Management System for a Grid-Connected AC Nanogrid

^{1}

^{2}

^{*}

## Abstract

**:**

## 1. Introduction

- to smoothen the power exchanged with the utility;(be list format, and add the full bracket)
- to keep the SOC within secure thresholds;
- to apply energy curtailment to the PV power if required (when, for example, power injection into the utility network is not permitted by contract and there is a situation of high PV production, low local load and batteries fully charged);
- to guarantee a safety operation of the hybrid ESS in terms of power rating; and
- to maximize the revenue coming from energy trading with the utility.

- A new multi-criteria approach based on rules or knowledge is included in the EMS for controlling the operation of a NG.
- The hybrid combination of batteries and supercapacitors at the residential level in the considered grid-connected NG is quite interesting for increasing the lifespan of such infrastructure.
- The proposed package can be easily upgraded by including other rules or parameters in a very easy way. This fact is possible due to the powerful algebraic capabilities of Maple.

## 2. Nanogrid (NG) under Study

#### 2.1. NG Modelling

#### 2.1.1. Photovoltaic (PV) Array Model

^{2}and 25 °C and a family of curves that illustrates how the panel curves are modified when those values change. An example of the named main parameters is available in Table 1, which shows the main specifications of module Shell SP150 referred to STC.

_{sh}), series resistance (R

_{s}), the diode factor and the effective cell area. Nevertheless, they are not provided by the manufacturers in the datasheet, so this makes them complex to use.

^{2}) respectively. Open-circuit voltage at any irradiance and temperature conditions (V

_{OC,TW}) are determined in (3):

#### 2.1.2. Battery and Supercapacitor Models

## 3. Residential Nanogrid Energy Management System

_{NET}represents the net power. P

_{PV}and P

_{LOAD}corresponds to the PV power and the power demanded by the household loads respectively. At the same time, P

_{HESS}, P

_{BAT}and P

_{SC}are the injected power by the HESS (total storage system, battery and supercapacitors). Finally, P

_{NG}is the power generated by the residential NG under study. Furthermore, the power demanded from the utility P

_{GRID}is positive when it injects power to the NG.

#### 3.1. Hybrid Energy Storage System (HESS) Strategy and Constraints

_{BAT}(t) and Q

_{BAT}as the battery current (A) and capacity (Ah), respectively. To determine the supercapacitor SOC (i.e., $SO{C}_{SC}$), the following expression is derived (16) [25]:

_{SC}and ${V}_{SC}^{NOM}$ are the supercapacitor voltage and the supercapacitor nominal voltage. The HESS deals with several functionalities. For example, depending on the energy price, the HESS or the utility will release power when P

_{NET}> 0 if possible. The battery and the supercapacitors can also fulfill energy shifting by storing energy in some strategical times. For these kinds of purposes, the SOC is considered as a crucial issue. The ideal situation for any practical NG operation would be to keep the SOC around 50%. To further distinguish a multi-criteria based decision making, five SOC intervals are proposed. The SOC is divided by 4 user-customizable levels, k

_{1}, ..., k

_{4}, which can be different for the battery and for the supercapacitors. Figure 4 represents such different levels and the action to be taken (if possible).

_{4BAT}< SOC

_{BAT}< k

_{3BAT}and P

_{NET}> 0, probably (depending on other factors) the utility will provide power to guarantee the load supply and to charge the battery. Another situation could be that 0 < SOC

_{SC}< k

_{4SC}and k

_{2BAT}< SOC

_{BAT}< k

_{1BAT}, and, depending on other factors to be detailed later, the battery will inject power to the supercapacitors.

_{HESS}that will be delivered or stored by the battery or by the supercapacitor, the following reasons are considered. Batteries are usually devoted to providing the bulk of energy in the long term, presenting a slow dynamic. Meanwhile, supercapacitors are suitable for providing or absorbing the power generation or demand peaks because of its fast response. In this sense, many previous works like [25,26] aim to distinguish between the low-frequency component and the high-frequency component of the power to be delivered/absorbed by the HESS. For this purpose, a conventional low-pass filter (LPF) will be used to extract the low-frequency component, which is LPF(${P}_{NET}$). Then, the power sharing will be as follows (17) and (18):

#### 3.2. NG Net Power Trend

_{BAT}, besides contributing to increase the revenues for the NG users. It is important to note that this parameter will have only influence in the low-frequency component of P

_{HESS}, that is, in the battery power. Calculation of ${P}_{NET}^{T}$ is based on the derivative of P

_{NET}(19):

_{S}is the sample rate (in the considered case of study is one hour).

_{NET}means that P

_{PV}is increased and/or P

_{LOAD}is decreased. Nevertheless, a negative slope is related to an increase in P

_{PV}generation and/or a reduction in P

_{LOAD}. At the same time, ${P}_{NET}^{T}$ values can be classified into several ranges: positive, slightly positive, zero, slightly negative or negative. Thresholds to determine this classification can be user-defined, depending on the power rating. In the NG under study, four thresholds are considered (τ

_{1}, τ

_{2}, τ

_{3}and τ

_{4}) to define five ranges for ${P}_{NET}^{T}$, as shown in Table 2.

_{4}< ${P}_{NET}^{T}$ < τ

_{3}(slightly negative) and k

_{2BAT}< SOC

_{BAT}< k

_{1BAT}(obligatory discharge), and, depending on other factors to be detailed later, the battery will supply the load power instead of the main grid.

#### 3.3. PV Power Regulation

_{BAT}and SOC

_{SC}within healthy limits (for example, if P

_{LOAD}is low and SOC

_{BAT}is high) or for providing ancillary services to the main grid (voltage and frequency regulation). There are several approaches to implement a RPP algorithm in the PV DC/DC power converter. This algorithm calculates the proper duty cycle for the power electronics switches to make the PV array working at any reference working point. In this paper, an algorithm based on the perturb and observe (P&O) method with adaptive step to minimize the power fluctuation is implemented. Details of this method are available in [27].

_{MPP}, P

_{MPP}) is marked. The EMS will generate a reference power for the PV system (${P}_{PV}^{REF}$) depending on a specific situation. As can be seen, there are two feasible points that correspond with ${P}_{PV}^{REF}$ (x and y). The one placed at the right of the MPP will be the desired one for a better operation as V

_{PV}is higher (leading to a reduced duty cycle). For example, if during the NG operation P

_{LOAD}is low and SOC

_{BAT}is high, and at the same time the utility is not available, the EMS will determine the appropriate ${P}_{PV}^{REF}.$

#### 3.4. Energy Price

#### 3.5. Comtrol Rules

_{BAT}and ${P}_{NET}^{T}.$ Each cell is divided into two or four sub-cells. The latter occupy the central part of the table. Within each cell, the sub-cells on the left represent the case of ${P}_{NET}>0$ and those on the right ${P}_{NET}<0$. On the other hand, also within each cell, the top ones correspond to the case of high energy prices and the bottom ones to low energy prices. When a sub-cell contains two lines, it indicates that two actions are executed simultaneously, both with equal power flow. For the cells outside the central box, the SOC is in the limit zone and ${P}_{NET}^{T}$ presents a strong slope. In such a case, the priority will be to redirect the SOC to the central zone in order to assure the battery health. On the other hand, in the cells in the central box, attention will also be paid to the power purchase/sale price in order to get economic benefits. The reading of one of the cells is given below as an example (the one highlighted in yellow):

If (${k}_{3BAT}\ge SO{C}_{BAT}\ge {k}_{4BAT}$-battery discharged) and (${\tau}_{1}\ge {P}_{NET}^{T}\ge {\tau}_{2}$-trends is slightly positive ($more\text{}power\text{}will\text{}be\text{}required\text{}for\text{}{P}_{LOAD})$) and (${P}_{NET}>0$-more power is required for P_{LOAD})) and (price is low) then the load will be supplied by the grid (50%, as the price is low) and by the battery (50%)(as we are not in the state of the battery “strongly discharged”).

## 4. The Associated Rule-Based Expert System (RBES)

#### 4.1. Analysing the Structuring of the Information in the Tables

_{BAT}, P

^{T}

_{NET}, P

_{NET}, price

- SOC
_{BAT}:x_{1}, x_{2}, x_{3}, x_{4}, x_{5} - P
^{T}_{NET}: y_{1}, y_{2}, y_{3}, y_{4}, y_{5} - P
_{NET}: z_{1}, z_{2} - Price: u
_{1}, u_{2}

^{2}× 2

^{2}cells = 100 cells. Nevertheless, the experts in electrical grids have grouped all cells outside the dark black rectangle in pairs (the third variable, z, is not considered for those cells), resulting in double height cells outside the dark black rectangle. One example is the upper left cell:

_{1}and y

_{1}and u

_{1}(despite having z

_{1}or z

_{2})

_{1}or z

_{2}: the same operation mode(s) is(are) recommended).

#### 4.2. Combinatorial Manual Grouping of the Information in the Tables

_{i}must hold (because the intervals considered for P

_{NET}

^{T}are mutually exclusive), the information provided by all the cells containing GRID2BAT in the lower row of Table 6 (all columns but the last three ones) can be summarized as follows:

_{i}must hold. A preferable alternative equivalent way to express it (without the need to include integrity constraints) is:

## 5. About the Inference Engine Chosen

#### 5.1. A Brief Overview of the Algebraic Model for Logic

_{1},X

_{2},…,X

_{m}, the algebraic model considers the polynomial variables x

_{1},x

_{2},…,x

_{m}and the residue-class ring

_{2}[x

_{1},x

_{2},…,x

_{m}]/<x

_{1}

^{2}− x

_{1},x

_{2}

^{2}− x

_{2},…,x

_{m}

^{2}− x

_{m}>

_{1}

^{2}− x

_{1},x

_{2}

^{2}− x

_{2},…,x

_{m}

^{2}− x

_{m}> denotes the ideal generated by x

_{1}

^{2}− x

_{1},x

_{2}

^{2}− x

_{2},…,x

_{m}

^{2}− x

_{m}. If $X\wedge Y$ $X\vee \mathrm{Y}$, $XxorY$ and $\neg X$ are translated by x·y, x + y − x·y, x·y and 1−x, respectively, we have a ring isomorphism (or a Boolean algebra isomorphism, depending on the logic and algebraic operations considered).

- Z
_{n}is considered instead of Z_{2}as the base field, - the ideal <x
_{1}^{2}− x_{1},x_{2}^{2}− x_{2},…,x_{m}^{2}− x_{m}> is substituted by ideal <x_{1}^{n}− x_{1},x_{2}^{n}− x_{2},…,x_{m}^{n}− x_{m}>

_{n}[x

_{1},x

_{2},…,x

_{m}]/ <x

_{1}

^{n}− x

_{1},x

_{2}

^{n}− x

_{2},…,x

_{m}

^{n}− x

_{m}>, and:

- the polynomial translations of the logic connectives do change.

#### 5.2. A Brief Overview of the Algebraic Model for RBES (Boolean Case)

_{2}[x

_{1},x

_{2},…,x

_{m}]/<x

_{1}

^{2}− x

_{1},x

_{2}

^{2}− x

_{2},…,x

_{m}

^{2}− x

_{m}> = Z

_{2}[x

_{1},x

_{2},…,x

_{m}]/I.

- J is the polynomial ideal generated by the polynomial translation of the negation of the rules and integrity constraints, and
- K is the polynomial ideal generated by the polynomial translation of the negation of the given facts,

_{2}[x

_{1},x

_{2},…,x

_{m}]/I)/(J + K)= Z

_{2}[x

_{1},x

_{2},…,x

_{m}]/(I + J + K).

#### 5.3. The Maple Implementation of the Algebraic Model for RBES

## 6. The Energy Management Nanogrid RBES Developed

#### 6.1. Subsystem I

#### 6.2. Subsystem II

_{1}, ...,x

_{5}in Table 6. The variables in the upper part of Table 4 (SOC

_{SC}) are new, and are denoted v

_{1}, ...,v

_{5}, respectively. Each column is divided into two columns, corresponding variables of which (high-price, low-price), were denoted z

_{1}and z

_{2}, respectively, in Table 6.

#### 6.3. Subsystem III

_{1}, ...,x

_{5}in Table 6. Similarly, the variables in the upper part of Table 5 were denoted y

_{1}, ...,y

_{5}in Table 6. Each column is divided into two columns, corresponding variables of which (P

_{NET}positive or negative) will be denoted w

_{1}, w

_{2}, respectively.

## 7. Simulations

_{NET}is represented in Figure 6b. Positive and negative values of P

_{NET}take place along the day. Thus, surplus or deficit must be compensated by the HESS or by the main grid. For simplicity, supposing that the main grid cannot participate (P

_{GRID}= 0), P

_{BAT}is represented in Figure 6c. It corresponds to the filtered value of P

_{NET}. Meanwhile, the supercapacitors will compensate the peak power according to Equation (18) as depicted in Figure 6d. Subsequently, Figure 7a depicts P

_{NET}and its slope is produced by two hourly consecutive samples. These slopes can be positive or negative. At the same time, ${P}_{NET}^{T}$ is displayed in Figure 7b.

_{NET}, just the sign (positive or negative) of this value is required as RBES input. The value of ${P}_{NET}^{T}$ is given a consideration according to Table 2. For our case of study, thresholds equal to 1.5 kW, 0.5 kW, −0.5 kW and −1.5 kW are selected as constants τ

_{1}, τ

_{2}, τ

_{3}and τ

_{4}respectively. Current values of the SOC

_{BAT}and SOC

_{SC}, calculated with Equations (15) and (16), define specific intervals according to Figure 4. These intervals will also feed the RBES back (the facts stated as true at each moment). Regarding the SOC for both the battery and the supercapacitor, the following levels: 80%, 65%, 35% and 20%, were chosen for k

_{1}, k

_{2}, k

_{3}and k

_{4}.

_{BAT}equal to 50% and initial SOC

_{SC}equal to 35%, the control of the NG with the proposed EMS and its associated RBES, clearly improves the performance of the HESS. Figure 8 represents the corresponding SOC before (SOC

_{BAT}and SOC

_{SC}) and after considering the proposed control (SOC´

_{BAT}and SOC´

_{SC}). Before the EMS activation, SOC

_{BAT}reaches almost 100% (around 20:00 p.m.) and falls 10% (around 10 a.m.). The maximum SOC

_{SC}corresponds to 14:30 p.m., with around 65%. On the other hand, at 7:30 a.m. the SOC

_{SC}is around 5%. As we can see in Figure 8, after applying the proposed control, both SOC are maintained close to 50% during the day. Thus, both SOC are kept within secure thresholds, guarantying a safety operation of the HESS.

_{BAT}and P´

_{SC}respectively) the EMS activation are represented in Figure 9a,b. Thanks to the EMS the system has a smoother response which also helps to improve the HESS lifespan.

## 8. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Acknowledgments

## Conflicts of Interest

## Appendix A

## Appendix B. Subsystem I—Construction and Extracting Knowledge

_{2}, z

_{2}, y

_{2}and u

_{1:}

## Appendix C. Subystem I—Simplifying Knowledge Extraction

_{1}$\wedge $u

_{1}$\wedge $(z

_{1}$\vee $z

_{2)}? Let us ask the system:

## Appendix D. Subsystem I—Checking the Correctness of the Rules

## Appendix E. Subsystem II—Extracting Knowledge

## Appendix F. Subsystem III—Extracting Knowledge

## Acronyms

AC | Alternating Current |

B2G, BAT2GRID | Battery to Grid |

B2L, BAT2LOAD | Battery to Load |

B2SC, BAT2SC | Battery to Supercapacitor |

CAS | Computer Algebra System |

DC | Direct Current |

DER | Distributed Energy Resources |

EMS | Energy Management System |

ESS | Energy Storage System |

G2B, GRID2BAT | Grid to Battery |

G2L, GRID2LOAD | Grid to Load |

G2SC, GRID2SC | Grid to Supercapacitor |

GC | Grid-Connected |

HESS | Hybrid Energy Storage System |

LPF | Low-Pass Filter |

MPP | Maximum Power Point |

MG | Microgrid |

MPPT | Maximum Power Point Tracking |

N2B, NET2BAT | Surplus to Battery |

N2G, NET2GRID | Surplus to Grid |

NG | Nanogrid |

P&O | Perturb and Observe |

PV | Photovoltaic |

PCC | Point of Common Coupling |

RBES | Rule Based Expert System |

RPP | Reference Power Point |

RES | Renewable Energy Sources |

RPPT | Reference Power Point Tracking |

SA | Stand-Alone |

STC | Standard Test Conditions |

SOC | State of Charge |

STS | Static Transfer Switch |

## References

- European Commission. 2030 Climate & Energy Framework; European Commission: Brussels, Belgium; Available online: https://ec.europa.eu/clima/policies/strategies/2030_en#tab-0-0 (accessed on 24 November 2020).
- SETIS. Smart Electricity Grids. Available online: https://setis.ec.europa.eu/relatedjrc-activities/jrc-setis-reports/smart-electricity-grids (accessed on 3 April 2019).
- Lee, S.; Jin, H.; Vecchietti, L.F.; Hong, J.; Har, D. Short-Term Predictive Power Management of PV-Powered Nanogrids. IEEE Access
**2020**, 8, 147839–147857. [Google Scholar] [CrossRef] - Sandgani, M.R.; Sirouspour, S. Energy Management in a Network of Grid-Connected Microgrids/Nanogrids Using Compromise Programming. IEEE Trans. Smart Grid
**2018**, 9, 2180–2191. [Google Scholar] [CrossRef] - Ban, M.; Shahidehpour, M.; Yu, J.; Li, Z. A Cyber-Physical Energy Management System for Optimal Sizing and Operation of Networked Nanogrids With Battery Swapping Stations. IEEE Trans. Sustain. Energy
**2019**, 10, 491–502. [Google Scholar] [CrossRef] - Luo, F.; Ranzi, G.; Wang, S.; Dong, Z.Y. Hierarchical Energy Management System for Home Microgrids. IEEE Trans Smart Grid
**2019**, 10, 5536–5546. [Google Scholar] [CrossRef] - Farzaneh, H.; Shokri, M.; Kebriaei, H.; Aminifar, F. Robust Energy Management of Residential Nanogrids via Decentralized Mean Field Control. IEEE Trans. Sustain. Energy
**2020**, 11, 1995–2002. [Google Scholar] [CrossRef] - Salazar, A.; Berzoy, A.; Song, W.; Velni, J.M. Energy Management of Islanded Nanogrids Through Nonlinear Optimization Using Stochastic Dynamic Programming. IEEE Trans. Ind. Appl.
**2020**, 56, 2129–2137. [Google Scholar] [CrossRef] - Lee, S.; Lee, J.; Jung, H.; Cho, J.; Hong, J.; Lee, S.; Har, D. Optimal power management for nanogrids based on technical information of electric appliances. Energy Build.
**2019**, 191, 174–186. [Google Scholar] [CrossRef] - Youssef, T.A.; Hariri, M.E.; Elsayed, A.T.; Mohammed, O.A. A DDS-Based Energy Management Framework for Small Microgrid Operation and Control. IEEE Trans. Ind. Inform.
**2018**, 14, 958–968. [Google Scholar] [CrossRef] - Roncero-Clemente, C.; Gonzalez-Romera, E.; Barrero-González, F.; Milanés-Montero, M.I.; Romero-Cadaval, E. Power-Flow-Based Secondary Control for Autonomous Droop-Controlled AC Nanogrids with Peer-to-Peer Energy Trading. IEEE Access
**2021**, 9, 22339–22350. [Google Scholar] [CrossRef] - Young, B.; Ertugrul, N.; Chew, H.G. Overview of optimal energy management for nanogrids (end-users with renewables and storage). In Proceedings of the 2016 Australasian Universities Power Engineering Conference (AUPEC), Brisbane, Australia, 25–28 September 2016; pp. 1–6. [Google Scholar] [CrossRef]
- Bhosale, R.; Agarwal, V. Fuzzy Logic Control of the Ultracapacitor Interface for Enhanced Transient Response and Voltage Stability of a DC Microgrid. IEEE Trans. Ind. Appl.
**2019**, 55, 712–720. [Google Scholar] [CrossRef] - Barricarte, J.J.; Martín, I.S.; Sanchis, P.; Marroyo, L. Energy management strategies for grid integration of microgrids based on renewable energy sources. In Proceedings of the 10th International Conference on Sustainable Energy Technology, Istambul, Turkey, 4–7 September 2011; pp. 4–7. [Google Scholar]
- Arcos-Aviles, D.; Espinosa, N.; Guinjoan, F.; Marroyo, L.; Sanchis, P. Improved fuzzy controller design for battery energy management in a grid connected microgrid. In Proceedings of the IECON 40th IEEE Annu. IEEE Industrial Electronics Society, Dallas, TX, USA, 29 October 2014; pp. 2128–2133. [Google Scholar]
- Arcos-Aviles, D.; Pascual, J.; Marroyo, L.; Sanchis, P.; Guinjoan, F. Fuzzy Logic-Based Energy Management System Design for Residential Grid-Connected Microgrids. IEEE Trans. Smart Grid
**2018**, 9, 530–543. [Google Scholar] [CrossRef] [Green Version] - Ding, Y.; Wang, Z.; Liu, S.; Wang, X. Energy Management Strategy of PV Grid-Connected Household Nano-Grid System. In Proceedings of the 2019 IEEE Power & Energy Society General Meeting (PESGM), Atlanta, GA, USA, 4–8 August 2019; pp. 1–5. [Google Scholar] [CrossRef]
- Ghiani, E.; Garau, M.; Celli, G.; Pilo, F.; Marongiu, G. Smart integration and aggregation of nanogrids: Benefits for users and DSO. In Proceedings of the 2017 IEEE Manchester PowerTech, Manchester, UK, 18–22 June 2017; pp. 1–6. [Google Scholar] [CrossRef]
- Latifi, M.; Rastegarnia, A.; Khalili, A.; Bazzi, W.M.; Sanei, S. A Self-Governed Online Energy Management and Trading for Smart Micro/Nano-Grids. IEEE Trans. Ind. Electron.
**2020**, 67, 7484–7498. [Google Scholar] [CrossRef] [Green Version] - Caldognetto, T.; Mion, E.; Bruschetta, M.; Simmini, F.; Carli, R.; Tenti, P. A Model Predictive Approach for Energy Management in Smart Buildings. In Proceedings of the 2019 21st European Conference on Power Electronics and Applications (EPE ’19 ECCE Europe), Genova, Italy, 3–5 September 2019; pp. P.1–P.10. [Google Scholar] [CrossRef]
- Roncero-Clemente, C.; González-Romera, E.; Romero-Cadaval, E.; Milanés-Montero, M.I.; Miñambres-Marcos, V. PSCAD/EMTDC model for photovoltaic modules with MPPT based on manufacturer specifications. In Proceedings of the 2013 International Conference-Workshop Compatibility and Power Electronics, Ljubljana, Slovenia, 5–7 June 2013; pp. 69–74. [Google Scholar] [CrossRef]
- Tremblay, O.; Dessaint, L.; Dekkiche, A. A Generic Battery Model for the Dynamic Simulation of Hybrid Electric Vehicles. In Proceedings of the 2007 IEEE Vehicle Power and Propulsion Conference, Arlington, TX, USA, 9–12 September 2007; pp. 284–289. [Google Scholar] [CrossRef]
- Miniguano, H.; Barrado, A.; Fernández, C.; Zumel, P.; Lázaro, A. A General Parameter Identification Procedure Used for the Comparative Study of Supercapacitors Models. Energies
**2019**, 12, 1776. [Google Scholar] [CrossRef] [Green Version] - Kong, S.N.; Chin-Sien, M.; Yi-Ping, C.; Yao-Ching, H. Enhanced coulomb counting method for estimating state-of-charge and state-of-health of lithium-ion batteries. Appl. Energy
**2009**, 86, 1506–1511. [Google Scholar] [CrossRef] - Ruiz-Cortés, M.; Romero-Cadaval, E.; Roncero-Clemente, C.; Barrero-González, F.; González-Romera, E. Energy management strategy to coordinate batteries and ultracapacitors of a hybrid energy storage system in a residential prosumer installation. In Proceedings of the 2017 International Young Engineers Forum (YEF-ECE), Almada, Portugal, 5 May 2017; pp. 30–35. [Google Scholar] [CrossRef]
- Ruiz-Cortés, M.; Romero-Cadaval, E.; Roncero-Clemente, C.; Barrero-González, F.; González-Romera, E. Comprehensive study of the benefits of integrating a sharing energy strategy between prosumers. In Proceedings of the IECON 2017—43rd Annual Conference of the IEEE Industrial Electronics Society, Beijing, China, 29 October–1 November 2017; pp. 3609–3614. [Google Scholar] [CrossRef]
- Roncero-Clemente, C.; Vilhena, N.; Delgado-Gomes, V.; Romero-Cadaval, E.; Martins, J.F. Control and operation of a three-phase local energy router for prosumers in a smart community. IET Renew. Power Gener.
**2020**, 14, 560–570. [Google Scholar] [CrossRef] [Green Version] - Roanes-Lozano, E.; Laita, L.M.; Roanes-Macías, E. A Groebner Bases Based Many-Valued Modal Logic Implementation in Maple. In AISC/Calculemus/MKM 2008, LNAI 5144; Autexier, S., Campbell, J., Rubio, J., Sorge, V., Suzuki, M., Wiedijk, F., Eds.; Springer: Berlin/Heidelberg, Germany, 2008; pp. 170–183. [Google Scholar] [CrossRef]
- Roanes-Lozano, E.; Laita, L.M.; Hernando, A.; Roanes-Macías, E. An algebraic approach to rule based expert systems. Rev. R. Acad. Cien. Ser. A. Mat.
**2010**, 104, 19–40. [Google Scholar] [CrossRef] - Buchberger, B. Bruno Buchberger’s PhD Thesis 1965: An algorithm for finding the basis elements of the residue class ring of a zero dimensional polynomial ideal. J. Symb. Comp.
**2006**, 41, 3–4. [Google Scholar] [CrossRef] [Green Version] - Cox, D.; Little, J.; O’Shea, D. Ideals, Varieties, and Algorithms; Springer: Berlin/Heidelberg, Germany, 1992. [Google Scholar]
- Smodels Web Page. Available online: http://www.tcs.hut.fi/Software/smodels/ (accessed on 14 February 2021).
- Roanes-Lozano, E.; Alonso, J.A.; Hernando, A. An approach from answer set programming to decision making in a railway interlocking system. RACSAM
**2014**, 108, 973–987. [Google Scholar] [CrossRef]

**Figure 3.**Current and voltage (I–V) photovoltaic (PV) curves. (

**a**) I–V characteristics provided by the manufacturer for different irradiance values; (

**b**) I–V characteristics simulated for different irradiance values; (

**c**) I–V characteristics provided by the manufacturer for different temperatures and (

**d**) I–V characteristics simulated for different temperatures.

**Figure 6.**HESS power distribution. (

**a**) P

_{PV}and P

_{LOAD}; (

**b**) P

_{NET}; (

**c**) P

_{BAT}and (

**d**) P

_{SC}.

**Figure 7.**NG net power trend analysis. (

**a**) P

_{NET}and the slopes coming from two consecutive samples (hourly) and (

**b**) ${P}_{NET}^{T}$.

**Figure 8.**Improved performance of the NG thanks to the RBES acting as EMS. (

**a**) SOC

_{BAT}and SOC´

_{BAT}and (

**b**) SOC

_{SC}and SOC´

_{SC}.

**Figure 9.**Smoother responses in the battery and supercapacitor powers thanks to the RBES acting as EMS. (

**a**) P

_{BAT}and P´

_{BAT}and (

**b**) P

_{SC}and P´

_{SC}.

Parameter | Description | Value |
---|---|---|

P_{mpp} (W) | Power at maximum power point | 150 |

V_{mpp} (V) | Voltage at maximum power point | 34 |

V_{oc} (V) | Open circuit voltage | 43.4 |

I_{sc} (A) | Short circuit current | 4.8 |

$\mathbf{Interval}\text{}\mathbf{for}\text{}{\mathit{P}}_{\mathit{N}\mathit{E}\mathit{T}}^{\mathit{T}}$ | Consideration |
---|---|

${P}_{NET}^{T}\ge {\tau}_{1}$ | Power trend positive |

${\tau}_{1}\ge {P}_{NET}^{T}\ge {\tau}_{2}$ | Power trend slightly positive |

${\tau}_{2}\ge {P}_{NET}^{T}\ge {\tau}_{3}$ | Power trend null |

${\tau}_{3}\ge {P}_{NET}^{T}\ge {\tau}_{4}$ | Power trend slightly negative |

${\tau}_{4}\ge {P}_{NET}^{T}$ | Power trend negative |

$\begin{array}{c}\mathbf{St}\mathbf{.}\mathbf{1}\mathbf{:}\\ {\mathit{P}}_{\mathit{N}\mathit{E}\mathit{T}}^{\mathit{T}}\mathbf{\ge}{\mathit{\tau}}_{\mathbf{1}}\end{array}$ | $\begin{array}{c}\mathbf{St}\mathbf{.}\mathbf{2}\mathbf{:}\\ {\mathit{\tau}}_{\mathbf{1}}\mathbf{\ge}{\mathit{P}}_{\mathit{N}\mathit{E}\mathit{T}}^{\mathit{T}}\mathbf{\ge}{\mathit{\tau}}_{\mathbf{2}}\end{array}$ | $\begin{array}{c}\mathbf{St}\mathbf{.}\mathbf{3}\mathbf{:}\\ {\mathit{\tau}}_{\mathbf{2}}\mathbf{\ge}{\mathit{P}}_{\mathit{N}\mathit{E}\mathit{T}}^{\mathit{T}}\mathbf{\ge}{\mathit{\tau}}_{\mathbf{3}}\end{array}$ | $\begin{array}{c}\mathbf{St}\mathbf{.}\mathbf{4}\mathbf{:}\\ {\mathit{\tau}}_{\mathbf{3}}\mathbf{\ge}{\mathit{P}}_{\mathit{N}\mathit{E}\mathit{T}}^{\mathit{T}}\mathbf{\ge}{\mathit{\tau}}_{\mathbf{4}}\end{array}$ | $\begin{array}{c}\mathbf{St}\mathbf{.}\mathbf{5}\mathbf{:}\\ {\mathit{\tau}}_{\mathbf{4}}\mathbf{\ge}{\mathit{P}}_{\mathit{N}\mathit{E}\mathit{T}}^{\mathit{T}}\end{array}$ | ||||||
---|---|---|---|---|---|---|---|---|---|---|

$\begin{array}{c}\mathrm{St}.1:\\ 100\%\ge SO{C}_{BAT}\ge {k}_{1BAT}\end{array}$ (strongly charged) | B2L | N2G | B2L | N2G B2G | B2L B2G | N2G B2G | B2L B2G | N2G B2G | B2L B2G | N2G B2G |

$\begin{array}{c}\mathrm{St}.2:\\ {k}_{1BAT}\ge SO{C}_{BAT}\ge {k}_{2BAT}\end{array}$ (charged) | B2L | N2G | B2L B2G | N2G B2G | B2L B2G | N2G B2G | B2L B2G | N2G B2G | B2L B2G | N2G B2G |

B2L | N2G | B2L | N2G | B2L B2G | N2G B2G | |||||

$\begin{array}{c}\mathrm{St}.3:\\ {k}_{2BAT}\ge SO{C}_{BAT}\ge {k}_{3BAT}\end{array}$ (intermediated) | G2L G2B | N2B | B2L | N2G B2G | B2L | N2G B2G | B2L B2G | N2G B2G | B2L | N2G B2G |

B2L G2L | N2B | G2L | N2G | B2L | N2G | |||||

$\begin{array}{c}\mathrm{St}.4:\\ {k}_{3BAT}\ge SO{C}_{BAT}\ge {k}_{4BAT}\end{array}$ (discharged) | G2L G2B | N2B G2B | B2L | N2G | B2L | N2G N2B | B2L B2G | N2G B2G | G2L | N2G |

B2L G2L | N2B | B2L G2L | N2B | B2L | N2G | |||||

$\begin{array}{c}\mathrm{St}.5:\\ {k}_{4BAT}\ge SO{C}_{BAT}\ge 0\%\end{array}$ (strongly discharged) | G2L G2B | N2B G2B | G2L G2B | N2B G2B | G2L G2B | N2B G2B | G2L G2B | N2B | G2L | N2B |

$\begin{array}{c}\mathbf{St}\mathbf{.}\mathbf{1}\\ \mathbf{100}\mathit{\%}\mathbf{\ge}\mathit{S}\mathit{O}{\mathit{C}}_{\mathit{S}\mathit{C}}\mathbf{\ge}{\mathit{k}}_{\mathbf{1}\mathit{S}\mathit{C}}\end{array}$ | $\begin{array}{c}\mathbf{St}\mathbf{.}\mathbf{2}\\ {\mathit{k}}_{\mathbf{1}\mathit{S}\mathit{C}}\mathbf{\ge}\mathit{S}\mathit{O}{\mathit{C}}_{\mathit{S}\mathit{C}}\mathbf{\ge}{\mathit{k}}_{\mathbf{2}\mathit{S}\mathit{C}}\end{array}$ | $\begin{array}{c}\mathbf{St}\mathbf{.}\mathbf{3}\\ {\mathit{k}}_{\mathbf{2}\mathit{S}\mathit{C}}\mathbf{\ge}\mathit{S}\mathit{O}{\mathit{C}}_{\mathit{S}\mathit{C}}\mathbf{\ge}{\mathit{k}}_{\mathbf{3}\mathit{S}\mathit{C}}\end{array}$ | $\begin{array}{c}\mathbf{St}\mathbf{.}\mathbf{4}\\ {\mathit{k}}_{\mathbf{3}\mathit{S}\mathit{C}}\mathbf{\ge}\mathit{S}\mathit{O}{\mathit{C}}_{\mathit{S}\mathit{C}}\mathbf{\ge}{\mathit{k}}_{\mathbf{4}\mathit{S}\mathit{C}}\end{array}$ | $\begin{array}{c}\mathbf{St}\mathbf{.}\mathbf{5}\\ {\mathit{k}}_{\mathbf{4}\mathit{S}\mathit{C}}\mathbf{\ge}\mathit{S}\mathit{O}{\mathit{C}}_{\mathit{S}\mathit{C}}\mathbf{\ge}\mathbf{0}\end{array}$ | ||||||
---|---|---|---|---|---|---|---|---|---|---|

$\begin{array}{c}\mathrm{St}.1\\ 100\%\ge SO{C}_{BAT}\ge {k}_{1BAT}\end{array}$ (strongly charged) | - | - | - | - | - | - | B2SC | B2SC | B2SC | B2SC |

$\begin{array}{c}\mathrm{St}.2:\\ {k}_{1BAT}\ge SO{C}_{BAT}\ge {k}_{2BAT}\end{array}$ (charged) | - | - | - | -- | - | - | B2SC | B2SC | B2SC | B2SC |

$\begin{array}{c}\mathrm{St}.3:\\ {k}_{2BAT}\ge SO{C}_{BAT}\ge {k}_{3BAT}\end{array}$ (intermediated) | - | - | - | - | - | B2SC | G2SC | B2SC | G2SC | |

$\begin{array}{c}\mathrm{St}.4:\\ {k}_{3BAT}\ge SO{C}_{BAT}\ge {k}_{4BAT}\end{array}$ (discharged) | - | - | - | - | - | - | G2SC | G2SC | G2SC | G2SC |

$\begin{array}{c}\mathrm{St}.5:\\ {k}_{4BAT}\ge SO{C}_{BAT}\ge 0\%\end{array}$ (strongly discharged) | - | - | - | - | - | - | G2SC | G2SC | G2SC | G2SC |

$\begin{array}{c}\mathbf{St}\mathbf{.}\mathbf{1}\mathbf{:}\\ {\mathit{P}}_{\mathit{N}\mathit{E}\mathit{T}}^{\mathit{T}}\mathbf{\ge}{\mathit{\tau}}_{\mathbf{1}}\end{array}$ | $\begin{array}{c}\mathbf{St}\mathbf{.}\mathbf{2}\mathbf{:}\\ {\mathit{\tau}}_{\mathbf{1}}\mathbf{\ge}{\mathit{P}}_{\mathit{N}\mathit{E}\mathit{T}}^{\mathit{T}}\mathbf{\ge}{\mathit{\tau}}_{\mathbf{2}}\end{array}$ | $\begin{array}{c}\mathbf{St}\mathbf{.}\mathbf{3}\mathbf{:}\\ {\mathit{\tau}}_{\mathbf{2}}\mathbf{\ge}{\mathit{P}}_{\mathit{N}\mathit{E}\mathit{T}}^{\mathit{T}}\mathbf{\ge}{\mathit{\tau}}_{\mathbf{3}}\end{array}$ | $\begin{array}{c}\mathbf{St}\mathbf{.}\mathbf{4}\mathbf{:}\\ {\mathit{\tau}}_{\mathbf{3}}\mathbf{\ge}{\mathit{P}}_{\mathit{N}\mathit{E}\mathit{T}}^{\mathit{T}}\mathbf{\ge}{\mathit{\tau}}_{\mathbf{4}}\end{array}$ | $\begin{array}{c}\mathbf{St}\mathbf{.}\mathbf{5}\mathbf{:}\\ {\mathit{\tau}}_{\mathbf{4}}\mathbf{\ge}{\mathit{P}}_{\mathit{N}\mathit{E}\mathit{T}}^{\mathit{T}}\end{array}$ | ||||||
---|---|---|---|---|---|---|---|---|---|---|

$\begin{array}{c}\mathrm{St}.1\\ 100\%\ge SO{C}_{BAT}\ge {k}_{1BAT}\end{array}$ (strongly charged) | MPPT | RPPT | MPPT | RPPT | RPPT | RPPT | RPPT | RPPT | RPPT | RPPT |

$\begin{array}{c}\mathrm{St}.2:\\ {k}_{1BAT}\ge SO{C}_{BAT}\ge {k}_{2BAT}\end{array}$ (charged) | MPPT | RPPT | MPPT | RPPT | RPPT | RPPT | RPPT | RPPT | RPPT | RPPT |

$\begin{array}{c}\mathrm{St}.3:\\ {k}_{2BAT}\ge SO{C}_{BAT}\ge {k}_{3BAT}\end{array}$ (intermediated) | MPPT | MPPT | MPPT | RPPT | RPPT | RPPT | RPPT | RPPT | RPPT | RPPT |

$\begin{array}{c}\mathrm{St}.4:\\ {k}_{3BAT}\ge SO{C}_{BAT}\ge {k}_{4BAT}\end{array}$ (discharged) | MPPT | MPPT | MPPT | MPPT | MPPT | MPPT | MPPT | MPPT | MPPT | MPPT |

$\begin{array}{c}\mathrm{St}.5:\\ {k}_{4BAT}\ge SO{C}_{BAT}\ge 0\%\end{array}$ (strongly discharged) | MPPT | MPPT | MPPT | MPPT | MPPT | MPPT | MPPT | MPPT | MPPT | MPPT |

**Table 6.**Table 3 with the notation of the rule-based expert system (RBES).

TABLE NUMBER 6 | y1 | y2 | y3 | y4 | y5 | ||||||
---|---|---|---|---|---|---|---|---|---|---|---|

u1 u2 | u1 u2 | u1 u2 | u1 u2 | u1 u2 | |||||||

x1 | z1 ----- z2 | BAT2LOAD | NET2GRID | BAT2LOAD | NET2GRID BAT2GRID | BAT2LOAD BAT2GRID | NET2GRID BAT2GRID | BAT2LOAD BAT2GRID | NET2GRID BAT2GRID | BAT2LOAD BAT2GRID | NET2GRID BAT2GRID |

x2 | z1 ----- z2 | BAT2LOAD | NET2GRID | BAT2LOAD BAT2GRID | NET2GRID BAT2GRID | BAT2LOAD BAT2GRID | NET2GRID BAT2GRID | BAT2LOAD BAT2GRID | NET2GRID BAT2GRID | BAT2LOAD BAT2GRID | NET2GRID BAT2GRID |

BAT2LOAD | NET2GRID | BAT2LOAD | NET2GRID | BAT2LOAD BAT2GRID | NET2GRID BAT2GRID | ||||||

x3 | z1 ----- z2 | GRID2LOAD GRID2BAT | NET2BAT | BAT2LOAD | NET2GRID BAT2GRID | BAT2LOAD | NET2GRID BAT2GRID | BAT2LOAD BAT2GRID | NET2GRID BAT2GRID | BAT2LOAD | NET2GRID BAT2GRID |

BAT2LOAD GRID2LOAD | NET2BAT | GRID2LOAD | NET2GRID | BAT2LOAD | NET2GRID | ||||||

x4 | z1 ------ z2 | GRID2LOAD GRID2BAT | NET2BAT GRID2BAT | BAT2LOAD | NET2GRID | BAT2LOAD | NET2GRID NET2BAT | BAT2LOAD BAT2GRID | NET2GRID BAT2GRID | GRID2LOAD | NET2GRID |

BAT2LOAD GRID2LOAD | NET2BAT | BAT2LOAD GRID2LOAD | NET2BAT | BAT2LOAD | NET2GRID | ||||||

x5 | z1 ------ z2 | GRID2LOAD GRID2BAT | NET2BAT GRID2BAT | GRID2LOAD GRID2BAT | NET2BAT GRID2BAT | GRID2LOAD GRID2BAT | NET2BAT GRID2BAT | GRID2LOAD GRID2BAT | NET2BAT | GRID2LOAD | NET2BAT |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Roncero-Clemente, C.; Roanes-Lozano, E.; Barrero-González, F.
A Multi-Criteria Computer Package-Based Energy Management System for a Grid-Connected AC Nanogrid. *Mathematics* **2021**, *9*, 487.
https://doi.org/10.3390/math9050487

**AMA Style**

Roncero-Clemente C, Roanes-Lozano E, Barrero-González F.
A Multi-Criteria Computer Package-Based Energy Management System for a Grid-Connected AC Nanogrid. *Mathematics*. 2021; 9(5):487.
https://doi.org/10.3390/math9050487

**Chicago/Turabian Style**

Roncero-Clemente, Carlos, Eugenio Roanes-Lozano, and Fermín Barrero-González.
2021. "A Multi-Criteria Computer Package-Based Energy Management System for a Grid-Connected AC Nanogrid" *Mathematics* 9, no. 5: 487.
https://doi.org/10.3390/math9050487