DOI: 10.3303/CET2188150 Paper Received: 24 April 2021; Revised: 20 August 2021; Accepted: 4 October 2021 Please cite this article as: Koltsaklis N.E., Knápek J., 2021, Optimal Scheduling of a Multi-Energy Microgrid, Chemical Engineering Transactions, 88, 901-906 DOI:10.3303/CET2188150 CHEMICAL ENGINEERING TRANSACTIONS VOL. 88, 2021 A publication of The Italian Association of Chemical Engineering Online at www.cetjournal.it Guest Editors: Petar S. Varbanov, Yee Van Fan, Jiří J. Klemeš Copyright © 2021, AIDIC Servizi S.r.l. ISBN 978-88-95608-86-0; ISSN 2283-9216 Optimal Scheduling of a Multi-Energy Microgrid Nikolaos E. Koltsaklis*, Jaroslav Knápek Czech Technical University in Prague, Faculty of Electrical Engineering, Technická 2, 166 27, Prague, Czech Republic koltsnik@fel.cvut.cz This work presents an optimization framework for the optimal scheduling of a multi-energy microgrid based on Mixed-Integer Programming techniques and consisting of a number of aggregated end-users. With the objective of satisfying the microgrid's electricity and heat demands in a cost-optimal way, the microgrid includes several technologies such as micro combined heat and power units, gas turbines, heat pumps, renewable energy sources, exchanges with the main grid, as well as flexibility providers such as energy storage systems, electric vehicles, and demand response. One salient feature of the proposed framework is that it considers the contribution of power generating sources in the ancillary services provision, both up and down, providing an additional income for their operation and enhancing the grid operation. An illustrative case study has been used to test the applicability of the proposed approach in both economic and operational terms. The results underscore the significance of including the ancillary services market as a revenues source to the MES as well as the fact that the participation of various resources in both energy and ancillary services markets affects the operational scheduling of the microgrid, and the services provided by the flexibility providers play a major role in the overall cost reduction. System operators, aggregators, and market participants can utilize the proposed optimization framework to determine their operational and investment strategies for optimal resource utilization and portfolio selection. 1. Introduction The energy landscape is undergoing a massive energy transition since the ever-increasing penetration of renewable energy sources (RES) injects additional variability and uncertainty into the energy system. On a technical level, multi-energy systems comprise an auspicious approach for providing the necessary flexibility for the control of the energy systems in an effective way. A microgrid is an integrated energy system including various energy generation technologies, energy storage options, and final consumers. It may operate either on grid-connected or on islanded mode. The grid-connected microgrids can also disconnect from the central grid and operate on islanded mode if required. In those integrated or multi-energy systems (MES), electricity, heating, cooling, fuels, and transport interact with each other at various levels (Mancarella, 2014). Consequently, these additional challenges have attracted the academic community's interest in the operational scheduling problem of a smart grid-based MES to investigate the combined effects of that structure in terms of cost-effectiveness, resilience, and service provision to the grid. Focusing on the energy scheduling problem of a micrοgrid and considering only its electric needs, a series of works have been presented in the literature. Naraharisetti et al. (2011) proposed a relevant optimization model considering various input fuels for the optimal energy scheduling in microgrids. A unit commitment model has been developed by Faqiry et al. (2017) for a day-ahead market-clearing of dispatchable distributed generators from the viewpoint of a distribution system operator. Examining both day-ahead and real-time markets, Eseye et al. (2019) assessed the flexibility provided by energy storage systems and EVs to alleviate mismatches due to demand and RES generation deviations. An optimization model for the optimal energy scheduling of a microgrid has been developed (Adefarati et al., 2021), including RES, battery storage system, and diesel generators. However, this work is focused only on the electric needs of the microgrid system. Also, Nicolosi et al. (2021) presented an optimization-based work for the cost-optimal satisfaction of a microgrid's electricity needs, providing a unit commitment version of the various generators' operation. 901 There is also a series of works taking into account flexibility issues in the microgrid scheduling problem. By formulating a unit commitment model, Alirezazadeh et al. (2020) assessed the impacts of the smart grid contribution in the spinning reserve provision of the central power system, highlighting its flexibility provision potential. In addition, Park and Lee (2020) developed an optimization model for the procurement of flexible ramping services from a microgrid to the central distribution system through energy storage systems and small-scale dispatchable generating units. Nikpour et al. (2021) proposed an optimization approach for the optimal stochastic bidding strategy in the joint energy and ancillary services market of a microgrid consisting of RES, small-scale dispatchable generation units, and energy storage systems. From a multi-energy perspective, an energy scheduling model for a microgrid structure based on micro combined heat and power units has been created, taking into account both electric and thermal requirements of end-users (Kopanos et al., 2013). A similar model, including both electric and thermal load demand, has been developed, focusing on the impacts of market prices on the energy management of the microgrid system (Kumar et al., 2020). In addition, an optimization model for the optimal operation of a MES has been developed for a smart neighborhood, including demand response in terms of thermal comfort (Çiçek et al., 2020). In addition, a similar scheduling model for a MES has been presented (Ata et al., 2019) to investigate the impacts of RES stochasticity and electric vehicles (EVs) in grid-to-vehicle mode. The last two works consider electricity, cooling, and heating demands. The literature review has identified the complexities and challenges for the energy scheduling problem of microgrids considering its interactions with the main power grid and the integration of all consumer needs (electricity, heating, and cooling) in an integrated way. However, the literature does not examine the combined effects of microgrid's services procurement to the grid in the form of ancillary services as well as its modeling as a multi-energy system. The current work aspires to enrich the existing literature with an integrated approach, providing an optimization framework for a MES microgrid with electricity, heating, and cooling requirements, which can also procure flexibility services to the main power grid. Apart from examining only the flexibility potential of dispatchable generating units and energy systems, the proposed is further extended to incorporate the flexibility provision by EVs, demand response, as well as heat pumps, providing some first insights of a sector coupling contribution to those ancillary services. 2. Methodology Figure 1 presents the superstructure of the suggested methodological framework. As can be seen, there are three types of final end-users demands, including electricity, heating, and cooling load. Various technologies are available for the supply of those energies, including: (i) natural gas-fired combined heat and power (CHP) units for the provision of electricity and heat, (ii) natural gas-fired dispatchable generators (GEN) for electricity production, (iii) RES-based electricity production, (iv) electricity exchanges (imports and exports) with the main power grid, (v) stationary energy storage (ESS) and EVs which can both charge and discharge energy with the power grid, (vi) demand response programs (DRPs) which can increase and decrease their consumption based on specified limits, (vii) natural gas-fired boiler (GB) and electric heat pump (HP) in heating mode for heat generation, and (viii) electric heat pump in cooling mode for the satisfaction of cooling demand. There are also specific operating reserve requirements, both upwards and downwards, in the MES, and the various technologies can provide those services to the main power grid by submitting priced offers. Figure 1: Flowchart of the proposed framework CHP units Dispatchable generating units RES (PV+Wind) Energy storage systems Electric vehicles Demand response Electricity load Heating load Cooling load Main Power grid Heat pumpNatural Gas Local grid Electricity exports Electricity imports Reserve provision Natural gas Electricity Heating Cooling Gas boiler 902 The objective function of the model concerns the MES net cost minimization incorporating the operational cost of the considered technologies (∑ (𝑝𝑡 𝑔𝑎𝑠 ∙ 𝐶𝑡 𝑔𝑎𝑠 )𝑡 ), the net electricity trade cost (𝑝𝑡 𝑓𝑔 ∙ 𝐶𝑡 𝑒𝑙𝑒𝑐 −𝑝𝑡 𝑡𝑔 ∙ 𝑅𝑡 𝑒𝑙𝑒𝑐), the start-up related cost of dispatchable generators (∑ ∑ (𝐶𝑔𝑒𝑛,𝑡 𝑠𝑡−𝑢𝑝 ∙ 𝑥𝑔𝑒𝑛,𝑡 𝑠𝑡−𝑢𝑝 )𝑡𝑔𝑒𝑛 ), and the revenues from the provision of ancillary services to the grid (∑ ∑ 𝑟𝑔𝑖,𝑡 𝑜𝑝𝑒𝑟,𝑢𝑝 ∙𝑡𝑖∈𝑅𝑢𝑝 𝑅𝑖,𝑡 𝑢𝑝 + ∑ ∑ 𝑟𝑔𝑖,𝑡 𝑜𝑝𝑒𝑟,𝑑𝑛 ∙𝑡𝑖∈𝑅𝑑𝑛 𝑅𝑖,𝑡 𝑑𝑛), as given by Eq(1): Minimization 𝐶𝑑𝑎𝑖𝑙𝑦 = ∑(𝑝𝑡 𝑔𝑎𝑠 ∙ 𝐶𝑡 𝑔𝑎𝑠 ) 𝑡 ⏞ 𝑛𝑎𝑡𝑢𝑟𝑎𝑙 𝑔𝑎𝑠 𝑓𝑢𝑒𝑙 𝑐𝑜𝑠𝑡 +∑(𝑝𝑡 𝑓𝑔 ∙ 𝐶𝑡 𝑒𝑙𝑒𝑐 − 𝑝𝑡 𝑡𝑔 ∙ 𝑅𝑡 𝑒𝑙𝑒𝑐) 𝑡 ⏞ 𝑛𝑒𝑡 𝑒𝑙𝑒𝑐𝑡𝑟𝑖𝑐𝑖𝑡𝑦 𝑡𝑟𝑎𝑑𝑒 𝑐𝑜𝑠𝑡 + ∑∑(𝐶𝑔𝑒𝑛,𝑡 𝑠𝑡−𝑢𝑝 ∙ 𝑥𝑔𝑒𝑛,𝑡 𝑠𝑡−𝑢𝑝 ) 𝑡𝑔𝑒𝑛 ⏞ 𝑠𝑡𝑎𝑟𝑡−𝑢𝑝 𝑐𝑜𝑠𝑡 − { ∑ ∑𝑟𝑔 𝑖,𝑡 𝑜𝑝𝑒𝑟,𝑢𝑝 ∙ 𝑡𝑖∈𝑅𝑢𝑝 𝑅 𝑖,𝑡 𝑢𝑝⏞ 𝑜𝑝𝑒𝑟𝑎𝑡𝑖𝑛𝑔 𝑢𝑝𝑤𝑎𝑟𝑑 𝑟𝑒𝑠𝑒𝑟𝑣𝑒 𝑝𝑟𝑜𝑣𝑖𝑠𝑖𝑜𝑛 𝑟𝑒𝑣𝑒𝑛𝑢𝑒𝑠 + ∑ ∑𝑟𝑔 𝑖,𝑡 𝑜𝑝𝑒𝑟,𝑑𝑛 ∙ 𝑡𝑖∈𝑅𝑑𝑛 𝑅𝑖,𝑡 𝑑𝑛 ⏞ 𝑜𝑝𝑒𝑟𝑎𝑡𝑖𝑛𝑔 𝑑𝑜𝑤𝑛𝑤𝑎𝑟𝑑 𝑟𝑒𝑠𝑒𝑟𝑣𝑒 𝑝𝑟𝑜𝑣𝑖𝑠𝑖𝑜𝑛 𝑟𝑒𝑣𝑒𝑛𝑢𝑒𝑠 } (1) The constraint in Eq(2) depicts the electricity demand balance of the studied MES in each time period. The electricity contribution can be from: (i) electricity purchases from the grid (𝑝𝑡 𝑓𝑔), (ii) electricity generation from the CHPs (∑ 𝑝𝑐ℎ𝑝,𝑡 𝑐ℎ𝑝,𝑒𝑙𝑒𝑐 𝑐ℎ𝑝 ), the dispatchable generators (∑ 𝑝𝑔𝑒𝑛,𝑡 𝑔𝑒𝑛 𝑔𝑒𝑛 ), and RES (∑ 𝑝𝑟𝑒𝑠,𝑡𝑟𝑒𝑠𝑟𝑒𝑠 ), and (iii) net discharging power output from ESS (∑ (𝑝𝑒𝑠𝑠,𝑡𝑑𝑖𝑠 − 𝑝𝑒𝑠𝑠,𝑡𝑐ℎ )𝑒𝑠𝑠 ) and EVs (∑ (𝑝𝑒𝑣,𝑡𝑑𝑖𝑠 −𝑝𝑒𝑣,𝑡𝑐ℎ )𝑒𝑣 ). The consumption side includes the final demand of the end-users (∑ 𝑑𝑑𝑟,𝑡 𝑛𝑒𝑤 𝑑𝑟 ), the electricity sales to the grid (𝑝𝑡 𝑡𝑔), and the electricity input to the electric heat pumps (∑ 𝑝ℎ𝑝,𝑡 ℎ𝑝,𝑖𝑛𝑝𝑢𝑡 ℎ𝑝 ). 𝑝𝑡 𝑓𝑔 +∑𝑝𝑐ℎ𝑝,𝑡 𝑐ℎ𝑝,𝑒𝑙𝑒𝑐 𝑐ℎ𝑝 + ∑𝑝𝑔𝑒𝑛,𝑡 𝑔𝑒𝑛 𝑔𝑒𝑛 + ∑𝑝𝑟𝑒𝑠,𝑡 𝑟𝑒𝑠 𝑟𝑒𝑠 +∑(𝑝𝑒𝑠𝑠,𝑡 𝑑𝑖𝑠 − 𝑝𝑒𝑠𝑠,𝑡 𝑐ℎ ) 𝑒𝑠𝑠 + ∑(𝑝𝑒𝑣,𝑡 𝑑𝑖𝑠 − 𝑝𝑒𝑣,𝑡 𝑐ℎ ) 𝑒𝑣 = ∑𝑑𝑑𝑟,𝑡 𝑛𝑒𝑤 𝑑𝑟 + 𝑝𝑡 𝑡𝑔 + ∑𝑝ℎ𝑝,𝑡 ℎ𝑝,𝑖𝑛𝑝𝑢𝑡 ℎ𝑝 ∀𝑡 (2) Eqs(3) and (4) define the MES heating and cooling demand balance in each time period. As can be seen in Eq(3), the heating demand (𝐷𝑡ℎ𝑒𝑎𝑡) can be met by heat pumps operating in heating mode (∑ 𝑝ℎ𝑝,𝑡 ℎ𝑝,ℎ𝑒𝑎𝑡,𝑜𝑢𝑡𝑝𝑢𝑡 ℎ𝑝 ), gas boilers output (∑ 𝑝𝑔𝑏,𝑡 𝑔𝑏,ℎ𝑒𝑎𝑡 𝑔𝑏 ), and heat output of CHP units (∑ 𝑝𝑐ℎ𝑝,𝑡 𝑐ℎ𝑝,ℎ𝑒𝑎𝑡 𝑐ℎ𝑝 ). Correspondingly in Eq(4), the cooling load (𝐷𝑡𝑐𝑜𝑜𝑙) can be satisfied by heat pumps operating in cooling mode (∑ 𝑝ℎ𝑝,𝑡 ℎ𝑝,𝑐𝑜𝑜𝑙𝑖𝑛𝑔,𝑜𝑢𝑡𝑝𝑢𝑡 ℎ𝑝 ). ∑𝑝ℎ𝑝,𝑡 ℎ𝑝,ℎ𝑒𝑎𝑡,𝑜𝑢𝑡𝑝𝑢𝑡 ℎ𝑝 +∑𝑝𝑔𝑏,𝑡 𝑔𝑏,ℎ𝑒𝑎𝑡 𝑔𝑏 + ∑𝑝𝑐ℎ𝑝,𝑡 𝑐ℎ𝑝,ℎ𝑒𝑎𝑡 𝑐ℎ𝑝 = 𝐷𝑡 ℎ𝑒𝑎𝑡 ∀𝑡 (3) ∑𝑝ℎ𝑝,𝑡 ℎ𝑝,𝑐𝑜𝑜𝑙𝑖𝑛𝑔,𝑜𝑢𝑡𝑝𝑢𝑡 ℎ𝑝 = 𝐷𝑡 𝑐𝑜𝑜𝑙 ∀𝑡 (4) The total reserve provision by the various flexibility providers is split into the part allocated for the MES requirements, and the other part is reserved for the main grid needs. Eqs(5) and (6) set the MES operating reserve requirements, both upwards (𝑅𝑡 𝑟𝑒𝑞,𝑢𝑝 ) and downwards (𝑅𝑡 𝑟𝑒𝑞,𝑑𝑛), in each time period. In particular, reserve-up services can be provided by CHPs (∑ 𝑟𝑚𝑐ℎ𝑝,𝑡 𝑜𝑝𝑒𝑟,𝑢𝑝 𝑐ℎ𝑝 ), generators, (∑ 𝑟𝑚𝑔𝑒𝑛,𝑡 𝑜𝑝𝑒𝑟,𝑢𝑝 𝑔𝑒𝑛 ), ESS (∑ 𝑟𝑚𝑒𝑠𝑠,𝑡 𝑜𝑝𝑒𝑟,𝑢𝑝 𝑒𝑠𝑠 ), EVs (∑ 𝑟𝑚𝑒𝑣,𝑡 𝑜𝑝𝑒𝑟,𝑢𝑝 𝑒𝑣 ), DRPs (∑ 𝑟𝑚𝑑𝑟,𝑡 𝑜𝑝𝑒𝑟,𝑢𝑝 𝑑𝑟 ), and the main power grid (𝑟𝑡 𝑔𝑟𝑖𝑑,𝑢𝑝), as stated in (5). In addition to the flexibility providers in the upward services, additional providers of downward services include RES (∑ 𝑟𝑚𝑟𝑒𝑠,𝑡 𝑜𝑝𝑒𝑟,𝑑𝑛 𝑟𝑒𝑠 ), and electric heat pumps (∑ 𝑟𝑚ℎ𝑝,𝑡 𝑜𝑝𝑒𝑟,𝑑𝑛 ℎ𝑝 ), as can be seen in Eq(6). ∑𝑟𝑚𝑑𝑟,𝑡 𝑜𝑝𝑒𝑟,𝑢𝑝 𝑑𝑟 + ∑𝑟𝑚𝑒𝑠𝑠,𝑡 𝑜𝑝𝑒𝑟,𝑢𝑝 𝑒𝑠𝑠 + ∑𝑟𝑚𝑒𝑣,𝑡 𝑜𝑝𝑒𝑟,𝑢𝑝 𝑒𝑣 + ∑𝑟𝑚𝑔𝑒𝑛,𝑡 𝑜𝑝𝑒𝑟,𝑢𝑝 𝑔𝑒𝑛 + ∑𝑟𝑚𝑐ℎ𝑝,𝑡 𝑜𝑝𝑒𝑟,𝑢𝑝 𝑐ℎ𝑝 + 𝑟𝑡 𝑔𝑟𝑖𝑑,𝑢𝑝 ≥ 𝑅𝑡 𝑟𝑒𝑞,𝑢𝑝 ∀𝑡 (5) ∑𝑟𝑚𝑑𝑟,𝑡 𝑜𝑝𝑒𝑟,𝑑𝑛 𝑑𝑟 + ∑𝑟𝑚𝑒𝑠𝑠,𝑡 𝑜𝑝𝑒𝑟,𝑑𝑛 𝑒𝑠𝑠 +∑𝑟𝑚𝑒𝑣,𝑡 𝑜𝑝𝑒𝑟,𝑑𝑛 𝑒𝑣 +∑𝑟𝑚𝑔𝑒𝑛,𝑡 𝑜𝑝𝑒𝑟,𝑑𝑛 𝑔𝑒𝑛 +∑𝑟𝑚𝑐ℎ𝑝,𝑡 𝑜𝑝𝑒𝑟,𝑑𝑛 𝑐ℎ𝑝 +∑𝑟𝑚𝑟𝑒𝑠,𝑡 𝑜𝑝𝑒𝑟,𝑑𝑛 𝑟𝑒𝑠 + ∑𝑟𝑚ℎ𝑝,𝑡 𝑜𝑝𝑒𝑟,𝑑𝑛 ℎ𝑝 + 𝑟𝑡 𝑔𝑟𝑖𝑑,𝑑𝑛 ≥ 𝑅𝑡 𝑟𝑒𝑞,𝑑𝑛 ∀𝑡 (6) 903 Additional constraints include the detailed modeling of ESS and EVs when providing energy and operating reserves and the representation of DRPs for the supply of the same services. It also includes the modeling of CHP units when providing electricity, heat, and operating reserve capacity and the respective modeling of RES and dispatchable generators taking into account their minimum uptimes, downtimes, and start-up and shut-down decision-making. Heat pumps, gas boilers are also modeled, and the energy purchases and sales with the main power grid, also considering the operating reserve exchange, subject to the maximum allowable flow limit. The overall problem is formulated as a mixed-integer linear programming model. 3. Case study An illustrative case study of aggregated end-users comprising a MES has been selected to test the applicability of the proposed approach. Four combined heat and power (CHP) units and two dispatchable generating units (GE) are considered as conventional generators of electricity and/or heat (for CHPs), the basic characteristics of which are presented in Table 1, together with the basic data of gas boiler and heat pump. An ESS of 500 kWh capacity (250 kW maximum charging and discharging power output and round-trip efficiency of 81 %) and five types of EVs have been modelled, operating in both grid-to-vehicle and vehicle-to- grid modes. The demand of the MES is also modelled as dynamic, having the potential to increase and decrease up to 5 % compared to the reference demand levels, correspondingly. The MES has an electrical, heating, and cooling load, the exact values of which are presented in Figures 3, 4, and 5. The MES also has upward, and downward operating reserve requirements (Figures 6 and 7, correspondingly), as well as all the flexibility providers (CHPs, generators, ESS, EVs, DRPs, and HPs) can sell those services to the grid. The electricity price from the grid equals 0.05396 €/kWhel in 1-9 h, 0.06339 €/kWhel in 10 h, 14-17 h, 20 h, and 23- 24 h, 0.101878 €/kWhel in 11-13 and 18-19 h, as well as 0.111313 €/kWhel in 21-22 h. The gas price equals 0.02 €/kWhth. The RES capacity of both PV and wind equals 300 kW each, and their average daily utilization factor is 21.2 % and 6.7 %. Table 1: Key technical data of the considered generating technologies TYPE Electric capacity (kW) Heat capacity (kW) Electric efficiency (%) Heat efficiency (%) Minimum Electric capacity (kW) CHP1 500 1,225 21.90 % 53.66 % 150 CHP2 300 555 31.00 % 57.35 % 90 CHP3 610 512.4 40.80 % 34.27 % 183 CHP4 1,000 1,360 34.00 % 46.24 % 300 GEN1 200 - 36.00 % - 67 GEN2 500 - 34.00 % - 167 4. Results The problem has been solved to global optimality using the ILOG CPLEX 12.6.0.0 solver incorporated in the General Algebraic Modeling System (GAMS) tool (Rosenthal, 2015). An integrality gap of 0 % has been achieved in the examined case. The total daily cost for the operation of the MES equals around 1,953 €, and the total natural gas demand amount to around 137,501 kWhth. CHP units and dispatchable generators contribute the most to the electricity generation mix, accounting for around 79.6 % of the total at a daily level, as shown in Figure 2. Electricity purchases from the main grid cover an additional 10.3 % of the total consumption, as well as the remaining 10 % is supplied by RES, EVs and ESS discharging. Figure 3 depicts the demand allocation mix, where it can be observed that that the most significant additional load types such as electricity exports to the main grid, electricity input to the HPs, ESS, and EVs charging load occur during the first eight h and the last three h of the day. Not surprisingly, these time periods are characterized by generally lower demand levels, and consequently, the electricity prices are lower than the average ones. CHPs, HPs, and GBs are responsible for covering the heating load requirements, and HPs are the only contributors to the cooling load needs. As can be seen in Figure 4, which depicts the heat generation mix, CHP units cover the largest part of the heating load, and gas boilers contribute a constant part during most of the h of the day. HPs supply the whole demand during two h of the day (4th and 5th h of the day), when there are no requirements for the cooling load (see Figure 5), and they can operate in heating mode. The operating reserves, both upwards and downwards, that can be provided by the available flexibility providers (CHPs, generators, ESS, EVs, DR, RES, HPs) can be used for covering the requirements of the MES (non-priced offers), as well as can be offered to the main grid, acquiring in this way additional revenues for the MES (priced offers), and subject to the maximum allowable power flow to and from the power grid. Figure 6 depicts 904 the upward operating reserve services for the MES requirements. As can be observed, the MES can cover its requirements from its own resources, and there is some excess capacity, especially during the first 8 h of the day, which is not supplied to the grid due to transmission flow limits. All flexibility providers, namely CHPs, generators, DRPs, ESS, and EVs, contribute to that service with different percentages. Figure 2: MES Electricity contribution mix Figure 3: MES load allocation mix Figure 4: Heat generation mix in the studied MES Figure 5: Cooling generation mix in the studied MES Figure 6: MES up operating reserve services mix Figure 7: MES down operating reserve services mix Figure 8: Upward operating reserve services provided by the MES to the grid Figure 9: Downward operating reserve services provided by the MES to the grid 0 500 1000 1500 2000 2500 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 k W h CHPs Generators Grid Imports RES ESS Discharge EVs Discharge 0 500 1000 1500 2000 2500 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 k W h New demand Grid Exports ESS charging load EVs charging load HPs input 0 500 1000 1500 2000 2500 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 k W h CHPs HPs GBs Demand 0 20 40 60 80 100 120 140 160 180 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 k W h HPs Demand 0 50 100 150 200 250 300 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 k W h ESS CHPs Generators DRPs EVs Grid Demand 0 200 400 600 800 1000 1200 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 k W h ESS CHPs Generators HPs Demand DRPs RES EVs Grid 0 50 100 150 200 250 300 350 400 450 500 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 k W h ESS CHPs Generators DRPs EVs 0 50 100 150 200 250 300 350 400 450 500 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 k W h ESS CHPs Generators RES HPs DRPs EVs 905 Figure 7 presents the same information for the MES downward requirements. Since the MES resources operate close to their operational limits to cover its energy and reserve requirements, there is plenty of available downward capacity. As in the upward requirements, all flexibility providers also take part in the satisfaction of this service. Figure 8 portrays the upward operating reserve services provided by the MES to the grid. As expected and based on Figure 6, the MES can provide flexibility into the grid in terms of the upward reserve during the hours of relatively low demand (1-8 h, 19 h, and 21-24 h). Dispatchable generators and CHP units contribute mainly to that service. According to the information presented in Figure 4b and shown in Figure 9, the MES can supply a significant amount of downward reserve capacity to the grid during all the hours of the day. CHPs, HPs, and ESSs cover that type of service, and the maximum available flow limit bounds their provision. 5. Conclusions This work presents an integrated optimization model for the optimal scheduling of a MES that can also provide ancillary services to the power grid. The results highlight the importance of considering the ancillary services market as a source of additional income to the MES since it achieves a cost reduction of almost 28 % compared to the case where this additional source of potential income is not included, namely from almost 2,702 € to 1,953.3 €. Another interesting finding is the significant flexibility offered to the system by ESS, EVs, DRPs, as well as from sector-coupling technologies such as electric heat pumps. Future challenges include the incorporation of planning decision-making into the methodological framework and the incorporation of additional market products and relevant technologies. Acknowledgments This work has been supported by the project International Mobility of Researchers in CTU, ČVUT FEL (Project Registration No. CZ.02.2.69/0.0/0.0/16_027/0008465). References Adefarati T., Bansal R.C., Bettayeb M., Naidoo R., 2021. Optimal energy management of a PV-WTG-BSS-DG microgrid system. Energy, 217, 119358. Alirezazadeh A., Rashidinejad M., Abdollahi A., Afzali P., Bakhshai A., 2020. A new flexible model for generation scheduling in a smart grid. Energy, 191, 116438. Ata M., Erenoğlu A.K., Şengör İ., Erdinç O., Taşcıkaraoğlu A., Catalão J.P.S., 2019. Optimal operation of a multi-energy system considering renewable energy sources stochasticity and impacts of electric vehicles. Energy, 186, 115841. Çiçek A., Şengör İ., Erenoğlu A.K., Erdinç O., 2020. Decision making mechanism for a smart neighborhood fed by multi-energy systems considering demand response. Energy, 208, 118323. Eseye A.T., Lehtonen M., Tukia T., Uimonen S., Millar R.J., 2019. Optimal Energy Trading for Renewable Energy Integrated Building Microgrids Containing Electric Vehicles and Energy Storage Batteries. IEEE Access, 7, 106092-106101. Faqiry M.N., Zarabie A.K., Nassery F., Wu H., Das S., 2017. A day-ahead market energy auction for distribution system operation. 2017 IEEE International Conference on Electro Information Technology (EIT), Lincoln, NE, USA, 14-17 May 2017, 182-187. Kopanos G.M., Georgiadis M.C., Pistikopoulos E.N., 2013. Energy production planning of a network of micro combined heat and power generators. Applied Energy, 102, 1522-1534. Kumar D., Verma Y.P., Khanna R., Gupta P., 2020. Impact of market prices on energy scheduling of microgrid operating with renewable energy sources and storage. Materials Today: Proceedings, 28, 1649-1655. Mancarella P., 2014. MES (multi-energy systems): An overview of concepts and evaluation models. Energy, 65, 1-17. Naraharisetti P.K., Karimi I.A., Anand A., Lee D.-Y., 2011, A linear diversity constraint – Application to scheduling in microgrids. Energy, 36(7), 4235-4243. Nicolosi F.F., Alberizzi J.C., Caligiuri C., Renzi M., 2021. Unit commitment optimization of a micro-grid with a MILP algorithm: Role of the emissions, bio-fuels and power generation technology. Energy Reports. DOI: 10.1016/j.egyr.2021.04.020. Nikpour A., Nateghi A., Shafie-khah M., Catalão J.P.S., 2021. Day-ahead optimal bidding of microgrids considering uncertainties of price and renewable energy resources. Energy, 227, 120476. Rosenthal R.E., 2015. GAMS: A User's Guide. Washington, DC: GAMS Development Corporation accessed 14.07.2021. 906