원시데이터 수집 시스템
선정목록으로

Dynamic Fuzzy Logic Energy Management System for a Multi-Energy Microgrid

관련 수소연료전지 · (7) MEA(막전극접합체)

기본 정보

저자
  1. Pablo Horrillo–Quintero — Department of Electrical Engineering, ETSI Algeciras, Research Group in Sustainable and Renewable Electrical Technologies—SURET (PAIDI-TEP023), University of Cádiz (UCA), Cádiz, Algeciras, Spain
  2. Pablo García–Triviño — Department of Electrical Engineering, ETSI Algeciras, Research Group in Sustainable and Renewable Electrical Technologies—SURET (PAIDI-TEP023), University of Cádiz (UCA), Cádiz, Algeciras, Spain
  3. Ehsan Shah Hosseini — Department of Electrical Engineering, ETSI Algeciras, Research Group in Sustainable and Renewable Electrical Technologies—SURET (PAIDI-TEP023), University of Cádiz (UCA), Cádiz, Algeciras, Spain
  4. Carlos Andrés García‐Vázquez — Department of Electrical Engineering, ETSI Algeciras, Research Group in Sustainable and Renewable Electrical Technologies—SURET (PAIDI-TEP023), University of Cádiz (UCA), Cádiz, Algeciras, Spain
  5. Higinio Sánchez–Sainz — Department of Electrical Engineering, ESI Puerto Real, Research Group in Sustainable and Renewable Electrical Technologies—SURET (PAIDI-TEP023), University of Cádiz (UCA), Cádiz, Algeciras, Spain
  6. Carlos E. Ugalde‐Loo — School of Engineering, Cardiff University, Cardiff, U.K.
  7. Vedran S. Perić — Department of Electrical and Computer Engineering, Aarhus University, Aarhus, Denmark
  8. Luis M. Fernández–Ramírez — Department of Electrical Engineering, ETSI Algeciras, Research Group in Sustainable and Renewable Electrical Technologies—SURET (PAIDI-TEP023), University of Cádiz (UCA), Cádiz, Algeciras, Spain
DOI
10.1109/access.2024.3422009
저널
IEEE Access
발행년도
2024
발행기관
Institute of Electrical and Electronics Engineers
피인용수
13
라이선스
cc-by-nc-nd
논문 유형
–
언어
–
원문 페이지
https://doi.org/10.1109/access.2024.3422009
토픽
Hybrid Renewable Energy Systems
OpenAlex ID
W4400228953

평가 내용

관련도
관련
사업분야
수소연료전지 · (7) MEA(막전극접합체)
부 분야
–
R&D 측면
–
확신도
–
근거 용어
–
판단 근거
임베딩 유사도 기반 평가로 '수소연료전지 > MEA(막전극접합체)' 분야에 선정된 논문입니다.
R&D 활용 포인트
–
평가 입력
–

초록

While multi-energy microgrids (MEMGs) offer a promising approach to reduce energy consumption through coordinated integration of various energy vectors, research has primarily focused on static studies. These studies aim to optimize a particular cost function but neglect the dynamic aspects of the system operation. This paper presents a dynamic model of an MEMG comprising of electricity and thermal vectors. A novel dynamic fuzzy logic-based energy management system (EMS) is investigated, aiming to ensure energy balance (electric and thermal), optimize renewable energy utilization, and reduce the reliance on the local electricity grid and gas. Both the EMS and MEMG have been evaluated under different weather conditions and a 4-hour variable load profile. Furthermore, the EMS effectiveness has been verified through a real-time experiment using an OPAL-RT4512 unit and a dSPACE MicroLabBox prototype. The results show that the proposed fuzzy logic-based EMS outperforms a conventional EMS based on machine states (states-based EMS), achieving a notable reduction in electricity grid consumption of 80%, as well as a consumption reduction of 7.4% in the gas boiler and 5.4% in the electric boiler. Furthermore, the control performance results in a remarkable reduction in ITAE (42.57%), ITSE (89.10%), IAE (54.36%) and ISE (57.55%) for the hot water temperature control, and in ITAE (17.06%), ITSE (52.50%), IAE (31.19%) and ISE (29.99%) for the heating control.

본문 73,832자

본문 펼치기
Received 4 June 2024, accepted 25 June 2024, date of publication 2 July 2024, date of current version 15 July 2024. _Digital Object Identifier 10.1109/ACCESS.2024.3422009_ # Dynamic Fuzzy Logic Energy Management System for a Multi-Energy Microgrid PABLO HORRILLO-QUINTERO 1, PABLO GARCÍA-TRIVIÑO 1, EHSAN HOSSEINI 1, CARLOS ANDRÉS GARCÍA-VÁZQUEZ 1, HIGINIO SÁNCHEZ-SAINZ <sup>2</sup>, (Senior Member, IEEE), CARLOS E. UGALDE-LOO 3, (Senior Member, IEEE), VEDRAN S. PERIĆ <sup>4</sup>, (Member, IEEE), AND LUIS M. FERNÁNDEZ-RAMÍREZ 1, (Senior Member, IEEE) 1Research Group in Sustainable and Renewable Electrical Technologies—SURET (PAIDI-TEP023), Department of Electrical Engineering, ETSI Algeciras, University of Cádiz (UCA), Algeciras, 11202 Cádiz, Spain 2Research Group in Sustainable and Renewable Electrical Technologies—SURET (PAIDI-TEP023), Department of Electrical Engineering, ESI Puerto Real, University of Cádiz (UCA), Algeciras, 11202 Cádiz, Spain 3School of Engineering, Cardiff University, CF24 3AA Cardiff, U.K. 4Department of Electrical and Computer Engineering, Aarhus University, 8200 Aarhus, Denmark Corresponding author: Luis M. Fernández-Ramírez (luis.fernandez@uca.es) This work was supported in part by the Ministerio de Ciencia e Innovación, Agencia Estatal de Investigación, and Unión Europea ‘‘NextGenerationEU/PRTR’’ (Grant TED2021-129631B-C32 supported by MCIN/AEI/10.13039/501100011033 and NextGenerationEU/PRTR) ABSTRACT While multi-energy microgrids (MEMGs) offer a promising approach to reduce energy consumption through coordinated integration of various energy vectors, research has primarily focused on static studies. These studies aim to optimize a particular cost function but neglect the dynamic aspects of the system operation. This paper presents a dynamic model of an MEMG comprising of electricity and thermal vectors. A novel dynamic fuzzy logic-based energy management system (EMS) is investigated, aiming to ensure energy balance (electric and thermal), optimize renewable energy utilization, and reduce the reliance on the local electricity grid and gas. Both the EMS and MEMG have been evaluated under different weather conditions and a 4-hour variable load profile. Furthermore, the EMS effectiveness has been verified through a real-time experiment using an OPAL-RT4512 unit and a dSPACE MicroLabBox prototype. The results show that the proposed fuzzy logic-based EMS outperforms a conventional EMS based on machine states (statesbased EMS), achieving a notable reduction in electricity grid consumption of 80%, as well as a consumption reduction of 7.4% in the gas boiler and 5.4% in the electric boiler. Furthermore, the control performance results in a remarkable reduction in ITAE (42.57%), ITSE (89.10%), IAE (54.36%) and ISE (57.55%) for the hot water temperature control, and in ITAE (17.06%), ITSE (52.50%), IAE (31.19%) and ISE (29.99%) for the heating control. INDEX TERMS Electricity, energy management system, energy storage system, fuzzy-logic, multi-energy microgrids, thermal. I. INTRODUCTION The push to increase the energy efficiency in electricity networks is driving the advancement of distributed generation through microgrids (MGs) that incorporate renewable energy sources with energy storage systems (ESSs) to address their variability. It is possible to include multiple energy vectors The associate editor coordinating the review of this manuscript and approving it for publication was Jiefeng Hu . in a MG, such as electricity, heat/cooling, gas or hydrogen to build a multi-energy microgrid (MEMG) [1], [2]. A MEMG considers multiple energy vectors with a complementary relationship that improves the efficiency of the whole system [3], [4], carrying out a multi-objective operation. Multi-objective operation typically aims to minimize the total operational cost of the microgrid system, improve energy balance, and enhance overall system performance [5]. Traditionally, the study of MEMGs has focused on static analysis, examining the MEMG response at a single point in time to assess its current state or predict its future state. However, this approach overlooks the dynamic behavior and real-time response of MEMGs, limiting the understanding of how they respond to changes over time. The main idea of a steady-state study is to optimize a cost or efficiency-related objective function [6], [7], [8]. For instance, a model minimizing the carbon footprint of an energy community was introduced in [9]. MEMG optimization problems are commonly solved using mixed-integer linear programming (MILP) with alternating directional multiplier method [10]. The research conducted in [11] concentrated on the integration of electric-thermal power flow using an extended Newton-Raphson algorithm. Furthermore, an optimization model for MEMGs was implemented in [12] using a MILP approach for a corrective receding horizon considering costs, emissions, and flexibility, through optimization over annual and daily time horizons. Several studies [13], [14] pointed out the optimization of MEMGs in long term time horizon and muti-time scale. NOMENCLATURE _Q_ <sup>_out_</sup> _EB_ _Q_ <sup>_out_</sup> _EB_ Heat extracted by the electric boiler (W). _Rint_ BESS internal resistance ( _�_ ). _Rs, Rsh_ Series and shunt resistance ( _�_ ). _T_ amb Ambient temperature ( <sup>◦</sup> C). _T_ bus _, Tbus_ <sup>_ref_</sup> Bus temperature and reference _T_ bus _, Tbus_ <sup>_ref_</sup> Bus temperature and reference bus temperature( <sup>◦</sup> C). _TEB_ Electric boiler temperature ( <sup>◦</sup> C). _T_ in Temperature of fluid at the input ( <sup>◦</sup> C). _TEB_ <sup>_max, T_</sup> _EB_ <sup>_min_</sup> Electric boiler turns off/on temperature ( <sup>◦</sup> C). _EB_ <sup>_max, T_</sup> _EB_ <sup>_min_</sup> _TEB_ <sup>_max, T_</sup> _EB_ <sup>_min_</sup> Electric boiler turns off/on temperature ( <sup>◦</sup> C). _T_ 2 Temp. after electric boiler heat exchange ( <sup>◦</sup> C). _TPV_ Photovoltaic cell temperature ( <sup>◦</sup> C). _UA_ Heat loss coefficient to ambient (W/K). _VBESS_ BESS voltage (V). _Vg_ Diode voltage (V). c Heat capacity boiler (J/(kg·K)). _CB_ Thermal capacity of the electric boiler (J/K). _c_ f Heat capacity of fluid (J/(kg·K)). _c_ p Heat capacity of fluid (const. pressure) (J/(kg·K)). _EBESS_ BESS open circuit voltage (V). _Gs, Gn_ Irradiation on the surface and the nominal irradiation. _IBESS_ BESS current (A). _IPV_ PV current (A). _IL, IL_ 0 Light current and light current at SRC (A). _Isat_ Diode reverse saturation current (A). _k_ Boltzmann’s constant (1 _._ 38066 × 10 <sup>−23</sup> J/K). _K_ 0 _, K_ 1 Constants depending on the PV characteristic. _m_ Mass of the boiler (kg). _m_ ˙ _bus_ Mass flow rate in the thermal bus (kg/s). _m_ ˙ _water_ Mass flow water demand (kg/s). _N_ Number of nodes. _Ns_ Number of cells in series. _P_ BESS BESS power (W) _P_ <sup>_max_</sup> _BESS,dis_ Maximum BESS power in discharging (W). MEMGs represent an efficient solution for both grid-connected and islanded operation modes. In [15], an algorithm was introduced to optimize planning decisions, enhance operating costs in grid-connected mode, and increase supply reliability in islanded mode. This approach accounts for uncertainties in both demand and renewable production. Energy storage is an imperative need for mitigating fluctuations in renewable production. In [16], it was demonstrated that storage systems can lead to cost savings in MEMG operations and reduced losses through Mixed Integral Linear Programming technique. The steady-state solutions hold under the assumption that the MEMG works within an operating range closely resembling the one studied [13], [14], [17]. In [18], an optimization cooperative demand-driven operational approach for a MEMG was presented, comprising a higher-level model and a lower-level model. However, the optimization was enclosed to the constraints and might not be adequate in different operating conditions. In [19], the demand problem was studied with nonlinear integrated demand response system for MEMGs based on pricing, aimed at mitigating errors in estimating both electricity and gas loads. However, this study did not explore real-time implementation of these scenarios. The static optimization presented in [20], employed demand management in two stages. The initial phase of optimization focused on employing a mixed-integer nonlinear programming approach to maximize projected profits from day-ahead operations. Subsequently, the second phase of the energy management plan aimed to minimize anticipated costs for hour-ahead operations. However, no details were provided regarding the dynamic behavior of the MEMG during the optimization processes, and the models used may not be suitable beyond the studied linearization point. In [21], total operating costs were minimized considering uncertainties in renewable production, demand, and energy prices. In this scenario, the system operator has the opportunity to actively engage in electricity, heat, and gas markets, enabling them to meet local energy demands and maximize profits through energy exchanges. _P_ <sup>_max_</sup> _BESS,dis_ Maximum BESS power in discharging (W). _P_ <sup>_max_</sup> _BESS,cha_ Maximum BESS power in charging (W). _P_ <sup>_max_</sup> _BESS,cha_ Maximum BESS power in charging (W). _P_ EB Electric boiler power (W). _PGRID_ Local grid power (W). _PLOAD_ Electric load power (W). _PPV_ PV power (W). _P_ <sup>′</sup> _NET_ Gross net power (W). _P_ <sup>′</sup> _NET_ Gross net power (W). _PNET_ Net power (W). _q_ Electron charge (1.60218E–19 Coulomb). _Q_ EB Heat power of the electric boiler (W). _Q_ GB Heat power of the gas boiler (W). To expand the operational capabilities of MEMGs and effectively manage dynamic conditions, the development of dynamic model is crucial. This allows the operation, control, and energy management system (EMS) to adapt to weather variations and sudden demand changes. Consequently, a more efficient distribution of energy between MEMG components becomes possible. A dynamic EMS incorporates instantaneous monitoring and control of energy consumption, considering temporary operating modes [22]. It has the ability to react to real-time fluctuations in demand by adjusting production levels, considering weather conditions and the state-of-charge (SOC) of the energy storage systems (ESSs). By implementing this dynamic approach, MEMGs can achieve optimal performance across diverse operating conditions, leading to maximized efficiency and minimized operational costs. As evidenced in the existing literature, most studies have largely overlooked the dynamic nature of MEMGs, leading to a significant research gap in the dynamic control of MEMGs facilitated by an EMS. The approach to energy control and management in MEMG studies requires dynamic models capable of accurately representing equipment behavior across various operating points, and effectively responding to changes in operating conditions. In complex MEMGs incorporating diverse renewable generation equipment, energy storage and thermal sources, designing an EMS becomes a challenging task, requiring intelligent techniques for efficient energy management [23]. This challenge involves addressing several system operator objectives concurrently, such as minimizing energy supply from the main grid while controlling ESS charge levels. Among the different intelligent techniques presented in the literature, fuzzy logic control is a widely adopted approach for dynamic EMSs. Fuzzy logic systems have gained extensive popularity across diverse fields owing to their inherent ability to be used in complex systems. Unlike other intelligent controllers that heavily rely on historical data, fuzzy systems do not require such data to function effectively. Furthermore, fuzzy logic control eliminates the need for system linearization, further simplifying its application in dynamic models [24]. In traditional energy systems, electric and thermal systems have been designed, planned, and operated independently, despite their physical complementarity. In the quest to optimize energy usage and integrate renewable energy-based generation systems and energy storage systems, there is a growing need to interconnect electricity systems and coordinate their operation with other energy vectors, such as heat, taking into account the control approach to achieve this. Current literature has not adequately addressed the study of MEMGs from the perspective of real-time control, as well as EMS that integrate different energy vectors. Both operators of electric and thermal grid systems, as well as operators of distributed generation, require real-time control to integrate renewable energy sources into residential networks that consume various types of energy in a safe and efficient manner. Similarly, end-users benefit from having efficient energy control and management systems, giving them greater decision-making capabilities based on available capacity and demand. There are deficiencies on the design of interconnected real-time energy control and management systems, while considering various reliability, resilience, and efficiency indicators within MEMGs. Additionally, minimizing energy consumption, taking into account the savings associated with harnessing the flexibility offered by ESS in MEMGs, is a pressing need due to the intrinsic intermittency of renewable generation. This problem is further exacerbated if there are heat-generating devices powered by renewable-produced electricity. Controlled real-time exchange of surplus non-dispatchable and dispatchable generation between different energy vectors is a fundamental issue for integrating RET and ESS into current distribution networks. This paper addresses this gap by presenting an MEMG considering electricity and thermal vectors controlled by a novel dynamic fuzzy logic-based EMS acting as a supervisory controller for the entire system. The primary objective of the EMS is to minimize energy withdrawal from the local grid and maximize the utilization of renewable energy sources while meeting the electrical and thermal demands. The innovative aspect of this paper lies in determining the operating mode of the thermal sources, and the management of the battery ESS (BESS) based on the real-time thermal and electric demands, renewable energy availability and the SOC of the BESS. The contributions of this paper are summarized as follows: - Dynamic control management (with a sample time of 0.02s) for a MEMG with electricity and thermal vectors, integrating PV power plant, BESS and electrical loads (in electricity vector) and gas boiler, heat pump, electric boiler and underfloor demand (in thermal vector). - Development of a dynamic fuzzy logic-based EMS that provides an efficient energy distribution in the MEMG and allows a wide operating range for thermal and electricity vectors. - Validation of the proposed MEMG and EMS under different weather condition and variations in electric and thermal loads. The results demonstrate significant improvements compared to a conventional state-based EMS, achieving a significant 80% reduction in local grid utilization for the tested scenarios. Furthermore, energy reductions of 7.4% and 5.4% are achieved for the gas and electric boiler sources, respectively. - Real-time verification using experimental hardware-inthe-loop (HIL) setup for the proposed MEMG. The MEMG operates on an OPAL4512 unit, while the control system is implemented on a dSPACE MicroLabBox prototype. This real-world testing confirms the effectiveness of the proposed EMS under practical operating conditions. Following this introduction, Section II provides a detailed explanation of the MEMG under study. The proposed control scheme and fuzzy logic-EMS are described in Section III. Section IV introduces an alternative state-based EMS for comparison with the proposed fuzzy-logic EMS. Section V validates the operation of the MEMG under different scenarios using MATLAB/Simulink and presents the experimental results. Finally, Section V provides the conclusions drawn in this paper. II. DYNAMIC MODELLING OF THE MEMG Fig. 1 shows the configuration of the proposed MEMG. The thermal segment of the MEMG comprises a 10-kW gas boiler and a 23-kW electric boiler with a 300-liter storage capacity, catering the heat demand of the MEMG. The electrical vector incorporates an 18-kW PV power plant, consisting of 60 panels of 300 W each. The PV power plant layout is designed using six strings of 10 panels connected in series per string. To mitigate the fluctuations inherent in PV power generation, a Lithium-Ion based BESS is integrated, leveraging its advantages in efficiency and scalability [25]. The selected BESS has a rated capacity of 26.6 kWh and a rated voltage of 345V. Furthermore, the MEMG is connected to a 400 V three-phase local grid to ensure a reliable power supply. It is important to note that the controlled components in the MEMG are the electric and gas boilers, along with the BESS. The PV power plant operates at the maximum power point tracking (MPPT) to maximize its output, while the local grid assumes the surplus or necessary power to fulfill the demand fluctuations. The modelling of the MEMG is implemented in MATLAB/Simulink. The CARNOT Toolbox, developed by the Institute of Solar Research in Juelich, Germany, was employed to model the thermal components of MEMG [26]. This toolbox provides a comprehensive library of components commonly used in thermal systems, represented by modular blocksets. Additionally, it offers valuable insights into the coordination between electrical and thermal systems, as well as specific elements related to thermal loads [26]. _A._ _THERMAL VECTOR_ The aforementioned thermal sources thermal loads form a thermal system that needs a structured and organized operational framework. Fig. 1 illustrates the thermal system scheme proposed in this paper. A thermal bus, a closed thermal circuit connecting the thermal sources and loads, is employed. A gas boiler maintains the bus temperature _(Tbus)_ at the desired value. The electric boiler extracts heat (denoted as _Q_ <sup>_out_</sup> _EB_ <sup>) from the bus by</sup> warming water obtained from the local network to achieve _Tbus_ . Subsequently, the electric boiler elevates this temperature to the required hot water demand ( _T EB_ ). Finally, an independent heat exchanger connects the underfloor heating demand to the bus, extracting heat power (denoted as _QU_ - _H_ ) from the FIGURE 1. Schematic diagram of the electrical-thermal MEMG. bus. This process results in a temperature reduction to _Tin_, which serves as the input temperature for the gas boiler. The thermal bus serves as the central component, facilitating heat transfer among the boilers and thermal loads, and control of water temperature. It enables efficient energy utilization and structured system organization by employing hot water circulation within the heating loop. To account for temperature drops during the heat exchange process, Eqs. (1) and (2) model the heat exchange between the electric boiler and the underfloor heating based on the thermodynamic energy balance principle: _T_ 2 = <sup>_<u>m</u>_</sup> <sup>˙</sup> <sup>_<u>water</u>_</sup> <sup>·</sup> <sup>_<u>Twater</u>_</sup> <sup>+</sup> <sup>_<u>m</u>_</sup> <sup>˙</sup> <sup>_<u>bus</u>_</sup> <sup>·</sup> <sup>_<u>Tbus</u>_</sup> _m_ ˙ _water_ + _m_ ˙ _bus_ _Tin_ = _T_ 2 + <sup>−</sup> <sup>_<u>QU</u>_</sup> <sup>·</sup> <sup>_<u>H</u>_</sup> _m_ ˙ _bus_ - _c p_ (1) (2) The gas boiler model is a simplified representation that primarily focuses on the heat input into the boiler combustion chamber. It disregards any limitations arising from the process or combustion control, such as the initial burner control during start-up. For the water side of the boiler, a multinode model is utilized to capture the time-dependent conditions. The differential equation governing the gas boiler is given as [27]: - _m_ - _c_ - <sup><u>1</u></sup> _N_ - <sup>_<u>dTbus</u>_</sup> = _dt_ - _U_ - _A_ - <sup><u>1</u></sup> _N_ - ( _Tamb_ - _Tbus_ ) + ( ˙ _mbus_ - _cf_ ) · ( _T in_ - _Tbus_ ) + _QGB_ (3) To define (3), the law of conservation of energy and the first law of thermodynamics are employed. In this expression, the rate of change of the gas boiler’s outlet temperature with respect to time equals the sum of heat transfer with the surroundings due to the heat flow through the boiler ducts (first term), the amount of heat required to raise the water from the inlet temperature to the desired outlet temperature (second term), and the heat supplied by the gas boiler, _QGB_ (third term). The electric boiler is modelled as an electric heater, utilizing electricity to heat the incoming mass flow of the water network for domestic hot water consumption. A thermal node represents the thermal inertia of the heater and account for losses to the surrounding environment. The equation governing the electric boiler is described by [26]: _mcp_ - <sup>_<u>dTEB</u>_</sup> = _U_ - _A_ - ( _T amb_ - _TEB_ ) _dt_ + ( _m_ ˙ _water_ - _cp_ ) · ( _Tbus_ - _TEB_ ) + _PEB_ (4) which was defined using the law of conservation of energy and the first law of thermodynamics. In (4), the rate of change of temperature at the outlet with respect to time, considering the boiler’s capacity _mcp_, is expressed as the losses to the surroundings due to heat flow through the boiler pipes (first term), the heat required to raise the water temperature from the inlet temperature to the desired outlet temperature (second term), and the required electrical power, _PEB_ (third term). _B._ _ELECTRICITY VECTOR_ The PV system implementation described in [28] is chosen due to its proven accuracy and simplicity [29]. The I-V characteristics of this model are obtained by providing irradiance and temperature as input. The model comprises a diode, a controlled current source, and two resistances (one in series and one in parallel). The mathematical expression for the output current of the PV system is as follows: - ( _VPV_ + _IPV RS_ ) _/Rsh_ (5) _<u>q(VPV</u>_ + _<u>IPV Rs)</u>_ _NsKTPV_ _IPV_ = _IL_ - _Isat_ _e_ _IL_ = _LL_ 0(1+ _K_ 0( _TPV_ −300) <sup>_<u>Gs</u>_</sup> _Gn_ (6) FIGURE 2. Overall MEMG scheme control. regulates _TEB_ following a hysteresis cycle. The gas boiler control loop is implemented using a PI controller, which regulates _Tbus_ . Additionally, the MPPT strategy based on P& O algorithm is implemented for the PV power plant, and the BESS is controlled according to its SOC. The EMS acts as a supervisory control for the entire MEMG. _A._ _FUZZY LOGIC-BASED DYNAMIC EMS_ The proposed FL-based dynamic EMS relies on taking into account the renewable available power ( _PPV_ ), the electric load and the BESS SOC to determinate dynamically the operating point of the thermal components of the MEMG, which involves varying _TEB_, _PEB_, _Tbus_ and _QGB_, while satisfying both electrical and thermal demands. Besides, the fuzzy logic system ensures power balance (both electrical and thermal) and minimizes the utilization of the local grid. By employing fuzzy logic, the boiler can operate over a wide temperature range generating both the turn-on ( _TEB_ <sup>_min_</sup> <sup>)</sup> and turn-off ( _T_ <sup>_max_</sup> _EB_ <sup>)</sup> <sup>temperatures</sup> <sup>in</sup> <sup>the</sup> <sup>electric</sup> <sup>boiler.</sup> <sup>The</sup> reference bus temperature can also be adjusted depending on the MEMG needs. The novelty in the proposed FL-EMS lies in its structure and its objective to coordinate the operation of electrical and thermal components. It is based on knowing the available energy in the MEMG at each moment. For this purpose, it only needs two parameters: the gross net power ( _P_ <sup>′</sup> _NET_ <sup>) and</sup> the BESS SOC. It provides the output signals _TEB_ <sup>_max_</sup> <sup>,</sup> <sup>_PEB_</sup> <sup>and</sup> _Tbus_, which allow understanding the energy consumption of the electric and gas boilers. The designed FL controller considers two inputs and three outputs, as shown in Fig. 2. In MGs, the difference between renewable power and demanded load is typically defined as _PNET_ . For the EMS presented in this paper, the demanded load is divided into the electrical load (power demanded by the dwelling) and the power demanded by the electric boiler. In addition, _P_ <sup>′</sup> _NET_ <sup>is defined as</sup> <sup>_PNET_</sup> <sup>without considering the</sup> electric boiler demand ( _PEB_ ): _Isat_ = _K_ 1 _TPV_ <sup>3</sup> <sup>_e_</sup> <sup>−</sup> <sup>_qVg/TPV_</sup> (7) This paper employs a BESS model derived from the SimPowerSystems Toolbox of Simulink [30]. To ensure accuracy, modifications have been made to accurately depict the V-I and V-SOC curves, as well as the dynamic response of the battery, based in datasheets information. The model consists of a series resistance and a variable voltage source. _VBESS_ = _EBESS_ - _IBESS_ - _Rint_ (8) Additionally, the battery state-of-charge (SOC), which is calculated from the BESS current variation, is a critical parameter that requires a suitable control to prevent overcharging or deep discharging. III. FUZZY LOGIC-BASED DYNAMIC EMS AND CONTROL LOOPS This section introduces the novel fuzzy logic-based dynamic EMS and the control loops proposed for the MEMG described in Section II. The primary objective of the EMS is to maintain power balance (electrical and thermal) by coordinating the operation of the gas and electric boilers alongside the production of the PV power plant, BESS, and thermal and electrical loads, while minimizing the utilization of the local grid. This goal allows the MEMG to operate as an independent MG, while the control loops ensure the local control of each component. In this context, the electric boiler control loop _P_ <sup>′</sup> _NET_ <sup>=</sup> <sup>_PPV_</sup> <sup>−</sup> <sup>_PLOAD_</sup> (9) _PNET_ = _PPV_ - ( _PLOAD_ + _PEB_ ) (10) Note that the BESS power ( _PBESS_ ) can be calculated as the difference between _P_ <sup>′</sup> _NET_ <sup>−</sup> <sup>_PEB_</sup> <sup>and is limited by its current</sup> SOC, as described in Eqs. (11) and (12) and illustrated in Fig. 2. _<u>BESS</u>_ - - _<u>SOC</u>_ - _<u>SOC</u>_ _<u>min</u>_ <sup>_nom_</sup> _�t_ 100 _P_ <sup>_max_</sup> _BESS,dis_ <sup>=</sup> <sup>_min_</sup> _P_ <sup>_max_</sup> _BESS_ <sup>_max_</sup> _BESS_ <sup>_,_</sup> <sup>_E_</sup> _<u>BESS</u>_ <sup>_nom_</sup> _�t_ �� (11) �� (12) _<u>BESS</u>_ - - _<u>SOC</u>_ _<u>max</u>_ - _<u>SOC</u>_ <sup>_nom_</sup> _�t_ 100 _P_ <sup>_max_</sup> _BESS,ch_ <sup>=</sup> <sup>_min_</sup> _P_ <sup>_max_</sup> _BESS_ <sup>_max_</sup> _BESS_ <sup>_, E_</sup> _<u>BESS</u>_ <sup>_nom_</sup> _�t_ _PBESS_ constraints shown in Eqs. (11) and (12) determine the maximum power that the BESS can handle ( _P_ <sup>_max_</sup> _BESS_ <sup>).</sup> On the one hand, _P_ <sup>_max_</sup> _BES_ <sup>is limited according to the rated power</sup> of the BESS. In addition, the SOC restriction guarantees that the maximum power available is limited according to the SOC in each moment without exceeding a threshold value. This restriction is based on maintaining the SOC level within a safe operating zone, defined by upper and lower limits ( _SOC_ _max,SOC_ _min_ ). The upper limit is set at 90 % and the lower limit to 30%. The BESS cannot be discharged below _SOC_ _min_ or charged above _SOC_ _max_ . Furthermore, in discharging mode, the maximum power delivered by the BESS is proportional to the SOC level when the SOC is between 30% and 50%. The design of the FL-EMS consists of three stages, namely: fuzzification, rule-base, and defuzzification. The fuzzification module transforms physical values into a normalized fuzzy subset, consisting of an interval for the range of input values, and an associated membership function describing the confidence levels that the input belongs to this range. The purpose of this step is to make the physical input signal compatible with the fuzzy control rule base at the core of the controller. Five membership functions (MFs) are utilized for fuzzification to define _P_ <sup>′</sup> _NET_ <sup>:</sup> <sup>negative</sup> <sup>high</sup> <sup>(NH),</sup> <sup>negative</sup> <sup>(N),</sup> zero (Z), positive (P) and positive high (PH). Three MFs are employed for SOC, _PEB_ and _Tmax_ <sup>_EB_</sup> <sup>:</sup> <sup>low</sup> <sup>(L),</sup> <sup>normal</sup> <sup>(N)</sup> <sup>and</sup> high (H). _TGB_ is defined with two MFs: low (L) and high (H). The rule base process is crucial for achieving the ultimate goal of minimizing energy consumption. It focuses on determining the operating mode of the output variables based on the input variables. The MF distribution is shown in Fig. 3. In this study, 15 rules (see Table 1) are used to determine the system behavior using a Mamdani-type inference method. This method was chosen due to its ease of implementation and its ability to handle nonlinear systems. Its flexibility and adaptability to new data or system changes make it suitable for dynamic scenarios, as is the case investigated in this study [31]. Serving as an intermediary between the control rule base and the physical system under control, the defuzzification module acts as a bridge, converting the controller outputs (produced by the control rule base in fuzzy terms) into precise values that the system can handle. In this article, the centroid FIGURE 3. Membership functions: a) Gross net power ( _P_ <sup>′</sup> FIGURE 3. Membership functions: a) Gross net power ( _PNET_ <sup>′</sup> <sup>), b) BES SOC,</sup> c) electric boiler power ( _PEB_ ), d) electric boiler turn-off temperature ( _T_ <sup>_EB_</sup> _max_ <sup>), and e) temperature in the thermal bus (</sup> <sup>_T_</sup> _bus_ <sup>).</sup> <sup>_EB_</sup> _max_ <sup>), and e) temperature in the thermal bus (</sup> <sup>_T_</sup> _bus_ <sup>).</sup> method is employed as the defuzzification technique. _u ((k_ + 1 _) T_ _)_ = - _Ni_ <u>=1</u> <sup>_µU_</sup> _<u>i</u>_ <sup>_(ui_</sup> <sup>_(kT_</sup> <sup>_))_</sup> <sup>·</sup> <sup>_ui_</sup> <sup><u>(</u></sup> <sup>_kT_</sup> <sup><u>)</u></sup> <u>�</u> _Ni_ =1 <sup>_µU_</sup> _i_ <sup>_(ui (kT_</sup> <sup>_))_</sup> (13) Here, _T_ represents the sampling time, and _u_ ( _kt_ ) denotes the value of the new control action change, _ui_ refers to the fuzzy subsets comprising bounded intervals with their associated membership functions, and _µU_ denotes the weights for centroid defuzzification. Fuzzy logic enables a flexible consumption pattern by dynamically adjusting _PEB_ based on _P_ <sup>′</sup> _NET_ <sup>and</sup> <sup>SOC,</sup> <sup>rather</sup> than keeping it constant its rated power. For instance, when _P_ <sup>′</sup> _NET_ <sup>is</sup> <sup>positive</sup> <sup>and</sup> <sup>SOC</sup> <sup>is</sup> <sup>high,</sup> <sup>the</sup> <sup>electric</sup> <sup>boiler</sup> <sup>oper-</sup> ates as the primary heat source, and the BESS charges accordingly. Conversely, if _P_ <sup>′</sup> _NET_ <sup>is</sup> <sup>negative</sup> <sup>and</sup> <sup>SOC</sup> <sup>is</sup> low, the available _PEB_ decreases, restricting the BESS from discharging. A similar approach is employed for bus thermal temperature control, where _Tbus_ varies across a range of temperatures, providing multiple operating points. This control structure promotes intelligent energy usage and reduces energy consumption, as discussed in Section IV. Designing an EMS requires a deep understanding of the overall system. Inefficient design can lead to complex EMS structures. Previous studies using FL for the EMS of a MEMG often require complex structures. For instance, 14 input parameters and 45 rules was used in [32], 27 inference rules and 3 input variables with 3 membership functions each in [33], and 3 membership functions for each of the 5 selected input variables in [34], resulting in a total of 243 rules. In contrast, this article proposes a simplified and easily reproducible structure for other MEMG architectures. TABLE 1. Rule base of the fuzzy logic EMS. It utilizes only two input variables: net power _P_ <sup>′</sup> _NET_ <sup>(with</sup> 5 membership functions) and SOC (with 3 membership functions). This results in a significantly reduced set of 15 inference rules for optimal FL operation, making it adaptable to MEMG designs with similar characteristics. _B._ _CONTROL LOOPS_ Fig. 2 shows the proposed control loops for the critical components of the MEMG. During the heating process, hot water flow and underfloor heating often fluctuate. The thermal bus control subsystem is responsible for maintaining _Tbus_ at the desired reference value ( _T_ <sup>_ref_</sup> _bus_ <sup>).</sup> This is achieved by using a gas boiler to increase the temperature of the incoming water and managing the bus according to the demand for underfloor heating and hot water usage. To accomplish this, a PI controller is employed to regulate _QEB_ and achieve the target bus temperature. This approach allows the power delivered by the gas boiler to be adjusted to meet the temperature requirements rather than operating in an all-or-nothing operation. The electric boiler temperature control subsystem regulates the output temperature of the electric boiler ( _TEB_ ), based on _TEB_ <sup>_max_</sup> provided by the EMS. Effective temperature regulation is achieved through the implementation of a hysteresis control cycle. In this process, the EMS determines the maximum temperature mode for the electric boiler ( _T_ <sup>_max_</sup> _EB_ <sup>)</sup> <sup>and</sup> <sup>the</sup> <sup>minimum</sup> temperature mode for the hysteresis cycle ( _T_ <sup>_min_</sup> _EB_ <sup>) is set at 5◦C</sup> temperature mode for the hysteresis cycle ( _T_ <sup>_min_</sup> _EB_ <sup>) is set at 5◦C</sup> lower than _Tmax_ <sup>_EB_</sup> <sup>.</sup> <sup>As</sup> <sup>a</sup> <sup>result,</sup> <sup>the</sup> <sup>electric</sup> <sup>boiler</sup> <sup>is</sup> <sup>activated</sup> until it reaches the upper threshold, and then it is deactivated until it reaches the lower threshold. This approach ensures temperature control without requiring a constant power supply to the boiler. The MPPT strategy employs the PV voltage ( _V PV_ ) and PV current ( _IPV_ ) to calculate the maximum power point voltage ( _V_ <sup>∗</sup> _PV_ <sup>) for each operating condition. To achieve this, the Per-</sup> turb & Observe (P&O) algorithm is selected to perform the MPPT. The MPPT strategy employs the PV voltage ( _V PV_ ) and PV current ( _IPV_ ) to calculate the maximum power point voltage ( _V_ <sup>∗</sup> _PV_ <sup>) for each operating condition. To achieve this, the Per-</sup> This strategy operates by changing the PV voltage and analyzing the output power. Based on these observations, the P&O technique calculates the necessary adjustment direction to approach the maximum power point (MPP). IV. RESULTS AND DISCUSSION This section evaluates the performance of the MEMG proposed in Section II, including the fuzzy logic-based dynamic EMS and control loops presented in Section III. MEMG modelling and simulations were performed using MATLAB/Simulink. The analysis is structured into three sections. First, Section IV-A focuses on the performance of the fuzzy logic-based dynamic EMS. The thermal control of the MEMG is discussed, considering the performance of both the thermal and electrical components of the MEMG. To illustrate the advantages of the designed fuzzy-logic supervisory control, the results are compared with a flowchart control in Section IV-B. Finally, Section IV-C presents a hardware-in-the-loop experimental setup to validate the MATLAB/Simulink simulations. In this experimental setup, the power system is implemented on an OPAL-RT4512 unit, while the proposed control systems are executed on a dSPACE MicroLabBox unit. The results are then displayed on a Yokogawa DLM4038 oscilloscope, where the signals are scaled down and measured in real time according to the references sent by the dSPACE controller board. _A._ _EVALUATION OF THE DYNAMIC FUZZY LOGIC-BASED_ _EMS_ To ensure a proper response of the dynamic behavior of the MEMG, it is tested over a varying profile of climatic conditions, water consumption, underfloor heating demand and domestic electrical loads over a four-hour simulation. Fig. 4 shows the profile data for water consumption ( ˙ _mwater_ ), irradiance of the PV power plant, and underfloor heating demand ( _QUH_ ). Fig. 5 shows the electrical and thermal powers of the MEMG. The power balance for electrical powers is illustrated in Fig. 5a. Between 0 to 2500s, the PV power plant produces 17.95 kW, while the electric boiler consumes 21.5 kW when it is turned on. When the electric boiler reaches the upper temperature setpoint determined by the hysteresis control, it is turned off. In this situation, the BESS is charged at a higher value of 16.95 kW. When the electric load demand ( _PLOAD_ ) increases, _P_ <sup>′</sup> _NET_ decreases, and consequently, _PEB_ decreases in accordance with the reference signal generated by the fuzzy logic-based dynamic EMS. At 7500s, the PV production drops to 6.3 kW. This operating condition implies that as _PLOAD_ increases, the BESS changes to discharging mode while _PEB_ reduces due to lower renewable power availability. The BESS remains in discharging mode, and when the SOC is near to the minimum SOC FIGURE 4. MEMG operating parameters. FIGURE 5. Balanced power for fuzzy logic-based dynamic EMS: (a) Electric powers and (b) thermal powers. level ( _SOC_ _min_ = 30%), the BESS is not able to fulfill the demands, and the local grid must provide the necessary power to the MEMG. The fuzzy logic-based dynamic EMS, upon receiving signals indicating a lower SOC and lower _PPV_, sets a minimum value for _PEB_ . The thermal power balance is illustrated in Fig. 5b. It shows the heat extracted from the bus due to hot water consumption in the fuzzy logic control ( _Q_ <sup>_out_</sup> _EB_ <sup>),</sup> <sup>the</sup> <sup>heat</sup> <sup>injected</sup> <sup>by</sup> <sup>the</sup> electric boiler in the fuzzy logic control ( _QEB_ ), and the heat provided by the gas boiler _(QGB)_ . As seen, when there is an increment in _m_ ˙ _water_ or _QUH_ _, QEB_ increases its value. Consequently, _QGB_ is incremented to maintain the bus temperature at the required value. <sup>max</sup> _BESS_ <sup>). The outputs are</sup> FIGURE 6. (a) Electric boiler temperature for fuzzy logic ( _T EB_ ), Bus temperature control for fuzzy logic, ( _Tbus_ and _Tbus_ <sup>_ref_</sup> <sup>), (b)Temperature drops</sup> for fuzzy logic ( _T bus_ _,_ _T_ 2 _,_ _Tin_ ) and (c) BESS SOC for fuzzy logic-based dynamic EMS. As discussed in Section III, the gas boiler is responsible for maintaining the temperature of the thermal bus, while the electric boiler increases the temperature to fulfill the domestic hot water demand. Fig. 6a shows the measured electric boiler output temperature for the fuzzy logic control _(TEB),_ which varies according to the operation point of the MEMG at each moment. This figure also includes the measured temperature control of the gas boiler for the fuzzy logic control ( _Tbus_ ) and the reference temperature control ( _Tbus_ <sup>_ref_</sup> <sup>).</sup> <sup>Heat</sup> <sup>exchangers</sup> <sup>connect</sup> the different thermal components, and _Tbus_ decreases due to the heat extracted from the bus. Furthermore, Fig. 6b represents the output temperature of the gas boiler ( _Tbus_ ), the temperature after the heat exchanged with the electric boiler ( _T_ 2), and the temperature after the heat exchange with the underfloor heating, which coincides with the input temperature of the gas boiler ( _T in_ ). The BESS SOC control is represented in Fig. 6c. The SOC is maintained between _SOC_ _min_ and _SOC_ _max_ . When the SOC approaches _SOC_ _min_, the curve becomes less decreasing for the discharging, aligning with the goal of not exceeding _SOC_ _min_ . _B._ _EVALUATION OF THE STATES-BASED EMS_ To compare the fuzzy logic-based dynamic EMS discussed in Section III, this section outlines an alternative EMS known as states-based EMS, which is based on operating states. Fig. 7 represents the flowchart of this EMS. It generates the same variables as the fuzzy logic-based dynamic EMS, i.e, to obtain _Tmax_ <sup>_EB_</sup> <sup>,</sup> <sup>_PEB_</sup> <sup>and</sup> <sup>_Tbus_</sup> <sup>, pursuing the same targets.</sup> Similarly, the input signals are _P_ <sup>′</sup> _NET_ <sup>,</sup> <sup>_PEB_</sup> <sup>,</sup> <sup>and</sup> <sup>the</sup> <sup>maxi-</sup> mum power available in the BESS ( _P_ <sup>max</sup> _BESS_ <sup>). The outputs are</sup> to obtain _Tmax_ <sup>_EB_</sup> <sup>,</sup> <sup>_PEB_</sup> <sup>and</sup> <sup>_Tbus_</sup> <sup>, pursuing the same targets.</sup> Similarly, the input signals are _P_ <sup>′</sup> _NET_ <sup>,</sup> <sup>_PEB_</sup> <sup>,</sup> <sup>and</sup> <sup>the</sup> <sup>_out_</sup> _E_ - _B_ <sup>−</sup> <sup>_ST_</sup>, _Q_ <sup>_ST_</sup> _E_ <sup>_ST_</sup> _E_ - _B_ <sup>and</sup> <sup>_Q_</sup> _G_ <sup>_ST_</sup> FIGURE 7. Flowchart states-based EMS. the operating modes for the gas and the electric boilers, and _PBESS_ is calculated according to Eqs (11,12). On the basis of these definitions, the following five possible modes of operation are defined: and the reference temperature control ( _Tbus_ <sup>_ref_</sup> <sup>−</sup> <sup>_ST_</sup> ). In this instance, _Tbus_ <sup>_ST_</sup> <sup>takes a value of 30</sup> <sup>◦</sup> - High-temperature mode (HTM): When _P_ <sup>′</sup> High-temperature mode (HTM): When _P_ <sup>′</sup> _NET_ <sup>_>_</sup> <sup>0</sup> <sup>and</sup> _P_ <sup>′</sup> _NET_ <sup>_>_</sup> <sup>0</sup> <sup>_._</sup> <sup>6·</sup> <sup>_Prated_</sup> _EB_ <sup>,</sup> <sup>the</sup> <sup>system</sup> <sup>operates</sup> <sup>with</sup> <sup>excess</sup> renewable power. In this mode, the electric boiler is turned on, while the gas boiler operates at a lower temperature. The excess renewable power is managed by the BESS, which charges according to its SOC. Moreover, if the electric boiler is turned off and _P_ <sup>′</sup> _NET_ <sup>_>_</sup> <sup>0</sup> <sup>_._</sup> <sup>6·</sup> <sup>_Prated_</sup> _EB_ <sup>,</sup> <sup>′</sup> _NET_ <sup>_>_</sup> <sup>0</sup> <sup>_._</sup> <sup>6·</sup> <sup>_Prated_</sup> _EB_ 2 <sup>_ST_</sup> and _Tin_ <sup>_ST_</sup> <sup>′</sup> _NET_ <sup>_>_</sup> <sup>0</sup> <sup>_._</sup> <sup>6·</sup> <sup>_Prated_</sup> _EB_ if the electric boiler is turned off and _P_ <sup>′</sup> _NET_ <sup>_>_</sup> <sup>0</sup> <sup>_._</sup> <sup>6·</sup> <sup>_Prated_</sup> _EB_ <sup>,</sup> the EMS sends the order to turn on the electric boiler in this operation mode. - Normal-temperature mode (NTM): In the case of _P_ <sup>′</sup> <sup>′</sup> _NET_ <sup>_>_</sup> <sup>0,</sup> <sup>and</sup> <sup>_P_</sup> <sup>′</sup> <sup>′</sup> _NET_ <sup>_<_</sup> <sup>0</sup> <sup>_._</sup> <sup>6·</sup> <sup>_Prated_</sup> _EB_ _P_ <sup>′</sup> _NET_ <sup>_>_</sup> <sup>0,</sup> <sup>and</sup> <sup>_P_</sup> <sup>′</sup> _NET_ <sup>_<_</sup> <sup>0</sup> <sup>_._</sup> <sup>6·</sup> <sup>_Prated_</sup> _EB_ <sup>,</sup> <sup>the</sup> <sup>electric</sup> <sup>boiler</sup> operates in NTM, and the gas boiler increases its temperature. The BESS discharges to meet the electric demand. When _P_ <sup>′</sup> _NET_ <sup>_<_</sup> <sup>0</sup> <sup>_._</sup> <sup>6·</sup> <sup>_P_</sup> _EB_ <sup>_rated_</sup> and | _PNET_ | _<_ 0 _._ 3· _P_ <sup>_rated_</sup> _EB_ <sup>,</sup> <sup>the</sup> the MEMG operates in LTM and _PEB_ is decreased. Similarly, when the SOC is near to _SOC_ _min_, the local grid injects the required power to the MEMG as there is not renewable or storage system energy available. Analogously, the thermal powers are shown in Fig. 8.b, where the same parameters are represented for the statesbased EMS: _Q_ <sup>_out_</sup> _E_ - _B_ <sup>−</sup> <sup>_ST_</sup>, _Q_ <sup>_ST_</sup> _E_ - _B_ <sup>and</sup> <sup>_Q_</sup> _G_ <sup>_ST_</sup> - _B_ <sup>, respectively. As shown,</sup> a minor amount of heat power is required for the fuzzy-logic control to maintain the temperature, leading to a lower electrical energy consumption of the electric boiler, as shown in Table 2. On the other hand, Fig. 8c shows the temperature of the electric boiler for the states-based EMS ( _TEB_ <sup>_ST_</sup> <sup>).</sup> <sup>In</sup> <sup>this</sup> <sup>case,</sup> _TEB_ <sup>_ST_</sup> <sup>is</sup> <sup>controlled</sup> <sup>in</sup> <sup>HTM</sup> <sup>and</sup> <sup>MTM</sup> <sup>from</sup> <sup>0</sup> <sup>to</sup> <sup>6000s,</sup> in MTM from 6000s to 10500s and in LTM from 10500s to 15000s. Moreover, Fig. 8c represents the measured temperature control of the gas boiler for the states-based EMS ( _Tbus_ <sup>_ST_</sup> <sup>)</sup> and the reference temperature control ( _Tbus_ <sup>_ref_</sup> <sup>−</sup> <sup>_ST_</sup> ). In this instance, _Tbus_ <sup>_ST_</sup> <sup>takes a value of 30</sup> <sup>◦C if the electric</sup> boiler operates in HTM and a value of 35 <sup>◦</sup> C if the electric boiler operates in MTM or LTM. The temperature drops due to the heat exchanged in the thermal bus are represented in Fig. 8d for the states-based EMS, which are denoted as _Tbus_ <sup>_ST_</sup> <sup>,</sup> _T_ 2 <sup>_ST_</sup> and _Tin_ <sup>_ST_</sup> <sup>.</sup> Finally, to ensure the correct operation of the MEMG, the energy balance in the thermal bus must be satisfied. This means that the total heat extracted from the bus ( _Qcon_ ), which is the sum of the underfloor heating demand ( _QU_ - _H_ ), and the heat extracted for the electric boiler ( _Q_ <sup>_out_</sup> _E_ - _B_ <sup>),</sup> <sup>must</sup> <sup>be</sup> <sup>equal</sup> to the heat injected by the gas boiler ( _QG_ - _B_ ) to maintain _Tbus_ according to _Tbus_ <sup>_ref_</sup> <sup>_._</sup> <sup>′</sup> _NET_ <sup>_<_</sup> <sup>0</sup> <sup>_._</sup> <sup>6·</sup> <sup>_P_</sup> _EB_ <sup>_rated_</sup> _EB_ <sup>_rated_</sup> and | _PNET_ | _<_ 0 _._ 3· _P_ <sup>_rated_</sup> _EB_ When _P_ <sup>′</sup> _NET_ <sup>_<_</sup> <sup>0</sup> <sup>_._</sup> <sup>6·</sup> <sup>_P_</sup> _EB_ <sup>_rated_</sup> and | _PNET_ | _<_ 0 _._ 3· _P_ <sup>_rated_</sup> _EB_ <sup>,</sup> <sup>the</sup> boiler is turned on. - Low-temperature mode (LTM): If _P_ <sup>′</sup> _NET_ <sup>_<_</sup> <sup>0,</sup> <sup>the</sup> <sup>elec-</sup> - Low-temperature mode (LTM): If _P_ <sup>′</sup> _NET_ <sup>_<_</sup> <sup>0,</sup> <sup>the</sup> <sup>elec-</sup> tric boiler is activated at low temperatures, while the gas boiler increases its temperature similarly to NTM. If the boiler is turned off, it remains in the LTM. - Off mode (NTM): When _P_ <sup>′</sup> _NET_ <sup>_>_</sup> <sup>0, and</sup> <sup>_P_</sup> <sup>′</sup> _NET_ <sup>_<_</sup> <sup>_Prated_</sup> _EB_ <sup>,</sup> if | _PNET_ | _>_ 0 _._ 3· _P_ <sup>_rated_</sup> _EB_ <sup>,</sup> <sup>the</sup> <sup>boiler</sup> <sup>remains</sup> <sup>turned</sup> <sup>off</sup> <sup>in</sup> NTM. - Off mode (LTM): When _P_ <sup>′</sup> _NET_ <sup>_<_</sup> <sup>0</sup> <sup>and</sup> <sup>the</sup> <sup>boiler</sup> <sup>is</sup> <sup>′</sup> _NET_ <sup>_<_</sup> <sup>_Prated_</sup> _EB_ <sup>′</sup> _NET_ <sup>_>_</sup> <sup>0, and</sup> <sup>_P_</sup> <sup>′</sup> Off mode (NTM): When _P_ <sup>′</sup> _NET_ <sup>_>_</sup> <sup>0, and</sup> <sup>_P_</sup> <sup>′</sup> _NET_ <sup>_<_</sup> <sup>_Prated_</sup> _EB_ <sup>,</sup> if | _PNET_ | _>_ 0 _._ 3· _P_ <sup>_rated_</sup> _EB_ <sup>,</sup> <sup>the</sup> <sup>boiler</sup> <sup>remains</sup> <sup>turned</sup> <sup>off</sup> <sup>in</sup> according to _Tbus_ <sup>_ref_</sup> <sup>_._</sup> Fig. 9a shows the energy balance for the fuzzy logic control, while Fig. 9b represents the same concept for the states-based control, where adequate responses are achieved in both cases. To provide numerical support to the above discussion, it has been calculated how the electric boiler power is supplied. The total energy consumed by the gas boiler can be computed by integrating the supplied power. Table 2 illustrates the total energy consumed ( _EGB_ ) for the fuzzy-based EMS and the states-based EMS. The results demonstrate a 7.36% reduction in consumption for the presented fuzzy-based EMS. Furthermore, Table 2 presents the energy consumed by the electric and gas boiler. As seen, the energy demand of the electric boiler ( _EEB_ ) is reduced by 5.38 % for the fuzzybased EMS. The total consumption of the local grid ( _Egrid_ ) is notably reduced by 80.67% for the fuzzy-based EMS, highlighting its superiority over the states-based EMS. The savings lie in the fact that the proposed fuzzy-based EMS is able to dynamically adjust the operating point of the electric and gas boilers, while the state-based EMS maintains a fixed consumption pattern for each operating mode. This dynamic adaptation enables more efficient energy distribution, resulting in energy savings as demonstrated by the numerical analysis. - Off mode (LTM): When _P_ <sup>′</sup> _NET_ <sup>_<_</sup> <sup>0</sup> <sup>and</sup> <sup>the</sup> <sup>boiler</sup> <sup>is</sup> turned off, it remains turned off in LTM. The results for the states-based EMS are shown in Fig. 8, which are denoted as ‘‘ST’’. The electric powers are represented in Fig. 8a. As mentioned above, the MEMG operation is divided into HTM, NTM, and LTM. From 0 to 6000s, the MEMG operates in alternating HTM and NTM modes. The electric boiler consumes its rated power, which is 23 kW, and the BESS is less charged than in Fig. 5a. In contrast, when _PLOAD_ increases, _PEB_ is kept at rated power, and the MEMG operates in MTM. This implies that the BESS is further discharged to fulfill the demand. Therefore, in this situation, the BESS handles the peaks value of the domestic electrical loads and _PEB_ . From 12000s onward, FIGURE 8. States-bases EMS (a) Electric powers and (b) thermal powers, (c) Electric boiler temperature _TEB_ <sup>_ST_</sup> _bus_ <sup>_ST_</sup> <sup>and</sup> _bus_ <sup>_ref_</sup> <sup>) and (d) Temperature drops (</sup> <sup>_T ST_</sup> _bus_ <sup>_ST_</sup> 2 <sup>_,_</sup> <sup>_T_</sup> _in_ <sup>_ST_</sup> <sup>).</sup> _Tbus_ <sup>_ref_</sup> <sup>_ST_</sup> _bus_ <sup>_,_</sup> <sup>_T ST_</sup> 2 _EB_ <sup>_ST_</sup> <sup>, Bus temperature control (</sup> <sup>_T_</sup> _bus_ <sup>_ST_</sup> FIGURE 9. (a) Thermal energy balance for fuzzy logic-based dynamic EMS and (b) electric power balance for state-based EMS. Another interesting aspect to analyze is the technology employed to supply the electric boiler. In terms of utilization, the fuzzy EMS enables a 1.74% increase in renewable power utilization ( _GPV_ ), and a 4.93% rise in BESS power utilization _GBESS_ ). This results in a 6.67% decrease in grid utilization ( _GGRID_ ) when compared to states-based EMS. Consequently, the grid is also less employed to fulfill the demand in each case, demonstrating the superiority of the proposed fuzzy EMS. It is essential to note that despite the different control schemes used, the average temperatures for the electric boiler ( _T_ <sup>_avg_</sup> _EB_ <sup>),</sup> <sup>and</sup> <sup>the</sup> <sup>gas</sup> <sup>boiler</sup> <sup>(</sup> <sup>_T avg_</sup> _GB_ <sup>)</sup> <sup>are</sup> <sup>very</sup> <sup>similar</sup> <sup>in</sup> <sup>both</sup> cases, ensuring consistent thermal comfort, as demonstrated in Table 2. In addition to an energy-based comparison, this section presents the metrics used to quantitatively evaluate the control performance of the FL-EMS compared against the SB-EMS, as well as the BESS SOC behavior and the temperature TABLE 2. Numerical comparison between fuzzy logic-based dynamic EMS and states-based EMS. gradient in the gas boiler. Table 3 summarized the numerical results. Firstly, performance indices including the Integral Time Absolute Error (ITAE), Integral Time Squared Error ITSE), Integral Absolute Error (IAE), and Integral Squared Error (ISE) are computed for of the regulated _Tbus_ with respect to its reference, _Tbus_ <sup>_ref_</sup> <sup>,</sup> <sup>and</sup> <sup>for</sup> <sup>the</sup> <sup>regulated</sup> <sup>_QGEN_</sup> <sup>with</sup> <sup>respect</sup> to _QCON_ . The results show an improvement in ITAETbus of 42.57%, in ITSETbus of 89.1%, IAETbus of 54.36%, and in ISETbus of 57.55%. Regarding the thermal balance control, the improvement in ITAEQ is 17.06%, in ITSEQ is 52.5%, in IAEQ is 31.19%, and in ISEQ is 29.99%. Employing FL-EMS results in an increase of 5.03% in the maximum BESS SOC ( _SOC_ _max_ ), 1.6% in the minimum BESS SOC ( _SOC_ _min_ ), and 3.98% in the average BESS SOC ( _SOC_ _avg_ ). This demonstrates that the BESS is managed more effectively with the proposed FL-EMS. Finally, the temperature gradient in the gas boiler is calculated, which is defined as _�_ T = ( _Tbus_ - _Tin_ ). The parameter _�_ T is directly related to the heat that the gas boiler must generate to meet the thermal demand. The results showa decrease in the temperature gradient for the FL-EMS of 7.29%. TABLE 3. Metrics for evaluate the fuzzy logic-based dynamic EMS and states-based EMS. FIGURE 10. Experimental HIL setup implemented in the laboratory:(a) Scheme, (b) Photo. _C._ _HARDWARE-IN-THE-LOOP (HIL) VERIFICATION_ Fig. 10a shows the schematic of the experimental setup built in the laboratory to perform a real-time simulation based on the HIL. The power system is implemented using an OPAL-RT4512 unit, a real-time HIL simulator designed for executing and testing models created using MATLAB/Simulink. It is specifically programmed using RT-Lab software, enabling efficient model implementation and testing. The control system is executed on a DSPACE MicroLabBox unit, programmed using Simulink. DSPACE MicroLabBox is a hardware device dedicated to rapid control prototyping and algorithm testing. It incorporates a powerful FPGA, and a comprehensive suite of I/O interfaces. Real-time simulation visualization is achieved using a Yokogawa DLM4038 oscilloscope. The Yokogawa DLM4038 is a digital storage oscilloscope FIGURE 11. Experimental results: (a) Electric power balance, (b) Temperature control and (c) Thermal power balance. specifically designed for accurate waveform analysis. Fig. 10b illustrates the experimental setup. It is worth noting that the OPAL-RT4512 analogue outputs operate within the range of −16V/+16V. Consequently, signals measured in the MATLAB/Simulink simulation must be scaled down to ensure proper representation on the oscilloscope. Fig. 11a represents the electric power balance for fuzzy-based dynamic EMS during a 3000s real-time simulation. Initially, the signals were scaled down by dividing them by 2000. Subsequently, a scale of 5V/div was employed to visualize the signals, and a scale of 300 s/div was selected as the time scale. For instance, the PPV signal (blue) exhibits a value of 17.95 kW in the first stage of the simulation, as seen in Fig. 5a. When divided by 2000 and represented in a scale of 5V/div, the measured signal is approximately 9 V, consistent with the performed scaling. A similar procedure was applied to the remaining signals: PGRID(yellow), PEB(green), PBESS(purple), and PLOAD(red). The obtained results confirmed that no energy was consumed from the grid and verified the results obtained from MATLAB/Simulink, as shown Fig. 5a. Fig. 11b shows the temperature control for fuzzy-based dynamic EMS. In this case, the signals were scaled down by dividing them by 2000. A scale of 2V/div is employed to represent the signals, and the scale of 300 s/div is kept. _Tbus_ (yellow) exhibits a value of 32 <sup>◦</sup> C in the first stage of simulation (Fig. 6a). When divided by 5 and represented on a scale of 2V/div, the measured signal is 6.4 V, confirming accurate representation. The same scaling procedure was applied to _T_ <sup>_ref_</sup> _bus_ <sup>(green) and</sup> <sup>_TEB_</sup> <sup>(purple). It was verified that</sup> _Tbus_ is controlled according to _Tbus_ <sup>_ref_</sup> <sup>, and the measured results</sup> for _TEB_ are consistent with the simulated results (Fig. 6a). Finally, Fig. 11c illustrates the heat bus control for fuzzy-based dynamic EMS. The signals were scaled down by dividing them by 1000. A scale of 2V/div was used to represent the signals, and the scale of 300 s/div was maintained. For instance, _QGB_ (yellow) takes a value of 7.5 kW at the beginning of the simulation (Fig. 9a), and when divided by 1000 and represented in a scale of 2V/div, the measured signal is 7.5 V, further confirming correct representation. The experimental results corroborate the heat control in the thermal bus. The results obtained in the HIL-based realtime simulation have verified the correct performance of the proposed MEMG. The results validate the effectiveness of both the dynamic models and the proposed novel FL-EMS for MEMGs. The FL-EMS demonstrated significant improvements in terms of energy efficiency and dynamic control of MEMGs. This work could be extended by considering the optimal operational costs in the energy distribution, and exploring demand response services to enhance the operational flexibility of MEMGs. V. CONCLUSION Traditionally, MEMG studies have employed a static approach, with optimization algorithms operating over daily or weekly time horizons. These models, typically linearized around a single operating point, may become ineffective when operating conditions deviate. The dynamic study of MEMGs, encompassing real-time control and management systems, which could be improved by the adoption of intelligent control algorithms specifically designed for MEMGs. This paper provided a dynamic control for a MEMG with electricity and thermal vectors, encompassing generation, energy storage and load systems. To effectively coordinate the different energy vectors within the MEMG, a dynamic fuzzybased EMS was proposed. The validity of the proposed EMS was evaluated through real-time HIL experimentation. Minimizing energy consumption through real-time interconnection of diverse energy vectors represents an underexplored approach for optimizing the operation of MEMGs. The proposed EMS was comparatively evaluated with a state-based EMS. By dynamically adjusting the operating point of the thermal generation sources based on available renewable energy, the proposed fuzzy-based EMS achieved a significant reduction of 80% in power grid consumption, accompanied by a decrease of 7.4% in gas boiler consumption, and a reduction of 5.4% in electric boiler consumption. Additionally, compared to the states-based EMS, the use of the PV plant increased by 1.74%, while BESS utilization rose by 4.93% to feed the electric boiler. The control of dispatchable and non-dispatchable systems within the context of MEMGs is a sparsely addressed issue in the literature. Concerning the control system, an 89.10% improvement in ITSE was achieved when compared to the states-based EMS for controlling the temperature of the hot water circuit, and a 52.5% improvement in ITSE was achieved for thermal balance control. Additionally, the average SOC was 3.98% higher, and the required temperature jump in the gas boiler was reduced by 7.29%. Despite the differences in energy dispatch between the two EMS implementations investigated in this paper, the findings demonstrated that thermal comfort was maintained when either a gas or an electric boiler was adopted, while the BESS SOC was effectively controlled within safe operating thresholds. The comprehensive approach presented in this paper ensures the efficient operation of the different vectors within an MEMG, leading to significant savings in natural gas consumption and overall energy consumption from the local electricity grid, while complying meeting energy demand. REFERENCES [1] M. Tostado-Véliz, P. Arévalo, and F. Jurado, ‘‘A comprehensive electrical gas-hydrogen microgrid model for energy management applications,’’ _Energy Convers. Manage._, vol. 228, Jan. 2021, Art. no. 113726. [2] Y.-G. Son, B.-C. Oh, M. A. Acquah, R. Fan, D.-M. Kim, and S.-Y. Kim, ‘‘Multi energy system with an associated energy hub: A review,’’ _IEEE_ _Access_, vol. 9, pp. 127753–127766, 2021, doi: [10.1109/ACCESS.2021.3108142.](http://dx.doi.org/10.1109/ACCESS.2021.3108142) [3] E. Guelpa, A. Bischi, V. Verda, M. Chertkov, and H. Lund, ‘‘Towards future infrastructures for sustainable multi-energy systems: A review,’’ _Energy_, vol. 184, pp. 2–21, Oct. 2019. [4] P. Wang, Y. Cao, and Z. Ding, ‘‘Flexible multi-energy scheduling scheme for data center to facilitate wind power integration,’’ _IEEE Access_, vol. 8, [pp. 88876–88891, 2020, doi: 10.1109/ACCESS.2020.2990454.](http://dx.doi.org/10.1109/ACCESS.2020.2990454) [5] Y. Wang, B. Wang, and H. Farjam, ‘‘Multi-objective scheduling and opti mization for smart energy systems with energy hubs and microgrids,’’ _Eng._ _Sci._ _Technol.,_ _Int._ _J._, vol. 51, Mar. 2024, Art. no. 101649, doi: [10.1016/j.jestch.2024.101649.](http://dx.doi.org/10.1016/j.jestch.2024.101649) [6] G. Comodi, A. Bartolini, F. Carducci, B. Nagaranjan, and A. Romagnoli, ‘‘Achieving low carbon local energy communities in hot climates by exploiting networks synergies in multi energy systems,’’ _Appl._ _Energy_, vol. 256, Dec. 2019, Art. no. 113901. [7] J. Zhong, Y. Li, Y. Wu, Y. Cao, Z. Li, Y. Peng, X. Qiao, Y. Xu, Q. Yu, X. Yang, Z. Li, and M. Shahidehpour, ‘‘Optimal operation of energy hub: An integrated model combined distributionally robust optimization method with Stackelberg game,’’ _IEEE_ _Trans._ _Sustain._ _Energy_, vol. 14, no. 3, [pp. 1835–1848, Jul. 2023, doi: 10.1109/TSTE.2023.3252519.](http://dx.doi.org/10.1109/TSTE.2023.3252519) [8] L. Tian, L. Cheng, J. Guo, and K. Wu, ‘‘System modeling and optimal dispatching of multi-energy microgrid with energy storage,’’ _J._ _Modern_ _Power Syst. Clean Energy_, vol. 8, no. 5, pp. 809–819, Sep. 2020. [9] Y. Jiang, C. Wan, C. Chen, M. Shahidehpour, and Y. Song, ‘‘A hybrid stochastic-interval operation strategy for multi-energy microgrids,’’ _IEEE_ _Trans. Smart Grid_, vol. 11, no. 1, pp. 440–456, Jan. 2020. [10] M. Yunshou, W. Jiekang, C. Zhihong, W. Ruidong, Z. Ran, and C. Lingmin, ‘‘Cooperative operation framework for a wind-solar-CCHP multi-energy system based on Nash bargaining solution,’’ _IEEE_ _Access_, [vol. 9, pp. 119987–120000, 2021, doi: 10.1109/ACCESS.2021.3107156.](http://dx.doi.org/10.1109/ACCESS.2021.3107156) [11] Y. Lei, X. Chen, K. Jiang, H. Li, and Z. Zou, ‘‘A novel methodology for electric-thermal mixed power flow simulation and transmission loss analysis in multi-energy micro-grids,’’ _Frontiers Energy Res._, vol. 8, pp. 1–13, Feb. 2021. [12] N. Holjevac, T. Capuder, I. Kuzle, N. Zhang, and C. Kang, ‘‘Modelling aspects of flexible multi-energy microgrids,’’ in _Proc. Power Syst. Comput._ _Conf. (PSCC)_, Jun. 2018, pp. 1–7. [13] D. Xu, B. Zhou, K. W. Chan, C. Li, Q. Wu, B. Chen, and S. Xia, ‘‘Distributed multienergy coordination of multimicrogrids with biogassolar-wind renewables,’’ _IEEE_ _Trans._ _Ind._ _Informat._, vol. 15, no. 6, [pp. 3254–3266, Jun. 2019, doi: 10.1109/TII.2018.2877143.](http://dx.doi.org/10.1109/TII.2018.2877143) [14] D. Qiu, T. Chen, G. Strbac, and S. Bu, ‘‘Coordination for mul tienergy microgrids using multiagent reinforcement learning,’’ _IEEE_ _Trans._ _Ind._ _Informat._, vol. 19, no. 4, pp. 5689–5700, Apr. 2023, doi: [10.1109/TII.2022.3168319.](http://dx.doi.org/10.1109/TII.2022.3168319) [15] Y. Cao, Y. Mu, H. Jia, X. Yu, K. Hou, and H. Wang, ‘‘A multi objective stochastic optimization approach for planning a multi-energy microgrid considering unscheduled islanded operation,’’ _IEEE_ _Trans._ _Sustain._ _Energy_, vol. 15, no. 2, pp. 1300–1314, Apr. 2024, doi: [10.1109/TSTE.2023.3341898.](http://dx.doi.org/10.1109/TSTE.2023.3341898) [16] S. M. Nosratabadi, R. Hemmati, and P. Khajouei Gharaei, ‘‘Optimal plan ning of multi-energy microgrid with different energy storages and demand responsive loads utilizing a technical-economic-environmental programming,’’ _Int. J. Energy Res._, vol. 45, no. 5, pp. 6985–7017, Apr. 2021, doi: [10.1002/er.6286.](http://dx.doi.org/10.1002/er.6286) [17] C. Zhang, Y. Xu, Z. Y. Dong, and L. F. Yang, ‘‘Multitimescale coordinated adaptive robust operation for industrial multienergy microgrids with load allocation,’’ _IEEE_ _Trans._ _Ind._ _Informat._, vol. 16, no. 5, pp. 3051–3063, [May 2020, doi: 10.1109/TII.2019.2907710.](http://dx.doi.org/10.1109/TII.2019.2907710) [18] M. Yunshou, W. Jiekang, W. Ruidong, C. Zhihong, Z. Ran, C. Lingmin, and Z. Wenjie, ‘‘A collaborative demand-controlled operation strategy for a multi-energy system,’’ _IEEE Access_, vol. 9, pp. 80571–80581, 2021, doi: [10.1109/ACCESS.2021.3083922.](http://dx.doi.org/10.1109/ACCESS.2021.3083922) [19] Y. Zhuang, Y. Liu, Z. Rong, and J. Chen, ‘‘Flexibility exploitation with nonlinear integrated demand response for multi-energy system against load estimation mistake,’’ _IEEE_ _Access_, vol. 11, pp. 35579–35590, 2023, doi: [10.1109/ACCESS.2023.3266056.](http://dx.doi.org/10.1109/ACCESS.2023.3266056) [20] N. B. Roy and D. Das, ‘‘Probabilistic optimal power allocation of dispatchable DGs and energy storage units in a reconfigurable gridconnected CCHP microgrid considering demand response,’’ _J._ _Energy_ _Storage_, vol. 72, Nov. 2023, Art. no. 108207, doi: [10.1016/j.est.2023.](http://dx.doi.org/10.1016/j.est.2023.108207) [108207.](http://dx.doi.org/10.1016/j.est.2023.108207) [21] Q.-Y. Wang, X.-L. Lv, and A. Zeman, ‘‘Optimization of a multi-energy microgrid in the presence of energy storage and conversion devices by using an improved gray wolf algorithm,’’ _Appl._ _Thermal_ _Eng._, [vol. 234, Nov. 2023, Art. no. 121141, doi: 10.1016/j.applthermaleng.2023.](http://dx.doi.org/10.1016/j.applthermaleng.2023.121141) [121141.](http://dx.doi.org/10.1016/j.applthermaleng.2023.121141) [22] K. Kumar and S. Bae, ‘‘Dynamic power management based on model predictive control for hybrid-energy-storage-based grid-connected microgrids,’’ _Int._ _J._ _Electr._ _Power_ _Energy_ _Syst._, vol. 143, Dec. 2022, [Art. no. 108384, doi: 10.1016/j.ijepes.2022.108384.](http://dx.doi.org/10.1016/j.ijepes.2022.108384) [23] Q. Zhang, X. Chen, G. Li, J. Feng, and A. Yang, ‘‘Model predic tive control method of multi-energy flow system considering wind power consumption,’’ _IEEE Access_, vol. 11, pp. 86697–86710, 2023, doi: [10.1109/ACCESS.2023.3304697.](http://dx.doi.org/10.1109/ACCESS.2023.3304697) [24] A. Chaouachi, R. M. Kamel, R. Andoulsi, and K. Nagasaka, ‘‘Mul tiobjective intelligent energy management for a microgrid,’’ _IEEE_ _Trans._ _Ind._ _Electron._, vol. 60, no. 4, pp. 1688–1699, Apr. 2013, doi: [10.1109/TIE.2012.2188873.](http://dx.doi.org/10.1109/TIE.2012.2188873) [25] K. Li and K. J. Tseng, ‘‘Energy efficiency of lithium-ion battery used as energy storage devices in micro-grid,’’ in _Proc._ _41st_ _Annu._ _Conf._ _IEEE_ _Ind._ _Electron._ _Soc._, Nov. 2015, pp. 005235–005240, doi: [10.1109/IECON.2015.7392923.](http://dx.doi.org/10.1109/IECON.2015.7392923) [26] _CARNOT—Conventional and Renewable ENergy CARNOT—Conventional_ _And Renewable Energy Systems Optimization Toolbox_, Sol. Institut Jülich, Jülich, Germany, 2018. [27] S. Lohmann. _Einführung_ _in_ _Die_ _Software_ _MATLAB_ <sup>®</sup> _—Simulink_ <sup>®</sup> _Und_ _Die_ _Toolboxen_ _CARNOT_ _Und_ _Stateflow_ <sup>®</sup> _Zur_ _Simulation_ _Von_ _Gebäude-_ _Und_ _Heizungstechnik_ . Accessed: May 4, 2024. [Online]. Available: https://zies.hs-duesseldorf.de/Lehre/Downloads/Documents/CARNOT_ Anfaenger_Anleitung.pdf [28] MathWorks. _PV_ _Array_ . Accessed: May 4, 2024. [Online]. Available: https://es.mathworks.com/help/sps/powersys/ref/pvarray.html [29] Z. Lang and Y. Zhang, ‘‘Parameter identification and performance estima tion for PV modules based on reduced forms model,’’ _J._ _Renew._ _Sustain._ _Energy_ [, vol. 12, no. 5, Sep. 2020, Art. no. 053703, doi: 10.1063/5.0019511.](http://dx.doi.org/10.1063/5.0019511) [30] _SimPowerSystems_ <sup>_TM_</sup>, Hydro-Quebec MathWorks Inc., Natick, MA, USA, 2015. [31] B. Maroua, Z. Laid, H. Benbouhenni, M. Fateh, N. Debdouche, and I. Colak, ‘‘Robust type 2 fuzzy logic control microgrid-connected photovoltaic system with battery energy storage through multi-functional voltage source inverter using direct power control,’’ _Energy Rep._, vol. 11, [pp. 3117–3134, Jun. 2024, doi: 10.1016/j.egyr.2024.02.047.](http://dx.doi.org/10.1016/j.egyr.2024.02.047) [32] W. Dong, Q. Yang, X. Fang, and W. Ruan, ‘‘Adaptive optimal fuzzy logic based energy management in multi-energy microgrid considering operational uncertainties,’’ _Appl._ _Soft_ _Comput._, vol. 98, Jan. 2021, [Art. no. 106882, doi: 10.1016/j.asoc.2020.106882.](http://dx.doi.org/10.1016/j.asoc.2020.106882) [33] A. C. Duman, H. S. Erden, Ö. Gönül, and Ö. Güler, ‘‘A home energy man agement system with an integrated smart thermostat for demand response in smart grids,’’ _Sustain. Cities Soc._, vol. 65, Feb. 2021, Art. no. 102639, [doi: 10.1016/j.scs.2020.102639.](http://dx.doi.org/10.1016/j.scs.2020.102639) [34] M. Arora, G. M. Vishwanath, A. Sharma, and N. Chilamkurti, ‘‘A novel price discovery insurance scheme for outage resilient energy management system,’’ _IEEE Trans. Ind. Appl._, vol. 60, no. 2, pp. 1986–2001, Apr. 2024, [doi: 10.1109/TIA.2023.3339471.](http://dx.doi.org/10.1109/TIA.2023.3339471) PABLO HORRILLO-QUINTERO was born in Medina-Sidonia, Cádiz, Spain, in 1997. He received the B.Sc. degree in electrical engineering and the M.Sc. degree in renewable energies and energy efficiency from the University of Cádiz (UCA), in 2020 and 2021, respectively. Since 2022, he has been a Research Fellow with the Research Group in Sustainable and Renewable Electrical Technologies, UCA. His current research interests include dynamic modeling, multi-energy microgrids, renewable systems, and power converters and control. PABLO GARCÍA-TRIVIÑO was born in La Línea de la Concepción, Cádiz, Spain, in 1984. He received the B.Sc. degree in electrical engineering, the M.Sc. degree in industrial engineering, and the Ph.D. degree from the University of Cádiz (UCA), Cádiz, in 2005, 2007, and 2010, respectively. Since 2008, he has been an Associate Professor with the Department of Electrical Engineering, UCA. His current research interests include power systems and power management in hybrid systems. EHSAN HOSSEINI was born in Isfahan, Iran. He received the Ph.D. degree from the University of Cádiz, in 2023. His current research interests include reinforcement learning for power systems control, smart grids, microgrids, renewable systems, and power converters. CARLOS ANDRÉS GARCÍA-VÁZQUEZ was born in La Línea de la Concepción, Spain. He received the M.Sc. degree in engineering and the Ph.D. degree from the University of Cádiz (UCA), Algeciras, Spain, in 2004 and 2009, respectively. Since 1988, he has been with the Department of Electrical Engineering, UCA, where he is currently an Associate Professor. His research interests include electric machines, renewable energy, and smart grids. HIGINIO SÁNCHEZ-SAINZ (Senior Member, IEEE) received the Ph.D. degree in industrial engineering from National Distance Education University (UNED), Spain, in 2005. He is currently an Associate Professor with the University of Cádiz, Spain. His research interests include renewable energy, electric drives, and microgrids. CARLOS E. UGALDE-LOO (Senior Member, IEEE) was born in Mexico City. He received the Ph.D. degree in electronics and electrical engineering from the University of Glasgow, Scotland, U.K. In 2010, he joined the School of Engineering, Cardiff University, Wales, U.K., where he is currently a Professor of electrical power systems and the Group Leader of the Centre for Integrated Renewable Energy Generation and Supply. His research interests include power system stability and control, grid integration and control of renewables, dc transmission, modeling and control of integrated energy systems, and multi-variable control. VEDRAN S. PERIĆ (Member, IEEE) received the Ph.D. degree from the KTH Royal Institute of Technology, Stockholm, Sweden (primary institution), Delft University of Technology, Delft, The Netherlands, and Comillas Pontifical University, Madrid, Spain, in 2016. He is currently an Associate Professor with Aarhus University, Denmark. His research interests include power system operation and control, with a focus on the commercial application of innovative technologies. LUIS M. FERNÁNDEZ-RAMÍREZ (Senior Member, IEEE) was born in Los Barrios, Cádiz, Spain. He received the M.Sc. degree in electrical engineering from the University of Seville, Seville, Spain, in 1997, and the Ph.D. degree from the University of Cádiz (UCA), Cádiz, in 2004. He is currently a Full Professor with the Department of Electrical Engineering and the Head of the Research Group in Sustainable and Renewable Electrical Technologies (PAIDI-TEP023), UCA. His research interests include smart grids, microgrids, renewable energy, energy storage, hydrogen systems, electrical transport systems, smart energy, multi-energy systems, and power converters and control.

섹션 본문 123문단 · 43,868자

(제목 없음)

1While multi-energy microgrids (MEMGs) offer a promising approach to reduce energy consumption through coordinated integration of various energy vectors, research has primarily focused on static studies.These studies aim to optimize a particular cost function but neglect the dynamic aspects of the system operation.This paper presents a dynamic model of an MEMG comprising of electricity and thermal vectors.A novel dynamic fuzzy logic-based energy management system (EMS) is investigated, aiming to ensure energy balance (electric and thermal), optimize renewable energy utilization, and reduce the reliance on the local electricity grid and gas.Both the EMS and MEMG have been evaluated under different weather conditions and a 4-hour variable load profile.Furthermore, the EMS effectiveness has been verified through a real-time experiment using an OPAL-RT4512 unit and a dSPACE MicroLabBox prototype.The results show that the proposed fuzzy logic-based EMS outperforms a conventional EMS based on machine states (states-based EMS), achieving a notable reduction in electricity grid consumption of 80%, as well as a consumption reduction of 7.4% in the gas boiler and 5.4% in the electric boiler.Furthermore, the control performance results in a remarkable reduction in ITAE (42.57%),ITSE (89.10%),IAE (54.36%) and ISE (57.55%) for the hot water temperature control, and in ITAE (17.06%),ITSE (52.50%),IAE (31.19%) and ISE (29.99%) for the heating control.

I. INTRODUCTION

2The push to increase the energy efficiency in electricity networks is driving the advancement of distributed generation through microgrids (MGs) that incorporate renewable energy sources with energy storage systems (ESSs) to address their variability.It is possible to include multiple energy vectors in a MG, such as electricity, heat/cooling, gas or hydrogen to build a multi-energy microgrid (MEMG) [1,2].

3A MEMG considers multiple energy vectors with a complementary relationship that improves the efficiency of the whole system [3,4], carrying out a multi-objective operation.

4Multi-objective operation typically aims to minimize the total operational cost of the microgrid system, improve energy balance, and enhance overall system performance [5].

5Traditionally, the study of MEMGs has focused on static analysis, examining the MEMG response at a single point in time to assess its current state or predict its future state.However, this approach overlooks the dynamic behavior and real-time response of MEMGs, limiting the understanding of how they respond to changes over time.The main idea of a steady-state study is to optimize a cost or efficiency-related objective function [6]- [8].

6For instance, a model minimizing the carbon footprint of an energy community was introduced in [9].MEMG optimization problems are commonly solved using mixedinteger linear programming (MILP) with alternating directional multiplier method [10].

7The research conducted in [11] concentrated on the integration of electric-thermal power flow using an extended Newton-Raphson algorithm.Furthermore, an optimization model for MEMGs was implemented in [12] using a MILP approach for a corrective receding horizon considering costs, emissions, and flexibility, through optimization over annual and daily time horizons.Several studies [13][14] pointed out the optimization of MEMGs in long term time horizon and muti-time scale.

8MEMGs represent an efficient solution for both gridconnected and islanded operation modes.In [15], an algorithm was introduced to optimize planning decisions, enhance operating costs in grid-connected mode, and increase supply reliability in islanded mode.This approach accounts for uncertainties in both demand and renewable production.

9Energy storage is an imperative need for mitigating fluctuations in renewable production.In [16], it was demonstrated that storage systems can lead to cost savings in MEMG operations and reduced losses through Mixed Integral Linear Programming technique.

10The steady-state solutions hold under the assumption that the MEMG works within an operating range closely resembling the one studied [17][18][19].In [20], an optimization cooperative demand-driven operational approach for a MEMG was presented, comprising a higher-level model and a lower-level model.However, the optimization was enclosed to the constraints and might not be adequate in different operating conditions.In [21], the demand problem was studied with nonlinear integrated demand response system for MEMGs based on pricing, aimed at mitigating errors in estimating both electricity and gas loads.However, this study did not explore real-time implementation of these scenarios.

11The static optimization presented in [22], employed demand management in two stages.The initial phase of optimization focused on employing a mixed-integer nonlinear programming approach to maximize projected profits from day-ahead operations.Subsequently, the second phase of the energy management plan aimed to minimize anticipated costs for hour-ahead operations.However, no details were provided regarding the dynamic behavior of the MEMG during the optimization processes, and the models used may not be suitable beyond the studied linearization point.

12In [23], total operating costs were minimized considering uncertainties in renewable production, demand, and energy prices.In this scenario, the system operator has the opportunity to actively engage in electricity, heat, and gas markets, enabling them to meet local energy demands and maximize profits through energy exchanges.

13To expand the operational capabilities of MEMGs and effectively manage dynamic conditions, the development of dynamic model is crucial.This allows the operation, control, and energy management system (EMS) to adapt to weather variations and sudden demand changes.Consequently, a more efficient distribution of energy between MEMG components becomes possible.

14A dynamic EMS incorporates instantaneous monitoring and control of energy consumption, considering temporary operating modes [24].It has the ability to react to real-time fluctuations in demand by adjusting production levels, considering weather conditions and the state-of-charge (SOC)

NOMENCLATURE c

15Heat capacity boiler (J/(kg of the energy storage systems (ESSs).By implementing this dynamic approach, MEMGs can achieve optimal performance across diverse operating conditions, leading to maximized efficiency and minimized operational costs.

16As evidenced in the existing literature, most studies have largely overlooked the dynamic nature of MEMGs, leading to a significant research gap in the dynamic control of MEMGs facilitated by an EMS.

17The approach to energy control and management in MEMG studies requires dynamic models capable of accurately representing equipment behavior across various operating points, and effectively responding to changes in operating conditions.In complex MEMGs incorporating diverse renewable generation equipment, energy storage and thermal sources, designing an EMS becomes a challenging task, requiring intelligent techniques for efficient energy management [25].This challenge involves addressing several system operator objectives concurrently, such as minimizing energy supply from the main grid while controlling ESS charge levels.

18Among the different intelligent techniques presented in the literature, fuzzy logic control is a widely adopted approach for dynamic EMSs.Fuzzy logic systems have gained extensive popularity across diverse fields owing to their inherent ability to be used in complex systems.Unlike other intelligent controllers that heavily rely on historical data, fuzzy systems do not require such data to function effectively.Furthermore, fuzzy logic control eliminates the need for system linearization, further simplifying its application in dynamic models [26].

19In traditional energy systems, electric and thermal systems have been designed, planned, and operated independently, despite their physical complementarity.In the quest to optimize energy usage and integrate renewable energy-based generation systems and energy storage systems, there is a growing need to interconnect electricity systems and coordinate their operation with other energy vectors, such as heat, taking into account the control approach to achieve this.

20Current literature has not adequately addressed the study of MEMGs from the perspective of real-time control, as well as EMS that integrate different energy vectors.Both operators of electric and thermal grid systems, as well as operators of distributed generation, require real-time control to integrate renewable energy sources into residential networks that consume various types of energy in a safe and efficient manner.Similarly, end-users benefit from having efficient energy control and management systems, giving them greater decision-making capabilities based on available capacity and demand.

21There are deficiencies on the design of interconnected realtime energy control and management systems, while considering various reliability, resilience, and efficiency indicators within MEMGs.Additionally, minimizing energy consumption, taking into account the savings associated with harnessing the flexibility offered by ESS in MEMGs, is a pressing need due to the intrinsic intermittency of renewable generation.This problem is further exacerbated if there are heat-generating devices powered by renewable-produced electricity.Controlled real-time exchange of surplus nondispatchable and dispatchable generation between different energy vectors is a fundamental issue for integrating RET and ESS into current distribution networks.

22This paper addresses this gap by presenting an MEMG considering electricity and thermal vectors controlled by a novel dynamic fuzzy logic-based EMS acting as a supervisory controller for the entire system.The primary objective of the EMS is to minimize energy withdrawal from the local grid and maximize the utilization of renewable energy sources while meeting the electrical and thermal demands.The innovative aspect of this paper lies in determining the operating mode of the thermal sources, and the management of the battery ESS (BESS) based on the real-time thermal and electric demands, renewable energy availability and the SOC of the BESS.

23The contributions of this paper are summarized as follows:

24 Dynamic control management (with a sample time of 0.02s) for a MEMG with electricity and thermal vectors, integrating PV power plant, BESS and electrical loads (in electricity vector) and gas boiler, heat pump, electric boiler and underfloor demand (in thermal vector). Development of a dynamic fuzzy logic-based EMS that provides an efficient energy distribution in the MEMG and allows a wide operating range for thermal and electricity vectors. Validation of the proposed MEMG and EMS under different weather condition and variations in electric and thermal loads.The results demonstrate significant improvements compared to a conventional state-based EMS, achieving a significant 80% reduction in local grid utilization for the tested scenarios.Furthermore, energy reductions of 7.4% and 5.4% are achieved for the gas and electric boiler sources, respectively. Real-time verification using experimental hardware-inthe-loop (HIL) setup for the proposed MEMG.The MEMG operates on an OPAL4512 unit, while the control system is implemented on a dSPACE MicroLabBox prototype.This real-world testing confirms the effectiveness of the proposed EMS under practical operating conditions.Following this introduction, Section II provides a detailed explanation of the MEMG under study.The proposed control scheme and fuzzy logic-EMS are described in Section III.Section IV introduces an alternative state-based EMS for comparison with the proposed fuzzy-logic EMS.Section V validates the operation of the MEMG under different scenarios using MATLAB/Simulink and presents the experimental results.Finally, Section VI provides the conclusions drawn in this paper.VOLUME XX, 2017

II. DYNAMIC MODELLING OF THE MEMG

25Fig. 1 shows the configuration of the proposed MEMG.The thermal segment of the MEMG comprises a 10-kW gas boiler and a 23-kW electric boiler with a 300-liter storage capacity, catering the heat demand of the MEMG.The electrical vector incorporates an 18-kW PV power plant, consisting of 60 panels of 300 W each.The PV power plant layout is designed using six strings of 10 panels connected in series per string.To mitigate the fluctuations inherent in PV power generation, a Lithium-Ion based BESS is integrated, leveraging its advantages in efficiency and scalability [27].The selected BESS has a rated capacity of 26.6 kWh and a rated voltage of 345V.Furthermore, the MEMG is connected to a 400 V threephase local grid to ensure a reliable power supply.

26It is important to note that the controlled components in the MEMG are the electric and gas boilers, along with the BESS.The PV power plant operates at the maximum power point tracking (MPPT) to maximize its output, while the local grid assumes the surplus or necessary power to fulfill the demand fluctuations.

27The modelling of the MEMG is implemented in MATLAB/Simulink.The CARNOT Toolbox, developed by the Institute of Solar Research in Juelich, Germany, was employed to model the thermal components of MEMG [28].This toolbox provides a comprehensive library of components commonly used in thermal systems, represented by modular blocksets.Additionally, it offers valuable insights into the coordination between electrical and thermal systems, as well as specific elements related to thermal loads [28].

A. THERMAL VECTOR

28The aforementioned thermal sources thermal loads form a thermal system that needs a structured and organized operational framework.Fig. 1 illustrates the thermal system scheme proposed in this paper.A thermal bus, a closed thermal circuit connecting the thermal sources and loads, is employed.A gas boiler maintains the bus temperature ⬚ at the desired value.The electric boiler extracts heat (denoted as ) from the bus by warming water obtained from the local network to achieve ⬚ .

29Subsequently, the electric boiler elevates this temperature to the required hot water demand ( ⬚ ).Finally, an independent heat exchanger connects the underfloor heating demand to the bus, extracting heat power (denoted as .⬚ ) from the bus.This process results in a temperature reduction to ⬚ , which serves as the input temperature for the gas boiler.

30The thermal bus serves as the central component, facilitating heat transfer among the boilers and thermal loads, and control of water temperature.It enables efficient energy utilization and structured system organization by employing hot water circulation within the heating loop.

31To account for temperature drops during the heat exchange process, Eqs. ( 1) and ( 2) model the heat exchange between the electric boiler and the underfloor heating based on the thermodynamic energy balance principle:

32The gas boiler model is a simplified representation that primarily focuses on the heat input into the boiler combustion chamber.It disregards any limitations arising from the process or combustion control, such as the initial burner control during start-up.For the water side of the boiler, a multinode model is utilized to capture the time-dependent conditions.The differential equation governing the gas boiler is given as [29]:

33To define (3), the law of conservation of energy and the first law of thermodynamics are employed.In this expression, the rate of change of the gas boiler's outlet temperature with respect to time equals the sum of heat transfer with the surroundings due to the heat flow through the boiler ducts (first term), the amount of heat required to raise the water from the inlet temperature to the desired outlet temperature (second term), and the heat supplied by the gas boiler, (third term).

34The electric boiler is modelled as an electric heater, utilizing electricity to heat the incoming mass flow of the water network for domestic hot water consumption.A thermal node represents the thermal inertia of the heater and account for losses to the surrounding environment.The equation governing the electric boiler is described by [28]:

35which was defined using the law of conservation of energy and the first law of thermodynamics.In (4), the rate of change of temperature at the outlet with respect to time, considering the boiler's capacity , is expressed as the losses to the surroundings due to heat flow through the boiler pipes (first term), the heat required to raise the water temperature from the inlet temperature to the desired outlet temperature (second term), and the required electrical power, (third term).

B. ELECTRICITY VECTOR

36The PV system implementation described in [30] is chosen due to its proven accuracy and simplicity [31].The I-V characteristics of this model are obtained by providing irradiance and temperature as input.The model comprises a diode, a controlled current source, and two resistances (one in series and one in parallel).The mathematical expression for the output current of the PV system is as follows:

37This paper employs a BESS model derived from the SimPowerSystems Toolbox of Simulink [32].To ensure accuracy, modifications have been made to accurately depict the V-I and V-SOC curves, as well as the dynamic response of the battery, based in datasheets information.The model consists of a series resistance and a variable voltage source.

38Additionally, the battery state-of-charge (SOC), which is calculated from the BESS current variation, is a critical parameter that requires a suitable control to prevent overcharging or deep discharging.

III. FUZZY LOGIC-BASED DYNAMIC EMS AND CONTROL LOOPS

39This section introduces the novel fuzzy logic-based dynamic EMS and the control loops proposed for the MEMG described in Section II.The primary objective of the EMS is to maintain power balance (electrical and thermal) by coordinating the operation of the gas and electric boilers alongside the production of the PV power plant, BESS, and thermal and electrical loads, while minimizing the utilization of the local grid.This goal allows the MEMG to operate as an independent MG, while the control loops ensure the local control of each component.In this context, the electric boiler control loop regulates following a hysteresis cycle.The gas boiler control loop is implemented using a PI controller, which regulates .Additionally, the MPPT strategy based on P& O algorithm is implemented for the PV power plant, and the BESS is controlled according to its SOC.The EMS acts as a supervisory control for the entire MEMG.

A. FUZZY LOGIC-BASED DYNAMIC EMS

40The proposed FL-based dynamic EMS relies on taking into account the renewable available power ( ), the electric load and the BESS SOC to determinate dynamically the operating point of the thermal components of the MEMG, which involves varying , and , while satisfying both electrical and thermal demands.Besides, the fuzzy logic system ensures power balance (both electrical and thermal) and minimizes the utilization of the local grid.

41By employing fuzzy logic, the boiler can operate over a wide temperature range generating both the turn-on ( ) and turn-off ( ) temperatures in the electric boiler.The reference bus temperature can also be adjusted depending on the MEMG needs.

42The novelty in the proposed FL-EMS lies in its structure and its objective to coordinate the operation of electrical and thermal components.It is based on knowing the available energy in the MEMG at each moment.For this purpose, it only needs two parameters: the gross net power (

43) and the BESS SOC.It provides the output signals , and , which allow understanding the energy consumption of the electric and gas boilers.

44The designed FL controller considers two inputs and three outputs, as shown in Fig. 2. In MGs, the difference between renewable power and demanded load is typically defined as ⬚ .For the EMS presented in this paper, the demanded load is divided into the electrical load (power demanded by the dwelling) and the power demanded by the electric boiler.In addition, is defined as ⬚ without considering the electric boiler demand ( ):

45Note that the BESS power ( ) can be calculated as the difference between -and is limited by its current SOC, as described in Eqs.(11) and (12) and illustrated in Fig. 2. 11) and (12) determine the maximum power that the BESS can handle (

46).On the one hand, is limited according to the rated power of the BESS.In addition, the SOC restriction guarantees that the maximum power available is limited according to the SOC in each moment without exceeding a threshold value.

47This restriction is based on maintaining the SOC level within a safe operating zone, defined by upper and lower limits ( , ).The upper limit is set at 90 % and the lower limit to 30%.The BESS cannot be discharged below or charged above .Furthermore, in discharging mode, the maximum power delivered by the BESS is proportional to the SOC level when the SOC is between 30% and 50%.

48The design of the FL-EMS consists of three stages, namely: fuzzification, rule-base, and defuzzification.The fuzzification module transforms physical values into a normalized fuzzy subset, consisting of an interval for the range of input values, and an associated membership function describing the confidence levels that the input belongs to this range.The purpose of this step is to make the physical input signal compatible with the fuzzy control rule base at the core of the controller.

49Five membership functions (MFs) are utilized for fuzzification to define : negative high (NH), negative (N), zero (Z), positive (P) and positive high (PH).Three MFs are employed for SOC, and : low (L), normal (N) and high (H).

50is defined with two MFs: low (L) and high (H).The rule base process is crucial for achieving the ultimate goal of minimizing energy consumption.It focuses on determining the operating mode of the output variables based on the input variables.

51The MF distribution is shown in Fig. 3.In this study, 15 rules (see Table I) are used to determine the system behavior using a Mamdani-type inference method.This method was chosen due to its ease of implementation and its ability to handle nonlinear systems.Its flexibility and adaptability to new data or system changes make it suitable for dynamic scenarios, as is the case investigated in this study [33].

52Serving as an intermediary between the control rule base and the physical system under control, the defuzzification module acts as a bridge, converting the controller outputs (produced by the control rule base in fuzzy terms) into precise values that the system can handle.In this article, the centroid method is employed as the defuzzification technique.

53Here, represents the sampling time, and ( ) denotes the value of the new control action change, refers to the fuzzy subsets comprising bounded intervals with their associated membership functions, and denotes the weights for centroid defuzzification.

54Fuzzy logic enables a flexible consumption pattern by dynamically adjusting based on and SOC, rather than keeping it constant its rated power.For instance, when is positive and SOC is high, the electric boiler operates as the primary heat source, and the BESS charges accordingly.Conversely, if is negative and SOC is low, the available decreases, restricting the BESS from discharging.A similar approach is employed for bus thermal temperature control, where varies across a range of temperatures, providing multiple operating points.This control structure Designing an EMS requires a deep understanding of the overall system.Inefficient design can lead to complex EMS structures.Previous studies using FL for the EMS of a MEMG often require complex structures.For instance, 14 input parameters and 45 rules was used in [34], 27 inference rules and 3 input variables with 3 membership functions each in [35], and 3 membership functions for each of the 5 selected input variables in [36], resulting in a total of 243 rules.

55In contrast, this article proposes a simplified and easily reproducible structure for other MEMG architectures.It utilizes only two input variables: net power (with 5 membership functions) and SOC (with 3 membership functions).This results in a significantly reduced set of 15 inference rules for optimal FL operation, making it adaptable to MEMG designs with similar characteristics.

B. CONTROL LOOPS

56Fig. 2 shows the proposed control loops for the critical components of the MEMG.During the heating process, hot water flow and underfloor heating often fluctuate.The thermal bus control subsystem is responsible for maintaining at the desired reference value (

57).This is achieved by using a gas boiler to increase the temperature of the incoming water and managing the bus according to the demand for underfloor heating and hot water usage.To accomplish this, a PI controller is employed to regulate and achieve the target bus temperature.This approach allows the power delivered by the gas boiler to be adjusted to meet the temperature requirements rather than operating in an all-or-nothing operation.

58The electric boiler temperature control subsystem regulates the output temperature of the electric boiler ( ), based on provided by the EMS.Effective temperature regulation is achieved through the implementation of a hysteresis control cycle.

59In this process, the EMS determines the maximum temperature mode for the electric boiler ( ) and the minimum temperature mode for the hysteresis cycle ( ) is set at 5°C lower than .As a result, the electric boiler is activated until it reaches the upper threshold, and then it is deactivated until it reaches the lower threshold.This approach ensures temperature control without requiring a constant power supply to the boiler.

60The MPPT strategy employs the PV voltage ( ) and PV current ( ) to calculate the maximum power point voltage ( * ) for each operating condition.To achieve this, the Perturb & Observe (P&O) algorithm is selected to perform the MPPT.

61This strategy operates by changing the PV voltage and analyzing the output power.Based on these observations, the P&O technique calculates the necessary adjustment direction to approach the maximum power point (MPP).

IV. RESULTS AND DISCUSSION

62This section evaluates the performance of the MEMG proposed in Section II, including the fuzzy logic-based dynamic EMS and control loops presented in Section III.MEMG modelling and simulations were performed using MATLAB/Simulink.

63The analysis is structured into three sections.First, Section IV.A focuses on the performance of the fuzzy logicbased dynamic EMS.The thermal control of the MEMG is discussed, considering the performance of both the thermal and electrical components of the MEMG.

64To illustrate the advantages of the designed fuzzy-logic supervisory control, the results are compared with a flowchart control in Section IV.B.Finally, Section IV.C presents a hardware-in-the-loop experimental setup to validate the MATLAB/Simulink simulations.In this experimental setup, the power system is implemented on an OPAL-RT4512 unit, while the proposed control systems are executed on a dSPACE MicroLabBox unit.The results are then displayed on a Yokogawa DLM4038 oscilloscope, where the signals are scaled down and measured in real time according to the references sent by the dSPACE controller board.

A. EVALUATION OF THE DYNAMIC FUZZY LOGIC-BASED EMS

65To ensure a proper response of the dynamic behavior of the MEMG, it is tested over a varying profile of climatic conditions, water consumption, underfloor heating demand and domestic electrical loads over a four-hour simulation.Fig. 4 shows the profile data for water consumption ( ̇ ), irradiance of the PV power plant, and underfloor heating demand ( ⬚ ).Fig. 5 shows the electrical and thermal powers of the MEMG.The power balance for electrical powers is illustrated in Fig. 5a.Between 0 to 2500s, the PV power plant produces 17.95 kW, while the electric boiler consumes 21.5 kW when it is turned on.When the electric boiler reaches the upper temperature setpoint determined by the hysteresis control, it is turned off.In this situation, the BESS is charged at a higher value of 16.95 kW.

66When the electric load demand ( ⬚ ) increases, decreases, and consequently, ⬚ decreases in accordance with the reference signal generated by the fuzzy logic-based dynamic EMS.

67At 7500s, the PV production drops to 6.3 kW.This operating condition implies that as ⬚ increases, the BESS changes to discharging mode while ⬚ reduces due to lower renewable power availability.The BESS remains in discharging mode, and when the SOC is near to the minimum SOC level ( ⬚ = 30%), the BESS is not able to fulfill the demands, and the local grid must provide the necessary power to the MEMG.The fuzzy logic-based dynamic EMS, upon receiving signals indicating a lower SOC and lower ⬚ , sets a minimum value for ⬚ .

68The thermal power balance is illustrated in Fig. 5b.It shows the heat extracted from the bus due to hot water consumption in the fuzzy logic control ( ), the heat injected by the electric boiler in the fuzzy logic control ( ⬚ ), and the heat provided by the gas boiler ⬚ .

69As seen, when there is an increment in ̇ or ⬚ , ⬚ increases its value.Consequently, ⬚ is incremented to maintain the bus temperature at the required value.

70As discussed in Section III, the gas boiler is responsible for maintaining the temperature of the thermal bus, while the electric boiler increases the temperature to fulfill the domestic hot water demand.Fig. 6a shows the measured electric boiler output temperature for the fuzzy logic control ⬚ , which varies according to the operation point of the MEMG at each moment.

71This figure also includes the measured temperature control of the gas boiler for the fuzzy logic control ( ⬚ ) and the reference temperature control (

72).Heat exchangers connect the different thermal components, and ⬚ decreases due to the heat extracted from the bus.Furthermore, Fig. 6b represents the output temperature of the gas boiler ( ⬚ ), the temperature after the heat exchanged with the electric boiler ( ⬚ ), and the temperature after the heat exchange with the underfloor heating, which coincides with the input temperature of the gas boiler ( ⬚ ).

73The BESS SOC control is represented in Fig. 6c.The SOC is maintained between ⬚ and ⬚ .When the SOC approaches ⬚ , the curve becomes less decreasing for the discharging, aligning with the goal of not exceeding ⬚ .

B. EVALUATION OF THE STATES-BASED EMS

74To compare the fuzzy logic-based dynamic EMS discussed in Section III, this section outlines an alternative EMS known as states-based EMS, which is based on operating states.Fig. 7 represents the flowchart of this EMS.It generates the same variables as the fuzzy logic-based dynamic EMS, i.e, to obtain , and , pursuing the same targets.Similarly, the input signals are , , and the maximum power available in the BESS (

75).The outputs are the operating modes for the gas and the electric boilers, and is calculated according to Eqs (11,12).

76On the basis of these definitions, the following five possible modes of operation are defined: , the system operates with excess renewable power.In this mode, the electric boiler is turned on, while the gas boiler operates at a lower temperature.The excess renewable power is managed by the BESS, which charges according to its SOC.Moreover, if the electric boiler is turned off and > 0.6 • , the EMS sends the order to turn on the electric boiler in this operation mode.

77-Normal-temperature mode (NTM): In the case of > 0, and < 0.6 • , the electric boiler operates in NTM, and the gas boiler increases its temperature.The BESS discharges to meet the electric demand.When < 0.6 • and ⬚ < 0.3 • , the boiler is turned on.

78-Low-temperature mode (LTM): If < 0, the electric boiler is activated at low temperatures, while the gas boiler increases its temperature similarly to NTM.If the boiler is turned off, it remains in the LTM.

79-Off mode (NTM): When > 0, and < , if

80, the boiler remains turned off in NTM.

81-Off mode (LTM): When < 0 and the boiler is turned off, it remains turned off in LTM.

82The results for the states-based EMS are shown in Fig. 8, which are denoted as "ST".The electric powers are represented in Fig. 8a.As mentioned above, the MEMG operation is divided into HTM, NTM, and LTM.From 0 to 6000s, the MEMG operates in alternating HTM and NTM modes.The electric boiler consumes its rated power, which is 23 kW, and the BESS is less charged than in Fig. 5a.

83In contrast, when ⬚ increases, ⬚ is kept at rated power, and the MEMG operates in MTM.This implies that the BESS is further discharged to fulfill the demand.Therefore, in this situation, the BESS handles the peaks value of the domestic electrical loads and ⬚ .From 12000s onward, the MEMG operates in LTM and ⬚ is decreased.Similarly, when the SOC is near to ⬚ , the local grid injects the required power to the MEMG as there is not renewable or storage system energy available.

84Analogously, the thermal powers are shown in Fig. 8.b, where the same parameters are represented for the states-based EMS:

85. ,

86. and ., respectively.As shown, a minor amount of heat power is required for the fuzzy-logic control to maintain the temperature, leading to a lower electrical energy consumption of the electric boiler, as shown in Table II.

87On the other hand, Fig. 8c shows the temperature of the electric boiler for the states-based EMS (

88).In this case, is controlled in HTM and MTM from 0 to 6000s, in MTM from 6000s to 10500s and in LTM from 10500s to 15000s.Moreover, Fig. 8c represents the measured temperature control of the gas boiler for the states-based EMS (

89) and the reference temperature control ( ).In this instance, takes a value of 30 °C if the electric boiler operates in HTM and a value of 35 °C if the electric boiler operates in MTM or LTM.The temperature drops due to the heat exchanged in the thermal bus are represented in Fig. 8d for the states-based EMS, which are denoted as , , and .Finally, to ensure the correct operation of the MEMG, the energy balance in the thermal bus must be satisfied.This means that the total heat extracted from the bus ( ⬚ ), which is the sum of the underfloor heating demand ( .⬚ ), and the heat extracted for the electric boiler ( .), must be equal to the heat injected by the gas boiler ( .⬚ ) to maintain ⬚ according to .

90Fig. 9a shows the energy balance for the fuzzy logic control, while Fig. 9b represents the same concept for the states-based control, where adequate responses are achieved in both cases.To provide numerical support to the above discussion, it has been calculated how the electric boiler power is supplied.The total energy consumed by the gas boiler can be computed by integrating the supplied power.Table II illustrates the total energy consumed ( ⬚ ) for the fuzzy-based EMS and the states-based EMS.The results demonstrate a 7.36% reduction in consumption for the presented fuzzy-based EMS.

91Furthermore, Table II presents the energy consumed by the electric and gas boiler.As seen, the energy demand of the electric boiler ( ⬚ ) is reduced by 5.38 % for the fuzzy-based EMS.The total consumption of the local grid ( ⬚ ) is notably reduced by 80.67% for the fuzzy-based EMS, highlighting its superiority over the states-based EMS.The savings lie in the fact that the proposed fuzzy-based EMS is able to dynamically adjust the operating point of the electric and gas boilers, while the state-based EMS maintains a fixed consumption pattern for each operating mode.This dynamic adaptation enables more efficient energy distribution, resulting in energy savings as demonstrated by the numerical analysis.

92Another interesting aspect to analyze is the technology employed to supply the electric boiler.In terms of utilization, the fuzzy EMS enables a 1.74% increase in renewable power utilization ( ⬚ ), and a 4.93% rise in BESS power utilization ⬚ ).This results in a 6.67% decrease in grid utilization ( ⬚ ) when compared to states-based EMS.Consequently, the grid is also less employed to fulfill the demand in each case, demonstrating the superiority of the proposed fuzzy EMS.

93It is essential to note that despite the different control schemes used, the average temperatures for the electric boiler (

94), and the gas boiler ( ) are very similar in both cases, ensuring consistent thermal comfort, as demonstrated in Table II.

95In addition to an energy-based comparison, this section presents the metrics used to quantitatively evaluate the control performance of the FL-EMS compared against the SB-EMS, as well as the BESS SOC behavior and the temperature gradient in the gas boiler.Table III Employing FL-EMS results in an increase of 5.03% in the maximum BESS SOC ( ), 1.6% in the minimum BESS SOC (

96), and 3.98% in the average BESS SOC (

97).This demonstrates that the BESS is managed more effectively with the proposed FL-EMS.

98Finally, the temperature gradient in the gas boiler is calculated, which is defined as ∆T = ( -).The parameter ∆T is directly related to the heat that the gas boiler must generate to meet the thermal demand.The results show

C. HARDWARE-IN-THE-LOOP (HIL) VERIFICATION

99Fig. 10a shows the schematic of the experimental setup built in the laboratory to perform a real-time simulation based on the HIL.The power system is implemented using an OPAL-RT4512 unit, a real-time HIL simulator designed for executing and testing models created using MATLAB/Simulink.It is specifically programmed using RT-Lab software, enabling efficient model implementation and testing.The control system is executed on a DSPACE MicroLabBox unit, programmed using Simulink.DSPACE MicroLabBox is a hardware device dedicated to rapid control prototyping and algorithm testing.

100It incorporates a powerful FPGA, and a comprehensive suite of I/O interfaces.Real-time simulation visualization is achieved using a Yokogawa DLM4038 oscilloscope.The Yokogawa DLM4038 is a digital storage oscilloscope specifically designed for accurate waveform analysis.Fig. 10b illustrates the experimental setup.

101It is worth noting that the OPAL-RT4512 analogue outputs operate within the range of -16V/+16V.Consequently, signals measured in the MATLAB/Simulink simulation must be scaled down to ensure proper representation on the oscilloscope.

102Fig. 11a represents the electric power balance for fuzzybased dynamic EMS during a 3000s real-time simulation.Initially, the signals were scaled down by dividing them by 2000.Subsequently, a scale of 5V/div was employed to visualize the signals, and a scale of 300 s/div was selected as the time scale.

103For instance, the P signal (blue) exhibits a value of 17.95 kW in the first stage of the simulation, as seen in Fig. 5a.When divided by 2000 and represented in a scale of 5V/div, the measured signal is approximately 9 V, consistent with the performed scaling.

104A similar procedure was applied to the remaining signals: P (yellow), P (green), P (purple), and P (red).The obtained results confirmed that no energy was consumed from the grid and verified the results obtained from MATLAB/Simulink, as shown Fig. 5a.

105Fig. 11b shows the temperature control for fuzzy-based dynamic EMS.In this case, the signals were scaled down by dividing them by 2000.A scale of 2V/div is employed to represent the signals, and the scale of 300 s/div is kept.

106(yellow) exhibits a value of 32ºC in the first stage of simulation (Fig. 6a).When divided by 5 and represented on a scale of 2V/div, the measured signal is 6.4 V, confirming accurate representation.The same scaling procedure was applied to (green) and (purple).It was verified that is controlled according to , and the measured results for are consistent with the simulated results (Fig. 6a).Finally, Fig. 11c illustrates the heat bus control for fuzzybased dynamic EMS.The signals were scaled down by dividing them by 1000.A scale of 2V/div was used to represent the signals, and the scale of 300 s/div was maintained.

107For instance, (yellow) takes a value of 7.5 kW at the beginning of the simulation (Fig. 9a), and when divided by 1000 and represented in a scale of 2V/div, the measured signal is 7.5 V, further confirming correct representation.The experimental results corroborate the heat control in the thermal bus.The results obtained in the HIL-based real-time simulation have verified the correct performance of the proposed MEMG.

108The results validate the effectiveness of both the dynamic models and the proposed novel FL-EMS for MEMGs.The FL-EMS demonstrated significant improvements in terms of energy efficiency and dynamic control of MEMGs.This work could be extended by considering the optimal operational costs in the energy distribution, and exploring demand response services to enhance the operational flexibility of MEMGs.

V. CONCLUSION

109Traditionally, MEMG studies have employed a static approach, with optimization algorithms operating over daily or weekly time horizons.These models, typically linearized around a single operating point, may become ineffective when operating conditions deviate.The dynamic study of MEMGs, encompassing real-time control and management systems, which could be improved by the adoption of intelligent control algorithms specifically designed for MEMGs.

110This paper provided a dynamic control for a MEMG with electricity and thermal vectors, encompassing generation, energy storage and load systems.To effectively coordinate the different energy vectors within the MEMG, a dynamic fuzzybased EMS was proposed.The validity of the proposed EMS was evaluated through real-time HIL experimentation.

111Minimizing energy consumption through real-time interconnection of diverse energy vectors represents an underexplored approach for optimizing the operation of MEMGs.

112The proposed EMS was comparatively evaluated with a state-based EMS.By dynamically adjusting the operating point of the thermal generation sources based on available renewable energy, the proposed fuzzy-based EMS achieved a significant reduction of 80% in power grid consumption, accompanied by a decrease of 7.4% in gas boiler consumption, and a reduction of 5.4% in electric boiler consumption.Additionally, compared to the states-based EMS, the use of the PV plant increased by 1.74%, while BESS utilization rose by 4.93% to feed the electric boiler.

113The control of dispatchable and non-dispatchable systems within the context of MEMGs is a sparsely addressed issue in the literature.Concerning the control system, an 89.10% improvement in ITSE was achieved when compared to the states-based EMS for controlling the temperature of the hot water circuit, and a 52.5% improvement in ITSE was achieved for thermal balance control.Additionally, the average SOC was 3.98% higher, and the required temperature jump in the gas boiler was reduced by 7.29%.Despite the differences in energy dispatch between the two EMS implementations investigated in this paper, the findings demonstrated that thermal comfort was maintained when either a gas or an electric boiler was adopted, while the BESS SOC was effectively controlled within safe operating thresholds.The comprehensive approach presented in this paper ensures the efficient operation of the different vectors within an MEMG, leading to significant savings in natural gas consumption and overall energy consumption from the local electricity grid, while complying meeting energy demand.

FIGURE 1 .

114FIGURE 1. Schematic diagram of the electrical-thermal MEMG.

Fig. 2 .

115Fig. 2. Overall MEMG scheme control.

Fig. 3 .

116Fig. 3. Membership functions: a) Gross net power ( ), b) BES SOC, c) electric boiler power ( ), d) electric boiler turn-off temperature ( ), and e) temperature in the thermal bus ( ).

Fig. 4 .

117Fig. 4. MEMG operating parameters.

Fig. 5 .Fig. 6 .

118Fig. 5. Balanced power for fuzzy logic-based dynamic EMS: (a) Electric powers and (b) thermal powers.

Fig. 7 .Fig. 8 .

119Fig. 7. Flowchart states-based EMS.

Fig. 9 .

120Fig. 9. (a) Thermal energy balance for fuzzy logic-based dynamic EMS and (b) electric power balance for state-based EMS.

Fig. 10 .Fig. 11 .

121Fig. 10.Experimental HIL setup implemented in the laboratory:(a) Scheme, (b) Photo.

122Regarding the thermal balance control, the improvement in ITAE is 17.06%, in ITSE is 52.5%, in IAE is 31.19%,and in ISE is 29.99%.

TABLE III METRICS

123FOR EVALUATE THE FUZZY LOGIC-BASED DYNAMIC EMS AND STATES-BASED EMS

참고문헌 30건

  1. Multiobjective Intelligent Energy Management for a Microgrid IEEE Transactions on Industrial Electronics · Institute of Electrical and Electronics Engineers · 2012 10.1109/tie.2012.2188873
  2. Energy efficiency of lithium-ion battery used as energy storage devices in micro-grid 2015 10.1109/iecon.2015.7392923
  3. Modelling Aspects of Flexible Multi-Energy Microgrids 2018 10.23919/pscc.2018.8442468
  4. Distributed Multienergy Coordination of Multimicrogrids With Biogas-Solar-Wind Renewables IEEE Transactions on Industrial Informatics · Institute of Electrical and Electronics Engineers · 2018 10.1109/tii.2018.2877143
  5. Multitimescale Coordinated Adaptive Robust Operation for Industrial Multienergy Microgrids With Load Allocation IEEE Transactions on Industrial Informatics · Institute of Electrical and Electronics Engineers · 2019 10.1109/tii.2019.2907710
  6. Towards future infrastructures for sustainable multi-energy systems: A review Energy · Elsevier BV · 2019 10.1016/j.energy.2019.05.057
  7. A Hybrid Stochastic-Interval Operation Strategy for Multi-Energy Microgrids IEEE Transactions on Smart Grid · Institute of Electrical and Electronics Engineers · 2019 10.1109/tsg.2019.2923984
  8. Achieving low carbon local energy communities in hot climates by exploiting networks synergies in multi energy systems Applied Energy · Elsevier BV · 2019 10.1016/j.apenergy.2019.113901
  9. Flexible Multi-Energy Scheduling Scheme for Data Center to Facilitate Wind Power Integration IEEE Access · Institute of Electrical and Electronics Engineers · 2020 10.1109/access.2020.2990454
  10. Parameter identification and performance estimation for PV modules based on reduced forms model Journal of Renewable and Sustainable Energy · American Institute of Physics · 2020 10.1063/5.0019511
  11. System Modeling and Optimal Dispatching of Multi-energy Microgrid with Energy Storage Journal of Modern Power Systems and Clean Energy · Springer Nature · 2020 10.35833/mpce.2020.000118
  12. Adaptive optimal fuzzy logic based energy management in multi-energy microgrid considering operational uncertainties Applied Soft Computing · Elsevier BV · 2020 10.1016/j.asoc.2020.106882
  13. A home energy management system with an integrated smart thermostat for demand response in smart grids Sustainable Cities and Society · Elsevier BV · 2020 10.1016/j.scs.2020.102639
  14. Optimal planning of <scp>multi‐energy</scp> microgrid with different energy storages and demand responsive loads utilizing a <scp>technical‐economic‐environmental</scp> programming International Journal of Energy Research · Wiley · 2020 10.1002/er.6286
  15. A comprehensive electrical-gas-hydrogen Microgrid model for energy management applications Energy Conversion and Management · Elsevier BV · 2020 10.1016/j.enconman.2020.113726
  16. A Novel Methodology for Electric-Thermal Mixed Power Flow Simulation and Transmission Loss Analysis in Multi-Energy Micro-Grids Frontiers in Energy Research · Frontiers Media · 2021 10.3389/fenrg.2020.620259
  17. A Collaborative Demand-Controlled Operation Strategy for a Multi-Energy System IEEE Access · Institute of Electrical and Electronics Engineers · 2021 10.1109/access.2021.3083922
  18. Cooperative Operation Framework for a Wind-Solar-CCHP Multi-Energy System Based on Nash Bargaining Solution IEEE Access · Institute of Electrical and Electronics Engineers · 2021 10.1109/access.2021.3107156
  19. Multi Energy System With an Associated Energy Hub: A Review IEEE Access · Institute of Electrical and Electronics Engineers · 2021 10.1109/access.2021.3108142
  20. Coordination for Multienergy Microgrids Using Multiagent Reinforcement Learning IEEE Transactions on Industrial Informatics · Institute of Electrical and Electronics Engineers · 2022 10.1109/tii.2022.3168319
  21. Dynamic power management based on model predictive control for hybrid-energy-storage-based grid-connected microgrids International Journal of Electrical Power & Energy Systems · Elsevier BV · 2022 10.1016/j.ijepes.2022.108384
  22. Optimal Operation of Energy Hub: An Integrated Model Combined Distributionally Robust Optimization Method With Stackelberg Game IEEE Transactions on Sustainable Energy · Institute of Electrical and Electronics Engineers · 2023 10.1109/tste.2023.3252519
  23. Flexibility Exploitation With Nonlinear Integrated Demand Response for Multi-Energy System Against Load Estimation Mistake IEEE Access · Institute of Electrical and Electronics Engineers · 2023 10.1109/access.2023.3266056
  24. Probabilistic optimal power allocation of dispatchable DGs and energy storage units in a reconfigurable grid-connected CCHP microgrid considering demand response Journal of Energy Storage · Elsevier BV · 2023 10.1016/j.est.2023.108207
  25. Optimization of a multi-energy microgrid in the presence of energy storage and conversion devices by using an improved gray wolf algorithm Applied Thermal Engineering · Elsevier BV · 2023 10.1016/j.applthermaleng.2023.121141
  26. Model Predictive Control Method of Multi-Energy Flow System Considering Wind Power Consumption IEEE Access · Institute of Electrical and Electronics Engineers · 2023 10.1109/access.2023.3304697
  27. A Novel Price Discovery Insurance Scheme for Outage Resilient Energy Management System IEEE Transactions on Industry Applications · Institute of Electrical and Electronics Engineers · 2023 10.1109/tia.2023.3339471
  28. A Multi-Objective Stochastic Optimization Approach for Planning a Multi-Energy Microgrid Considering Unscheduled Islanded Operation IEEE Transactions on Sustainable Energy · Institute of Electrical and Electronics Engineers · 2023 10.1109/tste.2023.3341898
  29. RETRACTED: Multi-objective scheduling and optimization for smart energy systems with energy hubs and microgrids Engineering Science and Technology an International Journal · Elsevier BV · 2024 10.1016/j.jestch.2024.101649
  30. Robust type 2 fuzzy logic control microgrid-connected photovoltaic system with battery energy storage through multi-functional voltage source inverter using direct power control Energy Reports · Elsevier BV · 2024 10.1016/j.egyr.2024.02.047