Je tiens à remercier les membres du jury de thèse pour l'attention particulière qu'ils ont portée sur ces travaux ainsi que pour les nombreuses perspectives proposées. De plus, votre bienveillance et vos compliments m'ont permis d'apprécier encore plus mes travaux.

Stéphane, tu as envie d'améliorer le monde qui t'entoure, de donner aux autres les ressources nécessaires à devenir des personnes meilleures. C'est ce que tu as fait pour moi. J'en tire de grands enseignements, j'ai pu développer de nombreuses compétences, que ce soit professionnellement ou socialement. Tu as toujours été présent pendant la thèse. C'est d'un immense soutient. Je t'admire pour tes nombreuses qualités. Merci pour tout Stéphane.

Julien, merci pour tes encouragements tout au long de la thèse, c'était important de se sentir valorisé. Grâce aux cours et au projet étudiant que tu m'as donnés, j'ai pu avoir de très bonnes bases pour commencer le développement de mes algorithmes et agir en autonomie.

À toutes les personnes qui m'ont aidé, à toutes les personnes qui m'ont proposé des défis ou à toutes les personnes que j'ai rencontrées, je vous exprime ma plus grande gratitude. J'ai pu évoluer grâce à vous. A toute personne qui lit ces remerciements, grâce à vous, ces travaux sont partagés, et ils pourront, je l'espère contribuer à un monde meilleur aussi modeste soit cette contribution. A toi qui lis ces remerciements, je te souhaite bon courage et beaucoup de réussite.

Sophie, merci pour tout, d'avoir activement participé à contribuer à maintenir l'équilibre dans la force et pour ta bienveillance. Jean-Jacques, merci pour tes nombreux conseils et de m'avoir aidé lors de ma recherche de thèse. Tu as su me faire prendre du recul par rapport à ma thèse et aussi quelles pistes pouvaient être utilisés pour aider d'autres doctorants. Alexandra Elbakyan, merci d'éliminer tout obstacle sur la voie de la science.

Pour tout l'ensemble du laboratoire PROMES-CNRS, permanents ou non-permanents, vous pouvez être heureux d'avoir réussi à offrir une ambiance de travail aussi agréable, confortable et aussi accueillante. Il y a peu de zones de travail telles que celle-ci.

Je remercie tous les doctorants du laboratoire, ça a été une bonne aventure de passer cette thèse avec vous. Le PROMES de Toulouse, Anis, Danielle, Alexis et Chloé, pour les randonnées, les soirées jeux, les discussions et tous les moments passés ensemble. Eztaz Youssef, pour les conseils, m'avoir enseigné une nouvelle langue et avoir été un sacré adversaire aux échecs. Nouha, tu as été l'une des premières à m'accueillir dans le laboratoire, à proposer des activités et faire vivre le laboratoire. Diane, tu as réussi à m'intégrer facilement au laboratoire malgré ma timidité, ça a été un plaisir d'aller dans la nature avec toi à de nombreuses occasions. Oumayma, samaka azraq, pour toutes les discussions, les conseils, ton écoute, m'avoir appris à écrire et parler en Arabe et de te soucier de ce que ressent chacun. Pour les doctorants de l'aquarium et du lagon, Martin, Antoine, Kadar et Alexandre merci pour tous les moments passés ensemble dans notre espace né-bulleux, pour votre bonne humeur qui ont nourri le corps de pâtisseries et l'esprit d'un grain de folie. Vive la République De l'Aquarium. Dounia, merci pour ton soutien et tes conseils durant cette thèse. Ton aide m'a permis de prendre la bonne décision sur la direction à prendre. Tu m'as allégé d'un poids à chacune de nos conversations qu'elles soient sérieuses ou pas du tout. Je suis très heureux de vous avoir tous rencontré.

Margaux, Sandrine, pour tous les bons moments passés ensemble, pour votre bonne humeur, chaque fois que l'on se retrouve, c'est comme si quelques jours avaient passés seulement. Sami, iii Quentin, Loïc, Nicolas, ma deuxième famille, vous êtes géniaux. J'ai de la chance d'avoir des amis comme vous. Cela fait un bon nombre d'années qu'on se connait et je suis très content de vous avoir. A tous mes meilleurs amis, je sais que je peux vous faire confiance, que vous serez toujours là pour moi. Je vous aime tous ! À toute ma famille, que ce soit mes grands-parents, mes tantes, oncles et mon cousin et mes cousines je mesure la chance que j'ai d'être dans une telle famille où chacun veille sur son prochain. Vous agissez dans l'amour et la bienveillance. Je vous aime très fort. À mon frère, mon père et ma mère, je vous aime du fond du coeur. Vous avez toujours été là, que ce soit matériellement ou spirituellement, peu importe la distance qui nous séparait. Vous êtes prêt à tout pour m'aider. Vous m'avez apporté tout ce dont j'avais besoin pour grandir et évoluer. Merci pour votre soutien permanent. Merci à moi-même aussi ! Merci à la vie, à toute chose vivante ou non. Merci à la lumière.

Contents

Remerciements iii

List of Figures xi

List of Tables xix

Nomenclature xxv

Résumé [4]. . . . . . . . . . . . . . . . . . . . 3 MG components: loads, renewable energy generation sources, conventional generation sources, energy storage systems, and electric vehicles. The energy management system (EMS) and the supervisory control and data acquisition (SCADA) coordinate energy demand and supply between the dispatchable generators and the different loads [START_REF] Fahad | Microgrids Energy Management Systems: A Critical Review on Methods, Solutions, and Prospects[END_REF] 2 Model predictive control (MPC) scheme. x: forecast vector. P c : power consumption. P p : power generation. P r : power bought from the main grid. P o : optimization vector. P f : total batteries power. E f : batteries total energy. G c : CO 2 emissions. k: actual time step. . . . . . . . . . . . . . . . . . . . . . . . . . 58 2.3 Microgrid MG 1 equipped with 16 electric vehicles (7-day simulation). P p : power generation. P c : power consumption. P f b f : power stored with the MPC fb strategy. P ib f : power stored with the MPC ib strategy. P r f : power stored with the rule-based strategy RB. α: sum of normalized electricity tariffs and normalized CO 2 emissions. 65 2.4 Microgrid MG 1 equipped with 16 electric vehicles (7-day simulation). P f b f : power stored with the MPC fb strategy. P ib f : power stored with the MPC ib strategy. E f b f : energy stored (fictitious battery) with the MPC fb strategy. E ib f : energy stored (fictitious battery) with the MPC ib strategy. E f b b : energy stored (bank of batteries) with the MPC fb strategy. E ib b : energy stored (bank of batteries) with the MPC ib strategy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 2.5 Microgrid MG 2 equipped with 16 electric vehicles (7-day simulation). P p : power generation. P c : power consumption. P f b f : power stored with the MPC fb strategy. P ib f : power stored with the MPC ib strategy. P r f : power stored with the rule-based strategy RB. α: sum of normalized electricity tariffs and normalized CO 2 emissions. 67 2.6 Microgrid MG 2 equipped with 16 electric vehicles (7-day simulation). P f b f : power stored with the MPC fb strategy. P ib f : power stored with the MPC ib strategy. E f b f : energy stored (fictitious battery) with the MPC fb strategy. E ib f : energy stored (fictitious battery) with the MPC ib strategy. E f b b : energy stored (bank of batteries) with the MPC fb strategy. E ib b : energy stored (bank of batteries) with the MPC ib strategy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 2.7 Microgrid MG 3 equipped with 16 electric vehicles (7-day simulation). P p : power generation. P c : power consumption. P f b f : power stored with the MPC fb strategy. P ib f : power stored with the MPC ib strategy. P r f : power stored with the rule-based strategy RB. α: sum of normalized electricity tariffs and normalized CO 2 emissions. 69 2.8 Microgrid MG 3 equipped with 16 electric vehicles (7-day simulation). P f b f : power stored with the MPC fb strategy. P ib f : power stored with the MPC ib strategy. E f b f : energy stored (fictitious battery) with the MPC fb strategy. E ib f : energy stored (fictitious battery) with the MPC ib strategy. (see Sections 2.2 and 2.5) when the MPC strategy is used (1-day simulation). MG: microgrid. P f : power stored used for one MG. P f n : power stored used for the NMG. E f : energy stored in all batteries. E v : energy stored in all electric vehicle batteries. E b : energy stored in the bank of batteries. P p : power generation used for one MG. P pn : power generation used for the NMG. P c : power consumption of one MG. P cn : power consumption of the NMG. P r : power bought from the main grid for one MG. P rn : power bought from the main grid for the NMG. P e : power exchanged between one MG and other. I s : islanding period of microgrid l. I sn : islanding period of the NMG. C r : normalized electricity tariffs. α: sum of normalized electricity tariffs and normalized CO 2 emissions. . . . . . . . . . . . .

3.4

Networked microgrid (NMG) behaviour for Islanding Scenario 1 and Operation 6 (see Sections 2.2 and 2.5) when the rule-based strategy is used (1-day simulation). MG: microgrid. P f : power stored used for one MG. P f n : power stored used for the NMG. E f : energy stored in all batteries. E v : energy stored in all electric vehicles batteries. E b : energy stored in the bank of batteries. P p : power generation used for one MG. P pn : power generation used for the NMG. P c : power consumption of one MG. P cn : power consumption of the NMG. P r : power bought from the main grid for one MG. P rn : power bought from the main grid for the NMG. P e : power exchanged between one MG and other. I s : islanding period of microgrid l. I sn : islanding period of the NMG. C r : normalized electricity tariffs. α: sum of normalized electricity tariffs and normalized CO 2 emissions. . . . . . . . . . . . .

3.5

Networked microgrid (NMG) behaviour for Islanding Scenario 3 and operation 3 (see Sections 2.2 and 2.5) when the MPC strategy is used (1-day simulation). MG: microgrid. P f : power stored used for one MG. P f n : power stored used for the NMG. E f : energy stored in all batteries. E v : energy stored in all electric vehicles batteries. E b : energy stored in the bank of batteries. P p : power generation used for one MG. P pn : power generation used for the NMG. P c : power consumption of one MG. P cn : power consumption of the NMG. P r : power bought from the main grid for one MG. P rn : power bought from the main grid for the NMG. P e : power exchanged between one MG and other. I s : islanding period of microgrid l. I sn : islanding period of the NMG. C r : normalized electricity tariffs. α: sum of normalized electricity tariffs and normalized CO 2 emissions. . . . . . . . . . . . . [START_REF] Jiang | Multi-Objective Optimal Dispatching of Microgrid With Large-Scale Electric Vehicles[END_REF] 3.6 Networked microgrid (NMG) behaviour for Islanding Scenario 3 and Operation 3 (see Sections 2.2 and 2.5) when the rule-based strategy is used (1-day simulation). MG: microgrid. P f : power stored used for one MG. P f n : power stored used for the NMG. E f : energy stored in all batteries. E v : energy stored in all electric vehicles batteries. E b : energy stored in the bank of batteries. P p : power generation used for one MG. P pn : power generation used for the NMG. P c : power consumption of one MG. P cn : power consumption of the NMG. P r : power bought from the main grid for one MG. P rn : power bought from the main grid for the NMG. P e : power exchanged between one MG and other. I s : islanding period of microgrid l. I sn : islanding period of the NMG. C r : normalized electricity tariffs. α: sum of normalized electricity tariffs and normalized CO 2 emissions. . . . . . . . . . . . . [START_REF] Wu | Fixed-Time Distributed Secondary Control for Islanded Microgrids With Mobile Emergency Resources Over Switching Communication Topologies[END_REF] 3.7 Networked microgrid (NMG) behaviour for Islanding Scenario 2 and operation 2 (see Sections 2.2 and 2.5) when the MPC strategy is used (1-day simulation). MG: microgrid. P f : power stored used for one MG. P f n : power stored used for the NMG. E f : energy stored in all batteries. E v : energy stored in all electric vehicles batteries. E b : energy stored in the bank of batteries. P p : power generation used for one MG. P pn : power generation used for the NMG. P c : power consumption of one MG. P cn : power consumption of the NMG. P r : power bought from the main grid for one MG. P rn : power bought from the main grid for the NMG. P e : power exchanged between one MG and other. I s : islanding period of microgrid l. I sn : islanding period of the NMG. C r : normalized electricity tariffs. α: sum of normalized electricity tariffs and normalized CO 2 emissions. . . . . . . . . . . . . [START_REF] Ho | Design and Simulation of an Autonomous Smart Microgrid for Energy Independence[END_REF] 3.8 Networked microgrid (NMG) behaviour for Islanding Scenario 2 and operation 2 (see Sections 2.2 and 2.5) when the rule-based strategy is used (1-day simulation). MG: microgrid. P f : power stored used for one MG. P f n : power stored used for the NMG. E f : energy stored in all batteries. E v : energy stored in all electric vehicles batteries. E b : energy stored in the bank of batteries. P p : power generation used for one MG. P pn : power generation used for the NMG. P c : power consumption of one MG. P cn : power consumption of the NMG. P r : power bought from the main grid for one MG. P rn : power bought from the main grid for the NMG. P e : power exchanged between one MG and other. I s : islanding period of microgrid l. I sn : islanding period of the NMG. 4.4 Schematic of the LNEG thermal MG operated in direct mode. EMG: electrical MG (see Figure 4.3). HP: heat pump. SC: solar collectors. HWT: hot water tank. TES: thermal energy storage. FCU: fan coil units. T c : temperature of the fluid circulating in the solar collectors. T w : temperature of the water in the HWT. T h : temperature of the water circulating in the heat pump. T e : temperature of the water in the TES. F c : flow rate of the fluid circulating in the solar collectors. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the FCUs. F h : flow rate of the water circulating between the TES and the heat pump. F s : supply air flow rate. in: entering fluid. out: leaving fluid. P r : electricity bought from the main grid. P s : PV power generation surplus. The grey color and the dashed lines indicate the part of the system not available for the operating mode chosen. . . . . . . . . 4.5 Schematic of the LNEG thermal MG operated in economic mode. EMG: electrical MG (see Figure 4.3). HP: heat pump. SC: solar collectors. HWT: hot water tank. TES: thermal energy storage. FCU: fan coil units. T c : temperature of the fluid circulating in the solar collectors. T w : temperature of the water in the HWT. T p : temperature of the water circulating in the heat pump. T e : temperature of the water in the TES. F c : flow rate of the fluid circulating in the solar collectors. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the FCUs. F h : flow rate of the water circulating between the TES and the heat pump. T e,j : simulated temperature of the water in the TES (layer j). T e,j : measured temperature of the water in the TES (layer j). F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. . The green dashed line is a good choice to turn on the FCU (at k + i = 5) of a room. The green line is the best choice to turn on the FCU (at k + i + 1 = 6) of a room. The red line is a bad choice to turn on the FCU (at k + i + 2 = 7) of a room. . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 4.24 PID FCU strategy for thermal comfort management in room R4 (3- (3-day simulation). T w : temperature of the water in the hot water tank (HWT). T c : temperature of the fluid circulating in the solar collectors. T e,j : temperature of the water in the TES (layer j). F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the FCUs. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions. . 4.28 Optimization-free MPC strategy MPC HP/TES (3-day simulation). T w : temperature of the water in the hot water tank (HWT). T c : temperature of the fluid circulating in the solar collectors. T e,j : temperature of the water in the TES (layer j). F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the FCUs. F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the fan coil units. P s : PV power generation surplus.

GT I c GTI expressed in W m -2 GT I m GTI expressed in hJ cm -2 h FCU convective heat transfer coefficient (W m -2 K -1
q Metabolic activity (W m -2 ) Q FCU Heat
U c SC heat loss coefficient (W m -2 K -1 ) U A e,h Overall heat transfer coefficient of the TES heat exchanger (W m -2 K -1 ) U A e,l TES overall heat loss coefficient (W m -2 K -1 ) U A w,h Overall heat transfer coefficient of the HWT heat exchanger (W m -2 K -1 ) U A w,l HWT overall heat loss coefficient (W m -2 K -1 )
V e Total volume of the water in the TES (m 3 )

V f Volume of the water circulating in a FCU (m 3 ) V r Volume of a room (m 3 ) V c
Volume of the fluid circulating in the SC (m 3 )

V e,h

N.B.

Cette thèse a été rédigée en anglais pour qu'elle soit accessible à un large public. Néanmoins, le lecteur francophone trouvera ci-après un résumé étendu rédigé en français récapitulant les principales contributions de ces travaux.

N.B. This thesis is written in English to make it more accessible to a wider audience. That being said, the interested reader will find hereinafter an extended summary in French of the main scientific contributions that this work makes.

Introduction

Contexte

En raison des activités humaines, une grande quantité de gaz à effet de serre est libérée dans l'atmosphère. Ainsi, les émissions de CO 2 liées à l'exploitation des ressources dites fossiles, principalement le pétrole, le charbon et le gaz, sont passées d'environ 20 000 Mt à environ 32 500 Mt entre 1990 à 2017 [1]. C'est pourquoi, en raison de l'augmentation du taux de CO 2 dans l'atmosphère, la température moyenne à la surface de la Terre a augmenté au cours des dernières décennies [2]. De plus, le mode de vie de l'homme dépend en grande partie des ressources fossiles mais aussi des ressources fissiles comme l'uranium. La consommation mondiale d'électricité dépend principalement de ces ressources. Or, elles ne peuvent être exploitées indéfiniment. De plus, selon l'Agence Internationale de l'Énergie, la demande mondiale d'énergie électrique pourrait croître de 45 % d'ici 2030 [3].

L'exploitation d'une ressource énergétique dite renouvelable (renouvellement naturel et rapide de la ressource) permet de produire de l'électricité en limitant les émissions polluantes et en réduisant les déchets. Les énergies renouvelables permettent de réduire l'utilisation des ressources fossiles et fissiles dans le monde. C'est pourquoi l'utilisation des énergies renouvelables (hydroélectricité, éolien, solaire photovoltaïque, bioélectricité, géothermie, solaire thermodynamique et l'énergie des océans) augmente [4]. En 2018, les énergies renouvelables occupaient environ 33 % de la part de la production d'électricité installée dans le monde [4]. Cependant, la pénétration des énergies renouvelables nécessite une restructuration du réseau électrique.

Le réseau électrique est organisé selon un mode de production centralisé. La production centralisée (nucléaire par exemple) est envoyée vers un réseau de transport puis un réseau de distribution avant d'être consommée par les usagers, selon un sens unidirectionnel. Cependant, le réseau électrique doit évoluer pour prendre en compte les nouveaux moyens de productions renouvelables tels que les éoliennes ou les centrales solaires photovoltaïques, qui sont des modes de production décentralisés, diffus et intermittents. A cause de cette intermittence, la qualité de l'énergie est dégradée. L'opérateur du réseau électrique doit également tenir compte des nouveaux usages de l'énergue et du déploiement des véhicules électriques (VEs). En effet, le nombre de VEs en circulation n'a cessé de croître depuis 2014 et a atteint 5,1 millions de véhicules en 2018 [4]. Lorsqu'ils sont intégrés au réseau électrique sans méthode de gestion efficace, ils dégradent la stabilité du réseau à cause de leur appel de puissance variable et diffus [START_REF]Le réseau électrique intelligent ou smart grid[END_REF].

Dans ce contexte, des microréseaux, c'est-à-dire des réseaux à petite échelle, sont déployés pour soutenir la production décentralisée. Ainsi, la production devient locale et est au plus près du consommateur. La Commission de Régulation de l'Énergie (CRE) [START_REF]Thèse Sur Les Microgrids : Étude Sur Les Perspectives Stratégiques de l'Énergie[END_REF][START_REF]Les Microgrids / Introduction[END_REF] définit les microréseaux comme «des réseaux électriques à petite échelle conçus pour fournir une alimentation électrique fiable à un petit nombre de consommateurs. Les microréseaux (MGs) combinent plusieurs installations de production locales et diffuses, des installations de consommation, des installations de stockage et des outils de supervision et de contrôle pour la gestion de la demande. Les MGs peuvent être directement connectés au réseau de distribution d'électricité (c'est-à-dire le xxxi Résumé en français réseau électrique) ou fonctionner de manière déconnectée du réseau (mode îlotage). Le concept de microréseau, susceptible de concerner différentes échelles de système (c'est-à-dire un bâtiment, un quartier, une zone industrielle ou artisanale, un village, etc.) est en train d'être étendu aux réseaux de chaleur et de gaz naturel, et peut donc être pensé de manière multiforme». Les microréseaux sont donc confrontés à différents défis : ils doivent être résilients, fiables et robustes, ils doivent contribuer à la qualité de l'approvisionnement électrique et favoriser la pénétration des sources d'énergie renouvelable. Afin de relever ces défis, des stratégies de gestion efficaces doivent voir le jour.

Ainsi, les acteurs Français de la distribution d'électricité parmi lesquels ENEDIS [START_REF]Le réseau électrique intelligent ou smart grid[END_REF], ont fait le choix de solutions logicielles, possiblement fondées sur des prévisions, pour la gestion de la production décentralisée, la localisation de défauts, la régulation de tension, le pilotage de la demande et la gestion des systèmes de stockage. Ces algorithmes amélioreront l'autoconsommation, contribueront à la stabilité du réseau électrique et tiendront compte des nouveaux usages de l'énergie. Cependant, la mise en oeuvre d'algorithmes complexes peut être une tâche difficile. En effet, même si ce genre d'algorithme est efficace afin de piloter des microréseaux, cela se fait souvent aux dépens du coût calculatoire. Disposer de grandes ressources calculatoires peut avoir un prix économique élevé. Il est donc nécessaire de développer des algorithmes de gestion à coût calculatoire maîtrisé afin de piloter ces systèmes.

Les travaux présentés se veulent une réponse à ces défis, en proposant des stratégies prédictive à coût calculatoire maîtrisé. Cette thèse s'est initialement déroulée dans le cadre d'une collaboration avec une entité locale : Roussillon Aménagement. Le but de cette collaboration était de développer des stratégies prédictives (plus de détails peuvent être trouvés ci-après) afin de piloter efficacement un microréseau, équipant un bâtiment industriel, disposant de moyens de stockage et de production, et de valider in situ ces stratégies. Ce microréseau était équipé d'un véhicule électrique.

Ces dernières années, des microréseaux interconnectés (en réseau), appelés réseaux de microréseaux (ou NMG pour Networked MicroGrid), sont apparus comme une solution possible pour la restructuration du réseau électrique de distribution du futur. Dans ces réseaux de microréseaux, les ressources locales sont partagées entre les microréseaux et une gestion coopérative des échanges d'énergie est effectuée [START_REF] Luis Querini | Cooperative Energy Management System for Networked Microgrids[END_REF]. Selon Alam et al. [START_REF] Nabab Alam | Networked Microgrids: State-of-the-Art and Future Perspectives[END_REF], «les réseaux de microréseaux font référence à l'interconnexion de deux ou plusieurs MGs avec une capacité à se connecter au système de distribution pour échanger de l'énergie entre les microréseaux et/ou le système de distribution au point de couplage commun (PCC)». Le déploiement des NMGs est un moyen intéressant d'améliorer la sécurité, l'efficacité, la durabilité, la robustesse, la fiabilité, la rentabilité économique et de réduire l'empreinte carbone au sein du réseau électrique [START_REF] Nabab Alam | Networked Microgrids: State-of-the-Art and Future Perspectives[END_REF][START_REF] Xie | Optimal Energy Storage Sizing for Networked Microgrids Considering Reliability and Resilience[END_REF][START_REF] Li | Coordination between Smart Distribution Networks and Multi-Microgrids Considering Demand Side Management: A Trilevel Framework[END_REF]. Dans les NMGs, un MG peut être îloté pour un fonctionnement autonome, avec (ou sans) d'autres MGs. Dans ce cas, les systèmes de gestion de l'énergie (ou EMS pour Energy Management System) cherchent à maximiser l'autonomie énergétique [START_REF] Fady | Optimization Methods and Energy Management in "Smart Grids[END_REF][START_REF] Nabab Alam | Networked Microgrids: State-of-the-Art and Future Perspectives[END_REF].

Notons que des pics de consommation peuvent survenir durant certaines périodes de l'année où les conditions climatiques peuvent être extrêmes, c'est le cas en hiver par exemple. Dès lors, il devient difficile de garantir la stabilité du réseau et des pannes de courant peuvent se produire. Le gestionnaire du réseau électrique propose des contrats qui permettent de pallier ce problème. Dans ces contrats, il peut être demandé à un gestionnaire de microréseau ou de réseau de microréseaux d'effectuer un effacement (réduire sa consommation) ou d'effectuer un îlotage (déconnexion du microréseau ou du réseau de microréseaux du réseau électrique) durant une période donnée afin de réduire la charge à soutenir durant ces pics de consommation. Une compensation financière peut alors être versée au gestionnaire du microréseau ou du réseau de microréseaux.

Toujours dans le contexte de la collaboration initiée avec l'entité locale, une étude se concentrait sur la gestion d'un réseau de microréseaux équipant des bâtiments industriels. Ce type de système n'est pas très courant en France, d'où la nécessité de solutions pour piloter efficacement 1 Introduction ce type de système. La planification de l'îlotage du réseau de microréseaux a été testé en simulation pour ce réseau de microréseaux. Malheureusement, pour diverses raisons, la collaboration a pris fin, et aucune validation expérimentale n'a pu être réalisée.

Les systèmes de stockage utilisés dans les microréseaux et dans les réseaux de microréseaux électriques sont souvent des batteries lithium, cependant ces batteries sont chères et il peut être plus intéressant, d'un point de vue économique, d'utiliser des systèmes de stockage d'énergie thermique [START_REF] Ziyati | Numerical Modeling of Large-Scale Compact Pv-Csp Hybrid Plants[END_REF][START_REF] Le | Éco-conception d'un échangeur-stockeur thermique de type thermocline[END_REF]. De plus, les statistiques montrent que la consommation d'énergie dans les bâtiments représente environ 30 % de la consommation d'énergie dans le monde. 77 % de cette consommation concerne l'énergie thermique [START_REF] Rana | Renewables[END_REF]. Aux États-Unis, par exemple, selon le ministère de l'énergie [START_REF] Jeon | White-Model Predictive Control for Balancing Energy Savings and Thermal Comfort[END_REF], le chauffage, la ventilation et la climatisation (CVC) représentent un tiers de la consommation d'énergie dans un bâtiment. Afin de réduire l'utilisation des combustibles fossiles et les coûts économiques, les systèmes de production d'eau chaude solaire pour le chauffage des locaux sont en plein essor [START_REF] Rana | Renewables[END_REF]. C'est dans ce contexte que se déploient des microréseaux thermiques et des microréseaux multi-énergies [START_REF]Thèse Sur Les Microgrids : Étude Sur Les Perspectives Stratégiques de l'Énergie[END_REF][START_REF]Les Microgrids / Introduction[END_REF]. Cependant, comme c'est le cas pour les microréseaux et réseaux de microréseaux électriques, des stratégies de gestion doivent être mises en oeuvre afin de piloter efficacement ces systèmes et d'en améliorer l'efficacité énergétiques et le taux d'autoconsommation, tout en garantissant leur stabilité.

Le projet Interreg SUDOE IMPROVEMENT a été initié dans ce contexte. L'objectif principal du projet est de transformer est de transformer des bâtiments publics, devant faire face à des charges critiques, en bâtiments à faible consommation d'énergie, grâce à des microréseaux multi-énergies [17]. La gestion efficace des microréseaux dont les bâtiments peuvent être équipés est un défi à relever. Il est à noter que les bâtiments étudiés sont toujours particuliers en raison de l'extrême sensibilité de leurs équipements aux perturbations électriques. Pour des raisons scientifiques dans les universités et les centres technologiques, pour des raisons sanitaires dans les hôpitaux et pour des raisons de sécurité dans les gares ou les aéroports, la qualité et la continuité de la fourniture électrique sont essentielles. Ces bâtiments ont besoin de grandes quantités d'électricité et de chaleur pour le chauffage et l'eau chaude sanitaire. Ce projet a été mené dans la région sud-ouest de l'Europe (SUDOE) qui comprend le Portugal, l'Espagne ainsi que deux régions françaises : la Nouvelle-Aquitaine et l'Occitanie. Les travaux de cette thèse se sont inscrits dans le cadre de ce projet.

Un des cas d'étude de ce projet, étudié dans cette thèse, est situé à Lisbonne (Portugal) [17]. Il est étudié, sous la direction du Laboratoire National d'Énergie et de Géologie (LNEG), avec le soutien de l'Institut Technique Supérieur (IST) de Lisbonne et intègre des systèmes de production de chaleur et de froid renouvelables pour la conversion d'un bâtiment public en un bâtiment à faible consommation d'énergie (nZEB). Un microréseau multi-énergie équipe ce bâtiment public. Le but de l'étude est de développer un système de gestion de l'énergie tirant profit de l'interaction du microréseau thermique et du microréseau électrique qui le composent afin d'assurer le confort thermique des usagers du bâtiment public (équipé par le microréseau), tout en réduisant le coûts économique et l'empreinte carbone de ce type de système.

Travaux de thèse

Des stratégies efficaces doivent donc être développées afin de piloter le microréseau électrique et le réseau de microréseaux électriques étudiés lors de la collaboration avec l'entité locale ainsi que le microréseau multi-énergie étudié dans le cadre du projet IMPROVEMENT. Une stratégie émergente pour le pilotage des microréseaux est la commande prédictive (MPC). Cette stratégie prend en compte le comportement futur d'un système afin de prédire la meilleure séquence de commande à appliquer sur un horizon de prédiction. Une fois la séquence de commande optimisée, seule la première commande, à l'instant actuel, est appliquée. Ensuite, le processus d'optimisation recommence sur l'horizon de prédiction qui est désormais décalé d'un pas de temps dans le futur. La commande prédictive est un outil très efficace lorsque des incertitudes sont présentes et perturbent le système (comme un excédent de production PV, la variabilité de la charge, la variabilité des prix, etc.) Les diverses stratégies prédictives mises en place au cours de cette thèse sont développées dans l'optique de les implémenter sur site. C'est pourquoi certaines de ces stratégies utilisent un modèle de commande simplifié et ont recours ou non à de l'optimisation afin de conserver un coût calculatoire maîtrisé. De cet objectif de pilotage des microréseaux et de l'utilisation de la commande prédictive, émerge une problématique qui peut se résumer comme suit : est-il possible de développer des algorithmes prédictifs faciles à mettre en oeuvre, nécessitant peu de ressources calculatoires et garantissant un niveau de performance satisfaisant ? Notons qu'avant d'implémenter des stratégies prédictives complexes in situ, il est nécessaire de tester des stratégies avec modèle simplifié permettant d'en valider l'usage pour la gestion des microréseaux. Dans l'industrie, des algorithmes fondés sur des règles sont préférés pour la mise en oeuvre de stratégies car ils ne sont pas trop complexes. Développer des stratégies prédictives à coût calculatoire maîtrisé (qui ne nécessitent pas d'optimisation ou dont le problème d'optimisation associé est simplifié) est la première étape pour mettre en oeuvre, par la suite, des stratégies MPC plus complexes. À l'avenir, les serveurs de calcul pourraient devenir moins coûteux et plus efficaces, rendant ces stratégies MPC plus faciles à mettre en oeuvre in situ. Différents apports méthodologiques ont été réalisés au cours de cette thèse :

-une stratégie prédictive pour la gestion simplifiée d'un ensemble de batteries fixes et mobiles (véhicules électriques) car dans la littérature, la majorité des méthodes ont un coût calculatoire élevé (limitant, de fait, la possibilité d'une implémentation in situ) ;

-tirer profit de prévisions des émissions de CO 2 en lien avec la production électrique nationale afin d'utiliser, autant que possible, une énergie bas carbone pour satisfaire les besoins d'un microréseau (peu de travaux de recherche considèrent ces émissions) ;

-une stratégie prédictive tirant profit des systèmes de stockage dont est équipé un réseau de microréseaux, dans un contexte d'ilotage ; cette stratégie tient compte de la criticité des différentes charges et propose deux modes de décharge (standard ou dégradé), ainsi qu'un système de récompense ;

-une stratégie prédictive sans optimisation permettant de tirer profit d'un surplus de production PV pour couvrir les besoins d'un microréseau thermique (gestion des ressources thermiques et du confort thermique des usagers) ; cette stratégie a été évaluée en mode « connecté au réseau » et en mode îloté.

Cas d'étude

Trois types de microréseaux sont donc étudiés dans cette thèse. Le premier est un microréseau électrique, équipant un bâtiment industriel (échelle moyenne), disposant d'un banc de batteries, de véhicules électriques et d'une installation photovoltaïque qui soutiennent sa charge. Le deuxième est un réseau de microréseaux électriques, équipant des bâtiments industriels (échelle large), qui possède des charges critiques et qui doit faire face à des opérations d'îlotage planifiées. Le troisième est un microréseau multi-énergie (thermique et électrique) équipant un bâtiment public (petite échelle), disposant de collecteurs solaires, de panneaux PV, de systèmes de stockage thermiques et électriques, d'une pompe à chaleur et de systèmes de ventilation qui permettent de garantir le confort thermique des usagers.

Structure du manuscrit

Tout d'abord, un état de l'art des stratégies de gestion les plus récentes, appliquées aux microréseaux électriques et aux réseaux de microréseaux électriques, est présenté dans le Chapitre 1. Afin de répondre à la problématique abordée, cette thèse est ensuite divisée en trois parties qui correspondent au contrôle de trois types de systèmes : un microréseau électrique, un réseau de microréseaux électriques et un microréseau multi-énergie (thermique et électrique). Dans le Tableau 1 -Articles discutés mettant en évidence les avancées récentes en matière de stratégie de gestion des MGs/NMGs, selon la méthode utilisée.

Méthode Articles présentés

Commande prédictive [START_REF] Parisio | Cooperative MPC-Based Energy Management for Networked Microgrids[END_REF][START_REF] Tsai | Model Predictive Optimization for Energy Storage-Based Smart Grids[END_REF][START_REF] Wen | MPC-Based Frequency Control Strategy with a Dynamic Energy Interaction Scheme for the Grid-Connected Microgrid System[END_REF][START_REF] Jayachandran | Predictive Power Management Strategy for PV/Battery Hybrid Unit Based Islanded AC Microgrid[END_REF][START_REF] Wu | A Model Predictive Control Approach in Microgrid Considering Multi-Uncertainty of Electric Vehicles[END_REF][START_REF] Ryu | MPC Based Energy Management System for Hosting Capacity of PVs and Customer Load with EV in Stand-Alone Microgrids[END_REF][START_REF] Pan | Model Predictive Load Frequency Control of Isolated Micro-Grid with Electrical Vehicles[END_REF][START_REF] Li | Model Predictive Control of a Voltage-Source Inverter With Seamless Transition Between Islanded and Grid-Connected Operations[END_REF][START_REF] Valencia | Robust Energy Management System for a Microgrid Based on a Fuzzy Prediction Interval Model[END_REF][START_REF] Del Nozal | A MPC Strategy for the Optimal Management of Microgrids Based on Evolutionary Optimization[END_REF][START_REF] Gust | Strategies for Microgrid Operation under Real-World Conditions[END_REF][START_REF] Bogdanovic | InterFlex -Simris-Technical Management of a Grid-Connected Microgrid That Can Run in an Islanded Mode with 100% Renewable Generation[END_REF][START_REF] Ouammi | Model Predictive Control for Optimal Energy Management of Connected Cluster of Microgrids with Net Zero Energy Multi-Greenhouses[END_REF] Systèmes multi-agents [START_REF] Ju | Multi-Agent-System-Based Coupling Control Optimization Model for Micro-Grid Group Intelligent Scheduling Considering Autonomy-Cooperative Operation Strategy[END_REF][START_REF] Kong | A Multi-Agent Optimal Bidding Strategy in Microgrids Based on Artificial Immune System[END_REF][START_REF] Egbue | Multi-Agent Approach to Modeling and Simulation of Microgrid Operation with Vehicle-to-Grid System[END_REF][START_REF] Waseem | Multi-Agents Based Optimal Energy Scheduling Technique for Electric Vehicles Aggregator in Microgrids[END_REF][START_REF] Nguyen | A Distributed Hierarchical Control Framework in Islanded Microgrids and Its Agent-Based Design for Cyber-Physical Implementations[END_REF][START_REF] Morstyn | Multi-Agent Sliding Mode Control for State of Charge Balancing Between Battery Energy Storage Systems Distributed in a DC Microgrid[END_REF][START_REF] Li | MAS-Based Distributed Control Method for Multi-Microgrids with High-Penetration Renewable Energy[END_REF][START_REF] Chen | Multi-Time Scale Coordinated Optimal Dispatch of Microgrid Cluster Based on MAS[END_REF][START_REF] Fang | Multi-Agent Deep Reinforcement Learning for Distributed Energy Management and Strategy Optimization of Microgrid Market[END_REF][START_REF] Tope | Multi-Agent Based Optimal Operation of Hybrid Energy Sources Coupled with Demand Response Programs[END_REF] Théorie des jeux [START_REF] Luis Querini | Cooperative Energy Management System for Networked Microgrids[END_REF][START_REF] Ali | Comparative Study on Game-Theoretic Optimum Sizing and Economical Analysis of a Networked Microgrid[END_REF][START_REF] Ali | Optimal Planning of Clustered Microgrid Using a Technique of Cooperative Game Theory[END_REF][START_REF] Mei | Coalitional Game Theory Based Local Power Exchange Algorithm for Networked Microgrids[END_REF][START_REF] Sun | Day-Ahead Economic Dispatch of Microgrid Based on Game Theory[END_REF][START_REF] Hu | Multi-Energy Management with Hierarchical Distributed Multi-Scale Strategy for Pelagic Islanded Microgrid Clusters[END_REF][START_REF] Yu | A Game Theoretical Pricing Mechanism for Multi-Microgrid Energy Trading Considering Electric Vehicles Uncertainty[END_REF][START_REF] Javanmard | Energy Management of Multi-Microgrids Based on Game Theory Approach in the Presence of Demand Response Programs, Energy Storage Systems and Renewable Energy Resources[END_REF][START_REF] Aziz | A Decentralized Game Theoretic Approach for Virtual Storage System Aggregation in a Residential Community[END_REF] Programmation stochastique [START_REF] Vergara | A Stochastic Programming Model for the Optimal Operation of Unbalanced Three-Phase Islanded Microgrids[END_REF][START_REF] Li | Combined Two-Stage Stochastic Programming and Receding Horizon Control Strategy for Microgrid Energy Management Considering Uncertainty[END_REF][START_REF] Guo | Economic-Environmental Analysis of Renewable-Based Microgrid under a CVaR-Based Two-Stage Stochastic Model with Efficient Integration of Plug-in Electric Vehicle and Demand Response[END_REF][START_REF] Thomas | Optimal Operation of an Energy Management System for a Grid-Connected Smart Building Considering Photovoltaics' Uncertainty and Stochastic Electric Vehicles' Driving Schedule[END_REF][START_REF] Jordehi | Two-Stage Stochastic Programming for Scheduling Microgrids with High Wind Penetration Including Fast Demand Response Providers and Fast-Start Generators[END_REF][START_REF] Zhang | Incorporating Production Task Scheduling in Energy Management of an Industrial Microgrid: A Regret-Based Stochastic Programming Approach[END_REF][START_REF] Sayed Rezwanul Islam | Multi-Facility Aggregate Production Planning with Prosumer Microgrid: A Two-Stage Stochastic Program[END_REF][START_REF] Cao | Networked Microgrids Planning Through Chance Constrained Stochastic Conic Programming[END_REF] Optimisation robuste [START_REF] Yang | Robust Optimization of Microgrid Based on Renewable Distributed Power Generation and Load Demand Uncertainty[END_REF][START_REF] Hussain | Impact Analysis of Demand Response Intensity and Energy Storage Size on Operation of Networked Microgrids[END_REF][START_REF] Liu | Distributed Robust Energy Management of a Multimicrogrid System in the Real-Time Energy Market[END_REF][START_REF] Tan | Two-Stage Robust Optimization Dispatch for Multiple Microgrids with Electric Vehicle Loads Based on a Novel Data-Driven Uncertainty Set[END_REF][START_REF] Adineh | Robust Optimization Based Harmonic Mitigation Method in Islanded Microgrids[END_REF][START_REF] Aryanezhad | A Robust Game-Theoretic Optimization Model for Battery Energy Storage in Multi-Microgrids by Considering of Renewable Based DGs Uncertainty[END_REF][START_REF] Mohiti | Two-Stage Robust Optimization for Resilient Operation of Microgrids Considering Hierarchical Frequency Control Structure[END_REF] Intelligence artificielle [START_REF] Wang | Demand-Side Management for off-Grid Solar-Powered Microgrids: A Case Study of Rural Electrification in Tanzania[END_REF][START_REF] Darville | Microgrid Operational Planning Using a Hybrid Neural Network with Resource-aware Scenario Selection[END_REF][START_REF] Uddin | A Novel Peak Shaving Algorithm for Islanded Microgrid Using Battery Energy Storage System[END_REF]

État de l'art

Un état de l'art est présenté dans le premier chapitre de cette thèse (cet état de l'art a été publié dans un journal scientifique [START_REF] Mannini | A Survey of Recent Advances in the Smart Management of Microgrids and Networked Microgrids[END_REF]) afin de mettre en lumière les différentes stratégies de gestion qui existent pour piloter un microréseau ou un réseau de microréseaux. Ces stratégies sont classées comme suit : commande prédictive, systèmes multi-agents, théorie des jeux, programmation stochastique, optimisation robuste, intelligence artificielle et contrôle de statisme. Les articles présentant les stratégies qui font l'objet d'importantes recherches ces dernières années, comme le montre la Figure 1.2, ont donc été sélectionnés et analysés. Les différentes stratégies peuvent être utilisées afin d'atteindre des objectifs différents : économiques, écologiques ou techniques. Ces stratégies peuvent également être appliquées à la régulation de fréquence, à la régulation de tension au sein du microréseau ou entre le microréseau et le réseau électrique, ou encore à la gestion de l'énergie circulant dans le microréseau.

Ce premier chapitre est découpé en trois parties. Dans une première partie est tout d'abord détaillée la méthodologie utilisée afin de sélectionner les articles qui sont présentés dans ce chapitre. Ensuite, dans une deuxième partie, des projets de microréseaux sont présentés afin d'apprécier l'évolution qu'ont connu ces systèmes au cours des vingt dernières années. Enfin, la troisième partie traite des stratégies les plus récentes concernant la gestion de microréseaux et de réseaux de microréseaux (voir Tableau 1). Une conclusion est donnée afin de mettre en lumière les tendances observées dans la littérature.

Des conclusions sont tirées des articles discutés dans ce chapitre et les questions abordées par la communauté scientifique sont identifiées :

-la commande prédictive apparaît comme une alternative intéressante aux méthodes conventionnelles pour la régulation de la tension et de la fréquence, la gestion des flux d'énergie, la gestion des ressources énergétiques distribuées ou l'optimisation du fonctionnement des MGs/NMGs ; -les outils de l'apprentissage automatique reçoivent de plus en plus d'attention de la part de la communauté scientifique car ils peuvent être utilisés pour le développement d'algorithmes de prévision efficaces mais aussi dans le développement d'approches de contrôle intelligent pour les MGs et NMGs, en particulier l'apprentissage par renforcement, qui apparaît comme une solution intéressante ; la logique floue et les systèmes neuro-flousces systèmes combinent la logique floue et les réseaux de neurones artificiels -sont des approches populaires dans le domaine ; -les systèmes multi-agents sont largement utilisés dans la gestion des systèmes distribués et restent intéressants pour la gestion des MGs et NMGs équipés de plusieurs générateurs distribués et/ou de véhicules électriques (VEs) ; les systèmes multi-agents se sont avérés être un outil permettant de mettre l'accent sur le comportement autonome des membres d'une communauté énergétique ; -en raison de sa capacité à gérer efficacement la coopération, la théorie des jeux est un très bon candidat pour la gestion efficace des NMGs, comme le soulignent plusieurs articles de recherche inclus dans cette étude ; -bien que sa popularité semble diminuer, la commande de statisme est encore largement utilisée pour la régulation de fréquence et la régulation de tension ou la gestion des flux de puissance. Alors que l'intérêt pour les VEs ne cesse de croître -cet intérêt est mis en évidence par le nombre d'articles mentionnés dans cet état de l'art -, de nombreux défis restent à relever, notamment en ce qui concerne la gestion des batteries dont ces véhicules sont équipés. L'intégration des VEs dans le système électrique a un impact sur la demande en électricité, ce qui entraîne des incertitudes. Ces incertitudes peuvent avoir différentes influences sur les performances des stratégies de gestion de l'énergie mises en oeuvre. Les batteries des VEs joueront un rôle clé dans l'équilibre entre l'offre et la demande d'énergie et peuvent contribuer au fonctionnement optimal des MGs et NMGs îlotés. Par conséquent, des stratégies nouvelles et efficaces sont nécessaires pour tirer parti de ces capacités de stockage flexibles, dans un contexte de pénétration croissante de la production décentralisée dans les réseaux électriques. Les stratégies de gestion des VEs basées sur la commande prédictive, la programmation stochastique ou l'intelligence artificielle gagnent en popularité ces dernières années.

La faisabilité des stratégies de gestion proposées lorsque les MGs/NMGs s'îlotent est également évaluée. Étant donné qu'un fonctionnement correct en îlotage (c'est-à-dire stable et autonome) est crucial, des stratégies fondées sur le délestage (pour améliorer la stabilité de la tension) et capables de gérer efficacement les systèmes de stockage d'énergie sont nécessaires. Comme le souligne le chapitre, la commande prédictive et l'intelligence artificielle (en particulier l'apprentissage par renforcement) sont de plus en plus utilisées à cette fin. La commande par statisme reste une option intéressante pour un fonctionnement efficace des MGs/NMGs en situation d'îlotage, comme en témoignent certains articles récemment publiés.

De plus, même si les aspects théoriques de la gestion des MGs ont été largement étudiés au fil des ans, les mises en oeuvre in situ sont peu nombreuses. Les projets de démonstration de microréseaux sont relativement peu nombreux. Par conséquent, il y a encore un écart important à combler entre les travaux de recherche et la mise en oeuvre in situ des stratégies développées. Cela peut s'expliquer, au moins partiellement, par le coût calculatoire élevé des solutions reposant sur une optimisation. Les solutions telles que celles basées sur la commande prédictive doivent offrir un compromis acceptable entre performance et coût calculatoire afin d'être mises en oeuvre in situ. Le 3 Gestion d'un microréseau électrique

Introduction

Le secteur des transports est un grand consommateur de combustibles fossiles. Par conséquent, le nombre de véhicules électriques (VEs) a considérablement augmenté ces dernières années [4] car c'est un bon moyen de réduire l'utilisation des combustibles fossiles. Cependant, cela fait émerger de nouveaux défis à relever en matière de gestion de la demande en électricité. En effet, la recharge incontrôlée des VEs peut contribuer à l'instabilité des réseaux de distribution d'électricité, alors que la recharge contrôlée des VEs contribue à une flexibilité et à un équilibre accrus [START_REF] Uttamrao | A Review of Strategic Charging-Discharging Control of Grid-Connected Electric Vehicles[END_REF]. La charge contrôlée des VEs peut également contribuer à améliorer la pénétration des sources d'énergie renouvelable dans les réseaux de distribution d'électricité.

Les véhicules électriques apportent des degrés de liberté supplémentaires en ce qui concerne la gestion des réseaux de distribution d'électricité et suscitent de plus en plus l'attention de la communauté des chercheurs [START_REF]Microgrid Symposium[END_REF][START_REF] Choletais | MASERA: A Microgrid Testbed For Advanced Optimisation Of Renewable Integration[END_REF]100,[START_REF] Wu | A Model Predictive Control Approach in Microgrid Considering Multi-Uncertainty of Electric Vehicles[END_REF][START_REF] Ryu | MPC Based Energy Management System for Hosting Capacity of PVs and Customer Load with EV in Stand-Alone Microgrids[END_REF][START_REF] Pan | Model Predictive Load Frequency Control of Isolated Micro-Grid with Electrical Vehicles[END_REF][START_REF] Hooshmand | Power Flow Management of Microgrid Networks Using Model Predictive Control[END_REF][START_REF] Waseem | Multi-Agents Based Optimal Energy Scheduling Technique for Electric Vehicles Aggregator in Microgrids[END_REF][START_REF] Egbue | Multi-Agent Approach to Modeling and Simulation of Microgrid Operation with Vehicle-to-Grid System[END_REF]. Dans ce chapitre, un microréseau électrique, équipé de véhicules électriques, d'un banc de batteries, d'une centrale photovoltaïque et de charges électriques liées à la consommation de bâtiments, est étudié. Deux stratégies MPC sont proposées et comparées à une stratégie fondée sur des règles. La première stratégie MPC considère indépendamment les batteries (banc de batteries et batteries de véhicules électriques) tandis que la seconde stratégie MPC considère l'ensemble des batteries de façon groupées, formant une unique batterie fictive. Les questions suivantes sont posées : -Quel est l'apport d'une stratégie MPC par rapport à une stratégie fondée sur des règles ? -La gestion groupée d'un ensemble de batteries sous la forme d'une seule batterie fictive améliore-t-elle ou dégrade-t-elle les performances et le coût calculatoire par rapport à une gestion indépendante de chaque batterie ? Pour répondre à ces questions, les stratégies MPC sont décrites et les résultats sont présentés.

Cas d'étude

Bâtiments

Stratégies

Stratégie fondée sur des règles

Dans cette étude, une stratégie fondée sur des règles (RB) est considérée comme la stratégie de référence. Les règles déifinissant cette stratégie utilisent les variations quotidiennes des tarifs de l'électricité en France. L'idée principale de la stratégie fondée sur des règles est de charger les batteries des VEs avec le surplus d'énergie produite par la centrale PV ou lorsque les prix de l'électricité sont bas. Si les batteries ne sont pas entièrement chargées avant 13h, elles sont chargées en soutirant de l'électricité au réseau électrique jusqu'à ce qu'elles atteignent leur état de charge maximal. Le banc de batteries se décharge lorsque les tarifs d'électricité sont élevés ou lorsqu'une période au cours de laquelle les tarifs de l'électricité sont élevés est terminée. Concernant les VEs qui quittent le parking avant 13h00, ceux-cis sont chargés dès leur arrivée.

Gestion prédictive de batteries indépendantes

La première stratégie prédictive développée utilise un vecteur d'optimisation (MPC ib ) pour chaque véhicule électrique de la flotte et un vecteur d'optimisation pour le banc de batteries. Ainsi, le profil de charge d'une batterie est indépendant du profil de charge des autres batteries. Cette stratégie est a priori lente puisqu'il faut déterminer une charge idéale pour chacune des batteries au cours de la journée. Selon certains scénarios, 8 ou 16 véhicules électriques sont considérés. Il peut être intéressant de s'intéresser à une seconde stratégie pour éviter d'avoir un problème trop complexe du fait de trop nombreaux vecteurs.

Gestion prédictive d'une batterie fictive

La seconde stratégie (MPC fb ) consiste à gérer une unique batterie fictive afin de simplifier le problème d'optimisation à résoudre [START_REF] Jiang | Multi-Objective Optimal Dispatching of Microgrid With Large-Scale Electric Vehicles[END_REF][START_REF] Tan | Two-Stage Robust Optimization Dispatch for Multiple Microgrids with Electric Vehicle Loads Based on a Novel Data-Driven Uncertainty Set[END_REF]. Au lieu d'utiliser un vecteur d'optimisation pour chaque véhicule électrique de la flotte et un vecteur d'optimisation pour le banc de batteries, un vecteur d'optimisation unique est considéré pour la gestion d'une batterie fictive. Ainsi, le nombre de variables à optimiser est réduit et le problème d'optimisation n'est pas lié au nombre de véhicules électriques présents dans le MG. Par conséquent, le temps de calcul est considérablement réduit, d'autant plus si le nombre de véhicules augmente en comparaison avec une gestion indépendante des batteries. Pour que cette stratégie fonctionne bien, certaines précautions doivent être prises, avec l'idée que toutes les batteries du microréseau doivent être soit chargées, soit déchargées, soit inactives, partageant ainsi le même comportement à un instant donné.

Problème d'optimisation

La mise en oeuvre d'une stratégie MPC repose sur la résolution d'un problème d'optimisation sous contrainte, avec dans notre cas P r la puissance soutirée au réseau éléctrique (en kW) en tant que vecteur d'optimisation. L'objectif principal des stratégies fondées sur la MPC est de minimiser à la fois le coût économique (P r • C r , C r étant le coût économique normalisé) et les émissions de dioxyde de carbone (P r •G r , G r étant les émissions de CO 2 normalisés) pour assurer la charge complète des batteries des VEs (∆ε), tout en minimisant les pénalités et en satisfaisant les contraintes du système désignées par γ t sur un horizon de prédiction H p dont la longueur est de 24 h. k est le pas de temps actuel. i est le pas de temps dans l'horizon de prédiction avec i ∈ [[1, H p ]]. La fonction objectif J MG (1) est minimisée selon (2) pour la stratégie MPC fb ou selon (3) pour la stratégie MPC ib . Des poids (ϕ) sont attribués aux différents objectifs (par exemple, la réduction du coût économique) à atteindre et les coefficients de pénalité sont choisis entre 0,05 et 10, selon l'étude de cas. Notons que ces poids et coefficients ont un impact sur le temps de calcul.

J MG = 1 N p Hp i=1 (ϕ a P r (k + i) × C r (k + i) + ϕ b P r (k + i)S × G r (k + i)) + ϕ c ∆ε + γ t ( 1
)
P * r = arg min J MG (P r ) (2)
P * b , P * v = arg min J MG (P b , P v ) (3)
L'algorithme fondé sur des règles permet de définir les vecteurs initiaux P r pour la stratégie MPC fb et P b et P v pour la stratégie MPC ib . Dans la fonction objectif, P r est calculé à partir de P b et P v . P f est défini comme la somme de la puissance de charge ou décharge de toutes les batteries. Le vecteur initial susmentionné est utilisé comme première étape dans nos simulations. Une fois que l'algorithme d'optimisation a atteint un minimum global ou local, le premier élément du vecteur obtenu peut alors être utilisé comme donnée d'entrée du système en temps réel. Dans ce chapitre, la «recherche directe »est utilisée car ce type d'optimisation est rapide, comparé à des algorithmes d'optimisation fondées sur des méta-heuristiques (algorithmes génétiques, optimisation par essaims particulaires ...), et permet de trouver une bonne solution. En utilisant un vecteur initial d'optimisation calculé grâce à l'algorithme fondé sur des règles, la recherche directe cherche une meilleure solution autour de ce vecteur initial. La solution obtenue est déjà convenable. Les méta-heuristiques permettent de trouver une meilleure solution mais nécessitent de grandes ressources calculatoires.

Résultats

Gestion d'un réseau de microréseaux électriques

Introduction

L'îlotage peut être intéressant pour éviter des blackouts, qui sont des événements coûteux pouvant menacer l'intégrité des systèmes électriques ou lorsque la demande en électricité est trop élevée et que l'on peut demander aux consommateurs de se déconnecter du réseau électrique. En cas de panne, il est préférable de procéder à un îlotage contrôlé intentionnel afin de réduire les conséquences techniques, économiques et sociales indésirables en cas d'un tel événement [START_REF] Reza | A Review on Intentional Controlled Islanding in Smart Power Systems and Generalized Framework for ICI in Microgrids[END_REF]. Ainsi, la question de la gestion et la distribution efficaces de l'énergie dans un MG est importante, en particulier en mode îloté [START_REF] Omar | Towards Optimal Management in Microgrids: An Overview[END_REF]. Ce chapitre se concentre sur le recours aux batteries de véhicules électriques (VEs) et à un banc de batteries pendant le fonctionnement en îlotage dans un réseau de microréseaux. Une stratégie MPC est proposée et comparée à une stratégie fondée sur des règles considérant une opération d'îlotage planifié pour le réseau de microréseaux. Les questions suivantes sont posées :

-peut-on répondre aux exigences de l'îlotage planifié ? -le réseau de microréseaux est-il économiquement rentable grâce à l'approche prédictive ?

Pour répondre à ces questions, différentes classes de fonctionnement en îlotage et un système de récompense sont proposés pour gérer le fonctionnement en îlotage planifié. Les véhicules élec-triques et le banc de batteries peuvent être déchargés en mode standard ou dégradé. Le système de récompense et de classe avec la commande prédictive est validé par différentes configurations en simulation et comparé à une stratégie fondée sur des règles. Ce chapitre présente d'abord l'étude de cas, puis la stratégie de gestion et, enfin, les résultats obtenus. L'étude de cas est ici un NMG équipant les bâtiments du laboratoire LNEG. Il y a 3 bâtiments publics, comme on peut le voir sur la Figure 3. Chaque bâtiment dispose d'une centrale photovoltaïque qui peut supporter la charge du bâtiment, formant ainsi un MG. Un banc de batteries et des véhicules électriques sont mutualisés pour les NMGs. En cas d'îlotage, le banc de batteries est toujours mutualisé avec les MGs îlotés. Les batteries des véhicules électriques sont soit mutualisées avec les MGs îlotés si le banc de batteries ne peut pas satisfaire les besoins de ces MGs, soit sont mutualisées avec les MGs connectés au réseau. Le MG1 correspondent aux pièces du bâtiment LNEG dont la centrale PV est connectée à la charge. Les données de puissance consommée et de puissance générée pour ce MG ont été augmentées pour correspondre à la consommation d'un bâtiment à forte consommation énergétique dans cette étude. Les charges sont considérées comme très critiques pour ce MG1. Les données de RTE (https ://www.rtefrance.com/) et electricitymap (https ://electricitymap.org/) ont été considérées comme dans [START_REF] Mannini | Predictive Management of Batteries in Microgrids Equipped with Electric Vehicles[END_REF] pour les MG2 et MG3. Le MG2 a des charges critiques. Le MG3 a des charges standard. Pour résumer les classes de charge :

Cas d'étude

-Classe 1 : MG avec des charges hautement critiques (MG1).

-Classe 2 : MG avec des charges critiques (MG2).

-Classe 3 : MG avec des charges standard (MG3).

Stratégies

Modes et opérations d'îlotage

Grâce au contrôle prédictif, le système est capable d'anticiper les évolutions ou les demandes spéciales du réseau électrique. Une demande spéciale peut consister à faire passer le microréseau en mode îlotage à un moment précis et pour une durée déterminée.

Chaque microréseau a une classe pour sa charge et les batteries ne sont pas utilisées de la même manière que pour un autre MG. Il y a 3 modes pour décharger les batteries pendant l'îlotage (Figure 3.2) :

-Mode d : le banc de batteries est déchargé pendant l'îlotage selon un mode standard de décharge, l'état de charge minimum du banc de batteries est de 20 %.

-Mode d+ : le banc de batteries et les batteries des VEs sont déchargés pendant l'îlotage selon un mode standard de décharge, l'état de charge minimum des batteries est de 20 %.

- -Opération 1 : îlotage réussi des MGs de classe 1 en utilisant le banc de batteries.

-Operation 2 : îlotage réussi des MGs de classe 1 en utilisant le banc de batteries et les batteries des VEs.

-Operation 3/4 : réussite/échec de l'îlotage des MG de classe 1 en utilisant le banc de batteries et les batteries des VEs en mode de décharge profonde.

-Operation 5 : succès de l'îlotage des MGs de classe 1 et de classe 2 en utilisant le banc de batteries.

-Operation 6 : succès de l'îlotage des MGs de classe 1 et de classe 2 en utilisant le banc de batteries et les batteries des VEs.

-Operation 7 : îlotage réussi du NMG en utilisant le banc de batteries.

Système de récompense

Lors de l'îlotage, les tarifs d'achat de l'électricité passent à 0,80 e(choix effectué dans cette thèse) pour inciter les MGs et NMGs à s'îloter. Après avoir décidé de l'opération d'îlotage, le gestionnaire d'énergie du NMG informe l'opérateur du réseau électrique des capacités d'îlotage du NMG. En fonction de l'opération, l'opérateur modifie les tarifs de l'électricité en conséquence :

-si l'ensemble du NMG réussit à s'iloter, le gestionnaire du réseau octroie une récompense au gestionnaire du NMG.

-si l'ensemble du NMG ne réussit pas à s'iloter mais que certains des MGs peuvent s'îloter, les tarifs d'achat de l'électricité durant l'îlotage sont réduits.

-

Stratégie de gestion

Premièrement, l'algorithme détermine quel MG est capable de se déconnecter du réseau électrique et quel mode de décharge peut être utilisé pendant l'îlotage. Ensuite, l'algorithme décide des meilleurs instants pour charger et décharger les batteries. Les profils d'état de charge du banc de batteries et des batteries des VEs peuvent être considérés indépendamment, ce qui définit la stratégie standard. Cependant, une stratégie prenant en la considération toutes les batteries comme une seule batterie (fictive) peut être utilisée. Dans ce cas, leurs profils d'état de charge sont les mêmes. Cette stratégie, qui est celle utilisée dans ce chapitre, est présentée et évaluée dans [START_REF] Mannini | Predictive Management of Batteries in Microgrids Equipped with Electric Vehicles[END_REF].

Au premier pas de temps de la simulation, un algorithme fondé sur des règles initialise l'utilisation des différentes batteries et teste la faisabilité de l'opération 1 (Figure 3.2). Il y a deux règles : les batteries sont chargées dès que possible et déchargées pendant toute la durée de l'îlotage. Si la puissance est fournie à tous les MGs de la classe 1, alors un test est effectuer afin d'évaluer s'il y a assez d'énergie pour couvrir les besoins des MGs de classe 1 et 2 durant l'îlotage, sinon, la faisabilité de l'îlotage avec utilisation du mode de décharge d+ est évaluée. Le processus est répété pour chaque flèche en noir sur la Figure 4. Cependant, il existe quelques spécificités. Pour l'opération 7, si à cette étape, l'opération d'îlotage n'est pas possible, l'opération 5 est sélectionnée. Pour l'opération 5, si cette dernière et l'opération 6 ne sont pas possibles, l'opération 1 est finalement sélectionnée pour l'îlotage. Il faut noter que la stratégie fondée sur des règles, dans cette étude de cas, n'est pas capable de déterminer quel microréseau doit s'îloter ni quel mode de décharge des batteries doit être utilisé.

La mise en oeuvre de la stratégie MPC repose sur la résolution d'un problème d'optimisation sous contrainte. L'objectif principal de cette stratégie est de minimiser à la fois le coût économique (P r •C r ) et les émissions de CO 2 (P r •G r ), de s'assurer de la charge complète des batteries des VEs (∆ε), tout en minimisant les pénalités et en satisfaisant différentes contraintes système désignées par γ t (ces contraintes peuvent sont décrites dans l'article [START_REF] Mannini | Predictive Management of Batteries in Microgrids Equipped with Electric Vehicles[END_REF]), sur un horizon de prédiction H p dont la longueur est de 24 h. k est le pas de temps actuel. i est le pas de temps dans l'horizon de prédiction avec i ∈ [[1, H p ]]. La fonction objectif J NMG (5) est minimisée avec [START_REF]Thèse Sur Les Microgrids : Étude Sur Les Perspectives Stratégiques de l'Énergie[END_REF]. Des poids (ϕ) sont attribués aux différents objectifs (par exemple, ϕ a pour la réduction du coût économique, ϕ b pour la réduction des émissions de CO 2 ou ϕ c pour la recharge complète des VEs). En particulier, le terme γ f fait référence au succès de l'opération d'îlotage. Si cette valeur est supérieure à 0, l'îlotage n'a pas été réalisé avec succès.

J NMG = 1 N p n l=1 ( Hp i=1
(ϕ a P r (k +i, l)×C r (k +i)+ϕ b P r (k +i, l)×G r (k +i))) +ϕ c ∆ε+γ t +ϕ f γ f (5)

P * rn = arg min J NMG (P rn ) (6)

Résultats

Différents scénarios d'îlotage (c'est à dire des îlotages planifiées selon différentes plages horaires) ont été considérés. Il y a 3 scénarios. Quelle que soit la stratégie de gestion, pour le scénario 1, le NMG n'est pas capable de s'îloter dans son ensemble pour les configurations 1 à 6 (à dessin, afin de valider la stratégie prédictive lorsque l'îlotage de la totalité du NMG n'est pas possible). Cependant, pour ces configurations, la stratégie prédictive est capable de décider quels sont les MGs à déconnecter du réseau électrique. Pour toutes les configurations (à l'exception de la configuration 4), l'îlotage est réussi pour au moins un MG en utilisant la stratégie MPC. Pour les configurations 1 à 6, aucun MG ne s'est déconnectée du réseau électrique avec la stratégie fondée sur des règles. Pour les configurations 2, 3 et 6 du scénario 1, par exemple, l'association d'un banc de batteries et des batteries de VEs permet à la stratégie prédictive de réduire les coûts économiques comparativement à la stratégie fondée sur des règles, pour le mode de décharge d+. Ainsi, grâce à la stratégie MPC, la robustesse et l'autosuffisance énergétique des MGs îlotés face aux charges critiques sont améliorées. Pour la configuration 4, la stratégie prédictive tente de déconnecter le MG1 du réseau électrique aussi longtemps que possible -cela est impossible pendant toute la période d'îlotage -mais grâce à cela la charge critique est satisfaite le plus longtemps possible avec le mode profond de décharge des batteries d++. Pour la configuration 7 du scénario 1, les deux stratégies réussissent l'îlotage de l'ensemble du NMG. Cependant, le NMG est récompensé lorsque la stratégie prédictive est utilisée, ce qui entraîne une réduction significative du coût économique par rapport à la stratégie basée sur des règles (Tableau 4). Pour tous les scénarios, en général, lorsqu'aucune modification du tarif d'achat de l'électricité n'est appliquée, l'îlotage d'un microréseau peut ne pas entraîner une réduction des coûts économiques, car seule une petite partie du NMG est îlotée avec la stratégie MPC, tandis que l'algorithme fondé sur des règles réduit la consommation du NMG mais n'en îlote aucune partie. Cela peut être observé pour la plupart des scénarios, comme pour la configuration 3

Cas d'étude

Le cas d'étude est un microréseau multi-énergie équipant un bâtiment du laboratoire LNEG [17]. Dans ce microréseau multi-énergie connecté au réseau électrique, il y a deux microréseaux : le microréseau électrique et le microréseau thermique. Le schéma du microréseau thermique peut être observé sur la Figure 5. Pour le microréseau électrique, les panneaux solaires photovoltaïques fournissent de l'électricité à la charge ou pour charger un banc de batteries. L'énergie stockée dans les batteries peut être déchargée pour alimenter la charge. Toutefois, si les ressources électriques du microréseau ne sont pas suffisantes, le réseau électrique peut fournir de l'électricité au microréseau électrique. Ce microréseau électrique est connecté au microréseau thermique par la pompe à chaleur. La pompe à chaleur peut être alimentée en électricité par le réseau électrique ou par le surplus de production d'énergie photovoltaïque provenant du microréseau électrique. Dans le microréseau thermique, des collecteurs solaires apportent de la chaleur à un ballon d'eau chaude solaire qui alimente à son tour un système de stockage thermique (TES). La pompe à chaleur peut également fournir de la chaleur à ce système de stockage thermique. Enfin, des ventilo-convecteurs (FCUs) utilisent la chaleur du système de stockage thermique afin de chauffer différentes pièces du bâtiment. T w : température de l'eau du HWT. T h : température de l'eau de la pompe à chaleur. T e : température de l'eau du TES. Le contrôle de l'ensemble du microréseau thermique est divisé en trois parties différentes, comme indiqué sur la Figure 6. Les systèmes de stockage (c'est-à-dire le ballon d'eau chaude et le système de stockage thermique) et la pompe à chaleur sont pilotés grâce à un contrôle fondé sur des règles, tandis que les débits volumétriques du capteur solaire, de la vanne entre le TES et le FCU et de la vanne entre le FCU et les pièces sont pilotés par des contrôleurs PID. Les stratégies MPC supervisent d'une part le PID gérant le confort thermique et d'autre part le PID gérant la production thermique solaire et l'algorithme fondé sur des règles gérant le système de stockage thermique avec la pompe à chaleur.

Gestion du confort thermique

Stratégie PID pour la gestion du confort thermique

La partie du bâtiment à chauffer comprend quatre pièces équipées de ventilo-convecteurs. Chaque pièce doit atteindre une température de confort de 21 • C l'hiver. Chaque ventilo-convecteur est piloté (voir Figure 5) pour respecter cette température de confort (vanne F s ). La vanne F t (voir Figure 5) est pilotée pour maintenir une température de 30 MPC HP/TES : stratégie prédictive avec optimisation pour le contrôle de la pompe à chaleur et du TES.

Stratégie prédictive avec optimisation pour la gestion du confort thermique

Une stratégie MPC a également été proposée avec optimisation (MPC FCU ) avec la même idée que la stratégie précédente : allumer ou éteindre les FCUs aux meilleurs instants. Peu importe la période d'occupation, on cherche à minimiser par (9) la fonction objectif J FCU,z [START_REF]Les Microgrids / Introduction[END_REF]. Durant une période de non-occupation, on choisit d'allumer les FCUs au pas de temps Y FCU,z . Durant une période d'occupation, on choisit d'arrêter les FCUs au pas de temps Y FCU,z . k est le pas de temps actuel. i est le pas de temps dans l'horizon de prédiction avec i ∈ [[1, H p ]]. J FCU,z représente l'énergie Q FCU,z utilisée par les ventilo-convecteurs et θ r,z les pénalités si le critère de confort thermique n'est pas respecté [START_REF] Luis Querini | Cooperative Energy Management System for Networked Microgrids[END_REF], c'est-à-dire si la température n'est pas maintenue entre T min r = 20 • C et T max r = 22 • C dans la pièce z. Cette fonction objectif s'inspire des objectifs décrits dans [START_REF] Barata | Distributed Model Predictive Control for Thermal House Comfort with Auction of Available Energy[END_REF].

J FCU,z = ϕ f Q FCU,z + ϕ r θ r,z (7)
θ r,z =λ

H p i=1 ((T r,z (k + i) -T max r ) × (T r,z (k + i) > T max r )+ (T min r -T r,z (k + i)) × (T r,z (k + i) < T min r )) avec λ = D/S/N p (8) Y * FCU,z = arg min (J FCU,z ) (9)
Contrairement à la stratégie de contrôle PID, qui impose une température de 21 • C, pour la stratégie MPC, des limites minimale et maximale sont définies (20 • C et 22 • C) pour avoir plus de flexibilité sur la température.

Stratégie prédictive sans optimisation pour la gestion du confort thermique

Pour la gestion du confort thermique, une stratégie MPC, notée MPC FCU , ne nécessitant pas d'optimisation, peut être mise en oeuvre en utilisant des règles de fonctionnement à la place de l'optimisation plus classique d'une séquence de commande [START_REF] Garnier | Low Computational Cost Technique for Predictive Management of Thermal Comfort in Non-Residential Buildings[END_REF]. L'idée de cette stratégie est d'anticiper l'instant où les systèmes FCU doivent être allumés pour atteindre une température de confort ou éteints en fonction de la période d'occupation. Au pas de temps initial (k) de la simulation, pendant une période d'occupation, l'instant optimal (k+i) pour activer le FCU d'une pièce est déterminé par la stratégie. Pendant une période de non-occupation, l'instant optimal (k + i) pour éteindre les systèmes FCU garantissant le confort thermique des usagers jusqu'à la fin de cette période d'occupation doit être trouvé. Pour trouver cet instant, la stratégie teste à différents pas de temps si les contraintes de confort thermique sont respectées en activant le FCU à ces pas de temps. Par exemple, k +i est le premier pas de temps sélectionné pour allumer le FCU avant la période d'occupation. Si l'activation du FCU au pas de temps k + i permet de garantir le respect des contraintes de confort thermique, alors l'algorithme teste l'activation du FCU au pas de temps k + i + 1. Si la température de confort est toujours respectée, alors l'algorithme continue et teste d'autres pas de temps postérieurs à k + i + 1. Cependant, si le pas de temps k + i + 1 ne permet pas de respecter la température de confort, alors le pas de temps précédent (k + i) est sélectionné. Pour la période d'occupation, l'idée est la même mais pour désactiver le FCU. Ainsi, le FCU est allumé avant la période d'occupation et laisse le contrôle PID garantir le confort thermique. Ensuite, le FCU est désactivé avant la fin de la période d'occupation au pas de temps optimal afin de réduire la quantité d'énergie utilisée pour chauffer les pièces. Cette stratégie prédictive a la particularité de ne pas utiliser d'outil d'optimisation pour résoudre le problème. Ainsi, cette solution est plus facile à mettre en oeuvre car elle ne nécessite pas de ressources calculatoires importantes.

Résultats

Pour la stratégie PID FCU , les FCUs sont toujours allumés pendant la journée de 8h à 18h. Cependant, les périodes d'occupation commencent aussi à 8h, c'est pourquoi il faut du temps pour chauffer les différentes pièces, et ainsi, la température de confort n'est pas respectée au début de la période d'occupation. De plus, laisser le FCU allumé toute la journée n'est pas forcément nécessaire, ce qui entraîne une consommation thermique élevée.

Pour les stratégies prédictives, grâce à la prédiction du moment optimal pour enclencher ou arrêter les FCUs, la température de confort est respectée dans toutes les conditions météorologiques et pour toutes les pièces. De plus, l'énergie transférée aux pièces est réduite de 26 à 41 % en hiver et de 20 à 60 % au printemps. Cela peut s'expliquer par le fait que la température extérieure est plus élevée au printemps et proche de la température de référence, les FCUs n'ont par conséquent pas besoin d'être allumés toute la journée. Les deux stratégies MPC anticipent de façon identique l'allumage et l'extinction du système de chauffage. Ainsi, la consommation d'énergie est identique. Le temps de calcul a été largement réduit avec la stratégie MPC FCU , comme on peut le voir dans le Tableau 6, ce qui en fait la stratégie la plus intéressante à utiliser in situ.

Gestion des ressources thermiques

Stratégie PID/basée sur des règles pour la gestion des ressources thermiques

La température du fluide sortant des collecteurs solaires T out c (voir Figure 5) est contrôlée par un contrôleur PID pour atteindre 45 • C. La pompe à chaleur est contrôlée par un contrôleur PID afin que sa puissance électrique ne dépasse pas 4,84 kW. La pompe à chaleur ne peut être allumée que de 7h à 18h. Le TES peut-être chauffé grâce à deux sources d'énergie différentes, c'est-à-dire la pompe à chaleur et le HWT. Deux règles différentes sont proposées pour ces deux sources. Premièrement, le TES est chauffé par la pompe à chaleur jusqu'à ce que la température de l'eau de la couche 4 (où le capteur du TES est situé) atteigne 43 a 18 workers utilisés en parallèle.

Stratégie prédictive avec optimisation pour la gestion des ressources thermiques

Une stratégie MPC développée dans ce travail repose sur l'optimisation classique d'un critère et est notée MPC HP/TES . L'objectif est d'utiliser la pompe à chaleur en cas de surplus de puissance provenant du microréseau électrique ou lorsque les prix de l'électricité ainsi que les émissions de CO 2 sont bas [START_REF] Dahl | Demand Response Potential of Model Predictive Control of Space Heating Based on Price and Carbon Dioxide Intensity Signals[END_REF][START_REF] Leerbeck | Control of Heat Pumps with CO2 Emission Intensity Forecasts[END_REF]. P HP est la puissance de la pompe à chaleur, utilisée en tant que vecteur d'optimisation qui permet d'obtenir P m (k + i) dans l'équation [START_REF] Li | Coordination between Smart Distribution Networks and Multi-Microgrids Considering Demand Side Management: A Trilevel Framework[END_REF], la puissance à soutirer au réseau électrique, avec P s (k + i) le surplus de puissance PV. k est le pas de temps actuel. i est le pas de temps dans l'horizon de prédiction avec i ∈ [[1, H p ]]. La fonction objectif J HP/TES [START_REF] Xie | Optimal Energy Storage Sizing for Networked Microgrids Considering Reliability and Resilience[END_REF] est minimisée dans [START_REF] Ziyati | Numerical Modeling of Large-Scale Compact Pv-Csp Hybrid Plants[END_REF]. J HP/TES est la somme du coût économique ϕ a P m (k + i) × C c (k + i), de l'empreinte carbone ϕ b P m (k + i) × G c (k + i) et du respect des contraintes de température minimale dans le TES [START_REF] Fady | Optimization Methods and Energy Management in "Smart Grids[END_REF].

J HP/TES = 1 N p H p i=1 (ϕ a P m (k + i) × C c (k + i) + ϕ b P m (k + i) × G c (k + i)) + ϕ d θ h ( 10
)
P m (k + i) = P HP (k + i) -P s (k + i) avec P m (k + i) > 0 (11) si O = 1 alors θ h = λ H p i=1 ((38 -T e,4 (k + i))(T e,4 (k + i) < 38)) (12)
P * HP = arg min (J HP/TES ) (13)

Stratégie prédictive sans optimisation pour la gestion des ressources thermiques

Le coeur du système est le TES. L'idéal serait que le TES soit entièrement et uniquement chauffé par le sous-système solaire (c'est-à-dire le collecteur solaire et le HWT). Cependant, en raison des pertes thermiques, de l'absence de soleil pendant la nuit (les collecteurs solaires sont donc à l'arrêt) et de la plage horaire d'activation de 7h à 18h de la pompe à chaleur, le TES ne serait chauffé qu'au début de la journée. Les tarifs d'achat de l'électricité peuvent être plus élevés Tableau 7 -Coût de l'électricité soutirée au réseau électrique C c (simulations de 3 jours). PID HP /RB TES : stratégie PID/fondée sur des règles pour le contrôle de la pompe à chaleur et du TES. MPC HP/TES : stratégie prédictive sans optimisation pour le contrôle de la pompe à chaleur et du TES. MPC HP/TES : stratégie prédictive avec optimisation pour le contrôle de la pompe à chaleur et du TES.

C Avec la stratégie MPC HP/TES , le comportement futur du système est connu, tout comme tarifs d'achat de l'électricité et les émissions de CO 2 . Les objectifs sont : faire en sorte que les ventilo-convecteurs aient toujours assez de chaleur pour chauffer les pièces et réduire la facture d'électricité ainsi que l'empreinte carbone. Cette stratégie diffère entre les périodes de nonoccupation (période 1), les périodes d'occupation avec une forte utilisation des FCUs (période 2) et les périodes d'occupation avec une faible utilisation des FCUs (période 3). En fait, d'après l'observation du système, les FCUs sont allumées à grande vitesse tôt le matin. En période d'occupation (période 2 ou 3), l'algorithme vérifie si la température de la 4 e couche du TES est supérieure à 38 • C pendant toute la période d'occupation. Si tel n'est pas le cas, les pas de temps, où les tarifs d'achat de l'électricité sont les plus bas sont sélectionnés pour utiliser la pompe à chaleur pour chauffer le TES. Si les besoins sont satisfaits, l'algorithme n'allume pas la pompe à chaleur. Cependant, si les besoins du TES ne sont toujours pas satisfaits, l'algorithme recherche un autre pas de temps pour activer la pompe à chaleur lorsque les tarifs d'achat de l'électricité sont suffisament bas. Pendant la période de non-occupation, le principe est le même : l'algorithme teste différents pas de temps pour activer la pompe à chaleur et vérifie si les besoins du TES sont satisfaits pendant la période de forte utilisation du FCU (période 2). La stratégie MPC, pendant les périodes de non occupation, vérifie les besoins du TES jusqu'à la fin de cette période de forte demande.

Résultats

Les résultats de coût économique sont présentés dans le Tableau 7 : les deux stratégies MPC sont meilleures que la stratégie fondée sur des règles, divisant le coût par au moins deux. Cela peut s'expliquer par le fait que la stratégie fondée sur des règles utilise la pompe à chaleur pendant la journée lorsque les tarifs d'achat de l'électricité sont plus élevés que le matin, alors que les deux stratégies MPC anticipent ces périodes et ont tendance à utiliser la pompe à chaleur aux moments où les tarifs d'achat de l'électricité sont plus bas. En outre, en cas de surplus de production PV, la quantité d'électricité achetée au réseau avec les stratégies MPC est divisée par au moins trois, car les deux stratégies MPC prennent en compte le comportement futur du système et prédisent, d'une part, la quantité de chaleur qui sera fournie au TES et, d'autre part, qu'il n'est pas nécessaire de surchauffer le TES. Notons que pour la plupart des scénarios, pour ce qui est du coût économique, la stratégie MPC HP/TES est meilleure car elle repose sur l'optimisation de la puissance de la pompe à chaleur, qui est modulable, tandis que les stratégies MPC HP/TES et PID HP /RB TES ont un fonctionnement où la pompe à chaleur est utilisée en tout ou rien. Une différence de 3,8 % à 26,2 % peut être notée entre les deux stratégies MPC selon le critère économique. Il n'y a qu'un seul scénario où la stratégie MPC HP/TES est meilleure que la stratégie MPC HP/TES . Les émissions de CO 2 sont également réduites grâce aux stratégies MPC. L'algorithme fondé sur des règles ne respecte pas toujours les contraintes de température du système de stockage, alors qu'elles le sont avec les stratégies MPC.

Si on étudie le coût calculatoire des deux stratégies prédictive, on note que la stratégie MPC HP/TES a un coût calculatoire très faible par rapport à la stratégie MPC HP/TES , ce dernier étant divisé par une valeur comprise entre 54 et 79. De plus, la stratégie MPC HP/TES implique 18 unités d'exécution en parallèle alors que la stratégie MPC HP/TES n'utilise qu'une seule unité d'exécution. Ainsi, le ratio pourrait être 18 fois plus élevé qu'il ne l'est déjà. En conclusion, en considérant les bonnes performances de la stratégie MPC HP/TES et son coût calculatoire faible, cela en fait la stratégie la plus adaptée à une mise en oeuvre in situ.

Ilotage du microréseau multi-énergie

Contexte

Dans la littérature, peu d'articles traitent de microréseaux multi-énergies [START_REF] Arcos-Aviles | Fuzzy Energy Management Strategy Based on Microgrid Energy Rate-of-Change Applied to an Electro-Thermal Residential Microgrid[END_REF][START_REF] Arcos-Aviles | An Energy Management System Design Using Fuzzy Logic Control: Smoothing the Grid Power Profile of a Residential Electro-Thermal Microgrid[END_REF][START_REF] Pascual | Energy Management for an Electro-Thermal Renewable-Based Residential Microgrid with Energy Balance Forecasting and Demand Side Management[END_REF][START_REF] Tang | Model Predictive Control for Thermal Energy Storage and Thermal Comfort Optimization of Building Demand Response in Smart Grids[END_REF][START_REF] Kia | Short-Term Operation of Microgrids with Thermal and Electrical Loads under Different Uncertainties Using Information Gap Decision Theory[END_REF] et de microréseaux multi-énergies capables de s'îloter [START_REF] Mohseni | Off-Grid Multi-Carrier Microgrid Design Optimisation: The Case of Rakiura-Stewart Island, Aotearoa-New Zealand[END_REF][START_REF] Moazeni | Dynamic Economic Dispatch of Islanded Water-Energy Microgrids with Smart Building Thermal Energy Management System[END_REF][START_REF] Bagheri | A Novel Approach for Sizing Thermal and Electrical Energy Storage Systems for Energy Management of Islanded Residential Microgrid[END_REF]. Cela peut s'expliquer par la complexité du dimensionnement, de la modélisation et de la gestion de ce type de système. Dans cette section, l'accent est mis sur les microréseaux multi-énergies réalisant une opération d'îlotage. Parmi ces quelques articles, certains sont intéressants. Un microréseau multi-énergie déconnecté du réseau électrique a été étudié par Mohseni et al. [START_REF] Mohseni | Off-Grid Multi-Carrier Microgrid Design Optimisation: The Case of Rakiura-Stewart Island, Aotearoa-New Zealand[END_REF] pour une planification optimale de la capacité de stockage. Moazeni et al. [START_REF] Moazeni | Dynamic Economic Dispatch of Islanded Water-Energy Microgrids with Smart Building Thermal Energy Management System[END_REF] ont travaillé sur la gestion thermique avec une méthode de planification de bâtiments équipés d'une centrale photovoltaïque et qui supportent aussi la demande en eau dans un microréseau multi-énergie. Un système de gestion de l'énergie est proposé dans [START_REF] Bagheri | A Novel Approach for Sizing Thermal and Electrical Energy Storage Systems for Energy Management of Islanded Residential Microgrid[END_REF] pour gérer les échanges d'énergie dans un microréseau multiénergie pour différentes opérations d'îlotage afin de réduire la dépendance du système à une batterie au lithium, permettant aux auteurs de réduire la taille de la batterie.

Ainsi, l'étude d'un microréseau multi-énergie fonctionnant en mode îlotage est rare et intéressante. De plus, l'étude de ce type de système en utilisant une stratégie de gestion prédictive pour un cas réel en simulation ne semble pas avoir été réalisée. C'est pourquoi des tests ont été réalisés dans le cadre de cette thèse selon différentes considérations.

Configurations et cas d'étude

Il y a 3 scénarios d'îlotage pour 4 configurations du microréseau multi-énergie (4 jours de simulation). Les scénarios sont les suivants : -Îlotage 1 : prévu à 18 heures le premier jour de la simulation, le microréseau multi-énergie restant déconnecté du réseau pour le reste de la simulation. -Îlotage 2 : prévu de 13 h le premier jour de la simulation à 13 h le troisième jour.

-Îlotage 3 : prévu de

Conclusion

Dans le contexte énergétique actuel, une croissance de la production décentralisée est observée. Des microréseaux et des réseaux de microréseaux apparaissent pour favoriser la pénétration de cette production décentralisée au sein du réseau électrique de distribution. Des stratégies de gestion efficaces sont alors nécessaires pour faire face à différents défis tels que la résilience, la fiabilité de la distribution électrique et l'autosuffisance énergétique. Ainsi, dans ce travail de recherche, s'inscrivant en partie dans le cadre du projet Interreg Sudoe IMPROVEMENT, des stratégies prédictives sont proposées pour la gestion des microréseaux électriques, des réseaux de microréseaux électriques et des microréseaux hybrides (thermiques-électriques). La finalité est d'atteindre des objectifs économiques, écologiques, d'îlotage et de confort thermique pour les usagers, tout en satisfaisant les contraintes du système. Cependant, les stratégies prédictives standard souffrent d'une certaine complexité. Ainsi, elles nécessitent des ressources calculatoires importantes, ce qui est souvent un frein à leur mise en oeuvre in situ. En général, cette complexité rend également réticents les investisseurs et les opérateurs de microréseaux. Il est très difficile de mettre en oeuvre ces stratégies prédictives in situ. Actuellement, les algorithmes basés sur des règles sont choisis pour une mise en oeuvre in situ. L'objectif principal de ce travail de recherche était donc de proposer des stratégies de gestion prédictive pour les microréseaux plus faciles à mettre en oeuvre que les stratégies prédictives standard. Afin de disposer de solutions satisfaisantes pour la gestion des microréseaux, des algorithmes à coût calculatoire maîtrisé et la mise oeuvre de stratégies MPC sans optimisation ont été proposés. Nous avons donc tenté d'apporter une réponse à la question suivante : est-il possible de proposer des algorithmes prédictifs faciles à mettre en oeuvre, nécessitant peu de ressources calculatoires et garantissant un niveau de performance satisfaisant ? Afin de répondre à cette question, il faut trouver le meilleur compromis entre performances et coût calculatoire. Les stratégies développées doivent être plus efficaces que des stratégies PID ou fondées sur des règles (pour ce qui est des objectifs économiques, écologiques et techniques), pour un coût calculatoire réduit par rapport aux stratégies prédictives standard. Le manuscrit est structuré comme suit :

-le Chapitre 1 est consacré à un état de l'art présentant l'état actuel des travaux de recherche en lien avec la gestion des microréseaux. Grâce à cet état de l'art, des pistes de recherche ont été recensées.

- -les émissions de CO 2 émises par les systèmes de production (en France, en Allemange ou au Royaume-Uni, par exemple) sont connues en temps réel grâce à des sites web comme celui de RTE ou electricitymap.org. Il convient de noter que la prise en compte de ces émissions de CO 2 en temps réel pour la gestion d'un microréseau électrique ou d'un réseau de microréseaux électriques équipé d'un parc de batteries et/ou de véhicules électriques est peu répandue dans la littérature. Les émissions de CO 2 émises par les systèmes de production ont été considérées dans cette thèse et ont été réduites avec succès grâce aux stratégies prédictives proposées.

Dans ce manuscrit, il a été démontré que le développement de stratégies de gestion prédictive efficaces et à coût calculatoire maîtrisé pour des microréseaux et des réseaux de microréseaux pour une mise en oeuvre in situ est possible. Un compromis entre performance et coût calculatoire a donc été trouvé.

Perspectives

Des améliorations peuvent être apportées aux algorithmes développés dans cette thèse et des pistes restent à explorer. Il est possible de lister quelques unes de ces perspectives :

-dans ce manuscrit, les prévisions ont été considérées comme parfaites dans toutes les études présentées. Les résultats pourraient se dégrader avec des prévisions réalistes. Dans de futurs travaux, des modules de prévision des entrées exogènes (consommation d'énergie, production solaire photovoltaïque, etc.) devront être développés et testés avec les stratégies prédictives pour en évaluer la robustesse.

-comme mentionné dans l'étude bibliographique, peu d'articles traitent de l'implémentation in situ de stratégies prédictives. Cela peut s'expliquer par le fait qu'elles nécessitent des modules de prévision et d'importantes ressources calculatoires. Dans cette thèse, malheureusement, l'implémentation in situ des algorithmes développés n'a pas été possible du fait de contraintes techniques rencontrées au cours du projet Interreg Sudoe IMPROVEMENT.

-le développement d'un modèle physique n'est pas une tâche facile, et des erreurs de modélisation peuvent se produire, entraînant des performances dégradées. La modélisation dynamique impose un coût calculatoire important pour des stratégies prédictives standard (alors qu'il est déjà élevé). Cette modélisation pourrait être simplifiée pour réduire les temps de calcul pour la modélisation du microréseau thermique étudié dans ce manuscrit par exemple). Une possibilité serait de réaliser une discrétisation du modèle.

Introduction 1 Context

Causes and consequences of global warming

As a result of the various industrial revolutions and the increasing use of fossil resources, human activity is increasingly impacting the environment, and is already beginning to have repercussions on the way of life.

The Sun brings thermal energy to the Earth through radiation, thus increasing the average temperature of the Earth's surface, which is about 14 • C [118,[START_REF] Chabaud | Micro-réseau intelligent pour la gestion des ressources énergétiques[END_REF]. A part of this radiation, about 30%, is sent back to space when it is reflected by the air, clouds, etc. Another part of this radiation is absorbed by the atmosphere, and finally the remainder is absorbed by the surface of the Earth [START_REF] Baude | Chiffres clés du climat -France[END_REF]. When the level of greenhouse gases (water vapour, carbon dioxide, methane, nitrous oxide, ozone and halogenated hydrocarbons) in the atmosphere increases, more infra-red radiation is reflected back to the Earth, so the heat from this radiation is retained on Earth as in a greenhouse, hence the name "greenhouse effect". In 1896, Arrhenius was one of the first to understand the influence of the rate of CO 2 , one of the greenhouse gases, on the Earth's climate. Due to intensive human activity, a large amount of greenhouse gases are released into the Earth's atmosphere. Thus, the CO 2 emissions from fossil fuel combustion has increased from about 20 000 Mt to about 32 500 Mt during the period from 1990 to 2017 [1]. This is why, due to the greenhouse gas rate increase, the average temperature of the Earth's surface has increased over the last few decades [2].

Global warming would harm many plant and animal species, leading to the disappearance of most of them. The balance of ecosystems would then be greatly disturbed. Another consequence of global warming is ice melting, at the Earth's poles and in the glaciers of mountain ranges. Ice melting would cause a rise in the sea level. The populations of coastal areas are directly impacted by this rise in the sea level and the ensuring consequences (flooding, erosion, storms, etc.).

Resource depletion

Human way of life largely depends on so-called fossil resources, mainly oil, coal, and gas but also on fissile resources such as uranium. The world's electricity consumption mainly depends on these resources. However, they cannot be exploited indefinitely. Moreover, according to the International Energy Agency (IEA), the world demand for electricity could grow by 45% by 2030 [3]. It is possible to measure the length of time these fossil resources can be exploited thanks to the ratio of reserves to annual production [START_REF] Horsin | Ressources Énergétiques et Énergie Électrique[END_REF]. This coefficient makes it possible to evaluate the reserves that can be exploited thanks to current technical progress in relation to annual production. At the current rate, according to the 2016 forecasts, oil could be used for 50 years, natural gas for 52 years and coal for 153 years. For uranium, a fissile resource, it was estimated in 2018 that the needs would still be met for 118 years with a constant consumption [START_REF] Gaspar | URAM 2018 : les hauts et les bas, les paramètres économiques de l'extraction d'uranium[END_REF]. This last prediction is made under the assumptions that the growth in the use of electricity from nuclear power remains low in the years to come, and according to the reserves known today.

Introduction

Table 11: Prediction of the end date for the exploitation of fossil and fissile resources [START_REF] Horsin | Ressources Énergétiques et Énergie Électrique[END_REF][START_REF] Gaspar | URAM 2018 : les hauts et les bas, les paramètres économiques de l'extraction d'uranium[END_REF].

Resource

Oil Table 11 shows the end date for the exploitation of fossil and fissile resources.

New ways of energy consumption and production

Exploiting a so-called renewable energy resource (natural and rapid renewal of the resource) makes it possible to produce electricity while limiting pollutant emissions and reducing waste [123]. Renewable energies make it possible to reduce the use of fossil and fissile resources in the world. This is why the use of renewable energies (hydropower, wind power, PV power, bio-power, geothermal, concentrating solar power and ocean power) is increasing (see Figure 7 [4]), since they limit the CO 2 emissions and their use over time has no limit. In 2018, renewable energies accounted for 33% of the world's electricity production, as can be seen in Figure 7. Unfortunately, most of the renewable energies, such as wind and solar, are intermittent resources on the one hand, the main grid needs to evolve to take into account this intermittency that limits the exploitation of these resources. And, on the other hand, the main grid needs to adapt to new energy consumption forms, such as electric vehicles, and to meet the objective of reducing greenhouse gas emissions by favouring renewable energies.

A new consideration is increasingly present in the main grid: electric vehicles (EVs). The number of EVs in the world has not stopped growing since 2014, as can be seen on Figure 8, and reached 5.1 million vehicles in 2018 [4]. Recharging batteries in a distribution network powered by coal does not allow to reduce CO 2 emissions [START_REF] Knobloch | Net Emission Reductions from Electric Cars and Heat Pumps in 59 World Regions over Time[END_REF]. However, when the penetration of renewable energies in the main grid is high, charging EV batteries with CO 2 emissions reduces the carbon footprint [START_REF] Knobloch | Net Emission Reductions from Electric Cars and Heat Pumps in 59 World Regions over Time[END_REF]. A microgrid, through optimised and efficient management, makes it possible to manage these new intermittent means of production as efficiently as possible, and to meet new forms of consumption.

Microgrids and networked microgrids

In the context of increasing distributed energy resources (DERs), such as renewable energybased systems, combined heating and cooling systems or storage systems, distribution system operators (DSOs) are responsible for managing and operating power distribution grids. The aim is to maintain safety, reliability and power quality, which mainly refers to continuous electricity supply at the required voltage, for customers. The deployment of microgrids (MGs) enables high penetration of locally available DERs and enhances in a significant way power supply reliability and resiliency, when supported by sophisticated management strategies. In addition, the most effective utilization of DERs can be achieved through networked MGs. However, efficient (and smart) strategies are required to manage these MGs in an optimal way. MGs are getting more and more attention from the scientific community these last few years. In this section, microgrids and interconnected (networked) microgrids are first defined (see Section 2.1). The different components of a MG are then listed and explained in Figure 2.2. In Section 2.3, the focus is put on a key MG/NMG component in the implementation of a management strategy: the energy management system (EMS).

Definitions

First, MGs can be seen as multiple parallel-connected distributed generators with coordinated control strategies, which are able to operate either in grid-connected or islanded mode. A MG has a power comprised between some kilowatts and some megawatts [START_REF] Fady | Optimization Methods and Energy Management in "Smart Grids[END_REF][START_REF] Burmester | A Review of Nanogrid Topologies and Technologies[END_REF]126]. Regarding MGs, several definitions can be found in the literature [START_REF] Fady | Optimization Methods and Energy Management in "Smart Grids[END_REF][START_REF] Dobrowolski | Modélisation, contrôle/commande et certification d'un micro-réseau électrique décentralisé avec entrées exogènes aléatoires et informations contraintes[END_REF]128,[START_REF] Feng | A Review of Microgrid Development in the United States -A Decade of Progress on Policies, Demonstrations, Controls, and Software Tools[END_REF][START_REF] Robert | Smart Distribution: Coupled Microgrids[END_REF][START_REF]Thèse Sur Les Microgrids : Étude Sur Les Perspectives Stratégiques de l'Énergie[END_REF], the French Energy Regulation Commission (CRE) [START_REF]Thèse Sur Les Microgrids : Étude Sur Les Perspectives Stratégiques de l'Énergie[END_REF][START_REF]Les Microgrids / Introduction[END_REF] defines MGs as "small-scale power grids designed to provide a reliable power supply to a small number of consumers. Microgrids combine multiple local and diffuse production facilities, consumption facilities, storage facilities and supervision and monitoring tools for demand management. Microgrids can be directly connected to the power distribution grid (i.e., the main grid) or operate disconnected from the main grid (islanding mode). The microgrid concept, likely to concern different system scales (i.e., a building, a district, an industrial or a craft zone, a village, etc.) is being extended to heat and natural gas networks, and can thus be thought out in a multifaceted manner".

In the last years, interconnected (networked) microgrids have emerged as one of the best successors to the current power distribution system. In NMGs, local resources are shared between MGs and cooperative power exchange management is carried out [START_REF] Luis Querini | Cooperative Energy Management System for Networked Microgrids[END_REF]. According to Alam et al. [START_REF] Nabab Alam | Networked Microgrids: State-of-the-Art and Future Perspectives[END_REF], "networked MGs is referred to the interconnection of two or more MGs with an ability to connect distribution system to exchange power among the microgrids and/or the distribution system at the point of common coupling (PCC)". The deployment of NMGs is an interesting way to improve security, efficiency, durability, robustness, reliability, economic profitability, and carbon footprint aspects [START_REF] Nabab Alam | Networked Microgrids: State-of-the-Art and Future Perspectives[END_REF][START_REF] Xie | Optimal Energy Storage Sizing for Networked Microgrids Considering Reliability and Resilience[END_REF][START_REF] Li | Coordination between Smart Distribution Networks and Multi-Microgrids Considering Demand Side Management: A Trilevel Framework[END_REF]. In networked MGs, a MG can be islanded for independent operation, along (or not) with other MGs. In this case, energy management systems (EMSs) seek to maximize energy self-sufficiency [START_REF] Fady | Optimization Methods and Energy Management in "Smart Grids[END_REF][START_REF] Nabab Alam | Networked Microgrids: State-of-the-Art and Future Perspectives[END_REF].

MG components

A MG (or a NMG) is composed of the following components (see Figure 9) [START_REF] Fahad | Microgrids Energy Management Systems: A Critical Review on Methods, Solutions, and Prospects[END_REF][START_REF] Fusheng | Chapter 2 -Composition and classification of the microgrid[END_REF]:

-Distributed generators. Sources of distributed generation include on-site renewables, such as wind and solar, waste-to-energy and combined heat and power (CHP). Conventional generation sources (diesel generator for example) may be used for emergency situations or in case MGs are isolated.

-Loads. As highlighted by Gavilema et al. [START_REF] Omar | Towards Optimal Management in Microgrids: An Overview[END_REF], loads, which are critical or not, can be classified into different categories: non-controllable loads, shiftable loads, controllable comfort-based loads and controllable energy-based loads.

-Energy storage systems (ESSs). ESSs -correct sizing of these systems is crucial [START_REF] Chen | Sizing of Energy Storage for Microgrids[END_REF] are needed to store renewable energy, to perform load shifting or to assist during black starts [START_REF] Tran | Energy Management for Lifetime Extension of Energy Storage System in Micro-Grid Applications[END_REF]. In MGs, energy storage systems can either be mechanical, electrochemical or electrical [START_REF] Chaudhary | Review of Energy Storage and Energy Management System Control Strategies in Microgrids[END_REF][START_REF] Alajmi | A Proposed Strategy to Solve the Intermittency Problem in Renewable Energy Systems Using A Hybrid Energy Storage System[END_REF].

-Electric vehicles (EVs). Because of an increasing adoption of EVs, EV integration in a MG (or in a NMG) environment is critical. There is a need for efficient vehicle-to-grid technologies and optimization techniques.

-Energy management system (EMS) (Section 2.3). An EMS coordinates energy demand and supply between the dispatchable generators and the different loads, while aiming at the fulfilment of technical, economic, and environmental objectives. Supervisory control and data acquisition (SCADA) systems, which can help improving microgrids' reliability, safety and economic benefits [START_REF] Li | Research and Application of a SCADA System for a Microgrid[END_REF], are closely linked to EMSs [138]. In case the EMS is predictive -i.e., a predictive energy management system (PEMS) -, a forecast module is involved to predict loads, power generation and energy prices, among the different quantities of interest. Accurate forecasts are needed to achieve efficient flux management in MGs and NMGs [START_REF] Chugh | Fuzzy Logic Approach for Short Term Solar Energy Forecasting[END_REF].

Energy management system

According to the International Electrotechnical Commission (IEC), an energy management system is "a computer system comprising a software platform providing basic support services and a set of applications providing the functionality needed for the effective operation of electrical generation and transmission facilities so as to assure adequate security of energy supply at minimum cost" [START_REF] Fahad | Microgrids Energy Management Systems: A Critical Review on Methods, Solutions, and Prospects[END_REF]. According to the International Organization for Standardization (ISO), "an energy management system involves developing and implementing an energy policy, setting achievable targets for energy use, and designing action plans to reach them and measure progress. This might include implementing new energy-efficient technologies, reducing energy waste or improving current processes to cut energy costs" [140].

EMSs have several functions among which data monitoring, data analytics, and real-time control. EMSs can also account for data uncertainties: for example, Carli et al. [START_REF] Carli | Robust Optimal Control for Demand Side Management of Multi-Carrier Microgrids[END_REF] propose an EMS based on a robust model predictive control (MPC) approach, allowing the consideration of data uncertainties, to minimize the total economic cost, while satisfying comfort and energy constraints. Karimi and Jadid [START_REF] Karimi | Optimal energy management for multi-microgrid considering demand response programs: A stochastic multi-objective framework[END_REF] propose a cooperative multi-objective optimization approach for energy management in NMGs, where the renewable generation uncertainty is modeled as a stochastic component. Benefits of EMSs are: power generation dispatch, reactive power support, detection of power quality problems, frequency regulation, energy savings, and reduction of CO 2 emissions, to name a few [START_REF] Fahad | Microgrids Energy Management Systems: A Critical Review on Methods, Solutions, and Prospects[END_REF][START_REF] Hooshmand | Power Flow Management of Microgrid Networks Using Model Predictive Control[END_REF]. EMSs play a key role in the management of distributed generators and energy storage systems during grid-connected and islanding operations. Islanding is an interesting option in case of emergency, for example when an extreme climatic event occurs or if a cyber attack happens, or when power demand is too high and, as a result, consumers can be asked to disconnect from the main grid. In the first case, voltage or frequency is greatly affected [START_REF] Nelson | Model Predictive Control of Microgrids for Real-Time Ancillary Service Market Participation[END_REF]. When a fault is detected, smooth transition and synchronization between gridconnected and islanding operations has to be achieved [START_REF] Issa | Smooth Mode Transfer in AC Microgrids during Unintentional Islanding[END_REF][START_REF] Abdel-Rady | Hierarchical Control System for Robust Microgrid Operation and Seamless Mode Transfer in Active Distribution Systems[END_REF][START_REF] Hatziargyriou | Microgrids: Architectures and Control[END_REF][START_REF] Cagnano | Microgrids: Overview and Guidelines for Practical Implementations and Operation[END_REF].

To implement an EMS, data access and communication protocols within the system are required. SCADA systems, which consist of both software and hardware components, first enable remote and on-site gathering of data. SCADA systems play also a key role in data visualization, storage, monitoring, and control [START_REF] Kermani | Intelligent Energy Management Based on SCADA System in a Real Microgrid for Smart Building Applications[END_REF][START_REF] Dkhili | A Survey of Modelling and Smart Management Tools for Power Grids with Prolific Distributed Generation[END_REF]. In addition, SCADA systems can contribute to solving protection and communication issues [START_REF] Parhizi | State of the Art in Research on Microgrids: A Review[END_REF] and ensure system security [START_REF] Sajid | Cloud-Assisted IoT-Based SCADA Systems Security: A Review of the State of the Art and Future Challenges[END_REF]. Thanks to the communication and supervision provided by SCADA systems, in MGs, EMSs can be centralized, decentralized, distributed or hierarchical [START_REF] Chaudhary | Review of Energy Storage and Energy Management System Control Strategies in Microgrids[END_REF][START_REF] Hamid | Control Strategies of DC Microgrids Cluster: A Comprehensive Review[END_REF]. In centralized control, a MG central controller supervises local controllers (managing power supply) with the aim of maximizing the economic gain [START_REF] Chaudhary | Review of Energy Storage and Energy Management System Control Strategies in Microgrids[END_REF]. In decentralized control, the MG central controller has a limited role while local controllers aim at supporting their own local load demand, store or export the power generation surplus. In distributed control, local controllers communicate with each other, which is not the case of decentralized control [START_REF] Chaudhary | Review of Energy Storage and Energy Management System Control Strategies in Microgrids[END_REF]. Thus, it increases system robustness as it avoids loss single-point failure [START_REF] Chaudhary | Review of Energy Storage and Energy Management System Control Strategies in Microgrids[END_REF]. Hierarchical control [START_REF] Kabalci | Hierarchical Control in Microgrid[END_REF][START_REF] Bidram | Hierarchical Structure of Microgrids Control System[END_REF][START_REF] Ghazanfari | Active Power Management of Multihybrid Fuel Cell/Supercapacitor Power Conversion System in a Medium Voltage Microgrid[END_REF][START_REF] Savaghebi | Secondary Control Scheme for Voltage Unbalance Compensation in an Islanded Droop-Controlled Microgrid[END_REF][START_REF] Zhao | Multiple-Time-Scales Hierarchical Frequency Stability Control Strategy of Medium-Voltage Isolated Microgrid[END_REF] is commonly used to manage MGs. It consists in different layers to ensure voltage/frequency stability, power sharing, and optimal operation. Hierarchical control is defined as having the following four levels, from the fastest to the slowest level [START_REF] Kabalci | Hierarchical Control in Microgrid[END_REF][START_REF] Rangu | Recent Trends in Power Management Strategies for Optimal Operation of Distributed Energy Resources in Microgrids: A Comprehensive Review[END_REF][START_REF] Hu | Model predictive control of microgrids -An overview[END_REF][START_REF] Domyshev | 26 -Resilient future energy systems: smart grids, vehicleto-grid, and microgrids[END_REF]159,[START_REF] Josep | Hierarchical Control of Droop-Controlled AC and DC Microgrids-A General Approach Toward Standardization[END_REF][START_REF] Daniel | Trends in Microgrid Control[END_REF][START_REF] Hamid | Control Strategies of DC Microgrids Cluster: A Comprehensive Review[END_REF]162]:

-Level 0, i.e., the inner loop control. This level, which consists of voltage and current loops, deals with managing the output power of renewable energy sources (operation time is in milliseconds).

-Level 1, i.e., the primary control. This level consists in an independent local control for increasing power reliability. It aims at stabilizing frequency and voltage using droop controllers [162] (operation time is in milliseconds to seconds).

-Level 2, i.e., the secondary control. This level deals with monitoring and supervising the MG in order to collect the necessary information from distributed generators and regulating these generators. It compensates voltage and frequency steady state deviations caused by the primary control [162, 163] (operation time is in seconds, minutes, even hours).

-Level 3, i.e., the tertiary control. This level, which deals with managing power fluxes, consists in an interface between the MG and the main grid. It takes into consideration economic factors and determines power flow between the MG and the main grid in order to achieve optimal operation or to minimize power losses when the MG is islanded [162] (operation time is in minutes, hours, even days).

For NMGs, in a centralized structure, all MGs are controlled thanks to a single energy management system, which optimize the operating costs of each MG through preventing load shedding of critical loads [START_REF] Hatziargyriou | Microgrids: Architectures and Control[END_REF][START_REF] Fahad | Microgrids Energy Management Systems: A Critical Review on Methods, Solutions, and Prospects[END_REF]. Although such an EMS has an easy implementation, with acceptable reliability in islanded mode, it can lead to heavy costs as the structure requires communication infrastructures, and has low flexibility. In a decentralized structure, each MG is equipped with a local control center and operated independently of the other MGs [START_REF] Josep | Advanced Control Architectures for Intelligent Microgrids-Part I: Decentralized and Hierarchical Control[END_REF]. A MG fulfills its generation and load balance through sharing energy with the main grid or other MGs in its vicinity. In islanded mode, the main objective of each MG is to maintain a reliable power supply to its customers [START_REF] Josep | Advanced Control Architectures for Intelligent Microgrids-Part I: Decentralized and Hierarchical Control[END_REF][START_REF] Wang | Decentralized Energy Management System for Networked Microgrids in Grid-Connected and Islanded Modes[END_REF]. A local generator may export electricity and will enter either in a competitive or collaborative mode with other local generators [START_REF] Hatziargyriou | Microgrids: Architectures and Control[END_REF][START_REF] Fahad | Microgrids Energy Management Systems: A Critical Review on Methods, Solutions, and Prospects[END_REF]. In comparison with the centralized structure, a decentralized EMS is well-suited to MGs. This kind of EMS, however, is highly dependent on the main grid in interconnected mode, which results in high operating costs. Moreover, such a structure is not beneficial and flexible in islanded mode. The centralized and decentralized approaches have different drawbacks. Centralized EMSs are easier to implement but are cost expensive (due to the communication structure) and difficult to manage [START_REF] Chaudhary | Review of Energy Storage and Energy Management System Control Strategies in Microgrids[END_REF]. In a decentralized approach, the MGs are more dependent on the main grid as local controllers don't communicate and the quantity of electricity bought from the main grid is generally higher [START_REF] Nikmehr | Probabilistic Optimal Scheduling of Networked Microgrids Considering Time-Based Demand Response Programs under Uncertainty[END_REF][START_REF] Chaudhary | Review of Energy Storage and Energy Management System Control Strategies in Microgrids[END_REF].

In order to tackle these drawbacks, distributed energy management systems have emerged [START_REF] Nikmehr | Probabilistic Optimal Scheduling of Networked Microgrids Considering Time-Based Demand Response Programs under Uncertainty[END_REF][START_REF] Luis Querini | Cooperative Energy Management System for Networked Microgrids[END_REF][START_REF] Simoes | Intelligent based hierarchical control power electronics for distributed generation systems[END_REF][START_REF] Kahrobaeian | Interactive Distributed Generation Interface for Flexible Micro-Grid Operation in Smart Distribution Systems[END_REF]. Distributed EMSs are defined as a combination of a number of local EMSs and a central EMS. Local EMSs optimize their own resources and inform the central EMS of their needs or if a surplus of energy is available [START_REF] Nikmehr | Probabilistic Optimal Scheduling of Networked Microgrids Considering Time-Based Demand Response Programs under Uncertainty[END_REF][START_REF] Luis Querini | Cooperative Energy Management System for Networked Microgrids[END_REF]. Distributed EMSs have the ability to achieve operating cost savings. A central EMS along with local energy management systems perform scheduling, monitoring, and rescheduling, as well as benefits distribution processes. In [START_REF] Luis Querini | Cooperative Energy Management System for Networked Microgrids[END_REF], a hybrid EMS based on canonical coalition games is proposed for cooperative power exchange management of NMGs.

As it has been said, microgrids and networked microgrids face different challenges: take into account the intermittency of renewable sources, adapt to new energy consumption forms such as electric vehicles, and meet the objective of reducing greenhouse gas emissions. In order to tackle these challenges, French power distribution stakeholders have the choice of building new infrastructures or developing smart (predictive) management and supervision systems. ENEDIS [START_REF]Le réseau électrique intelligent ou smart grid[END_REF], the French distribution system operator, has decided for the development of advanced software for distributed generation management, fault detection voltage regulation or demand-side management. These algorithms make it possible to take advantage of the power generation surplus in order to improve energy self-consumption and grid stability, and to adapt to new consumption and storage usages (electric vehicles, heat networks, hydrogen storage, etc.). However, the implementation of complex algorithms can be a difficult task. Indeed, even if this kind of algorithm is efficient in order to control microgrids, it is often to the detriment of computational cost. Having high computational resources is economically costly. Therefore, it is necessary to develop management algorithms that are computationally tractable in order to control these systems.

The work presented in this manuscript intends to tackle these challenges by proposing computationally-tractable predictive management algorithms. This PhD thesis was initially developed in the context of a collaboration with a local entity: Roussillon Aménagement. The aim of this collaboration was to develop predictive strategies in order to efficiently manage microgrids and networked microgrids from an in-situ implementation perspective. The microgrid was equipped with storage systems and PV panels. This microgrid has the particularity of being equipped with an electric vehicle. The networked microgrids equips industrial buildings. Planned islanding has been tested in simulation for the mentioned microgrid and networked microgrid. Unfortunately, for various reasons, the collaboration has ended and no experimental validation could be performed.

Project IMPROVEMENT

Main challenge

The Interreg Sudoe project IMPROVEMENT [17] has been launched at the end of year 2019 to promote multi-energy (thermal/electrical) microgrids as a good solution to transform public buildings facing critical loads (hospitals, research centres, military facilities, etc.) into net-zero energy buildings (nZEB). Figure 10 illustrates a multi-energy microgrid and Figure 11 depicts a hospital facing critical loads which is equipped with a multi-energy microgrid. Of course, efficiently managing the MGs the buildings can be equipped with is a challenge to be taken up. That is why an advanced energy management system based on model predictive control (MPC) has been developed by PROMES-CNRS, with the help of National Laboratory of Energy and Geology (LNEG) (which provided data collected in situ). All partners have worked on a specific task related to the EMS development. The developed EMS is described in Figure 12. The proposed EMS is optimization free in order to be computationally tractable and so, easy to implement in situ. The ambition of the project IMPROVEMENT deals with the followings aspects [17]: -develop a system to improve energy efficiency in public buildings through a solar heating -develop a fault-resilient power management system for microgrids under high quality supply design criteria;

-develop a microgrid energy control system for renewable generation microgrids with hybrid energy storage under criteria of minimum degradation, maximum efficiency and priority in the use of renewable energy.

Global description of the System

Two pilot buildings are studied in the framework of the project IMPROVEMENT: the first one is located in Lisbon, Portugal, and the other one in Puertollanno, Spain. Only the Lisbon LNEG pilot building is considered in this manuscript.

LNEG pilot building

This pilot building integrates renewable heat/cold generation systems into a microgrid for the conversion of an existing public building into a net-zero energy building.

The LNEG pilot building (Lisbon) is powered by a 4 kWp photovoltaic system, a 2.5 kW wind turbine, and a 30 kWh battery storage system, all integrated in a solar trigeneration system which provides electricity to feed a microgrid. Thermal energy is provided by a solar hot water installation with 4 m 2 evacuated tube solar collectors and a 300 L water storage tank associated with a 16 kW power air/water heat pump and a 1 000 L inertial water storage tank to individually heat and cool the rooms of the LNEG pilot building through 4 fan coils.

Puertollano pilot building

The Puertollano pilot building (Ciudad Real) is an experimental microgrid platform located at the headquarters of the National Hydrogen Centre (CNH2), where the different technical solutions devised have been integrated and tested.

The pilot building is composed of an electrical MG and a thermal MG. The electrical MG is composed of a 800 W wind turbine, a 100 kWp PV plant, a 5 kW electrolyzer, 40 kWh/30 kW lithium-ion batteries, a 30 kW/660 Wh ultra capacitor, as well as critical and non critical loads. The thermal MG has a 50 kW geothermal heat pump, heat and cold energy storage systems of 3000 L and 3300 L, respectively, a 60 kWn alkaine electrolyzer, a 30 kWn proton exchange membrane fuel cell and an air conditioner capable of providing a heat power of 273.3 kW and a cooling power of 236.9 kW.

-WP4: Energy management system. The main participants are the PROcédés, Matériaux et Energie Solaire laboratory (Perpignan), the Centro Nacional del Hidrógeno (Puertollano), the Instituto Superior Técnico and the École Nationale Supérieure de Mécanique et d'Aérotechnique (Poitiers); -WP5: System integration, demonstration and validation. The main participants are the Centro Nacional del Hidrógeno and the Laboratório Nacional de Energia e Geologia.

More details related to those WPs can be found in the remaining of this section.

WP1: System definition, business model and implementation plan

Its main objectives are:

-analyse the pilot buildings and requirements according to the type of use, the building characteristics, the location and climatic conditions;

-define the global architecture of the pilot building;

-develop a business model;

-carry out specific (regional) implementation plan;

-create a good practice guide.

WP2: Power management

Its main objectives are:

-define the specifications of the power electronic components;

-define an advanced metering infrastructure to assess power quality issues;

-develop and implement power converters;

-develop and implement control techniques to detect and mitigate power quality issues in microgrids;

-test and validate the integrated solution.

WP3: Thermal management system

Its main objectives are:

-analyse the current technologies available for heating and cooling storage systems;

-define the requirements for thermal and cooling systems in public buildings with critical loads;

-define the solar-based heating system;

-design the heating and cooling storage system;

-define the requirements for integration of the heating and cooling storage systems;

-test and validate the system.

WP4: Energy management system

Its main objectives are:

-develop advanced forecasting algorithms for renewable power generation, thermal/electrical consumption and electricity prices;

-develop an advanced energy management system based on model predictive control to maximise the energy storage system (ESS) lifetime and the efficiency of hybrid storage system;

-manage the interconnection between thermal and electrical MGs.

WP5: System integration, demonstration and validation

Its main objectives are:

-define the IMPROVEMENT global test plan;

-integrate the different components of the system in the two pilot buildings (CNH2 and LNEG);

-assess the results through key performance indicators;

-provide final recommendations.

PROMES-CNRS's contribution

PROMES-CNRS has developed an energy management system based on model predictive control (MPC) for thermal resource and thermal comfort management in public buildings. The MPC controller is either optimization based or optimization free. The latter is computationally tractable. The developed control algorithms are validated through simulation analysis, using experimental data provided by LNEG. The LNEG pilot building and the production and storage systems the building is equipped with were modelled. Finally, the islanding capability of the LNEG microgrid is evaluated in simulation. Furthermore, another work, realized by PROMES-CNRS, addresses the topic of multi-horizon (intraday) forecasting of global horizontal irradiance using Gaussian process regression.

Thesis research work 5.1 Purpose of the work

As a result of the deployment of electrical and thermal microgrids, efficient strategies are needed to efficiently manage those systems. An emerging strategy is model predictive control (MPC). MPC can be very efficient in case of uncertainties disturbing the system (like the PV power generation surplus, loads, prices variability etc.). An MPC strategy is proposed in this manuscript for:

-electrical microgrids; -networked electrical microgrids; -multi-energy (thermal and electrical) microgrids.

In this manuscript, MPC strategies are developed to be easily implementable in situ while remaining efficient enough regarding economical and ecological performance, and able to satisfy constraints. So, this manuscript tries to address the following question:

-Is it possible to develop MPC strategies that are easy to implement, require few computational resources and provide a satisfactory level of performance?

To answer this question, a compromise has to be found between performance and computational cost. The developed strategies have to be more efficient than PID/rule-based strategies (regarding economical, ecological, and technical objectives) with reduced computational cost, compared to standard predictive strategies. Let us note that developing computationally-tractable MPC strategies is a step towards in-situ implementation. Nowadays, rule-based algorithms are preferred for in-situ implementation as they have low complexity. In the future, calculation servers may become less expensive and more effective, making MPC strategies interesting to implement.

Organization of the manuscript

First of all, a state of the art of the most recent management strategies applied to electrical microgrids and networked electrical microgrids is presented in Chapter 1. Then, in order to answer the main question, this manuscript is divided into three parts corresponding to three types of systems: electrical microgrids equipped with electric vehicles, networked electrical microgrids also equipped with electric vehicles and, finally, multi-energy microgrids (thermal and electrical microgrids). All those systems are managed with model predictive control strategies. In Chapter 2, for the electrical microgrid, a predictive strategy for the management of independent batteries is compared with a predictive strategy for the management of a fictitious battery. In Chapter 3, a networked microgrid is managed using a predictive strategy in order to perform islanding operations with either batteries standard discharging mode or deep discharging mode. Finally, in Chapter 4, optimization-free predictive strategies are compared with optimization-based predictive strategies and rule-based strategies for the management of a multi-energy microgrid. Those strategies aim at reducing the economic cost and the carbon footprint, satisfying thermal comfort constraints and ensuring heat demand during islanding operations. Finally, a synthesis of the work is made in the Conclusion and perspectives section.

Novel methodological approaches: synthesis

The novel methodological approaches are the following:

-a computationally-tractable predictive strategy for the management of electric vehicle batteries and a bank of batteries grouped in a fictitious battery;

-a predictive management strategy able to identify the best islanding operation depending on the batteries' discharging mode and the criticity of the loads in a networked microgrid for planned islanding operation. A reward system is also proposed;

-a research work on a real multi-energy (thermal and electrical) microgrid for implementation purposes and considering islanding events;

-an optimization-free predictive strategy for the management of thermal resources and users' thermal comfort in a real multi-energy (thermal and electrical) microgrid either in grid-connected or islanded mode; -the consideration in real time of the main grid power generated-related CO 2 emissions.

Dissemination

The work presented in this manuscript has led to the following peer-reviewed publications and conference papers.

Chapter 1

Survey of recent advances in the smart management of microgrids and networked microgrids

The first chapter of this manuscript introduces a survey on management strategies for microgrids and networked microgrids. The most recent works are analysed. Thanks to this survey, a better understanding of concerns and issues is gained and gaps are highlighted. From those gaps, novel methodological approaches are proposed in Chapter 2 and Chapter 3. This survey on the management of microgrids and networked microgrids is available in [START_REF] Mannini | A Survey of Recent Advances in the Smart Management of Microgrids and Networked Microgrids[END_REF].

Microgrids (MGs) and networked (interconnected) microgrids (NMGs) are emerging as an efficient way for integrating distributed energy resources (DERs) into power distribution systems. MGs and NMGs can disconnect from the main grid and operate autonomously, strengthen grid resilience, and help mitigate grid disturbances and maintain power quality. In addition, when supported by sophisticated and efficient management strategies, MGs and NMGs have the ability to enhance power supply reliability. However, their deployment comes with many challenges, in particular regarding the efficient management of DERs. That is why a survey of recent advances in the smart management -the term refers to a variety of planning and control tasksof MGs and NMGs is presented in this chapter. It aims at establishing a picture of strategies and identifying trends in methods. The reader is provided with an in-depth analysis of a variety of papers recently published in peer-reviewed journals: the way the methods are used and the common issues addressed by the scientific community are discussed. Following this analysis, one can especially observe that (1) model predictive control (MPC) is emerging as a competitive alternative to conventional methods, in particular in voltage and frequency regulation and DER management (2) due to their ability to handle complex tasks, data-driven strategies are getting more and more attention from the scientific community (3) game theory (GT) is a very good candidate for efficient management of complex systems as NMGs (4) MPC and artificial intelligence are increasingly being used for proper MG islanding operation or to manage electric vehicles (EVs) efficiently. 1 Introduction

This section first endeavours to describe the context leading to the deployment of microgrids (MGs) and networked (interconnected) microgrids (NMGs) (Section 1.1). Such a deployment comes with many challenges, in particular regarding the efficient management of distributed energy resources (DERs). The pursued objectives can be technical, ecological or economical oriented [START_REF] Hatziargyriou | Microgrids: Architectures and Control[END_REF]. Review papers are presented (Section 1.2) and the review methodology is explained (Section 1.3). The chapter's aim is first to identify current trends in management methods. This section ends with the chapter's organization (Section 1.3).

Survey of recent advances in the smart management of microgrids and networked microgrids

Context

World demand in electricity is expected to double by the end of 2050 [START_REF]Electricity and Nuclear Power Estimates for the Period up to 2050[END_REF] while the world is facing two main challenges: the global warming [170,[START_REF] Höök | Depletion of Fossil Fuels and Anthropogenic Climate Change-A Review[END_REF] and the depletion of fossil and fissile resources [1,[START_REF] Horsin | Ressources Énergétiques et Énergie Électrique[END_REF][START_REF] Gaspar | URAM 2018 : les hauts et les bas, les paramètres économiques de l'extraction d'uranium[END_REF]. A possibility for power generation with low carbon emissions and minor impact on the environment is having recourse to renewable energies [123]. Resorting to this kind of energy resource in a distributed way is more and more frequent [4,172]. However, renewable energies may have a negative impact on the main grid, in particular regarding stability, reliability, and power quality. The deployment of MGs -low-voltage power distribution networks of interconnected DERs, controllable loads, and critical loads, which can operate in either gridconnected or islanded mode and are subject to operational characteristics of the main grid -and NMGs enables high penetration of distributed energy resources in the main grid. A MG, through optimal operation, is able to handle intermittent energy resources [START_REF] Josep | Hierarchical Control of Droop-Controlled AC and DC Microgrids-A General Approach Toward Standardization[END_REF]. Additionally, other benefits can be reached: ecological benefits [START_REF] Terlouw | Multi-Objective Optimization of Energy Arbitrage in Community Energy Storage Systems Using Different Battery Technologies[END_REF], self-sufficiency, self-healing, islanding ability, reliability, flexibility and robustness [138]. In addition, power losses can be lowered thanks to the proximity between distributed generators and consumption power spots. Availability of power sources can also be improved [138,[START_REF] Li | Formalisme pour la supervision des systèmes hybrides multi-sources de générateurs d'énergie répartie : application à la gestion d'un micro réseau[END_REF]. When supported by management strategies that take advantage of sophisticated tools -model predictive control, multi-agent systems, game theory or artificial intelligence, to name some of these tools -, MGs and NMGs enable high penetration of locally available DERs and enhance power supply reliability and resiliency in a significant way. In this context, MGs and NMGs are being deployed all over the world, especially in Asia and North America [START_REF] Aslam | Deep Learning Models for Long-Term Solar Radiation Forecasting Considering Microgrid Installation: A Comparative Study[END_REF][START_REF] Kleyman | Educating Data Centers about Microgrid Benefits: More than Just Backup[END_REF][START_REF] Kim | Application of Flexible Ramping Products with Allocation Rates in Microgrid Utilizing Electric Vehicles[END_REF][START_REF] Hirsch | Microgrids: A Review of Technologies, Key Drivers, and Outstanding Issues[END_REF]. European countries are also involved in MG development [START_REF] Kim | Application of Flexible Ramping Products with Allocation Rates in Microgrid Utilizing Electric Vehicles[END_REF]. From 2015 to 2020, the global installed power in MGs has doubled to reach 3 TW [START_REF] Aslam | Deep Learning Models for Long-Term Solar Radiation Forecasting Considering Microgrid Installation: A Comparative Study[END_REF][START_REF] Kleyman | Educating Data Centers about Microgrid Benefits: More than Just Backup[END_REF]. During the fourth quarter of 2018, the number of MGs has culminated to 2258 [START_REF] Warneryd | Unpacking the Complexity of Community Microgrids: A Review of Institutions' Roles for Development of Microgrids[END_REF]. This trend is expected to continue over the next years at the same rate as the one observed between 2015 and 2019 [START_REF] Aslam | Deep Learning Models for Long-Term Solar Radiation Forecasting Considering Microgrid Installation: A Comparative Study[END_REF][START_REF] Kleyman | Educating Data Centers about Microgrid Benefits: More than Just Backup[END_REF]. In some countries, politics influence the deployment of MGs [START_REF] Howland | Microgrid Feasibility Funds, Totalling $13.2M[END_REF][START_REF] Feng | A Review of Microgrid Development in the United States -A Decade of Progress on Policies, Demonstrations, Controls, and Software Tools[END_REF]181,[START_REF]Les Microgrids / Introduction[END_REF]. Germany and Italy are two good examples of the influence of politics in the domain, with a growth of local energy communities (LECs), which typically refer to cooperating consumers (or prosumers) in order to satisfy energy needs using DERs, and a change in the paradigm of power generation, from a centralized power generation to a distributed one [START_REF] Krug | Mainstreaming Community Energy: Is the Renewable Energy Directive a Driver for Renewable Energy Communities in Germany and Italy?[END_REF][START_REF] Stefan | Participative Renewable Energy Community-How Blockchain-Based Governance Enables a German Interpretation of RED II[END_REF]. According to the EU package entitled "Clean Energy for All Europeans", there is a particular concern to pose European citizens as the key players into the energy markets future, as part of the EU decarbonization effort and targets of year 2050. Towards these efforts, the LEC concept can drive and empower the end-users to consume energy in a more responsible manner, contribute to energy savings and steer the main grid to become more flexible.

In this context, the need for efficient management strategies (i.e., decision-making strategies) for MGs and NMGs is high. The control and planning tasks behind managing such systems are, among others, voltage and frequency regulation, power flow management, DER management, reactive power compensation, and optimal operational planning. These tasks go with the deployment of MGs and NMGs. As a result, this chapter provides a survey of recent advances in the smart management of MGs and NMGs. Its main purpose is to identify current trends in the methods used. The reader is provided with an in-depth analysis of a variety of papers recently published in peer-reviewed journals from the leading publishers of scientific content. Thus far, NMG management is little discussed in the literature, that is why this chapter aims at establishing a picture of management strategies for this kind of interconnected system, in light of the methods used.

Review papers

This section is dedicated to review papers (Section 1.1 and 1.2). In [START_REF] Hirsch | Microgrids: A Review of Technologies, Key Drivers, and Outstanding Issues[END_REF], Hirsch et al. define the concept of MG and provide a multi-disciplinary portrait of MG drivers, real-world applications, challenges, and future prospects. In [START_REF] Bilal | Control methods and objectives for electronically coupled distributed energy resources in microgrids: A review[END_REF], Eid et al. review the classification of

Paper

Brief description [START_REF] Hirsch | Microgrids: A Review of Technologies, Key Drivers, and Outstanding Issues[END_REF] A multi-disciplinary portrait of MG drivers, real-world applications, challenges, and future prospects is provided [START_REF] Bilal | Control methods and objectives for electronically coupled distributed energy resources in microgrids: A review[END_REF] MG control objectives, in particular in islanded mode, are discussed [START_REF] Lidula | Microgrids research: A review of experimental microgrids and test systems[END_REF] A review of experimental MGs and test systems around the world is conducted [START_REF] Nabab Alam | Networked Microgrids: State-of-the-Art and Future Perspectives[END_REF] A review of the most relevant research works on NMGs is conducted [START_REF] Hamid | Control Strategies of DC Microgrids Cluster: A Comprehensive Review[END_REF] Control strategies for DC MGs are discussed [START_REF] Omar | Towards Optimal Management in Microgrids: An Overview[END_REF] An overview of solutions evaluated during the last years by the scientific community for MG optimal management is given [START_REF] Samir | Hybrid renewable microgrid optimization techniques: A review[END_REF] A review of optimization techniques for the management of isolated MGs with hybrid renewable sources is conducted [START_REF] Fahad | Microgrids Energy Management Systems: A Critical Review on Methods, Solutions, and Prospects[END_REF] An analysis of decision making strategies and their solution methods for MG energy management systems is performned [START_REF] Gao | Primary and Secondary Control in DC Microgrids: A Review[END_REF] An overview of primary and seconderay control approaches for DC MGs is provided [START_REF] Chaudhary | Review of Energy Storage and Energy Management System Control Strategies in Microgrids[END_REF] A review of EMS control strategies for MGs with DERs is conducted, with a focus on energy storage [START_REF] Yimy | Energy Management in Microgrids with Renewable Energy Sources: A Literature Review[END_REF] A review of energy management in renewable energy based MGs is conducted [START_REF] Dkhili | A Survey of Modelling and Smart Management Tools for Power Grids with Prolific Distributed Generation[END_REF] Smart approaches for power grid monitoring and control, in a context of prolific distributed generation, are discussed [START_REF] Garcia-Torres | Model Predictive Control for Microgrid Functionalities: Review and Future Challenges[END_REF] The application of MPC to MGs and NMGs is reviewed, from the point of view of their main functionalities [START_REF] Hu | Model predictive control of microgrids -An overview[END_REF] A review of MPC applied toward the control of MGs and NMGs is conducted [START_REF] Sachit | A review of coordination strategies and protection schemes for microgrids[END_REF] Coordination strategies and protection schemes that have been proposed for MGs in the last few years are reviewed [START_REF] Gayatri | A review of reactive power compensation techniques in microgrids[END_REF] A review of compensation methods against power quality issues in MGs is conducted

MGs and discuss their control objectives, in particular in islanded mode. The most common problems and solutions are summarized. In [START_REF] Lidula | Microgrids research: A review of experimental microgrids and test systems[END_REF], a review of experimental MGs and test systems around the world (Europe, North America and Asia) is conducted. This review chapter is focused on the available MG control options and is concluded by highlighting possible research areas that could enhance the practical use of MG facilities. In [START_REF] Nabab Alam | Networked Microgrids: State-of-the-Art and Future Perspectives[END_REF], a comprehensive literature review of the most relevant research works on NMGs is conducted. The major benefits and challenges related to NMGs are analyzed.

Taking a look at review papers dealing with the management -the term is used in a broader sense here, covering various control and planning tasks -of MGs and NMGs, published in the last few years in peer-reviewed journals, one can first highlight the work done by Al-Tameemi et al. [START_REF] Hamid | Control Strategies of DC Microgrids Cluster: A Comprehensive Review[END_REF] which is focused on control strategies for DC MGs. Centralized, decentralized, distributed, and hierarchical control strategies are discussed in this review paper. In [START_REF] Omar | Towards Optimal Management in Microgrids: An Overview[END_REF], Topa Gavilema et al. give an overview of different solutions evaluated during the last few years by the scientific community to manage MGs. The review shows the variety of mature and tested solutions for managing MGs with different configurations. The main conclusion which is deduced

Paper

Brief description [START_REF] Hadi Andishgar | An overview of control approaches of inverter-based microgrids in islanding mode of operation[END_REF] An overview of control approaches for inverter-based MGs operating in islanded mode is given [START_REF] Bashir | A review of droop control techniques for microgrid[END_REF] A review of droop control techniques to coordinate distributed generators in MGs is conducted [START_REF] Majeed | Voltage and frequency control strategies of hybrid AC/DC microgrid: a review[END_REF] Voltage and frequency control strategies of hybrid AC/DC MGs are reviewed [START_REF] John | AC-microgrids versus DC-microgrids with distributed energy resources: A review[END_REF] A review of AC/DC MGs in connection with RES-based distributed generators, ESSs and loads is conducted [START_REF] Kumar | Recent techniques to model uncertainties in power generation from renewable energy sources and loads in microgrids -A review[END_REF] A survey of the latest analytical and approximation techniques to model the uncertainties in MGs is presented [START_REF] Hina Fathima | Optimization in microgrids with hybrid energy systems -A review[END_REF] A survey on hybrid renewable energy system is presented [START_REF] Ahmad Khan | A compendium of optimization objectives, constraints, tools and algorithms for energy management in microgrids[END_REF] A review of optimization objectives, constraints, tools and algorithms for energy management in MGs is conducted [START_REF] Meng | Microgrid supervisory controllers and energy management systems: A literature review[END_REF] Control objectives and development methodologies in MG supervisory controllers are summarized [START_REF] Vitor | Multi-agent systems applied for energy systems integration: Stateof-the-art applications and trends in microgrids[END_REF] The major issues and challenges in considering multi-agent systems for MGs are discussed [START_REF] Olatomiwa | Energy management strategies in hybrid renewable energy systems: A review[END_REF] A review of approaches and techniques used to establish an efficient energy management strategy is conducted [START_REF] Gamarra | Computational optimization techniques applied to microgrids planning: A review[END_REF] Optimization techniques applied to MG planning are reviewed and guidelines for innovative planning are defined

[159] A review of optimal control techniques for energy management and control in MGs is conducted [START_REF] Kantamneni | Survey of Multi-Agent Systems for Microgrid Control[END_REF] A survey of multi-agent systems for MG control is presented [START_REF] Han | MAS-Based Distributed Coordinated Control and Optimization in Microgrid and Microgrid Clusters: A Comprehensive Overview[END_REF] An overview of MAS-based distributed coordinated control and optimization in MGs and NMGs is given [START_REF] Parhizi | State of the Art in Research on Microgrids: A Review[END_REF] A review of power management and control strategies for MGs is conducted [START_REF] Rangu | Recent Trends in Power Management Strategies for Optimal Operation of Distributed Energy Resources in Microgrids: A Comprehensive Review[END_REF] A review of recent trends in power management strategies for optimal operation of DERs in MGs is conducted [START_REF] Wang | Enhancing Power System Operational Flexibility with Flexible Ramping Products: A Review[END_REF] A review of the modelling and implementation of flexible ramping products is conducted [START_REF] Uttamrao | A Review of Strategic Charging-Discharging Control of Grid-Connected Electric Vehicles[END_REF] A survey of control strategies for grid-connected EVs is presented 1 Introduction from this review is that a technique for energy management is mandatory when operating a MG. In [START_REF] Samir | Hybrid renewable microgrid optimization techniques: A review[END_REF], a review of optimization techniques for the management of isolated MGs with hybrid renewable sources is conducted. The authors highlight the relevance of using artificial intelligence tools to optimize MG operation. In [START_REF] Fahad | Microgrids Energy Management Systems: A Critical Review on Methods, Solutions, and Prospects[END_REF], a comparative analysis of decision making strategies and their solution methods for MG energy management systems is performed. Various uncertainty quantification methods are summarized in order to manage both the volatility and intermittency of renewable energy resources and load demand. In addition, a comparative analysis of communication technologies is discussed. In [START_REF] Gao | Primary and Secondary Control in DC Microgrids: A Review[END_REF], Gao et al. provide an overview of primary and secondary control approaches for DC MGs. Inner loop and droop control approaches for primary control are reviewed. Centralized, distributed, and decentralized secondary control approaches are discussed in detail. In [START_REF] Chaudhary | Review of Energy Storage and Energy Management System Control Strategies in Microgrids[END_REF], a review of EMS control strategies for MGs with DERs is conducted, with a focus on energy storage. ESSs can be supported by appropriate controllers in order to increase MG reliability and efficiency. As highlighted by the authors, both the lifetime and efficiency of ESSs are greatly influenced by the chosen control strategy. In addition, this strategy has an impact on economic viability. In [START_REF] Yimy | Energy Management in Microgrids with Renewable Energy Sources: A Literature Review[END_REF], a literature review of energy management in renewable energy based MGs is conducted, along with a comparative analysis of optimization objectives, constraints, solution approaches, and simulation tools. Isolated and interconnected MGs are considered. Due to increased technological maturity and because it can provide grid services, energy storage is highlighted as an attractive option to manage the intermittent nature of renewable energies. In [START_REF] Dkhili | A Survey of Modelling and Smart Management Tools for Power Grids with Prolific Distributed Generation[END_REF], Dkhili et al. discuss smart approaches for power grid monitoring and control, in a context of prolific distributed generation. Two methods are showcased by the authors in terms of efficiency: multi-agent systems and model predictive control. In [START_REF] Garcia-Torres | Model Predictive Control for Microgrid Functionalities: Review and Future Challenges[END_REF], Garcia-Torres et al. review the application of MPC to MGs and NMGs, from the point of view of their main functionalities, describing the design methodologies and the main current advances. Challenges and future perspectives of MPC and its applications in MGs and NMGs are described and summarized. In [START_REF] Hu | Model predictive control of microgrids -An overview[END_REF], a comprehensive review of MPC applied toward the control of MGs and NMGs, including both converter-and grid-level control, is conducted. This review shows that MPC is emerging as an interesting alternative to conventional methods in different aspects of MG/NMG management. In addition, some of the most important trends in MPC development are identified and discussed.

In [START_REF] Sachit | A review of coordination strategies and protection schemes for microgrids[END_REF], coordination strategies and protection schemes that have been proposed for MGs in the last few years are reviewed. The advantages and limitations of existing MG protection schemes are discussed. Future directions for research in the protection system design for MGs and NMGs are also outlined. In [START_REF] Gayatri | A review of reactive power compensation techniques in microgrids[END_REF], a review of compensation methods against power quality issues in MGs is conducted. Various control techniques, algorithms, and devices are discussed. In [START_REF] Hadi Andishgar | An overview of control approaches of inverter-based microgrids in islanding mode of operation[END_REF], an overview of control approaches for inverter-based MGs operating in islanded mode is given. MG control objectives are summarized. In [START_REF] Bashir | A review of droop control techniques for microgrid[END_REF], a review of droop control techniques highlights the benefits of using those techniques to coordinate distributed generators in MGs. In [START_REF] Majeed | Voltage and frequency control strategies of hybrid AC/DC microgrid: a review[END_REF], voltage and frequency control strategies of hybrid AC/DC MGs are reviewed. Various interlinking converter strategies based on droop and communication control are presented. Some recommendations are given for future work in this research field. In [START_REF] John | AC-microgrids versus DC-microgrids with distributed energy resources: A review[END_REF], a review of AC/DC MGs in connection with RES-based distributed generators, energy storage systems, and loads is conducted. A thorough comparison between the two types of MGs is realized, from economical, technical and environmental points of view. Possible control and energy management strategies for the two types of MGs are also investigated. In [START_REF] Kumar | Recent techniques to model uncertainties in power generation from renewable energy sources and loads in microgrids -A review[END_REF], Prakash Kumar and Saravanan present a survey of the latest analytical and approximation techniques reported in the literature to model the uncertainties in a MG environment. The authors highlight the inadequacy of uncertainty modelling methods applicable to RESs, both in terms of number and accuracy.

In [START_REF] Hina Fathima | Optimization in microgrids with hybrid energy systems -A review[END_REF], Hina Fathima and Palanisamy bring to light the concept of hybrid renewable energy system (HRES). A literature survey on HRES is presented. In addition, a review of modelling and applications of renewable energy generation sources and energy storage systems is presented. networked microgrids Metrics, which entail the technical and economic performance of the system, are enlisted. In [START_REF] Ahmad Khan | A compendium of optimization objectives, constraints, tools and algorithms for energy management in microgrids[END_REF], a review of optimization objectives, constraints, tools and algorithms for energy management in MGs equipped with heterogeneous energy resources and energy storage devices -small scale distributed energy management (DEM) -is conducted. This work provides foundation for further investigation in the field of cost effective energy management techniques for NMGs. In [START_REF] Meng | Microgrid supervisory controllers and energy management systems: A literature review[END_REF], Meng et al. summarize the control objectives and development methodologies in MG supervisory controllers. A classification of control objectives is proposed according to the definition of hierarchical control layers in MGs. Proposals of future research directions in this domain are given. In [START_REF] Vitor | Multi-agent systems applied for energy systems integration: Stateof-the-art applications and trends in microgrids[END_REF], the major issues and challenges in considering multi-agent systems for MGs are discussed. The authors present a comprehensive review of state-of-the-art applications and trends. In [START_REF] Olatomiwa | Energy management strategies in hybrid renewable energy systems: A review[END_REF], a comprehensive review of approaches and techniques used to establish an efficient energy management strategy is conducted. These approaches include standalone and grid-connected hybrid renewable energy systems for power generation. In [START_REF] Gamarra | Computational optimization techniques applied to microgrids planning: A review[END_REF], optimization techniques applied to MG planning are reviewed and guidelines for innovative planning focused on economic feasibility are defined. Some trending techniques and new MG planning approaches are pointed out. In [159], a review of optimal control techniques for energy management and control in MGs is conducted. A general architecture for optimal EMSs is provided and analyzed in detail. The authors highlight that EMSs based on a hierarchical control architecture are the most commonly found in the literature. In [START_REF] Kantamneni | Survey of Multi-Agent Systems for Microgrid Control[END_REF], a survey of multi-agent systems for MG control and operation is presented. MAS concepts, architectures, platforms and processes are reviewed. Limitations are discussed. In [START_REF] Han | MAS-Based Distributed Coordinated Control and Optimization in Microgrid and Microgrid Clusters: A Comprehensive Overview[END_REF], a comprehensive overview of MAS-based distributed coordinated control and optimization in MGs and NMGs is given. Topology models and mathematic models are summarized. The merits and drawbacks of these control methods are evaluated.

In [START_REF] Parhizi | State of the Art in Research on Microgrids: A Review[END_REF], a review of power management and control strategies for MGs is conducted. In [START_REF] Rangu | Recent Trends in Power Management Strategies for Optimal Operation of Distributed Energy Resources in Microgrids: A Comprehensive Review[END_REF], Rangu et al. present a comprehensive review of recent trends in power management strategies for optimal operation of DERs in MGs. First, deterministic and probabilistic approaches, as well as stochastic programming and robust optimization strategies are discussed. Furthermore, the optimal scheduling problem of DERs in MGs is presented. Advanced control and demand response strategies are also presented. In addition, multi-agent-based distributed and decentralized control strategies are reviewed. In [START_REF] Wang | Enhancing Power System Operational Flexibility with Flexible Ramping Products: A Review[END_REF], an in-depth review of the modelling and implementation of flexible ramping products is conducted by Wang et al. A survey of cutting-edge charging-discharging methods and optimization strategies and objectives for gridconnected EVs is presented in [START_REF] Uttamrao | A Review of Strategic Charging-Discharging Control of Grid-Connected Electric Vehicles[END_REF]. Several controlled charging-discharging issues with respect to system performance, such as overloading, power quality deterioration and power loss, are reviewed. The challenges and issues faced by EV applications are also discussed from the aggregator's point of view. The authors highlight that uncontrolled charging-discharging may result in grid stability, power quality or operational efficiency issues.

Review methodology and organization of the chapter

A research with the following keywords (in the paper's title and abstract) was performed on ScienceDirect, IEEE Xplore and Google Scholar, among other sources for research papers: microgrids, interconnected microgrids, networked microgrids, multi-microgrids, management, control, planning, model predictive control, multi-agent systems, game theory, stochastic programming, robust optimization, artificial intelligence, droop control. As highlighted in Section 1.1, the number of research papers dealing with MG/NMG management published in peerreviewed journals owned by the leading publishers of scientific content (Elsevier, IEEE, MDPI and Springer) has increased a lot in the last years, from almost nothing in the early 2000s (one paper in 2002) to about 1600 (1609) in 2021. This increase is reflective of a booming interest in MGs and NMGs, which can be seen as an efficient way of integrating DERs into power distribution systems. Because the need for efficient management strategies is high, this chapter focuses on the most popular methods -model predictive control, multi-agent systems, game theory, stochastic programming, robust optimization, artificial intelligence, and droop controlused in recent times for MG/NMG management. The term "management" is used in a broader sense, thus covering various control and planning tasks. So, these research papers address different aspects of MG/NMG management, for example voltage or frequency regulation, power flow management, distributed generation management or MG/NMG optimal planning. This survey chapter aims at establishing a picture of management strategies for MGs and NMGs, in light of the methods used, the way these methods are used and the issues addressed by the scientific community (the reader is provided with an in-depth analysis of a variety of papers recently published in peer-reviewed journals in Section 3). In Section 1.2, the focus is put on years 2011, 2016 and 2021. Trends in methods are identified. First, one can observe that droop control is still a popular method for MG/NMG management, although its influence decreases: the method is used in 63 papers (48% of the total number of papers considered in this study) in 2011, 334 papers (51%) in 2016, and 533 papers (33%) in 2021. Artificial intelligence, model predictive control, robust optimization and, to a lesser extent, stochastic programming are gaining in popularity. Artificial intelligence was used in 14 papers (11%) in 2011, 28 papers (4%) in 2016 and 244 papers (15%) in 2021. Thus, the popularity of artificial intelligence methods, in particular reinforcement learning, in the field of MG/NMG management is relatively new. That being said, machine and deep learning tools, in particular convolutional and recurrent neural networks (long short-term memory networks), are widely used for time series forecasting and, as a result, can be involved in the implementation of predictive strategies. Regarding MPC, it was used in very few papers (3) in 2011 but the number of papers dealing with MPC strategies for MG/NMG management has increased to 88 (14%) in 2016 and 226 (15%) in 2021. A similar trend can be observed for robust optimization: the method was used in 9 papers (7%) in 2011, 51 papers (8%) in 2016, and 216 papers (15%) in 2021.

Section 1.3 is about the number of papers addressing the management of MGs vs. the number of papers addressing the management of NMGs in 2011, 2016 and 2021. Taking a look at this figure, one can clearly see that NMG management is still little discussed by the scientific community in comparison with MG management. Only 15 papers (4%), 67 papers (4%) and 184 (5%) papers address the management of NMG in 2011, 2016 and 2021, respectively. However, the number of papers addressing the management of NMGs has increased tenfold between 2011 and 2021, which reflects a growing interest for efficient strategies dedicated to the management of this kind of interconnected system.

The chapter is organized as follows: in Section 2, MGs and NMGs projects are presented to understand the management strategies evolution. Then, in Section 3 focuses on research papers recently published in peer-reviewed journals, identifying advances in MG/NMG management, according to the addressed issues. Section 1.3 summarizes the papers discussed in Section 3. Note that to improve the readability of the chapter, for all the highlighted works, their main features, the MG/NMG resources and the noticeable results are summarized in tables. The section ends with a discussion. The chapter ends with a conclusion (Section 4).

Microgrid projects

Over the years, MGs have catched the attention of the scientific community because of different technical aspects. In 1882, Thomas Edison has built the first MG [START_REF] Dobrowolski | Modélisation, contrôle/commande et certification d'un micro-réseau électrique décentralisé avec entrées exogènes aléatoires et informations contraintes[END_REF][START_REF] Hirsch | Microgrids: A Review of Technologies, Key Drivers, and Outstanding Issues[END_REF], before the main grid emerged thanks to Tesla's ideas and inventions about transformers, alternative current and alternators [206] in 1888. Later, at the end of the XX th century, using MGs has been an opportunity for people living in areas where access to electricity is constrained [START_REF] Cagnano | Microgrids: Overview and Guidelines for Practical Implementations and Operation[END_REF][START_REF] Cañizares | Remote Microgrids in Canada[END_REF] and diesel generators are the main source of energy [START_REF] Hirsch | Microgrids: A Review of Technologies, Key Drivers, and Outstanding Issues[END_REF][START_REF] Peng | Innovative Microgrid Solution for Renewable Energy Integration within the REIDS Initiative[END_REF][START_REF] Smart | Microgrids / REIDS (Singapore): Technologies for sustainable and affordable energy for all in South East Asia. Les Microgrids / REIDS (Singapour) : Technologies pour une énergie durable et abordable pour tous en Asie Du Sud-Est[END_REF]. In addition, PV panels, batteries and diesel generators are used to ensure continuous energy flow to the consumers. Thus, standalone microgrids were the first to meet the need for electrification with cheap and renewable This section is split into two subsections. The first subsection presents microgrid projects from 2000 to 2008, at this period, smart grid management systems development were not the priority of those projects. The second subsection presents microgrid projects from 2008 to nowadays as microgrid management catched the attention of researchers.

From 2000 to 2008

Microgrid projects which do not specifically on smart management are being investigated in this section.

Kythnos Island (2001)

Kythnos Island was one of the first demonstration project, funded in 2001 by the European Union under the « Framework Programs (FP) » on microgeneration and MG control and operation [211,212]. This MG was connected to a three-phase distribution grid and equipped with a 5 kVA diesel generator and a 12 kWc PV plant associated with 53 kWh batteries, supplying energy to 12 houses [212,211,213]. The scale of this MG is a group of buildings. The aim of this project was to test centralized and decentralized approaches for planned islanding [210], with the possibility to disconnect some users of the main grid if energy demand is too high [START_REF]Les Microgrids / Introduction[END_REF]. Testing and validating the islanding capability of a microgrid in 2001 was something quite new which makes this project worth to mention.

Sendai (2004)

In Sendai, Japan, a project dealing with the development of a MG management system, coordinated by the New Energy and Industrial Technology Development Organization (NEDO), has been launched in 2004 with the aim of improving power quality, on both AC and DC parts [138,210]. This MG supplies energy to three consumers: a high school, a university and a hospital. During islanding, the MG was able to give priority to one consumer over the others. For example, power generation is used to supply the hospital loads in priority. Let us note that the idea of supplying critical loads first for islanded microgrids is taken into consideration in Chapter 3 of this manuscript. Series of tests were conducted in order to improve power quality and reduce the economic cost. The results indicate that the economic cost has been reduced from 14 to 30% and CO 2 emissions have been reduced by 12% [210]. As an interesting result, the microgrid was able to disconnect from the main grid during the seismic event of 2011 and able to supply electricity to consumers during two days. Such resilience has allowed to conduct more research works related to MG robustness [START_REF] Feng | A Review of Microgrid Development in the United States -A Decade of Progress on Policies, Demonstrations, Controls, and Software Tools[END_REF].

Santa Rita Jail (2002)

One of the case studies presented by Romankiewicz et al. [210] is the Santa Rita Jail in the United States of America, where local energy resources have been deployed (from 1.2 MW in 2002 to approximately 5 MW in 2006). Thanks to equipment modernization, consumption has been reduced [210]. Two aspects make this MG worth to mention. First, this MG was capable of islanding, while having a larger consumption and production than the Kythnos Island MG or the Sendai MG, in a short time: 8 ms [START_REF] Feng | A Review of Microgrid Development in the United States -A Decade of Progress on Policies, Demonstrations, Controls, and Software Tools[END_REF]. Secondly, the scale of this microgrid is different from the MGs previously mentioned: power consumption of this MG is much higher than it is for usual MGs during the 2000-2006 period. Thus, it has been shown that MGs can be deployed on a larger scale than before.

Bornholm Island (2007)

Bornholm Island (Denmark) was funded by the European project "More Microgrids" [214]. This MG has the ability to integrate a large-scale power system, with a power installed of about 127 MW [126,215]. Again, the scale of a MG can be much higher than it was before. With this amount of power, islanding was tested and has proven to be successful in 2007, 2008, and 2009 [126]. Furthermore, customer consumption was controlled (household appliances) depending on the electricity cost [START_REF] Asmus | Microgrid Analysis and Case Studies Report[END_REF]. From this MG, the idea of control and optimization, leading to smart systems in microgrids, has emerged.

From 2008 to nowadays

One of the main lines of research in the deployment of microgrids is the development of smart energy management approaches. What is meant by smart management is the efficient handling of networked microgrids energy flux through optimization and communication tools. Smart management techniques play a key role in MG development as they carry out distributed energy resources efficiently, trying to solve the intermittency problem while providing good power quality. Let us note that MGs and smart grids are different. A MG is defined according to its islanding capability and its power generation sources that feed the loads. A smart grid is defined according to the management strategy used. According to the Smart Grids European Technology Platform, a smart grid concerns an electricity network that can intelligently integrate the actions of all users connected to it -generators, consumers and those that do both -in order to efficiently deliver sustainable, economic and secure electricity supplies [START_REF] Fady | Optimization Methods and Energy Management in "Smart Grids[END_REF]. According to Kanchev et al. [138], a smart grid is a distribution network using informatics technologies in order to optimize and coordinate production, distribution, and consumption, aiming to improve energy efficiency and reliability of the system. A smart grid has to be reliable, flexible, and equipped with communication sensors [START_REF] Dkhili | A Survey of Modelling and Smart Management Tools for Power Grids with Prolific Distributed Generation[END_REF]. A smart grid must be able to detect grid faults and react consequently. Dkhili et al. [START_REF] Dkhili | A Survey of Modelling and Smart Management Tools for Power Grids with Prolific Distributed Generation[END_REF] suggest the following definition: The term "smart grid" thus refers to modern reactive power grids that intelligently integrate these distributed generators with end loads and efficiently reroute power flows to balance supply and demand in real time with respect to stability, quality, and safety constraints. They must offer the possibility of energy storage, adapt grid protection equipment to handle bidirectional power flow and be capable of serving non-traditional loads.

Illinois Institute of Technology (2008)

The Illinois Institue of Technology MG has been deployed in 2008 and was one of the first MG projects with smart control and self-healing capability [START_REF] Feng | A Review of Microgrid Development in the United States -A Decade of Progress on Policies, Demonstrations, Controls, and Software Tools[END_REF][START_REF] Shahidehpour | A Functional Microgrid for Enhancing Reliability, Sustainability, and Energy Efficiency[END_REF]. A fault detection system is used and allows the system to guarantee the energy load furniture and power balance. Numerous tools are available in the MG to smooth energy consumption. One of the main MG particularities is the use of electric vehicles to modify the load curve profile [START_REF]Microgrid Symposium[END_REF], which makes this project worth to mention.

Nicegrid (2011)

Over the available examples, the Nicegrid project is a demonstration project related to the development of management strategies applied in a distribution network in France. However, only a small part of the Nicegrid can be considered as a MG, but on the whole part, the Nicegrid is a smart grid. Launched in 2011, the Nicegrid project has been carry out through the FP7 European Program [START_REF] Rémy | GRID4EU -Innovation for energy networks[END_REF]. The Nicegrid project aimed at developing and validating in-situ tools for renewable energies integration, grid automation, demand-side management and reduction of the energy consumption. Consumption and production data are registered thanks to smart meters and weather forecast is used to predict renewable power generation. The energy management system developed within this project is then used to control the Nicegrid thanks to the collected data [219,[START_REF] Lombardo | Nice Microgrid: Solar, Storage, and Reliability[END_REF]. What makes this project interesting is all the considerations towards demand-side management and the prediction tools used.

iBats (2012)

In 2012, the iBats project has been launched in Switzerland. An energy management system has been developed to control the microgrid studied within the framework of this project [START_REF] Smart | Les Microgrids / Présentation Du Projet iBATs[END_REF]. What can be noticed about this project is the use of energy consumption forecasting associated with power regulation to control energy consumption, energy production and energy storage under high grid demand [222,[START_REF] Dufour | Contribution to the Development of Distributed Energy Management by Prediction[END_REF].

REIDS (2015)

Led by the Nanyang Technological University (NTU), the Renewable Energy Integration Demonstrator -Singapore (REIDS) has been initiated in 2015, through a partnership with ENGIE and Schneideir Electric, in Semakau Island, Singapore [START_REF] Peng | Innovative Microgrid Solution for Renewable Energy Integration within the REIDS Initiative[END_REF][START_REF] Smart | Microgrids / REIDS (Singapore): Technologies for sustainable and affordable energy for all in South East Asia. Les Microgrids / REIDS (Singapour) : Technologies pour une énergie durable et abordable pour tous en Asie Du Sud-Est[END_REF]. It is one of the biggest demonstration projects according to Peng et al. [START_REF] Peng | Innovative Microgrid Solution for Renewable Energy Integration within the REIDS Initiative[END_REF], as it is considered as an open-sky laboratory including a large number of MG experimentations and smart grid functions. An mixed integer linear programming (MILP) based energy management system is used to manage energy flux in this system [START_REF] Choletais | MASERA: A Microgrid Testbed For Advanced Optimisation Of Renewable Integration[END_REF]. Here are the main points:

-CO 2 emissions are reduced using renewable energies [START_REF] Peng | Innovative Microgrid Solution for Renewable Energy Integration within the REIDS Initiative[END_REF][START_REF] Smart | Microgrids / REIDS (Singapore): Technologies for sustainable and affordable energy for all in South East Asia. Les Microgrids / REIDS (Singapour) : Technologies pour une énergie durable et abordable pour tous en Asie Du Sud-Est[END_REF];

-the problem of intermittent renewable energies is solved [224]; -using electric vehicles are used as battery energy storage systems (BESS) (grid-to-vehicle or vehicle-to-grid) performing frequency regulation [START_REF] Choletais | MASERA: A Microgrid Testbed For Advanced Optimisation Of Renewable Integration[END_REF];

-smart meters are used for distance control in a secure way from France [START_REF] Choletais | MASERA: A Microgrid Testbed For Advanced Optimisation Of Renewable Integration[END_REF];

-weather and power generation forecasting [START_REF] Peng | Innovative Microgrid Solution for Renewable Energy Integration within the REIDS Initiative[END_REF];

-a reliable and affordable electricity supply for disadvantaged communities (that do not have access to an affordable and qualitative electricity due to their localization and economic status) is achieved [START_REF] Smart | Microgrids / REIDS (Singapore): Technologies for sustainable and affordable energy for all in South East Asia. Les Microgrids / REIDS (Singapour) : Technologies pour une énergie durable et abordable pour tous en Asie Du Sud-Est[END_REF].

Bornholm 2.0 (2016)

The demonstration project Bornholm 2.0 has been initiated in 2016. Smart meters have been installed in residential buildings [START_REF] Asmus | Microgrid Analysis and Case Studies Report[END_REF]. Energy consumption management has been already tested for Bornholm, but between 2016 and 2019, a MG aggregator called Ecogrid has been introduced, which makes this project interesting. Signals are sent to the consumers if they want to change their consumption [START_REF] Asmus | Microgrid Analysis and Case Studies Report[END_REF]. Following those tests, results have shown that consumers are very likely to make their consumption flexible towards ecological reasons [START_REF] Asmus | Microgrid Analysis and Case Studies Report[END_REF]. Like the REIDS project, electric vehicles can be used as frequency regulator for the main grid [START_REF] Asmus | Microgrid Analysis and Case Studies Report[END_REF].

Simris (2017)

The Simris MG was built in 2017 in Sweden by the E.ON company [START_REF] Bogdanovic | InterFlex -Simris-Technical Management of a Grid-Connected Microgrid That Can Run in an Islanded Mode with 100% Renewable Generation[END_REF] and tested until 2019. It is part of the Interflex project, funded by the European Program Horizon 2020 (H2020). One of the main goals of this project was to perform an islanding operation with 100% of the load fulfilled with renewable energies [100]. In Sweden, during winter, MG islanding is necessary as electric lines may be damaged by storms. Here, islanding is done in a smooth way (without voltage or frequency disturbances) [START_REF] Bogdanovic | InterFlex -Simris-Technical Management of a Grid-Connected Microgrid That Can Run in an Islanded Mode with 100% Renewable Generation[END_REF]100]. Regarding the control methods available or the MG configuration, demand response, peer-2-peer, automatic control of the system and the taking advantage of electric vehicles have been considered [100]. Bogdanovic et al. [START_REF] Bogdanovic | InterFlex -Simris-Technical Management of a Grid-Connected Microgrid That Can Run in an Islanded Mode with 100% Renewable Generation[END_REF] forecast energy consumption with recurrent neural networks (RNN) and use model predictive control (MPC) to charge or discharge the battery in the MG. Thus, the energy exchange with the main grid is minimized in simulation. To our best knowledge, in 2017, using an MPC controller does not seem to have been done for a MG within the framework of a demonstration project which makes this project of most interest regarding MG deployment and the control strategies used.

Perspectives and conclusion

Among different parts of the world, microgrids have different assets. Using MGs has been an opportunity for people living in areas where access to electricity is constrained. They also improve the main grid robustness in case of natural disasters, in Japan or in the United States of America for example [START_REF] Feng | A Review of Microgrid Development in the United States -A Decade of Progress on Policies, Demonstrations, Controls, and Software Tools[END_REF]. But, all over the world, microgrids are often used to reduce the Survey of recent advances in the smart management of microgrids and networked microgrids economic cost and CO 2 emissions thanks to the penetration of renewable energies into the main grid. In the beginning of the twentieth century, research projects were launched to evaluate the islanding capability of microgrids. Then, smart meters have been deployed and efficient management strategies have been developed in order to enhance power quality and take advantage of new forms of energy consumption (like electric vehicles). Recently, machine learning methods and advanced control approaches like MPC have been used to efficiently control microgrids. Tables 1.4, 1.5 and 1.6 describe the configurations of the mentioned MGs in this section. It is expected that management strategies will be developed and studied more and more in the future, in a context of in-situ implementations. Demonstration projects have been launched over the past years, but in-situ validation still need to be done before advanced strategies can be deployed in commercial microgrids. In this section, research papers recently published in peer-reviewed journals, dealing with various aspects of MG/NMG management, are presented and discussed. The main applications and issues addressed by the scientific community are identified. Works concerned by (1) MGs and NMGs operated in islanded mode and (2) MGs and NMGs equipped with EVs are highlighted. Model predictive control (Section 3.1), multi-agent systems (Section 3.2), game theory (Section 3.3), stochastic programming (Section 3.4), robust optimization (Section 3.5), artificial intelligence (Section 3.6) and droop control (Section 3.7) are the main considered methods. The way these methods are used to solve complex control and planning tasks is analyzed. The section ends with a discussion (Section 3.9).

Model predictive control

In recent years, model predictive control (MPC), an advanced method of process control used to control a process while satisfying a set of constraints, is getting more and more attention from the scientific community. As the deployment of renewable energy-based distributed generators increases, energy management becomes more complex and efficient tools are needed to handle such a complexity. An overview of MPC strategies in a MG context is given in [START_REF] Hu | Model predictive control of microgrids -An overview[END_REF]. As highlighted by the papers previously mentioned, MPC is used in the last years for voltage and frequency regulation, distributed generation management, EV and ESS management, or power flow management. Some recent papers are highlighted in the followings in order to give to the reader an overview on how MPC is used for MG/NMG management [START_REF] Parisio | Cooperative MPC-Based Energy Management for Networked Microgrids[END_REF][START_REF] Tsai | Model Predictive Optimization for Energy Storage-Based Smart Grids[END_REF][START_REF] Wen | MPC-Based Frequency Control Strategy with a Dynamic Energy Interaction Scheme for the Grid-Connected Microgrid System[END_REF][START_REF] Jayachandran | Predictive Power Management Strategy for PV/Battery Hybrid Unit Based Islanded AC Microgrid[END_REF][START_REF] Wu | A Model Predictive Control Approach in Microgrid Considering Multi-Uncertainty of Electric Vehicles[END_REF][START_REF] Ryu | MPC Based Energy Management System for Hosting Capacity of PVs and Customer Load with EV in Stand-Alone Microgrids[END_REF][START_REF] Pan | Model Predictive Load Frequency Control of Isolated Micro-Grid with Electrical Vehicles[END_REF][START_REF] Li | Model Predictive Control of a Voltage-Source Inverter With Seamless Transition Between Islanded and Grid-Connected Operations[END_REF][START_REF] Valencia | Robust Energy Management System for a Microgrid Based on a Fuzzy Prediction Interval Model[END_REF][START_REF] Del Nozal | A MPC Strategy for the Optimal Management of Microgrids Based on Evolutionary Optimization[END_REF][START_REF] Gust | Strategies for Microgrid Operation under Real-World Conditions[END_REF][START_REF] Bogdanovic | InterFlex -Simris-Technical Management of a Grid-Connected Microgrid That Can Run in an Islanded Mode with 100% Renewable Generation[END_REF][START_REF] Ouammi | Model Predictive Control for Optimal Energy Management of Connected Cluster of Microgrids with Net Zero Energy Multi-Greenhouses[END_REF].

In [START_REF] Parisio | Cooperative MPC-Based Energy Management for Networked Microgrids[END_REF], a novel cooperative MPC framework is proposed for urban districts comprising multiple MGs sharing certain distributed energy resources. Each MG is equipped with an MPCbased EMS, responsible for optimally controlling flexible loads, heating systems, and local power generators. The proposed coordination algorithm is distributed and guarantees constraints satisfaction. Each MG achieves cost savings. In addition, the quantity of electricity extracted from the main grid is lowered. In [START_REF] Tsai | Model Predictive Optimization for Energy Storage-Based Smart Grids[END_REF], a genetic algorithm is used by Yang et al. to optimize the ESS schedule in a NMG composed of 321 households in Norway (the Demo Steinkjer). Using MPC, a compromise has been entered between two objectives, maximizing the economic cost and extending the battery's lifetime. Cost savings have been realized whereas the battery's lifetime has been preserved. In [START_REF] Wen | MPC-Based Frequency Control Strategy with a Dynamic Energy Interaction Scheme for the Grid-Connected Microgrid System[END_REF], a model predictive controller is proposed to regulate frequency fluctuations in a grid-connected MG. In order to mitigate power fluctuations caused by energy demand and renewable energy sources, a dynamic energy interaction scheme is also proposed. As stated by the authors, a stable system frequency is hard to achieve. In comparison with a PI (proportional-integral) controller, the MPC controller is faster and achieves better results. In [START_REF] Jayachandran | Predictive Power Management Strategy for PV/Battery Hybrid Unit Based Islanded AC Microgrid[END_REF], an MPC decentralized control scheme is proposed for hybrid source converters and parallel-connected voltage source inverter (VSI) in an islanded MG. As an interesting result, fluctuations in PV power generation can be smoothened by controlling the PV converter. In addition, the strategy maintains the DC-link voltage and state of charge balancing among batteries. The active and reactive power sharing between distributed generators can be achieved by the proposed control scheme under fluctuating power generation, various load conditions and mismatched feeder impedance. Wu et al. [START_REF] Wu | A Model Predictive Control Approach in Microgrid Considering Multi-Uncertainty of Electric Vehicles[END_REF] have used MPC to enhance robustness to multi-uncertainty of electric vehicles in a MG, in coordination with wind energy. Feedback from aggregated EVs is used for higher forecasting accuracy. In a standalone MG equipped with an energy storage system, Ryu et al. [START_REF] Ryu | MPC Based Energy Management System for Hosting Capacity of PVs and Customer Load with EV in Stand-Alone Microgrids[END_REF] have used MPC to improve hosting capacity of solar photovoltaics and EV integration. The effectiveness of the proposed controller is demonstrated via numerical simulations. Using MPC, frequency deviation has been reduced to zero by [START_REF] Pan | Model Predictive Load Frequency Control of Isolated Micro-Grid with Electrical Vehicles[END_REF] in an islanded MG. Diesel generators and EVs has been put to good use. In [START_REF] Li | Model Predictive Control of a Voltage-Source Inverter With Seamless Transition Between Islanded and Grid-Connected Operations[END_REF], a new control strategy based on MPC with seamless transfer characteristics for a grid-connected voltage-source inverter is presented. The objectives of the proposed MPC controller are decoupled power control in grid-connected mode, load voltage control in islanded mode, and seamless transition between modes of operation. The effectiveness of the proposed control strategy has been validated. In [START_REF] Valencia | Robust Energy Management System for a Microgrid Based on a Fuzzy Prediction Interval Model[END_REF], a robust MPC-based EMS, which is formulated using a fuzzy prediction interval model as prediction model, is proposed for MGs. A MG in Chile (Huatacondo) has been used as a test bench. The results highlight that the proposed MPC-based EMS increased the robustness of the MG by using a diesel generator as a spinning reserve. However, the operating costs are slightly increased. In a MG composed of a large number of power generators, Nozal et al. [START_REF] Del Nozal | A MPC Strategy for the Optimal Management of Microgrids Based on Evolutionary Optimization[END_REF] have decided for a genetic algorithm as an optimizer for the proposed MPC controller in order to reduce operating costs in this complex system. Good results are achieved. In [START_REF] Gust | Strategies for Microgrid Operation under Real-World Conditions[END_REF], Gust et al. compare two different strategies for MG management. The first one is a reactive strategy where no forecast is required, a greedy heuristic is used. The second one is an MPC strategy. The total economic cost is significantly reduced with the MPC strategy. In the InterFlex H2020 research project framework, Bogdabovic et al. [START_REF] Bogdanovic | InterFlex -Simris-Technical Management of a Grid-Connected Microgrid That Can Run in an Islanded Mode with 100% Renewable Generation[END_REF] have demonstrated an MPC approach for MGs with an important proportion of renewable energy sources. Artificial neural networks were used as forecasting tool. A central battery system is used as grid-forming unit in order to balance the MG. Simulation results show the effectiveness of the proposed approach. In particular, smart management of energy storage allows reducing exchanges with the main grid and, as a result, smooth islanding (with no voltage or frequency disturbances). The demonstration is based on E.ON's MG in Simris (Sweden). Finally, a coordinated optimization framework embedded in an MPC scheme is proposed by Ouammi et al. [START_REF] Ouammi | Model Predictive Control for Optimal Energy Management of Connected Cluster of Microgrids with Net Zero Energy Multi-Greenhouses[END_REF] for power flow management in a cooperative NMG with multi-greenhouses. As an interesting result, the MPC scheme is capable of ensuring the power supply without any support from the main grid, reaching the objective of net zero energy greenhouses.

For all the papers highlighted in this section, the main features, MG/NMG resources, and noticeable results are summarized in Table 1.7. If a paper deals with MG islanding operation, this is highlighted in the table.

Multi-agent systems

As stated by Dkhili et al. [START_REF] Dkhili | A Survey of Modelling and Smart Management Tools for Power Grids with Prolific Distributed Generation[END_REF], numerous definitions have been given to explain multiagent systems. An agent is "a free-standing entity situated in a partially or totally observable environment to which it is able to react. An agent is, controversially so, characterized as "intelligent". This refers to its ability to perceive changes in its environment and make decisions autonomously". An agent will percept a situation, take a decision and act from its own drawback. However, when the problem is too complex, a single agent would not be able to solve it: several agents, acting as a multi-agent system are needed. Three MAS architectures can be distinguished: a centralized architecture where each agent is controlled by a single control center, a distributed architecture where each agent handles its own part of the network, and a hierarchical architecture where some agents are above the command chain, over other agents [START_REF] Kantamneni | Survey of Multi-Agent Systems for Microgrid Control[END_REF]. MAS has been vastly used and has the following features: flexibility, extensivity, fault tolerance, communication and cooperation. A comprehensive review of MAS-based distributed coordinated control and optimization in MGs and NMGs is proposed by Han et al. [START_REF] Han | MAS-Based Distributed Coordinated Control and Optimization in Microgrid and Microgrid Clusters: A Comprehensive Overview[END_REF]. Some recent papers are highlighted in the followings in order to give to the reader an overview on how MAS is used for MG/NMG management [START_REF] Ju | Multi-Agent-System-Based Coupling Control Optimization Model for Micro-Grid Group Intelligent Scheduling Considering Autonomy-Cooperative Operation Strategy[END_REF][START_REF] Kong | A Multi-Agent Optimal Bidding Strategy in Microgrids Based on Artificial Immune System[END_REF][START_REF] Egbue | Multi-Agent Approach to Modeling and Simulation of Microgrid Operation with Vehicle-to-Grid System[END_REF][START_REF] Waseem | Multi-Agents Based Optimal Energy Scheduling Technique for Electric Vehicles Aggregator in Microgrids[END_REF][START_REF] Nguyen | A Distributed Hierarchical Control Framework in Islanded Microgrids and Its Agent-Based Design for Cyber-Physical Implementations[END_REF][START_REF] Morstyn | Multi-Agent Sliding Mode Control for State of Charge Balancing Between Battery Energy Storage Systems Distributed in a DC Microgrid[END_REF][START_REF] Li | MAS-Based Distributed Control Method for Multi-Microgrids with High-Penetration Renewable Energy[END_REF][START_REF] Chen | Multi-Time Scale Coordinated Optimal Dispatch of Microgrid Cluster Based on MAS[END_REF][START_REF] Fang | Multi-Agent Deep Reinforcement Learning for Distributed Energy Management and Strategy Optimization of Microgrid Market[END_REF][START_REF] Tope | Multi-Agent Based Optimal Operation of Hybrid Energy Sources Coupled with Demand Response Programs[END_REF].

In [START_REF] Ju | Multi-Agent-System-Based Coupling Control Optimization Model for Micro-Grid Group Intelligent Scheduling Considering Autonomy-Cooperative Operation Strategy[END_REF], MAS is introduced for intelligent scheduling of NMG autonomy-cooperative operation. A 3-layer coordinate control system framework is designed. Results suggest that the proposed strategy can be applied to the optimal scheduling of MG operation, both in grid-connected and islanded modes. In addition, the authors highlight on one hand that energy storage affects MG scheduling and on the other hand that price-based demand response can smooth the load demand curve and improve MG operation. In [START_REF] Kong | A Multi-Agent Optimal Bidding Strategy in Microgrids Based on Artificial Immune System[END_REF], Kong et al. establish a multi-agent bidding and trading mechanism of distributed energy resources in a commercial MG connected to the main grid. In addition, an artificial immune algorithm is improved to search for the optimal strategy. The strategy provides an effective coordination and interaction between the main grid and the NMG. Resource and benefit distribution is improved. In [START_REF] Egbue | Multi-Agent Approach to Modeling and Simulation of Microgrid Operation with Vehicle-to-Grid System[END_REF], a multi-agent approach to modeling and simulation of MG operation with vehicle-to-grid system included is presented by Egbue et al. The authors looked for the minimization of the electricity extracted from the main grid. Finally, Khan et al. [START_REF] Waseem | Multi-Agents Based Optimal Energy Scheduling Technique for Electric Vehicles Aggregator in Microgrids[END_REF] have proposed an MAS-based technique for electrical power delivering and electricity price uncertainties control to attain robust energy scheduling of the domestic loads and EV aggregator. Local agents operate and accomplish their respective tasks in an autonomous way, making the MG smarter and reliable. The trading of electrical power and energy balancing jobs over the required load demand has also been accomplished. MG reliability has been significantly improved. In [START_REF] Nguyen | A Distributed Hierarchical Control Framework in Islanded Microgrids and Its Agent-Based Design for Cyber-Physical Implementations[END_REF], a distributed hierarchical control framework based on MAS with coordinated secondary and tertiary levels is proposed for islanded MGs. The multi-agent system is designed to cover both control levels for cyber-physical implementations. The proposed control framework has been validated in real time and under hardware-in-the-loop conditions using a cyber-physical MG platform. In [START_REF] Morstyn | Multi-Agent Sliding Mode Control for State of Charge Balancing Between Battery Energy Storage Systems Distributed in a DC Microgrid[END_REF], Morstyn et al. propose the use of a novel multi-agent sliding mode control for state of charge balancing between distributed DC MG battery energy storage systems. The strategy (1) ensures the battery energy storage systems are either all charging or all discharging, thus increasing efficiency and reducing degradation of battery lifetime (2) achieves faster state of charge balancing and (3) avoids overloading the batteries during high-load periods. In [START_REF] Li | MAS-Based Distributed Control Method for Multi-Microgrids with High-Penetration Renewable Energy[END_REF], a MAS-based decentralized approach with fault tolerance control is proposed for NMGs. The results show that the frequency and voltage stay at the prescribed values and the system is more tolerant to failures than in a centralized approach.

In [START_REF] Chen | Multi-Time Scale Coordinated Optimal Dispatch of Microgrid Cluster Based on MAS[END_REF], a 3-layer MAS architecture is established by Chen et al. for NMG coordinated operation.

A multi-time scale energy optimization scheme, including day-ahead scheduling and real-time dispatch, is proposed by the authors. Real-time dispatch aims at minimizing the regulation cots of each MG, with the help of the fast tracking ability of controllable distributed generators and energy storage systems. Results show that a cooperative strategy is better for reducing regulation costs in a NMG than a non-cooperative one. A multi-agent (model-free) reinforcement learning approach is proposed by Fang et al. [START_REF] Fang | Multi-Agent Deep Reinforcement Learning for Distributed Energy Management and Strategy Optimization of Microgrid Market[END_REF] to achieve distributed energy scheduling and strategy-making in the case of a regional NMG. An independent market strategy is learnt. In [START_REF] Tope | Multi-Agent Based Optimal Operation of Hybrid Energy Sources Coupled with Demand Response Programs[END_REF], a demand response (DR) strategy built on an incentive-based demand response (IBDR) model is proposed to minimize the daily operating costs of hybrid MGs. Three case studies were considered to derive the most reduced daily operating costs. A MAS is used to make sure that all the MG energy sources are properly managed. Using smart agents enables the MG to perform optimally. For all the papers highlighted in this section, the main features, MG/NMG resources, and noticeable results are summarized in Table 1.8. If a paper deals with MG islanding operation, this is highlighted in the table.

Game theory

As NMGs emerge, energy management evolves. The aim of NMGs is to achieve both resilience and stability through power exchange among the MGs and to smooth the penetration of distributed generation into the main grid. According to Dkhili et al. [START_REF] Dkhili | A Survey of Modelling and Smart Management Tools for Power Grids with Prolific Distributed Generation[END_REF], "game theory is a branch of applied mathematics used to tackle a multitude of problems where the components of the system have evolving interdependent relationships". Game theory (GT) allows modeling the behavior of subsystems' agents involved in strategic situations where the outcome of a player's actions is function of its choices, these of other players, and exterior factors. Different kinds of cooperation might be used in the context of NMGs:

-Selfish mode: every MG only considers the main grid as an auxiliary aid, MGs don't share their respective resources. -Selfish cooperation: energy exchanges between MGs exist, but only when a MG has power surplus and if these exchanges don't have any effect on management. A MG pursues its own interest first.

-Collective cooperation: the NMG is considered as a whole, optimization is done for the system and benefits will be shared proportionally to the respective contributions of the MGs.

Some recent papers are highlighted in the followings in order to give to the reader an overview on how GT is used for MG/NMG management [START_REF] Luis Querini | Cooperative Energy Management System for Networked Microgrids[END_REF][START_REF] Ali | Comparative Study on Game-Theoretic Optimum Sizing and Economical Analysis of a Networked Microgrid[END_REF][START_REF] Ali | Optimal Planning of Clustered Microgrid Using a Technique of Cooperative Game Theory[END_REF][START_REF] Mei | Coalitional Game Theory Based Local Power Exchange Algorithm for Networked Microgrids[END_REF][START_REF] Sun | Day-Ahead Economic Dispatch of Microgrid Based on Game Theory[END_REF][START_REF] Hu | Multi-Energy Management with Hierarchical Distributed Multi-Scale Strategy for Pelagic Islanded Microgrid Clusters[END_REF][START_REF] Yu | A Game Theoretical Pricing Mechanism for Multi-Microgrid Energy Trading Considering Electric Vehicles Uncertainty[END_REF][START_REF] Javanmard | Energy Management of Multi-Microgrids Based on Game Theory Approach in the Presence of Demand Response Programs, Energy Storage Systems and Renewable Energy Resources[END_REF][START_REF] Aziz | A Decentralized Game Theoretic Approach for Virtual Storage System Aggregation in a Residential Community[END_REF]. First, a hybrid EMS architecture based on canonical coalition games for cooperative power exchange management in NMGs, interconnected with the main grid via a macro station, is proposed by Querini et al. [START_REF] Luis Querini | Cooperative Energy Management System for Networked Microgrids[END_REF]. A central EMS and local EMSs perform three main processes: a scheduling process, a monitoring and rescheduling process, and a benefits distribution process. By comparing the proposed architecture with a coalition formation game-based algorithm, the authors have concluded that the problem of power exchange management in NMGs should be modeled as a canonical coalition game and not as a coalition formation game. In [START_REF] Ali | Comparative Study on Game-Theoretic Optimum Sizing and Economical Analysis of a Networked Microgrid[END_REF], two techniques based on game theory, i.e., Shapley values and Nash equilibrium, are proposed by Ali et al. for correct sizing of a networked grid-connected MG. System optimization is based on a multi-objective imperialistic competition algorithm (ICA). The NMG is composed of two different grid-connected MGs with common electrical load and might have different combinations of generation resources including wind turbine, photovoltaic panels, and batteries. Different kinds of cooperation are studied in the paper and the best results were obtained when considering the Shapley values and if actors play in a cooperative way. In another paper from the same authors [START_REF] Ali | Optimal Planning of Clustered Microgrid Using a Technique of Cooperative Game Theory[END_REF], the selected technique for optimal planning of a networked grid-connected MG (i.e., for capacity allocation of generation resources and batteries and to maximize the annual profit of each MG) is the Nash bargaining game. A particle swarm optimization (PSO) algorithm is used to find the most feasible Nash bargaining solution. According to the authors, the proposed technique provided the best results (among the different techniques the authors have tried). A coalitional-gametheory-based local power exchange algorithm is proposed by Mei et al. [START_REF] Mei | Coalitional Game Theory Based Local Power Exchange Algorithm for Networked Microgrids[END_REF] to identify incentives for coalitional operation. The proposed method also helps MGs trade power locally with neighboring MGs, in order to meet their own power requirements while achieving higher expected individual utility. Simulation results show that the proposed coalitional-game-theory-based local power exchange algorithm is capable of increasing individual MG utility in the network. In [START_REF] Sun | Day-Ahead Economic Dispatch of Microgrid Based on Game Theory[END_REF], a strategy for day-ahead economic dispatch based on game theory, capable of solving mixed integer programming problems, is proposed by Sun et al. As an interesting statement, the price of electricity is considered as an independent variable in the optimization process. A case study (i.e., a MG with one utility and two users who want to lower costs) allows assessing the effectiveness and practicability of the strategy. The latter ensures that each actor achieves its own economic goals. Hu et al. [START_REF] Hu | Multi-Energy Management with Hierarchical Distributed Multi-Scale Strategy for Pelagic Islanded Microgrid Clusters[END_REF] introduce a novel multi-energy management framework for pelagic islanded MG clusters (PIMGCs). In this framework, the operators on "resource" islands sell energy resources while the aggregators and users on "load" islands dispatch and consume energy resources, respectively. The operators determine their daily optimal energy supply in a distributed collaborative way, each aggregator determines its daily optimal energy demand and hourly optimal energy usage, and each user determines its hourly optimal energy consumption. A hierarchical day-ahead distributed algorithm is proposed to obtain the Nash equilibrium strategy: the operators minimize their aggregate operational cost, each aggregator maximizes its revenue and each user maximizes its payoff. Simulation results show the effectiveness and benefits of the proposed multi-energy management framework for the PIMGCs. In [START_REF] Yu | A Game Theoretical Pricing Mechanism for Multi-Microgrid Energy Trading Considering Electric Vehicles Uncertainty[END_REF], Yu et al. propose a MG energy trading Bayesian game (METBG) for time-of-use price based energy trading between MGs. The utility model of players is established using a Bayesian-Stackelberg game. The price mechanism solution has been rigorously derived and an iterative algorithm is presented to achieve the equilibrium solution. As interesting results, the METBG-based scheme networked microgrids is capable of guiding the EVs to operate as an energy storage system. The price mechanism of METBG makes MGs willing to participate in the power exchange with more surplus energy and the energy storage's charging/discharging capacity is increased. In [START_REF] Javanmard | Energy Management of Multi-Microgrids Based on Game Theory Approach in the Presence of Demand Response Programs, Energy Storage Systems and Renewable Energy Resources[END_REF], Javanmard et al. present a 2-stage framework in which distribution feeder reconfiguration is implemented in order to satisfy technical and security constraints. In addition, MG day-ahead scheduling is carried out by a game-theoretic approach in order to avoid market power. A shiftable-load demand response program is implemented. The optimization problem is modeled as a mixed-integer quadratically constrained programming (MIQCP) problem. Results indicate reduced market power and operating costs. In [START_REF] Aziz | A Decentralized Game Theoretic Approach for Virtual Storage System Aggregation in a Residential Community[END_REF], Aziz et al. present a game theoretic analysis for community MGs including a coalition of prosumer households with photovoltaic solar panels. Using an application of mean field game theory, the authors highlight that Nash equilibrium strategies enable minimizing both the households' energy generation cost and the energy consumption cost.

For all the papers highlighted in this section, the main features, MG/NMG resources, and noticeable results are summarized in Table 1.9. If a paper deals with MG islanding operation, this is highlighted in the table.

Stochastic programming

Stochastic programming (SP) is an optimization framework dealing with decision-making under uncertainty [START_REF] Li | An improved L-shaped method for two-stage convex 0-1 mixed integer nonlinear stochastic programs[END_REF]. Some recent papers are highlighted in the followings in order to give to the reader an overview on how SP is used for MG/NMG management [START_REF] Vergara | A Stochastic Programming Model for the Optimal Operation of Unbalanced Three-Phase Islanded Microgrids[END_REF][START_REF] Li | Combined Two-Stage Stochastic Programming and Receding Horizon Control Strategy for Microgrid Energy Management Considering Uncertainty[END_REF][START_REF] Guo | Economic-Environmental Analysis of Renewable-Based Microgrid under a CVaR-Based Two-Stage Stochastic Model with Efficient Integration of Plug-in Electric Vehicle and Demand Response[END_REF][START_REF] Thomas | Optimal Operation of an Energy Management System for a Grid-Connected Smart Building Considering Photovoltaics' Uncertainty and Stochastic Electric Vehicles' Driving Schedule[END_REF][START_REF] Jordehi | Two-Stage Stochastic Programming for Scheduling Microgrids with High Wind Penetration Including Fast Demand Response Providers and Fast-Start Generators[END_REF][START_REF] Zhang | Incorporating Production Task Scheduling in Energy Management of an Industrial Microgrid: A Regret-Based Stochastic Programming Approach[END_REF][START_REF] Sayed Rezwanul Islam | Multi-Facility Aggregate Production Planning with Prosumer Microgrid: A Two-Stage Stochastic Program[END_REF][START_REF] Cao | Networked Microgrids Planning Through Chance Constrained Stochastic Conic Programming[END_REF].

In [START_REF] Vergara | A Stochastic Programming Model for the Optimal Operation of Unbalanced Three-Phase Islanded Microgrids[END_REF], a mixed integer nonlinear programming (MINLP) model is presented for the optimal operation of islanded droop-based MGs. A scenario-generation approach is used for uncertainty consideration in the optimization model. Results have shown that the total operating costs are reduced. Reference is a deterministic approach. In [START_REF] Li | Combined Two-Stage Stochastic Programming and Receding Horizon Control Strategy for Microgrid Energy Management Considering Uncertainty[END_REF], a combined stochastic programming and receding horizon control strategy is proposed by Li et al. for energy management under uncertainty in MGs. A proper strategy is also proposed by the authors in order to maintain the SP model as a mixed integer linear constrained quadratic programming (MILCQP) problem. The problem is solvable without resorting to any heuristics algorithms. Results demonstrate the superiority of the proposed strategy for both islanded and grid-connected operating modes. The work presented in [START_REF] Guo | Economic-Environmental Analysis of Renewable-Based Microgrid under a CVaR-Based Two-Stage Stochastic Model with Efficient Integration of Plug-in Electric Vehicle and Demand Response[END_REF] by Guo et al. focuses on the optimal risk assessment of a MG equipped with a parking lot of EVs. A DR program and high penetration of wind and solar energies are considered for enhancing financial and environmental goals. The proposed model is formulated as a mixed-integer linear 2-stage stochastic model. Results indicate that the integration of EVs and demand response reduces the MG total operating cost. Besides, CO 2 emissions and renewable power curtailment are reduced. In [START_REF] Thomas | Optimal Operation of an Energy Management System for a Grid-Connected Smart Building Considering Photovoltaics' Uncertainty and Stochastic Electric Vehicles' Driving Schedule[END_REF], a mixed-integer linear programming framework-based model is proposed for optimal operation of a grid-connected smart building. Results confirm that the proposed stochastic approach is capable of lowering the total expected daily cost. In [START_REF] Jordehi | Two-Stage Stochastic Programming for Scheduling Microgrids with High Wind Penetration Including Fast Demand Response Providers and Fast-Start Generators[END_REF], the operation of a MG with dispatchable generators is formulated as a 2-stage stochastic optimization problem, wherein day-ahead (DA) and real-time (RT) stages are seen in one shot. DA and RT decision variables are determined in order to minimize the MG operating costs. Flexibility resources are used to increase MG flexibility. In [START_REF] Zhang | Incorporating Production Task Scheduling in Energy Management of an Industrial Microgrid: A Regret-Based Stochastic Programming Approach[END_REF], a regret-based riskaverse stochastic production task and energy management (PTEM) model for industrial MG is proposed. The model is formulated as a mixed-integer linear programming problem based on stochastic programming considering uncertainties of day-ahead electricity market prices and PV power generation. Results highlight that the proposed PTEM approach is effectively risk-averse. In [START_REF] Sayed Rezwanul Islam | Multi-Facility Aggregate Production Planning with Prosumer Microgrid: A Two-Stage Stochastic Program[END_REF], a novel aggregate production planning model with onsite renewable energy (APPM-RE) is proposed. The model is a 2-stage stochastic program considering uncertainties (in particular in power generation). The results show that the model can assist firms in accurately anticipating the effect of transitioning to wind-and solar-based MGs. In addition, numerical experiments Nash equilibrium strategies minimize both the energy generation and energy consumption costs [START_REF] Aziz | A Decentralized Game Theoretic Approach for Virtual Storage System Aggregation in a Residential Community[END_REF] show that the most affordable manner to decarbonize production, transportation, and warehousing is through prosumer MG operation. In [START_REF] Cao | Networked Microgrids Planning Through Chance Constrained Stochastic Conic Programming[END_REF], a chance constrained stochastic conic program model for NMG planning is proposed. Stochastic scenarios are used to capture randomness and a joint chance constraint is proposed to control the operational risks. Numerical results demonstrate the effectiveness of the proposed planning model and the superior performance of the developed algorithm.

For all the papers highlighted in this section, the main features, MG/NMG resources, and noticeable results are summarized in Table 1.10. If a paper deals with MG islanding operation, this is highlighted in the table.

Robust optimization

Robust optimization (RO) methods are used to solve functions with random parameters and uncertainties that can vary over time. In such methods, values of the uncertain parameters are defined by a continuous set [START_REF] Omar | Towards Optimal Management in Microgrids: An Overview[END_REF]. Some recent papers are highlighted in the followings in order to give to the reader an overview on how RO is used for MG/NMG management [START_REF] Yang | Robust Optimization of Microgrid Based on Renewable Distributed Power Generation and Load Demand Uncertainty[END_REF][START_REF] Hussain | Impact Analysis of Demand Response Intensity and Energy Storage Size on Operation of Networked Microgrids[END_REF][START_REF] Liu | Distributed Robust Energy Management of a Multimicrogrid System in the Real-Time Energy Market[END_REF][START_REF] Tan | Two-Stage Robust Optimization Dispatch for Multiple Microgrids with Electric Vehicle Loads Based on a Novel Data-Driven Uncertainty Set[END_REF][START_REF] Adineh | Robust Optimization Based Harmonic Mitigation Method in Islanded Microgrids[END_REF][START_REF] Aryanezhad | A Robust Game-Theoretic Optimization Model for Battery Energy Storage in Multi-Microgrids by Considering of Renewable Based DGs Uncertainty[END_REF][START_REF] Mohiti | Two-Stage Robust Optimization for Resilient Operation of Microgrids Considering Hierarchical Frequency Control Structure[END_REF].

In [START_REF] Yang | Robust Optimization of Microgrid Based on Renewable Distributed Power Generation and Load Demand Uncertainty[END_REF], a 2-stage robust optimization model is established, considering uncertainties. It aims to find a balance between economy and robustness of MG operation. The robust equivalent representation proposed by Yang et al. includes the robust equivalent characterization of both photovoltaic power generation and wind power generation outputs. In order to solve the problem, the Benders dual algorithm is used by the authors. The simulation results show that the system's robustness can be achieved by solving the robust adjustment parameters, while the operating cost can be reduced. In [START_REF] Hussain | Impact Analysis of Demand Response Intensity and Energy Storage Size on Operation of Networked Microgrids[END_REF], the impact of two representative demand response programs, i.e., price-based and incentive-based demand response programs, and batteries sizing on the operation of NMGs is analyzed by Hussain et al. Robust optimization is used to realize forecast uncertainties. In addition, worst-case scenarios of renewables, loads, and prices are considered. Operating costs of the considered NMG have been reduced for increases in both demand response intensity and batteries' size. In [START_REF] Liu | Distributed Robust Energy Management of a Multimicrogrid System in the Real-Time Energy Market[END_REF], a robust distributed energy management scheme for NMGs is proposed. It aims to optimize the total operating cost of NMGs through the trading of energy with neighboring MGs and the main grid. Uncertainties are handled using an adjustable robust optimization technique. A 4-MG case study is considered in order to validate the proposed approach. Operating costs are reduced. In [START_REF] Tan | Two-Stage Robust Optimization Dispatch for Multiple Microgrids with Electric Vehicle Loads Based on a Novel Data-Driven Uncertainty Set[END_REF], a two-stage robust scheduling model is proposed to reduce the operating cost of NMGs and optimize electric power dispatch. The uncertainties associated with existing loads, renewable energy sources, and EV usage are taken into consideration. The optimization problem is formulated as a MILP problem and solved using a column and constraint generation algorithm. The feasibility of the proposed approach is demonstrated. Its superiority in terms of economic cost and convergence performance in comparison with existing robust optimization methods is demonstrated thanks to numerical case studies. In [START_REF] Adineh | Robust Optimization Based Harmonic Mitigation Method in Islanded Microgrids[END_REF], Adineh et al. propose a method based on robust optimization to reduce voltage harmonic distortion. A central controller receives voltage harmonic distortion measurements, optimizes the global information and sends back the optimal voltage harmonic components to the local controller of each distributed generator. The results highlight the robustness and efficiency of the controller. In [START_REF] Aryanezhad | A Robust Game-Theoretic Optimization Model for Battery Energy Storage in Multi-Microgrids by Considering of Renewable Based DGs Uncertainty[END_REF], a robust game-theoretic optimization model is developed for NMG economical operation by considering the renewable-based distributed generators uncertainty. The batteries' charging and discharging power is predicted using the column and constraint generation algorithm, particle swarm optimization, and a Markov decision process model of random variables. Suggestions regarding the battery operation mode are given by the authors. Simulation results show the ability of the proposed approach to tackle the uncertainty of renewable-based distributed generators. In [START_REF] Mohiti | Two-Stage Robust Optimization for Resilient Operation of Microgrids Considering Hierarchical Frequency Control Structure[END_REF], a two-stage robust day-ahead optimization model, in which a hierarchical frequency control structure is defined, is proposed for resilient MG operation. The MG operating costs are reduced while sufficient primary and secondary reserves are scheduled to restrict frequency deviations and avoid load shedding under the worstcase realization of islanding events. A column-and-constraint generation algorithm is used to solve the problem. Numerical test cases show the effectiveness of the proposed approach. For all the papers highlighted in this section, the main features, MG/NMG resources, and noticeable results are summarized in Table 1.11. If a paper deals with MG islanding operation, this is highlighted in the table.

Artificial intelligence

Artificial intelligence (AI) methods are nowadays very popular methods. As previously stated in the chapter, artificial intelligence -mainly machine and deep learning -is used in forecasting. As highlighted in the following papers [START_REF] Wang | Demand-Side Management for off-Grid Solar-Powered Microgrids: A Case Study of Rural Electrification in Tanzania[END_REF][START_REF] Darville | Microgrid Operational Planning Using a Hybrid Neural Network with Resource-aware Scenario Selection[END_REF][START_REF] Uddin | A Novel Peak Shaving Algorithm for Islanded Microgrid Using Battery Energy Storage System[END_REF][START_REF] Barbalho | Deep Reinforcement Learning-Based Secondary Control for Microgrids in Islanded Mode[END_REF][START_REF] Daniel | Renewable Energy Integration and Microgrid Energy Trading Using Multi-Agent Deep Reinforcement Learning[END_REF][START_REF] Chettibi | Adaptive Neural Network-Based Control of a Hybrid AC/DC Microgrid[END_REF][START_REF] Huo | Decision Tree-Based Optimization for Flexibility Management for Sustainable Energy Microgrids[END_REF][START_REF] Karimi | Intelligent Control of Islanded AC Microgrids Based on Adaptive Neuro-Fuzzy Inference System[END_REF][START_REF] Cheng | Implementation of a Small Type DC Microgrid Based on Fuzzy Control and Dynamic Programming[END_REF][START_REF] Oliveira | A Fuzzy-Based Approach for Microgrids Islanded Operation[END_REF][START_REF] Teekaraman | Solution for Voltage and Frequency Regulation in Standalone Microgrid Using Hybrid Multiobjective Symbiotic Organism Search Algorithm[END_REF][START_REF] Mohamed | A Novel Fuzzy Cloud Stochastic Framework for Energy Management of Renewable Microgrids Based on Maximum Deployment of Electric Vehicles[END_REF][START_REF] Jiao | Multi-Objective Optimal Energy Management of Microgrids Including Plug-in Electric Vehicles with the Vehicle to Grid Capability for Energy Resources Scheduling[END_REF], artificial intelligence, in particular artificial neural networks and fuzzy/neuro-fuzzy systems, can also be used in the management of MGs and NMGs. These papers are highlighted in the followings in order to give to the reader an overview on how AI is used in the domain.

In [START_REF] Wang | Demand-Side Management for off-Grid Solar-Powered Microgrids: A Case Study of Rural Electrification in Tanzania[END_REF], a novel strategy, which combines an analysis of consumed power with a model for anomaly detection, is proposed for addressing the energy shortages in rural areas of Africa and the low energy efficiency of off-grid solar power systems. Machine learning is used to detect anomalies. The model is nonintrusive and zero-training-cost. The proposed approach increases the utilization of local renewable energy sources and improves residents' experience. In [START_REF] Darville | Microgrid Operational Planning Using a Hybrid Neural Network with Resource-aware Scenario Selection[END_REF], a 2-stage reconfigurable framework is proposed for near real-time MG operational planning. An artificial neural network is used to predict energy dispatch decisions. It demonstrates robust predictive performance. In [START_REF] Uddin | A Novel Peak Shaving Algorithm for Islanded Microgrid Using Battery Energy Storage System[END_REF], a decision-tree-based peak shaving algorithm is proposed for islanded MGs. Simulation case studies are conducted under various load conditions and the results are compared with those of conventional techniques. The peak load demand is effectively mitigated while generation units are efficiently operated. In [START_REF] Barbalho | Deep Reinforcement Learning-Based Secondary Control for Microgrids in Islanded Mode[END_REF], a deep reinforcement learningbased secondary control algorithm is proposed for MGs in islanded mode. The deep deterministic policy gradient controller decides for the output power of the storage systems to guaranty voltage and frequency stability. The performance of the controller is compared to the one of droop controllers, considering a short-circuit event, feeder and load disconnections. Results show an important reduction of voltage and frequency deviations. In [START_REF] Daniel | Renewable Energy Integration and Microgrid Energy Trading Using Multi-Agent Deep Reinforcement Learning[END_REF], multi-agent reinforcement learning is used to control a MG in a mixed cooperative and competitive setting. The agents control a hybrid energy storage system; the aim is to maximize the utilization of renewables and reduce the energy costs. Moreover, an aggregator agent trades with external MGs competing against one another and competing against the aggregator in order to reduce their own energy bills. Renewable energy utilization is increased and energy bills are reduced. In [START_REF] Chettibi | Adaptive Neural Network-Based Control of a Hybrid AC/DC Microgrid[END_REF], both the design and validation of an online-trained ANN-based control system for AC/DC MGs are investigated. Adaptive artificial neural networks are used to track the maximum power point of distributed generators and to control the power exchanged between the front-end converter and the main grid. In addition, a fuzzy logic-based power management system is proposed. Results demonstrate the effectiveness, robustness, and self-adaptation ability of the proposed control approach. In [START_REF] Huo | Decision Tree-Based Optimization for Flexibility Management for Sustainable Energy Microgrids[END_REF], a flexibility based operational planning paradigm is applied to MG energy dispatch. A decision tree-based dispatch strategy, which can provide feasible and near optimal decisions, is proposed by the authors. Its computation efficiency is very high.

In [START_REF] Karimi | Intelligent Control of Islanded AC Microgrids Based on Adaptive Neuro-Fuzzy Inference System[END_REF], a knowledge-based neuro-fuzzy system, i.e., an adaptive neuro-fuzzy inference system (ANFIS), is used to control frequency and power sharing among distributed generators in a full renewable energy based MG while working in different areas of the operating points. The ANFIS rules and configuration are introduced to handle the complexity of larger MGs. Effectiveness of the proposed approach is demonstrated thanks to two case studies. Results suggest that the developed ANFIS controller, in comparison to conventional controllers such as proportional-integral (PI) controllers, is able to satisfy power sharing among distributed generators while better regulating frequency. In [START_REF] Cheng | Implementation of a Small Type DC Microgrid Based on Fuzzy Control and Dynamic Programming[END_REF], Cheng et al. propose the concept of small-type DC MG as well as control methods for power converters and generators. A DC-MG-based power generation system which is connected to the main grid is considered. The system is composed of a photovoltaic array, a wind generator, fuel cells and an energy storage system. Fuzzy controllers and a dynamic programming method are suggested by the authors in order to increase the injected power and balance the power flow and the voltage level of the distributed generators. Energy storage enables overcoming power flow issues and stabilizing the voltage level. Results show that good operation performance for different load conditions is provided by the proposed control method. In [START_REF] Oliveira | A Fuzzy-Based Approach for Microgrids Islanded Operation[END_REF], an approach for MG management in islanded conditions is proposed by Oliveira et al. Its aim is to maximize the duration of power supply taking into consideration the availability of renewable sources and stored energy. Load shedding, dispatch of expensive fossil fuel sources, and demand response actions are taken with the help of fuzzy logic. Because voltage/frequency regulation is one of the main challenges for proper operation of isolated MGs, a MG and simulation-based control structure including voltage and current control feedback loops is proposed for MG inverters in [START_REF] Teekaraman | Solution for Voltage and Frequency Regulation in Standalone Microgrid Using Hybrid Multiobjective Symbiotic Organism Search Algorithm[END_REF]. A PI controller is implemented along with the hybrid multi-objective symbiotic organism search algorithm to control the voltage deviation due to load variations. A fuzzy decision maker is proposed for optimal solution in voltage controller. A performance comparison is done with particle swarm optimization or multiple objective particle swarm optimization. With the proposed approach, voltage/frequency regulation is improved. In [START_REF] Mohamed | A Novel Fuzzy Cloud Stochastic Framework for Energy Management of Renewable Microgrids Based on Maximum Deployment of Electric Vehicles[END_REF], Mohamed et al. propose a stochastic fuzzy-based framework based on cloud theory and swarm optimization (polar honeybee mating algorithm) for optimal scheduling and management of MG units. The simulation results on a typical case study (a MG networked microgrids equipped with PV solar panels, a wind unit and plug-in hybrid EVs) demonstrate the efficiency of the proposed optimization method. The method shows good performance by reducing system costs. In [START_REF] Jiao | Multi-Objective Optimal Energy Management of Microgrids Including Plug-in Electric Vehicles with the Vehicle to Grid Capability for Energy Resources Scheduling[END_REF], Jiao et al. propose a multi-objective optimization energy management model for MGs with plug-in EVs and distributed generators. An improved gray wolf algorithm is proposed to solve this model. Compared with both particle swarm optimization and traditional gray wolf algorithm, the proposed model improves accuracy and convergence speed. Besides, the model is applied to three scheduling schemes and results show that, in some particular cases, plug-in hybrid EVs favor energy economy.

For all the papers highlighted in this section, the main features, MG/NMG resources, and noticeable results are summarized in Tables 1.12 and 1.13. If a paper deals with MG islanding operation, this is highlighted in the table.

Droop control

According to Li [START_REF] Li | Chapter 2 -Grid-connected power conversion of distributed resources[END_REF], "droop control refers to a method of simulating the drooping characteristics of a traditional generator set. This control method is generally applicable to occasions where multiple communication line-free inverters are connected in parallel. The working principle is as follows: each inverter self-detects its own output power and then adjusts the same against the reference output voltage amplitude and the frequency obtained by carrying out droop control, so as to realize reasonable allocation of active power and reactive power of the system". Some recent papers are highlighted in the followings in order to give to the reader an overview on how droop control is used for MG/NMG management [START_REF] Issa | Smooth Mode Transfer in AC Microgrids during Unintentional Islanding[END_REF][START_REF] Zhao | Multiple-Time-Scales Hierarchical Frequency Stability Control Strategy of Medium-Voltage Isolated Microgrid[END_REF][START_REF] Hou | Distributed Hierarchical Control of AC Microgrid Operating in Grid-Connected, Islanded and Their Transition Modes[END_REF][START_REF] Ullah | A Distributed Hierarchical Control Framework for Economic Dispatch and Frequency Regulation of Autonomous AC Microgrids[END_REF][START_REF] Wei | A power sharing method based on modified droop control for modular UPS[END_REF][START_REF] Zhang | An Enhanced Droop Control Strategy for Accurate Reactive Power Sharing in Islanded Microgrids[END_REF][START_REF] Tian | SOC Balancing and Coordinated Control Based on Adaptive Droop Coefficient Algorithm for Energy Storage Units in DC Microgrid[END_REF][START_REF] Bayat | Comprehensive Enhanced Newton Raphson Approach for Power Flow Analysis in Droop-Controlled Islanded AC Microgrids[END_REF][START_REF] Jiang | A Novel Pre-Synchronization Control Strategy for Microgrid Connections Based on Improved Droop Control[END_REF][START_REF] Noor | A Novel Decentralized Adaptive Droop Control Technique for DC Microgrids Based on Integrated Load Condition Processing[END_REF].

In [START_REF] Issa | Smooth Mode Transfer in AC Microgrids during Unintentional Islanding[END_REF], MG coordinated controllers are designed for enhancing the MG reliability by protecting it against unintentional islanding instability. In this strategy, the DC link voltage is used as a feedback parameter in the droop control loop. This leads to reliable operation. Stability is enhanced. The validity of the proposed strategy is verified by software simulations. A hierarchical control strategy is proposed by Zhao et al. [START_REF] Zhao | Multiple-Time-Scales Hierarchical Frequency Stability Control Strategy of Medium-Voltage Isolated Microgrid[END_REF] to maintain frequency stability in an islanded medium-voltage MG. The proposed architecture divides the system frequency in three zones: the stable zone, the precautionary zone, and the emergency zone. For both the stable and precautionary zones, a rule-based controller is proposed. For the emergency zone, droop control is used. Theoretical analysis, time-domain simulations, and field test under various conditions and scenarios prove the validity of the control strategy. In [START_REF] Hou | Distributed Hierarchical Control of AC Microgrid Operating in Grid-Connected, Islanded and Their Transition Modes[END_REF], a distributed hierarchical control with three levels is proposed for AC MGs. The primary control is a basic droop control, the secondary control is based on a distributed control with a leader-follower consensus protocol and the tertiary level is a mode-supervisory control, which manages the control targets of four operation modes. Frequency/voltage recovery and accurate power sharing are achieved in islanded mode. In grid-connected mode, flexible power flow regulation is achieved. In [START_REF] Ullah | A Distributed Hierarchical Control Framework for Economic Dispatch and Frequency Regulation of Autonomous AC Microgrids[END_REF], a distributed hierarchical control framework is formulated as a 3-layer structure. Droop control is chosen for the first layer and leaderless consensus-based control is chosen for the second layer (active power regulation). The same method is used in the third layer for power dispatch. The results show improved economic dispatch and frequency regulation. In [START_REF] Wei | A power sharing method based on modified droop control for modular UPS[END_REF], an average power sharing control strategy for parallel operation of voltage source inverter based on modular uninterruptible power systems is proposed. The strategy relies on a modified droop control that can quickly adjust the voltage of local modules and the average power of parallel modules. Simulation results confirm the effectiveness of the strategy. Power sharing performance is improved and circulating currents in the parallel modules are eliminated. In [START_REF] Zhang | An Enhanced Droop Control Strategy for Accurate Reactive Power Sharing in Islanded Microgrids[END_REF], power sharing among distributed generators in islanded MGs is addressed. An enhanced droop control strategy is proposed. A first controlled voltage source is inserted into the conventional droop control loop to compensate the feeder voltage drop. Because droop control leads to voltage and frequency deviations in case of load variations, a secondary controlled voltage source is also inserted in the loop. Thanks to the proposed strategy, power sharing performance is improved and unmatched feeder impedances are eliminated. In [START_REF] Tian | SOC Balancing and Coordinated Control Based on Adaptive Droop Coefficient Algorithm for Energy Storage Units in DC Microgrid[END_REF], a state-of-charge (SOC) balancing and coordinated control strategy based Table 1.12: A focus on papers dealing with artificial intelligence (AI) methods for MG/NMG management (part 1/2). ANFIS: adaptive neuro-fuzzy inference system. ANN: artificial neural network. DG: distributed generator. DR: demand response. DSM: demand-side management. ESS: energy storage system. MG: microgrid. NMG: netwoked microgrid. RL: reinforcement learning. WT: wind turbine. on the adaptive droop coefficient algorithm for multiple energy storage units is proposed. In case of a slight SOC deviation, a fuzzy logic-based algorithm dynamically adjusts the droop coefficient and changes the power distribution. In addition, a bus voltage recovery control scheme is used to regulate the bus voltage, thus improving voltage quality. Thanks to the proposed approach, SOC balance is achieved in a fast and precise way while regulating bus voltage. In [START_REF] Bayat | Comprehensive Enhanced Newton Raphson Approach for Power Flow Analysis in Droop-Controlled Islanded AC Microgrids[END_REF], an enhanced Newton-Raphson (NR) approach for power flow analysis in droop-controlled islanded MGs is proposed. The approach is NR-based but a more comprehensive model that considers different droop schemes is used. Results show that this approach has excellent accuracy and low computation time. In [START_REF] Jiang | A Novel Pre-Synchronization Control Strategy for Microgrid Connections Based on Improved Droop Control[END_REF], a novel pre-synchronization control strategy based on improved droop control for MG connections is proposed. An improved droop control strategy adjusts the MG output voltage and frequency automatically. A pre-synchronization controller compensates for the angular frequency during droop control. Results suggest that the proposed control strategy is highly effective and reliable: accuracy and stability of voltage and frequency are improved, the harmonics provoked by inverters are suppressed, and the control errors are reduced. In [START_REF] Noor | A Novel Decentralized Adaptive Droop Control Technique for DC Microgrids Based on Integrated Load Condition Processing[END_REF], a novel decentralized adaptive droop control approach for DC MGs is proposed.

Syst. Main features MG/NMG resources

The approach aims at enhancing the current sharing performance and provides superior DC bus voltage regulation. A decentralized bus voltage control method based on local measurements only is first introduced. Second, the droop coefficient value is adaptively changed. Results show that the current sharing error and voltage variations are reduced.

For all the papers highlighted in this section, the main features, MG/NMG resources, and noticeable results are summarized in

Other programming methods

In this section, some recent papers are highlighted in order to give to the reader an overview on how other programming methods than the ones considered in the previous sections are used for MG/NMG management [START_REF] Pascual | Energy Management for an Electro-Thermal Renewable-Based Residential Microgrid with Energy Balance Forecasting and Demand Side Management[END_REF][START_REF] Kumar | Intelligent Demand Side Management for Optimal Energy Scheduling of Grid Connected Microgrids[END_REF][START_REF] Marqusee | Resilience and Economics of Microgrids with PV, Battery Storage, and Networked Diesel Generators[END_REF][START_REF] Mohammed Manaz | Adaptive Defense Plan Against Anticipated Islanding of Microgrid[END_REF][START_REF] Behnam Rasouli | Optimal Day-Ahead Scheduling of a Smart Micro-Grid via a Probabilistic Model for Considering the Uncertainty of Electric Vehicles' Load[END_REF][START_REF] Xie | Optimal Energy Storage Sizing for Networked Microgrids Considering Reliability and Resilience[END_REF][START_REF] Jiang | Multi-Objective Optimal Dispatching of Microgrid With Large-Scale Electric Vehicles[END_REF][START_REF] Wu | Fixed-Time Distributed Secondary Control for Islanded Microgrids With Mobile Emergency Resources Over Switching Communication Topologies[END_REF][START_REF] Ho | Design and Simulation of an Autonomous Smart Microgrid for Energy Independence[END_REF][START_REF] Wang | Sliding Mode Control of Bi-directional DC/DC Converter in DC Microgrid Based on Exact Feedback Linearization[END_REF].

First, an energy management strategy based on demand-side management is proposed by Pascual et al. [START_REF] Pascual | Energy Management for an Electro-Thermal Renewable-Based Residential Microgrid with Energy Balance Forecasting and Demand Side Management[END_REF] for a residential MG equipped with photovoltaic solar panels, a small wind turbine and solar thermal collectors. The power exchanged with the main grid is controlled thanks to batteries and a controllable electric water heater. By using forecasted data and controlling the electric water heater, a better grid power profile is achieved while reducing the overall cost of the system (in particular, thanks to a smaller battery). In [START_REF] Kumar | Intelligent Demand Side Management for Optimal Energy Scheduling of Grid Connected Microgrids[END_REF], the impact of utility induced flexible load shaping on non-dispatchable energy sources is investigated by Kumar et al. A 3-stage stochastic energy management system framework is proposed for solving optimal day-ahead scheduling and minimizing the operating cost of grid-connected MGs. Four scenarios for solar and wind power generation are created in the first stage in order to address the uncertainty problem by considering real-time meteorological data. The second stage deals with the MG configuration, the operational constraints and demand-side management. The quantum particle swarm optimization (QPSO) is devised at the third stage in order to obtain the optimal power dispatch configuration for distributed generators. Thanks to the proposed stochastic framework, operating costs are significantly reduced. In [START_REF] Marqusee | Resilience and Economics of Microgrids with PV, Battery Storage, and Networked Diesel Generators[END_REF], a new statistical method is proposed for assessing the impact of distributed energy reliability and variability on the performance of MGs. In addition, a novel use of the optimization platform REopt to explore multiple cost savings and revenue streams is provided. Distributed energy resources are selected by evaluating their life cycle costs and the resilience of islanded MGs. The authors highlight that hybrid MGs -equipped with a combination of solar panels, batteries and networked emergency diesel generators -are more resilient and cost-effective than diesel-only systems. In [START_REF] Mohammed Manaz | Adaptive Defense Plan Against Anticipated Islanding of Microgrid[END_REF], an adaptive optimal defense mechanism is proposed to establish secure MG islanding, without acquiring fast response energy resources. The dynamics involved in the islanding transition are considered into the search for optimal defense measures by using the "simulation optimization" technique. Effectiveness of the proposed adaptive defensive approach when the islanding occurs is demonstrated. Such an approach can help to improve system performance. In [START_REF] Behnam Rasouli | Optimal Day-Ahead Scheduling of a Smart Micro-Grid via a Probabilistic Model for Considering the Uncertainty of Electric Vehicles' Load[END_REF], a new Monte-Carlo-based model taking into consideration uncertainties on the charging station's load of EVs and on operating parameters. Operating parameters uncertainties are energy market prices, photovoltaic power generation and loads is presented for MG's day-ahead operation optimization. Various stochastic scenarios are generated and involved in a mixed-integer linear programming (MILP) cost minimization problem. Results show that total operating costs are decreased by applying the proposed model. In [START_REF] Xie | Optimal Energy Storage Sizing for Networked Microgrids Considering Reliability and Resilience[END_REF], considering reliability and resilience enhancement, an optimal energy storage sizing approach is proposed for networked and non-networked MGs. A 2-level optimization model is proposed for energy storage sizing. The upper-level deals with the sizing problem, aiming at maximizing annual profit. The lower-level is aimed at operation optimization for profit maximization under various operating scenarios. The problem is converted into a MILP. Results highlight on the one hand that the energy storage size can be reduced while the operating profit is improved by interconnecting MGs. On the other hand, results show that energy interaction between NMGs allows enhancing both reliability and resilience in case of grid outages. In [START_REF] Jiang | Multi-Objective Optimal Dispatching of Microgrid With Large-Scale Electric Vehicles[END_REF], an annealing mutation particle swarm optimization algorithm is proposed for minimizing the operating cost and the cost of environmental protection of MGs. The authors conclude that the orderly charging and discharging mode guided by electricity prices can effectively reduce these costs. Reliability of MG operation is improved. Mobile emergency resources are critical to the resilience of power distribution systems in case of natural disaster [START_REF] Wu | Fixed-Time Distributed Secondary Control for Islanded Microgrids With Mobile Emergency Resources Over Switching Communication Topologies[END_REF]. As a result, a distributed secondary control algorithm is designed to regulate frequency and voltage in islanded MGs. Case studies are used to demonstrate both the effectiveness and robustness of the proposed control algorithm to switching communication topologies. In [START_REF] Ho | Design and Simulation of an Autonomous Smart Microgrid for Energy Independence[END_REF], an autonomous smart MG is designed and simulated for energy independence. Its automatic control system is rule-based. Results show that the MG can adequately supply power to its community, without relying on the main grid. In [START_REF] Wang | Sliding Mode Control of Bi-directional DC/DC Converter in DC Microgrid Based on Exact Feedback Linearization[END_REF], an exact feedback linearization method based on the nonlinear differential geometry theory is proposed to realize the linearization of bi-directional DC/DC converters. The nonlinear property of these converters cause large voltage disturbances. In addition, considering the approaching speed of the linearized Bruno standard model, a sliding mode controller is designed by using the exponential approach law. Simulation results show that the proposed method has fast response, strong anti-interference ability and good steady-state characteristics.

For all the papers highlighted in this section, the main features, MG/NMG resources, and noticeable results are summarized in Table 1.15. If a paper deals with MG islanding operation, this is highlighted in the table.

Discussion

Conclusions are drawn from the papers discussed in the previous subsections (from Section 3.1 to Section 3.8). The following applications and issues addressed by the scientific community are identified:

-model predictive control is emerging as a competitive alternative to conventional methods in voltage and frequency regulation, power flow management, distributed energy resource management or MG/NMG operation optimization;

-machine learning tools are getting more and more attention from the scientific community as they can be used in the development of efficient forecasting algorithms but also in the development of smart control approaches for MGs and NMGs, in particular based on reinforcement learning, which is emerging as an interesting solution; fuzzy logic and neuro-fuzzy systems -these systems combine fuzzy logic with artificial neural networksare still popular in the domain;

-multi-agent systems are widely used in the management of distributed systems and are still attractive in the management of MGs and NMGs equipped with multiple distributed generators and/or EVs; multi-agent systems have proven to be a useful tool to emphasize the autonomous behavior of members in an energy community;

-due to its ability to handle cooperation efficiently, game theory is a very good candidate for efficient management of NMGs, as highlighted by several research papers included in this survey;

-although its popularity seems to be decreasing, droop control is still used widely in a MG context for frequency and voltage regulation or power flow management.

As the interest for EVs is growing -this interest is evidenced by the number of papers sourced for this survey -, a lot of challenges are still ahead, particularly in the management of the batteries these vehicles are equipped with. The integration of EVs in power systems impacts power demand, which leads to uncertainties. These uncertainties may have different influences on the performance of the implemented energy management strategies. EV batteries will play a key role in balancing energy supply and demand and have the potential to contribute to optimal operation in islanded MGs and NMGs. As a result, novel and efficient strategies are needed to take advantage of these flexible storage capacities, in a context of increasing penetration of distributed generation in the power systems. Strategies for EV management based on MPC (see Section 1.7), stochastic programming (see Section 1.10) or artificial intelligence (see Section 1.12) are gaining in popularity these past few years.

The feasibility of management strategies to be adopted for the operation of MGs and NMGs when they become isolated is also evaluated. As proper (i.e., stable and autonomous) islanding operation is crucial, strategies based on load shedding (to improve voltage stability) and capable The proposed method has fast response, strong anti-interference ability and good steady-state characteristics [START_REF] Wang | Sliding Mode Control of Bi-directional DC/DC Converter in DC Microgrid Based on Exact Feedback Linearization[END_REF] of efficiently managing ESSs are needed. As highlighted in Section 3, MPC (see Section 1.7) and artificial intelligence (in particular, reinforcement learning) (see Section 1.12) are increasingly being used for this purpose. Droop control (see Section 1.14) is still an interesting option for proper islanded MG/NMG operation, as evidenced by certain papers recently published in peerreviewed journals. Furthermore, even though theoretical aspects of MG management have been vastly studied over the years, there is a lack of in situ implementations. Demonstration projects are relatively few in number. As a result, there is still an important gap to cover between research work and in situ implementation of the developed strategies. This can be explained, at least partially, by the heavy computational cost of the solutions relying on an optimization. Solutions like the ones based on MPC have to offer an acceptable compromise between performance and computational cost in order to be implemented in situ. The increasing number of distributed generators in MGs as well as the deployment of EVs and hybrid energy storage systems increase the overall complexity to handle. This complexity is also increased by the deployment of NMGs. That is why strategies capable of accounting for complex (distributed) systems and increasing uncertainties are needed. The literature lacks frameworks incorporating this kind of strategy. In this context, game theory (see Section 1.9) is a promising tool. In addition, let us mention that both the development and implementation of efficient energy management strategies require data and, as a consequence, an exhaustive MG/NMG instrumentation as well as efficient data acquisition systems and transmission protocols.

Conclusion

An efficient way for integrating distributed energy resources into power distribution systems is emerging: microgrids (MGs) and networked (interconnected) microgrids (NMGs). These systems can disconnect from the main grid and operate autonomously, strengthen grid resilience, and help mitigate grid disturbances and maintain power quality. When supported by sophisticated and efficient management strategies, MGs and NMGs have the ability to enhance power supply reliability. Benefits from organizing power distribution systems through MGs and NMGs are also related to reducing CO 2 emissions and operating costs, but also improving the robustness to failures. However, the deployment of MGs and NMGs, which is ongoing in many countries, comes with many challenges, in particular regarding the efficient management of distributed energy resources or electric vehicles (EVs). That is why a survey of recent advances in the smart management of MGs and NMGs is presented in this chapter. A variety of planning and control tasks are discussed. The chapter aims at establishing a picture of strategies and identifying trends in methods. To this end, the reader is provided with an in-depth analysis of papers recently published in peer-reviewed journals, highlighting the way the methods are used and the common issues to be resolved. Following this analysis, one can especially observe that (1) despite its heavy computational cost, model predictive control (MPC) is emerging as a competitive alternative to conventional methods in voltage and frequency regulation or distributed energy resource management (2) machine learning tools (in particular, reinforcement learning) are getting more and more attention from the scientific community as they can be used in the development of smart control approaches for MGs and NMGs (3) due to its ability to handle cooperation, game theory (GT) is a very good candidate for efficient management of complex systems as NMGs, which is still little discussed in the literature (4) MPC and artificial intelligence (in particular, reinforcement learning) are increasingly being used for proper MG islanding operation or to manage a fleet of EVs in an efficient way.

Chapter 2

Electrical microgrid management

In this chapter, an electrical microgrid equipped with electric vehicles, a bank of batteries, and solar PV panels, along electrical with loads, is studied. Two model predictive control (MPC) based strategies -in the first one, all the batteries are managed as a unique (fictitious) battery whereas in the second one, those batteries are managed independently -are discussed and evaluated in simulation. The reference strategy is rule-based. The following questions are asked:

-What are the benefits of using an MPC strategy instead of a rule-based one? -What is the best way to manage a bank of batteries and EV batteries in an electrical microgrid ?

-Is it possible for the proposed solution to be computationally tractable?

First, the results highlight the benefits of using a predictive strategy when it comes to efficiently manage electricity storage and release in microgrids equipped with electric vehicles. As an interesting result, the strategy proposed to predictively manage the set of batteries the microgrid is equipped with as a unique (fictitious) battery is a little bit less efficient regarding the reduction of both the economic cost and the CO 2 emissions than the predictive strategy intending to manage the batteries independently but computation time is significantly lower with a large fleet of electric vehicles. Results of this chapter have been presented in [START_REF] Mannini | Predictive Management of Batteries in Microgrids Equipped with Electric Vehicles[END_REF].

Introduction

Context

The transportation sector is a major consumer of fossil fuels [227]. As a result, the number of electric vehicles (EVs) -mobile electricity storage devices -has significantly risen over the last years [4], as a good way to reduce the use of fossil fuels. But there are still some considerations to be made towards this new kind of electricity demand. Indeed, uncontrolled EV charging may bring instability to power distribution grids whereas controlled EV charging is well suited to contribute to increased flexibility and balance [START_REF] Uttamrao | A Review of Strategic Charging-Discharging Control of Grid-Connected Electric Vehicles[END_REF]. Controlled EV charging can also help improving the penetration of renewable energy sources into power distribution grids [START_REF] Uttamrao | A Review of Strategic Charging-Discharging Control of Grid-Connected Electric Vehicles[END_REF]. Electric vehicles are additional degrees of freedom regarding the management of power distribution grids and are getting more and more attention from the research community [START_REF]Microgrid Symposium[END_REF][START_REF] Choletais | MASERA: A Microgrid Testbed For Advanced Optimisation Of Renewable Integration[END_REF]100,[START_REF] Wu | A Model Predictive Control Approach in Microgrid Considering Multi-Uncertainty of Electric Vehicles[END_REF][START_REF] Ryu | MPC Based Energy Management System for Hosting Capacity of PVs and Customer Load with EV in Stand-Alone Microgrids[END_REF][START_REF] Pan | Model Predictive Load Frequency Control of Isolated Micro-Grid with Electrical Vehicles[END_REF][START_REF] Hooshmand | Power Flow Management of Microgrid Networks Using Model Predictive Control[END_REF][START_REF] Waseem | Multi-Agents Based Optimal Energy Scheduling Technique for Electric Vehicles Aggregator in Microgrids[END_REF][START_REF] Egbue | Multi-Agent Approach to Modeling and Simulation of Microgrid Operation with Vehicle-to-Grid System[END_REF].

This study is part of project IMPROVEMENT (program Interreg SUDOE SOE3/P3/E0901) which deals with improving energy efficiency in public buldings (for example, research centers or hospitals), which can be equipped with a fleet of electric vehicles, through the developement of a predictive energy management system.

State of the art

Electric vehicles can enhance the robustness or the reliability of a microgrid (MG) [START_REF] Wu | A Model Predictive Control Approach in Microgrid Considering Multi-Uncertainty of Electric Vehicles[END_REF][START_REF] Valencia | Robust Energy Management System for a Microgrid Based on a Fuzzy Prediction Interval Model[END_REF][START_REF] Guo | Economic-Environmental Analysis of Renewable-Based Microgrid under a CVaR-Based Two-Stage Stochastic Model with Efficient Integration of Plug-in Electric Vehicle and Demand Response[END_REF][START_REF] Jiang | Multi-Objective Optimal Dispatching of Microgrid With Large-Scale Electric Vehicles[END_REF], improve the hosting capacity of solar photovoltaics [START_REF] Ryu | MPC Based Energy Management System for Hosting Capacity of PVs and Customer Load with EV in Stand-Alone Microgrids[END_REF][START_REF] Egbue | Multi-Agent Approach to Modeling and Simulation of Microgrid Operation with Vehicle-to-Grid System[END_REF], reduce frequency deviations [START_REF] Pan | Model Predictive Load Frequency Control of Isolated Micro-Grid with Electrical Vehicles[END_REF] and economic costs [START_REF] Waseem | Multi-Agents Based Optimal Energy Scheduling Technique for Electric Vehicles Aggregator in Microgrids[END_REF][START_REF] Guo | Economic-Environmental Analysis of Renewable-Based Microgrid under a CVaR-Based Two-Stage Stochastic Model with Efficient Integration of Plug-in Electric Vehicle and Demand Response[END_REF][START_REF] Del Nozal | A MPC Strategy for the Optimal Management of Microgrids Based on Evolutionary Optimization[END_REF][START_REF] Kim | Application of Flexible Ramping Products with Allocation Rates in Microgrid Utilizing Electric Vehicles[END_REF][START_REF] Aliasghari | Optimal Scheduling of Plug-in Electric Vehicles and Renewable Micro-Grid in Energy and Reserve Markets Considering Demand Response Program[END_REF][START_REF] Thomas | Optimal Operation of an Energy Management System for a Grid-Connected Smart Building Considering Photovoltaics' Uncertainty and Stochastic Electric Vehicles' Driving Schedule[END_REF][START_REF] Jiao | Multi-Objective Optimal Energy Management of Microgrids Including Plug-in Electric Vehicles with the Vehicle to Grid Capability for Energy Resources Scheduling[END_REF][START_REF] Mohamed | A Novel Fuzzy Cloud Stochastic Framework for Energy Management of Renewable Microgrids Based on Maximum Deployment of Electric Vehicles[END_REF][START_REF] Behnam Rasouli | Optimal Day-Ahead Scheduling of a Smart Micro-Grid via a Probabilistic Model for Considering the Uncertainty of Electric Vehicles' Load[END_REF] or for environmental purposes [START_REF] Hooshmand | Power Flow Management of Microgrid Networks Using Model Predictive Control[END_REF][START_REF] Waseem | Multi-Agents Based Optimal Energy Scheduling Technique for Electric Vehicles Aggregator in Microgrids[END_REF][START_REF] Guo | Economic-Environmental Analysis of Renewable-Based Microgrid under a CVaR-Based Two-Stage Stochastic Model with Efficient Integration of Plug-in Electric Vehicle and Demand Response[END_REF][START_REF] Jiang | Multi-Objective Optimal Dispatching of Microgrid With Large-Scale Electric Vehicles[END_REF]. Taking a look at the literature, only a few works deal with the CO 2 emissions associated with charging and discharging batteries. Works dealing with reducing carbon footprint of thermal microgrids can be found in the literature [START_REF] Leerbeck | Control of Heat Pumps with CO2 Emission Intensity Forecasts[END_REF][START_REF] Dahl | Demand Response Potential of Model Predictive Control of Space Heating Based on Price and Carbon Dioxide Intensity Signals[END_REF]. In addition, efficient and computationallytractable strategies to the management of microgrids equipped with bank of batteries and electric vehicles are needed. As the management of electric vehicles is becoming crucial, this topic is gaining in popularity. In case electric vehicles are numerous, some authors propose to manage their batteries as a unique battery [START_REF] Jiang | Multi-Objective Optimal Dispatching of Microgrid With Large-Scale Electric Vehicles[END_REF][START_REF] Tan | Two-Stage Robust Optimization Dispatch for Multiple Microgrids with Electric Vehicle Loads Based on a Novel Data-Driven Uncertainty Set[END_REF][START_REF] Hu | Research on Optimal Allocation of Energy Storage Capacity of Microgrid Considering Various Factors[END_REF], which enables simplifying the charging and discharging cycles.

Purpose of this chapter

In recent years, model predictive control (MPC), an advanced method of process control which has the ability to anticipate future events and can take control actions accordingly by solving a constrained optimization problem, is getting more and more attention from the scientific community, in particular in the energy field [START_REF] Dkhili | A Survey of Modelling and Smart Management Tools for Power Grids with Prolific Distributed Generation[END_REF][START_REF] Tsai | Model Predictive Optimization for Energy Storage-Based Smart Grids[END_REF]. In this chapter, a simulated microgrid equipped with a bank of batteries and a fleet of electric vehicles is managed using MPC strategies. First, a new strategy for the management of several batteries as a unique (fictitious) battery is proposed with the aim of taking the best advantage of the MG's storage capability. Indeed, it makes sense to group together the batteries in order to simplify the optimization problem and reduce computation time. A strategy for managing the batteries independently is proposed as well. Our objective is also to reduce the carbon footprint of the MG by reducing the amount of electricity bought to the main grid and deciding for the optimal extraction times. The MPC strategies are compared to a classical rule-based strategy. The chapter is organized as follows: first, the simulated case study (Section 2) is presented. Then, the MPC management strategies (Section 3) and the optimization problem (Section 4) are discussed. The chapter ends with the results (Section 5) and a conclusion (Section 6).

Case study 2.1 Description of the microgrid

In this study, three variants of an on-grid MG (a MG connected to the main grid) equipped with a photovoltaic farm, a bank of batteries and a fleet of electric vehicles, are considered as can be seen in Figure 2.1. The MG is simulated using energy consumption and PV power generation data from RTE's website [102] (data from France) or electricitymap.org [103] (data from Germany and England). Power demand has been reduced to around 100 kW. So, here are the three MGs considered in this study:

-MG 1 (FR): the maximum power extracted from the main grid is 300 kW, the PV peak power is 225 kW;

-MG 2 (GE): the maximum power extracted from the main grid is 300 kW, the PV peak power is 200 kW;

-MG 3 (EN): the maximum power extracted from the main grid is 300 kW, the PV peak power is 50 kW.

Bank of batteries

A bank of batteries with a capacity E cb of 150 kWh is considered in this study (for all three MGs), with a system round-trip efficiency (i.e., the percentage of electricity put into storage which is later retrieved) of 95% (β) is the same for all batteries when charging the batteries (β C is used), but let us note that the interested reader should put this value (β D is used) to 105% ( [START_REF] José | On the Use of a Convex Model for Bulk Storage in MIP-Based Power System Operation and Planning[END_REF]) when discharging batteries. Such a small bank of batteries is capable of enhancing the self-consumption rate to nearly 100% in case of a MG equipped with at least two electric vehicles while having a positive economical impact (for MG 1 and MG 2). The energy level E b in the batteries [START_REF] Ouammi | Coordinated Model Predictive-Based Power Flows Control in a Cooperative Network of Smart Microgrids[END_REF]

(k + i + 1) = E b (k + i) + β × P b (k + i) × 1 N p (2.1) E min b ≤ E b (k + i + 1) ≤ E max b (2.2) P min b ≤ β C P b (k + i) ≤ β D P b (k + i) ≤ P max b (2.3)
The power of all batteries cannot be injected into the main grid, giving us (2.4) if P b (k + i) ≥ 0, P b (k + i) > P c (k + i) -P p (k + i), and P c (k + i) > P p (k + i), with P p the PV power generation and P c the power consumption. (80%), favouring better cycling performance and avoiding significant degradation of the batteries. n v is the number of EVs and j stands for vehicle j. Equations (2.5) and (2.6) are both used for the bank of batteries and the EV batteries to calculate the amount of stored energy E v , according to P v .

P b (k + i) ≤ P c (k + i) -P p (k + i) (2.4)

EV scenarios and model

E v,j (k + i + 1) = E v,j (k + i) + βP v,j (k + i) × 1 N p (2.5) E min v,j (k + i + 1) ≤ E v,j (k + i + 1) ≤ E max v,j (k + i + 1) (2.6)

Power purchase agreement and CO 2 emissions

In this study, the green electricity purchase tariffs A5 [234] are considered (C c ). Electricity tariffs (in ce/kWh) are as follows from December to February:

-from 6 AM to 8 AM, 10 AM to 5 PM, and 7 PM to 10 PM, the electricity purchase tariffs are 9.782 ce/kWh; -from 8 AM to 10 AM and from 5 PM to 7 PM, the electricity purchase tariffs are 21.387 ce/kWh; -during the remaining of the day, the electricity purchase tariffs are 5.305 ce/kWh.

CO 2 emissions (in gCO 2 kWh -1 eq ) data (G c ) coming from RTE's website [102] are used. Data quantifying how carbon intensive electricity is (on an hourly basis), provided by electricitymap.org [103], are used as well. Both the electricity tariffs (C r ) (2.7) and CO 2 emissions (G r ) (2.8) are normalized between 1 and 2. In the remainder of the chapter, the addition of those two normalized quantities (α) (2.9) is considered.

C r (k + i) = C c (k + i) -C min c C max c -C min c + 1 (2.7) G r (k + i) = G c (k + i) -G min c G max c -G min c + 1 (2.8) α(k + i) = ϕ a C r (k + i) + ϕ b G r (k + i) (2.9)
3 Management strategies for batteries

Rule-based strategy

In this study, a classical rule-based strategy is considered as the reference strategy. The rules are formulated below. The strategy is based on France's electricity tariffs, with h the hour of the day, P c the power consumption, P p the PV power generation and P v the EV batteries' charge and discharge power. The main idea behind the rule-based strategy is to charge the EV batteries with the surplus of PV generated power (2.10) or when electricity prices are low. The way the batteries are charged is explained in Section 3.3. If the batteries are not fully charged before 1 PM, they are charged by extracting electricity from the main grid until they reach their maximum state of charge (2.11). The bank of batteries is discharged when the electricity tariffs are high (2.12) or when a period of high electricity tariffs is over (2.13). EVs leaving the parking lot before 1 PMi f the time step at which an electric vehicle leaves the parking lotare charged at their arrival (3.15). The time step used for all strategies is 15 minutes. R1: if h < 13 and P p (k) ≤ P c (k) then The power bought from the main grid (P r ≥ 0) is then calculated as follows (2.15):

n v j=1 P v,j (k) = P c (k) -P p (k) and P v,j (k) = P c (k) -P p (k) - n v j=1 P v,j (k) (2.10) R2: if h ≥ 13 and C r (k) < C max
P r (k) = P c (k) -P p (k) -P b (k) - n v j=1 P v,j (k) (2.15)

Predictive management of independent batteries

For the predictive management strategy of independent batteries, one optimization vector is used (MPC ib ) for each electric vehicle in the fleet and one optimization vector for the bank of batteries. The state of charge of each battery is calculated according to the constraints mentioned above ((2.1), (2.2), (2.3), (2.5) and (2.6)). Then, P f , defined as the sum of all the battery vectors, is obtained from (2.16) and P r (2.17) is calculated.

P f (k + i) = n j=1 (P v,j (k + i)) + P b (k + i) (2.16) P r (k + i) = P c (k + i) -P p (k + i) -P f (k + i) (2.17)

Predictive management of a fictitious battery

P c (k) P p (k) G c (k) P r (k) P f (k) E f (k + 1)
Figure 2.2: Model predictive control (MPC) scheme. x: forecast vector. P c : power consumption. P p : power generation. P r : power bought from the main grid. P o : optimization vector. P f : total batteries power. E f : batteries total energy. G c : CO 2 emissions. k: actual time step.

The second strategy (MPC fb ) is managing a fictitious battery, in order to simplify the optimization problem to solve [START_REF] Jiang | Multi-Objective Optimal Dispatching of Microgrid With Large-Scale Electric Vehicles[END_REF][START_REF] Tan | Two-Stage Robust Optimization Dispatch for Multiple Microgrids with Electric Vehicle Loads Based on a Novel Data-Driven Uncertainty Set[END_REF]. Instead of one optimization vector per electric vehicle in the fleet and one optimization vector for the bank of batteries, a unique optimization vector is determined. Thus, the number of variables is reduced and the optimization problem is not related to the number of electric vehicles the MG is equipped with. As a result, computation time is significantly reduced. The fictitious battery's minimum and maximum states of charge are calculated. They are expected to change at each iteration as electric vehicles may arrive or leave the parking lot. However, some precautions have to be taken, with the idea that all the batteries in the microgrid will be either charged, discharged or idle, sharing the same behaviour.

An option would be to calculate the state of charge (2.1) of the fictitious battery by adding all the batteries' states of charge. However, in some cases, considering a maximum power for the fictitious battery is not possible as some batteries may be fully charged whereas others are not, resulting in changes in the maximum power [START_REF] Tan | Two-Stage Robust Optimization Dispatch for Multiple Microgrids with Electric Vehicle Loads Based on a Novel Data-Driven Uncertainty Set[END_REF]. The minimum and maximum power limits of EV battery l (with l < n v + 1) are calculated from the charge (c) (2.18) and discharge (d) (2.19) power of the battery at a given time step, with two constraints (2.20) and (2.21):

c l (k + i) = - E max v,l (k + i) -E v,l (k + i) β × N p (2.18) d l (k + i) = E v,l (k + i) -E v v, l min (k + i) β × N p (2.19) c l (k + i) ≥ -P max v,l (k + i) (2.20) d l (k + i) ≤ P max v,l (k + i) (2.
P min f (k + i) = n v +1 l=1 c l (k + i) (2.22) P max f (k + i) = n v +1 l=1 d l (k + i) (2.23)
The power of the fictitious battery (P f ) is formulated as follows (2.24):

P f (k + i) = P c (k + i) -P p (k + i) -P r (k + i) (2.24)
The state of charge of the fictitious battery (E f ) is calculated as follows (2.25), according to the two constraints formulated below (2.26) (2.27):

E f (k + i + 1) = E f (k + i) + βP f (k + i) × 1 N p (2.25) E min f (k + i) ≤ E f (k + i) ≤ E max f (k + i) (2.26) P min f (k + i) ≤ P f (k + i) ≤ P max f (k + i) (2.27)
The minimum (E min f ) (2.28) and maximum (E max f ) (2.29) states of charge of the fictitious battery are defined as follows, depending on the available electric vehicles in the fleet:

E min f (k + i) = E min b + n j=1 E min v,j (k + i) (2.28) E max f (k + i) = E max b + n j=1 E max v,j (k + i) (2.29)
So, both the energy and power of the fictitious battery can be calculated at each time step. In order to evaluate the state of charge of each battery, groups of batteries are identified before calculating for each battery in a group its power and energy. The proposed algorithm has the four following steps:

1. Batteries in the bank of batteries and EV batteries are partitioned into groups (m), depending on departure times (for electric vehicles). For charging periods, the first group is about electric vehicles leaving first the parking lot and the last group is about the bank of batteries. For discharging periods, this is the opposite. So, priority is given to the charge of the EV batteries or the discharge of the batteries in the bank of batteries. The full charge of all EV batteries is easier. 2. The maximum charge and discharge power of each group of batteries P max g is calculated.

3. All the batteries in a group are charged or discharged (P g ) as a whole, depending on the batteries' constraints (P max g ) and priorities. It can happen that not all groups will receive sufficient energy. That is why giving priority to the electric vehicles leaving first the parking lot is essential to ensure the full charge of the batteries. 4. Knowing how a group of batteries is charged and discharged, the way the batteries in the bank of batteries (P b ) and the EV batteries (P v ) are being charged is determined (2.30). P b is used (instead of P v ) in case the member of the group is the bank of batteries (2.30).

For the energy discharging process, d (2. [START_REF] Parisio | Cooperative MPC-Based Energy Management for Networked Microgrids[END_REF]) is used instead of c (2.18).

P v,l (k + i) = c l (k + i) × P g,m (k + i) P max g,m (k + i) (2.30)
From the charge/discharge power of each battery, their state of charge can be calculated with (2.1) or (2.5). P r can be calculated as well (2.17).

In order to decide in which order the bank of batteries and EV batteries have to be charged, the idea of Oliveira and al. [START_REF] Oliveira | A Fuzzy-Based Approach for Microgrids Islanded Operation[END_REF] allowing to define priorities is put to good use.

Optimization problem 4.1 Objective function

MPC relies on a constrained optimization problem. The main goal of the MPC strategies is to minimize both the economic cost (P r •C r ) and CO 2 emissions (P r •G r ) to ensure the full charge of the EV batteries (∆ε), while minimizing the penalties and satisfying the system constraints labelled as γ t over a prediction horizon H p whose length is 24 h. The objective function J MG (2.31) is minimized with either (2.32) for the MPC fb strategy or (2.33) for the MPC ib strategy. Weights (ϕ) are assigned to the different goals (e.g. reducing the economic cost) to be achieved and the penalty coefficients are chosen between 0.05 and 10, depending on the case study. Let us note that those weights and coefficients impact computation time (see Section 5.2).

J MG = 1 N p Hp i=1 (ϕ a P r (k + i) × C r (k + i) + ϕ b P r (k + i) × G r (k + i)) + ϕ c ∆ε + γ t (2.

31)

P * r = arg min J MG (P r ) (2.32)

P * b , P * v = arg min J MG (P b , P v ) (2.33)
Using the rule-based algorithm, initial vectors P r for the MPC fb strategy and P b and P v for the MPC ib strategy are defined. In the objective function, P r is calculated from P b and P v . P f is defined as the sum of all the battery vectors. Thus, from P f , P r (2.17) can be calculated. The above-mentioned initial vector is used as the first step in our simulations. Once the optimization algorithm -"pattern search" is used as it is capable of finding a good solution in a short time -has reached a global or a local minimum, the first element of the obtained vector can then be used as the real time state. Figure 2.2 depicts this MPC process.

To ensure full recharge of the EV batteries, ∆ε (2.34) is defined as the difference between the expected state of charge (E vs ) of the battery an electric vehicle is equipped with and its real state of charge (E vr ). i f is the time step at which an electric vehicle leaves the parking lot, allowing us to calculate if its battery has the desired state of charge before leaving.

∆ε = n j=1 E vs,j (i f ) -E vr,j (i f ) E vs,j (i f ) (2.34)
Let us note γ t (2.35) the sum of all the penalties considered in the optimization problem. γ a (2.36) deals with penalties for not satisfying the life cycle of the batteries (Section 4.2). γ b (2.39) (2.40) is about penalties for not satisfying inrush current constraints (Section 4.3). γ c (2.43) deals with penalties regarding the power purchased from the main grid (Section 4.4).

γ t = ϕ d γ a + ϕ e γ b + ϕ f γ c (2.35)

Life cycle objective

The bank of batteries is expected to last around 10 years for lithium technologies [START_REF] Mongird | Energy Storage Technology and Cost Characterization Report[END_REF]. Getting as close as possible to one cycle per day allows maximizing lifetime. If this is not the case, the objective function is penalized with γ a (2.36). The number of cycles per day (N c ) is defined as follows, with DOD the depth of discharge of the batteries and N p the number of time steps per hour. If the difference between the real number of cycles (2.37) and the ideal number of cycles per day is more than 5%, the following penalties are calculated in the final results of this study: N c -1 -0.05.

γ a = N c -1 (2.36) N c = β Hp i=1 P b (k + i) 2 × N p × DOD (2.37)
Because smooth charging and discharging increases the lifespan of batteries, it is promoted. As a consequence, if the charging (resp. discharging) process is interrupted to discharge (resp. charge) the batteries, the following penalties (γ a ) (2.38) are considered:

γ a := γ a + ϕ g E b (k + i + 1) -E b (k + i) 2DOD (2.38)

Inrush current constraint

When a battery is being charged or discharged, an inrush current occurs and may damage the system [START_REF] Khan | Digital Soft Start Implementation for Minimizing Start up Transients in High Power DAB-IBDC Converter[END_REF][START_REF] Mizanur | A Battery Charge Balancing System with Reducing Inrush High Spike Current for Electric Vehicle[END_REF][START_REF] Kwak | Inrush Current Reduction Technology of DAB Converter for Low-voltage Battery Systems and DC Bus Connections in DC Microgrids[END_REF] if it is repeated. Thus, useless charge/discharge situations for the bank of batteries have to be avoided. If such situations occur too often, the objective function is penalized with γ b , as the number of times the batteries in the bank of batteries change their state (N v ) is high. The penalties are calculated using (2.39) if N v is below N min v or using (2.40) if it is above N max v . N v is constrained by lower and higher bounds (2.41):

γ b = (N min v -N v )
(2.39)

γ b = (N v -N max v ) (2.40) N min v ≤ N v ≤ N max v (2.41)

Purchased power penalties

Purchasing too much power from the main grid generates penalties to the MG proconsumer, depending on his power purchase agreement. In such agreements, there is a limit regarding power purchase, as depicted by the following inequality (2.42), and one can undergo some penalties γ c (2.43) in case this limit is not followed. P l is the power bought from the main grid, which is paid three times, above the limit P max r .

P l (k + i) = P r (k + i) -P max r if P r (k + i) ≤ P max r (2.42) γ c = Hp i=1 P l (k + i) (2.43)

Results

Perfect power generation, energy consumption, and CO 2 emissions forecasts are considered in this study. In addition, let us note that in France the power generation surplus is flanged instead of being sold to the main grid operator when the consumption mode is full self-consumption.

Other kinds of consumption modes exist, however full self-consumption has been taken into consideration in this chapter.

Analysis for 7-day simulation

Matlab 2017 has been used for the simulations. Those simulations were run on a calculation server composed of two Intel Xeon Gold 6230 @ 2.10 GHz processors, with 20 cores and 40 threads, 512 G o of RAM and an average CPU mark of 26657, a picture of this calculation server can found in Figure 2.9. The time step is 15 minutes. As a result, all the computations at each time step have to be done with less than 15 min.

The two proposed predictive strategies have been tested by performing a 7-day simulation, for each MG, with a number of electric vehicles ranging from 2 to 16. Table 2.2, 2.3 and 2.4 highlight, respectively, the performance enhancement, economic cost reduction and CO 2 emissions reduction, with the rule-based strategy considered as the reference strategy. Figures 2.3 (microgrid MG 1), 2.5 (microgrid MG 2), and 2.7 (microgrid MG 3) depict the batteries behaviour, with P f b f the power of the fictitious battery (MPC fb strategy) and P ib f and P r f the power of the batteries with the MPC ib strategy and the rule-based strategy, respectively. A first work [START_REF] Mannini | Predictive Management of Batteries in Microgrids Equipped with Electric Vehicles[END_REF], with 1-day simulation performed, has been carrying out but to get more indicative results considering variabilities over successive days, 7-day simulations have been carrying out and are presented in this manuscript. Some considerations have changed. The power one can buy is now limited to 400 kW, this limit was put at 300 kW in Mannini et al. [START_REF] Mannini | Predictive Management of Batteries in Microgrids Equipped with Electric Vehicles[END_REF] related to his manuscript, however, the rule-based strategy was penalized with such consideration. That is why, this limit is put to 400 kW. The state of charge for every electric vehicle is now 50% (this state of charge was put at 20 % in Mannini et al. [START_REF] Mannini | Predictive Management of Batteries in Microgrids Equipped with Electric Vehicles[END_REF]) as the MPC ib strategy tends to discharge and charge EVs again. An assumption can be made that the MPC fb strategy may follow the same idea if the state of charge of EVs is not minimal. Only two EV scenarios (8 and 16) were considered in this manuscript as a 7-day simulation is very long, that is why EV scenarios with 2 and 4 electric vehicles, as there were tested in Mannini et al. [START_REF] Mannini | Predictive Management of Batteries in Microgrids Equipped with Electric Vehicles[END_REF], weren't tested. Coefficients of the objective function cannot change from a scenario to another (while they could change in Mannini et al. [START_REF] Mannini | Predictive Management of Batteries in Microgrids Equipped with Electric Vehicles[END_REF] to highlight if it impacts the results.

The main feedback from the performed 7-day simulation is that the MPC ib strategy has slightly better performance than the MPC fb strategy for MG 2 and MG 3, J MG increased from 0.5 to 2.2 %, but not for MG 1, J MG decreased from -2.2% to -0.3%. Both strategies outperform the rule-based strategy, J MG increased from 2.3% to 7%. Let us note that MG 2 and MG 3 get penalties with the rule-based strategy and in case they are equipped with 16 electric vehicles for not satisfying the 400 kW power limit. That is why an increasing gap in the economic results and in performance is observed, the economic cost increased from 2.3% to 7% with the rulebased strategy compared to the MPC fb strategy. For the other case studies considered in this study, the power limit is satisfied. Regarding MG 1, the reduction in CO 2 emissions is low, from 0.2 to 1.1 kgCO 2 between the rule-based strategy and the MPC strategies, regardless of the number of electric vehicles. But MPC ib has a little bit lower performance than MPC fb for MG 1. It can be explained by the choice of the coefficients that has a direct impact on the results. Regarding MG 2 and MG 3, a significant reduction in CO 2 emissions is achieved, from 8 to 16.3 kgCO 2 between the rule-based strategies and the MPC strategies. By taking a look at the results, one can observe that with the MPC ib strategy, the number of charging and discharging cycles of the EV batteries is increased, but also with the MPC fb strategy which wasn't the case in [START_REF] Mannini | Predictive Management of Batteries in Microgrids Equipped with Electric Vehicles[END_REF]. As mentioned, the coefficients have a great impact on performance, furthermore, the state of charge of EVs when they arrive in the parking lot of the MG is at 50% while this value was lower in [START_REF] Mannini | Predictive Management of Batteries in Microgrids Equipped with Electric Vehicles[END_REF]. All those considerations can explain this increase in the number of charging and discharging cycles. In a real situation, for economical purposes, it might not be ideal to discharge the EV batteries as it may degrade their lifetime. The MPC fb strategy tends to save the lifetime of the batteries, and thus, should be chosen to manage batteries in a real situation. What can be observed when the 7-day simulation is that the constraints start to deviate from the reference target. For example, for the number of cycle constraints, there is a deviation of 5 % for MPC strategies, in case of a with 1-day simulation, there is not any deviation. Let us note that this gap is still acceptable. To summarize the results obtained, the same conclusion can be drawn for both a 1-day simulation and a 7-day simulation.

Computational complexity

Computational complexity has been evaluated in this chapter. The computational cost is defined as follows (2.44):

computational cost = computation time × number of workers (2.44)
The so-called workers are Matlab computational engines executing tasks depending on the assignment given by the Parallel Computing Toolbox, the interested reader is referred to the Matlab website for details [239]. Each simulation has been repeated five times. Average computational costs are summarized in Table 2.5. Let us note that the MPC fb strategy has lower computation time than the MPC ib strategy. Except for MG 1 with 8 electric vehicles where computation time is higher for the MPC fb strategy by 36%, computation time decreases from 32% (with 8 EVs) to 178% (16 EVs) with MPC fb compared to MPC ib . The difference in computation time between the two predictive strategies increases significantly as the MG is equipped with more and more electric vehicles.

As expected, the weights (ϕ) in the objective function have a high impact on the computational cost. A set of weights has been chosen empirically for each case study. Let us note that the computational cost can be reduced with another set of weights. For example, with another set of weights the small irregularity one can observe in Table 2.5 in case MG 1 is equipped with eight electric vehicles could be removed. But, it has been said for this case that MPC fb outperforms MPC ib , which may explain the difference in computational cost. Furthermore, power generation, energy consumption, and CO 2 emissions are different from one MG to another, resulting in different solutions for the optimization problem at hand. All of this explains why some irregularities regarding the computational cost can be observed from one MG to another. It can be noticed that with 16 electric vehicles, MPC fb has the same computational cost for each case study whatever the microgrid, this could imply that the computational cost reaches a constant value once there are enough electric vehicles.

Sensitivity analysis

From the results presented in Section 5.2, one can observe that computation time generally increases as the number of electric vehicles increases, but is different from one MG to another. Two questions emerge from this irregularity: which parameter impacts on computation time? Is there a coefficient in the objective function impacting in an irregular manner computation time? To understand which parameter impacts on computation time, a sensitivity analysis has been conducted. This sensitivity analysis revolves around choosing the ϕ coefficients in the objective function and doing 1-day simulation with different scenarios and microgrids. Six tests with 3 MGs and 4 scenarios dealing with the number of electric vehicles are performed. For each test, a coefficient value is put at 1, the others are put at 0. The first test (Test 1) corresponds to ϕ a = 1 and ϕ b = ϕ c = ϕ d = ϕ e = ϕ f = 0. The second test (Test 2) corresponds to ϕ b = 1 and ϕ a = ϕ c = ϕ d = ϕ e = ϕ f = 0 and so on. Thus, computation time is only impacted by one objective.

From the results observed in Figures 2.10, 2.11, 2.12, 2.13, 2.14, and 2.15, the MPC ib strategy has always a higher computation time than the MPC fb strategy, except for one test, according to the ecological objective (ϕ b = 1) (Figure 2.11). Regarding this test, there is an irregularity when MG3 is equipped with 4 or 8 electric vehicles: the computation time is higher with the MPC fb strategy than with the MPC ib strategy. Furthermore, in Figure 2.11, the computation time according to this objective is higher than all other computation times for the other tests. For Test 1, as can be observed in Figure 2.10, the computation time is increased with the MPC fb strategy while it is not the case for Test 3, Test 4, Test 5, and Test 6.

For Test 3, Test 4, and Test 5 (constraint satisfaction), the results are similar, as it can be seen in Figures 2.12, 2.13 and 2.14. An interesting finding is that with more electric vehicles, the computation time increases drastically with the MPC ib strategy. This computation time, except when the microgrid is equipped with 2 EVs, is always higher than with the MPC fb strategy. Furthermore, the main advantage of the MPC fb strategy is that the computation time remains constant whatever the number of EVs.

A higher computation time is obtained with Test 6 for the MPC ib strategy, with 8 and 16 EVs, compared to the other tests (Figure 2.15). With a high number of electric vehicles, the rule-based algorithm, which gives a solution used as an initial optimization vector, extracts a lot of electricity from the main grid at a specific hour to cover the EV needs. So, the constraints γ c are not satisfied and penalties are given. Both MPC strategies start from the initial rule-based algorithm solution to find a better solution. To find this new solution, more calculations are required, thus, computation time gets higher to satisfy γ c .

Conclusion and perspectives

In this chapter, two predictive strategies based on model predictive control (MPC) are proposed for the management of a microgrid (MG) equipped with a bank of batteries and a fleet of electric vehicles. In the first strategy (MPC ib ), batteries are managed independently whereas in the second one (MPC fb ), all the batteries are managed as a unique (fictitious) battery.

T 1 f b T 2 f b T 3 f b T 1 ib T 2 ib T 3 ib
T 1 f b T 2 f b T 3 f b T 1 ib T 2 ib T 3 ib
-Does a predictive strategy provide a performance gain compared to a rule-based strategy?

The strategies MPC ib and MPC fb are more efficient (+4.5%) than the rule-based strategy.

-What is the impact of the management of fixed and mobile batteries as a fictitious battery? Compared to MPC ib , MPC fb has a reduced computational cost (-32%) and equivalent performance (-0.5%).

-For an in-situ implementation, what is the best compromise? The strategy MPC fb is the best option.

First, the two MPC strategies are evaluated in simulation are compared to a classical rulebased strategy for a 7-day simulation. Both predictive strategies enable a significant reduction in the economic cost and CO 2 emissions. They outperform the rule-based strategy and enhance MG reliability. Furthermore, all the constraints are satisfied with the proposed predictive strategies. This is not the case with the rule-based strategy: constraints related to the purchased power are not satisfied for two case studies. Moreover, better performance is achieved with the MPC ib strategy but its computational cost is higher than the one of the MPC fb strategy. This gap becomes significantly higher as the microgrid is equipped with more and more electric vehicles, revealing the relevance of the MPC fb strategy. So, in case computation resources are limited, the MPC fb strategy is the one to choose.

Secondly, a sensitivity analysis is conducted to determine how the objective function coefficients affect the computational tractability of the two MPC strategies. From the results obtained, it can be noticed that the random behaviour of the CO 2 emissions has an impact on computation time for both strategies, resulting in a non-regular profile for computation time. The other coefficients have a low impact on computation time but it can be noticed that the economical objective increases computation time for MPC fb as the number of EVs increases, whereas it is not the case for the other objectives. However, for the other coefficients, computation time increases for MPC ib as the number of EVs increases, whereas it is not the case for MPC fb .

More EV scenarios should be considered to highlight computation time tendencies for both MPC strategies. Constraints should be added to ensure a proper utilization of the EV energy, limiting the number of charging and discharging cycles depending on the EV owner's choice. A survey towards EV owner behaviour should be conducted to identify a pattern on EV departure times and arrival times. The difficulty lies here in collecting private data. Privatisation of data and collecting it anonymously is a major aspect to consider if a survey is done. An economic study dealing with battery sizing should be done depending on the number of electric vehicles the microgrid is equipped with, which, from the best knowledge of the authors hasn't been done yet.

Chapter 3

Networked electrical microgrid management

Microgrids (MGs) and networked microgrids (NMGs) are emerging as an efficient way to increase the penetration of distributed energy resources into the main grid. An electrical microgrid has been previously studied, however, research works are recently focusing on networked microgrids. In this context, the present chapter focuses on the predictive management of a bank of batteries and electric vehicle (EVs) batteries in NMGs under planned islanding. MGs with standard loads, critical loads, and highly critical loads are considered in this sudy. Different storage configurations and EV scenarios are evaluated. Batteries can be discharged in a normal or in a deep way, according to three islanding discharging modes, to support MGs with critical loads. Moreover, a reward system, which is used to remunerate proper (i.e., successful) islanding, is put in place. The proposed predictive strategy has recourse to model predictive control (MPC) and is compared to a rule-based strategy. The following questions are asked:

-What contribution does system sharing make to the management of the electrical resources of a networked microgrid?

-Can a networked microgrid meet the requirements of planned islanding according to load criticality?

-What economic benefit for a networked microgrid in case of successful islanding?

-What is the impact of a deep discharge of the batteries in case of islanding on the ability of a networked microgrid to meet critical loads?

The simulation results highlight that the predictive strategy has the ability to decide which MG in the NMG will achieve successful islanding. In addition, such a strategy takes advantage of the EVs the NMG is equipped with to satisfy highly critical loads, thus enhancing the NMG robustness and energy self-sufficiency. Results will be published in the proceedings of the IFAC World Congress 2023, in Yokohama, Japan.

Introduction

Context

Towards the EU decarbonization efforts and targets of year 2050, the LEC (local energy communities) concept can drive and empower end-users to consume energy in a responsible way, contribute to energy savings and steer the main grid to become more flexible. In this context, microgrids (MGs) and networked microgrids (NMGs) are emerging as an efficient way to increase the penetration of distributed energy resources (DERs) into the main grid. These systems can disconnect from the main grid, strengthen grid resilience, and help mitigate grid disturbances and maintain power quality. In addition, when supported by sophisticated and efficient management strategies, MGs and NMGs have the ability to enhance power supply reliability. However, their deployment comes with many challenges, in particular regarding the efficient management of DERs and energy storage systems, for example fixed or electric vehicle (EV) batteries.

State of the art

Most of the works presented in this chapter are deeply reviewed in [START_REF] Mannini | A Survey of Recent Advances in the Smart Management of Microgrids and Networked Microgrids[END_REF]. Islanding can be interesting to avoid blackouts (cascade failures), which are costly events which may threaten the integrity of electrical systems, or when power demand is too high and consumers can be asked to disconnect from the main grid. In case of a blackout, intentional controlled islanding, using detection methods, is preferable in order to reduce the undesirable technical, economic, and social consequences of such an event ( [START_REF] Reza | A Review on Intentional Controlled Islanding in Smart Power Systems and Generalized Framework for ICI in Microgrids[END_REF]). So, efficient management and distribution of energy in a MG is an important issue, in particular when it is operated in islanded mode ( [START_REF] Omar | Towards Optimal Management in Microgrids: An Overview[END_REF]). An approach for islanded MG management is proposed in [START_REF] Oliveira | A Fuzzy-Based Approach for Microgrids Islanded Operation[END_REF]. Its aim is to maximize the duration of power supply by taking into consideration the availability of renewable energy sources and the stored energy. Standard and critical loads are distinguished. Priority is given to critical loads in case of islanding operation. In [START_REF] Feng | A Review of Microgrid Development in the United States -A Decade of Progress on Policies, Demonstrations, Controls, and Software Tools[END_REF], a review of MG development in the United States is conducted. The paper discusses trends in MG control methods and software tools for MG design, planning, and performance analysis. Many research works ( [START_REF] Jayachandran | Predictive Power Management Strategy for PV/Battery Hybrid Unit Based Islanded AC Microgrid[END_REF][START_REF] Li | Model Predictive Control of a Voltage-Source Inverter With Seamless Transition Between Islanded and Grid-Connected Operations[END_REF][START_REF] Valencia | Robust Energy Management System for a Microgrid Based on a Fuzzy Prediction Interval Model[END_REF][START_REF] Mohiti | Two-Stage Robust Optimization for Resilient Operation of Microgrids Considering Hierarchical Frequency Control Structure[END_REF][START_REF] Barbalho | Deep Reinforcement Learning-Based Secondary Control for Microgrids in Islanded Mode[END_REF]) focus on voltage and frequency regulation in islanded MGs. In addition, networked microgrids ( [START_REF] Nabab Alam | Networked Microgrids: State-of-the-Art and Future Perspectives[END_REF]) are emerging as an efficient way to improve MG robustness, security, and durability. NMG planning is studied in [START_REF] Cao | Networked Microgrids Planning Through Chance Constrained Stochastic Conic Programming[END_REF]. In [START_REF] Fady | Optimization Methods and Energy Management in "Smart Grids[END_REF], optimization methods and energy management approaches for NMGs are discussed. Because efficient cooperation between MGs in a NMG has the potential to improve robustness and reduce economic cost, the development of (predictive) power management strategies for NMGs is booming these past few years ( [START_REF] Ouammi | Coordinated Model Predictive-Based Power Flows Control in a Cooperative Network of Smart Microgrids[END_REF][START_REF] Ouammi | Model Predictive Control for Optimal Energy Management of Connected Cluster of Microgrids with Net Zero Energy Multi-Greenhouses[END_REF][START_REF] Parisio | Cooperative MPC-Based Energy Management for Networked Microgrids[END_REF][START_REF] Hooshmand | Power Flow Management of Microgrid Networks Using Model Predictive Control[END_REF]). Multi-agent systems (MASs) are widely used for NMG coordinated operation and smart planning ( [START_REF] Chen | Multi-Time Scale Coordinated Optimal Dispatch of Microgrid Cluster Based on MAS[END_REF][START_REF] Ju | Multi-Agent-System-Based Coupling Control Optimization Model for Micro-Grid Group Intelligent Scheduling Considering Autonomy-Cooperative Operation Strategy[END_REF][START_REF] Kong | A Multi-Agent Optimal Bidding Strategy in Microgrids Based on Artificial Immune System[END_REF]). Finally, artificial intelligence is more and more used: as an example, a model-free multi-agent reinforcement learning approach is proposed in [START_REF] Fang | Multi-Agent Deep Reinforcement Learning for Distributed Energy Management and Strategy Optimization of Microgrid Market[END_REF] to achieve distributed energy scheduling and strategy making in a regional NMG.

Purpose of this chapter

From our best knowledge, taking advantage of EV batteries to achieve successful NMG islanding is little discussed in the literature. Furthermore, rewarding a NMG for giving information to the main grid operator in case of planned islanding is rarely done. Planned islanding, which is considered in this chapter, is defined as the main grid operator asking to the NMG operator to disconnect for a given period of time. The NMG considered in this chapter is a real system and, as a result, in situ implementation of the developed algorithms is planned. In addition, MPC, which is used in this chapter, has already proven to be an effective way to manage NMGs. There are several questions we want to answer in this chapter: can we take advantage of fixed batteries and EV batteries to achieve successful NMG islanding? Is MPC an efficient strategy to manage such storage systems? What is the impact of their sizing on the islanding capacity of NMGs? So, the following contributions can be summarized:

-an MPC controller is proposed for planned islanding operation, according to different configurations based on both the batteries' power and capacity.

-EV batteries can be shared among interconnected MGs during islanding.

-Batteries can be used in a deep way allowing for emancipating from state of charge constraints to supply electricity to MGs with critical loads during islanding.

The chapter is organized as follows: the case study is presented in Section 2. The management strategies are described in Section 3. Section 4 deals with the simulation results. The chapter ends with a conclusion and an outlook to future work (Section 5).

Case study 2.1 Description of the networked microgrid

The case study considered in this chapter is a NMG composed of three buildings equipped with PV panels and batteries as well as EVs (MG1, MG2 and MG3) as can be seen in Figure 3.1. These buildings are part of the LNEG research center in Lisbon, Portugal. The bank of batteries and the EVs are shared among the NMG. In case of islanding, the bank of batteries is always shared among the disconnected MGs. EV batteries are either shared among islanded MGs if the bank of batteries cannot satisfy the needs of those MGs alone, otherwise they are shared with grid-connected MGs. PV power generation and power consumption for MG1 have been increased. Loads are considered as highly critical for MG1. PV power generation and power consumption data from RTE (https://www.rte-france.com) and electricitymap (https://electricitymap.org) have been considered for MG2 and MG3, as in [START_REF] Mannini | Predictive Management of Batteries in Microgrids Equipped with Electric Vehicles[END_REF]. MG2 has critical loads. MG3 has standard loads. To summarize the MG classes: Let us note that in this chapter different terms are used to deal with the success of an islanding operation (see Table 3.1). If all the NMG loads (MG1, MG2, and MG3 loads) are satisfied for the whole islanding operation, it is considered to be fully successful. If all critical loads, i.e., highly critical (MG1) and critical loads (MG2), are satisfied for the whole islanding operation, it is considered to be successful. If only the highly critical loads are satisfied for the whole islanding operation, it is considered to be partially successful. Otherwise, the islanding operation is unsuccessful, even if some loads are satisfied for a short period of time during islanding. Furthermore, the islanding capability of the NMG is defined as its ability to meet critical and highly critical loads during islanding.

Islanding scenarios

The proposed management strategy is evaluated in simulation, for each operation described in Figure 3.2, according to the following scenarios:

-Islanding Scenario 1: islanding of the NMG is expected between 8:00 PM and 9:30 PM (duration is 1h30). For the configuration 2 and 3 of the bank of batteries, the islanding is expected from 7:45 PM and 9:15 PM; -Islanding Scenario 2: islanding of the NMG is expected between 5:00 AM and 8:00 AM (duration is 3h); -Islanding Scenario 3: islanding of the NMG is expected between 3:30 PM and 5:00 PM (duration is 1h30).

During this period of time, power consumption is high and the main grid operator asks to the MGs in the NMG to disconnect from the main grid. In addition, the selected day has low PV power generation. As a result, power has to be extracted from the main grid in order to cover the needs of the NMG.

Bank of batteries configurations

Seven configurations of banks of batteries, for a capacity E b and a power P b , are considered in this study. The round-trip efficiency (i.e., the percentage of electricity put into storage which is later retrieved) of 95% (β) is the same for all batteries when charging the batteries (β C is used), but let us note that the reader have to put this value (β D is used) to 105% ( [START_REF] José | On the Use of a Convex Model for Bulk Storage in MIP-Based Power System Operation and Planning[END_REF]) when discharging batteries. Batteries are sized according to the nature of the electrical loads, which can be standard loads, critical loads or high critical loads. Each configuration (Table 3

E b (k + i + 1) = E b (k + i) + β × P b (k + i) × 1 N p (3.1)
E min b ≤ E b (k + i + 1) ≤ E max b (3.2) P min b ≤ β C P b (k + i) ≤ β D P b (k + i) ≤ P max b (3.3)
For all models, the time step is 15 minutes. = 80%. In the same way as for the bank of batteries, EV batteries can also be used in a deep way: E min v = 10%. n v is the number of EVs in the fleet and j stands for vehicle j. Equations 3.4 and 3.5 are both used for the bank of batteries and the EV batteries in order to calculate the amount of stored energy E v , according to P v . Table 3.3 shows the EV scenarios.

EV scenarios

E v (k + i + 1, j) = E v (k + i, j) + βP v (k + i, j) × 1 N p (3.4) E min v (k + i + 1, j) ≤ E v (k + i + 1, j) ≤ E max v (k + i + 1, j) ( 3

Planned islanding and discharging modes

The aim behind the development of a predictive strategy is being able to anticipate NMG changes or special demands from the main grid. A special demand can be for the NMG to disconnect from the main grid at a specific time, for a specific duration.

Each MG has its own (load) class and batteries are not used in the same way for all MGs. As highlighted by Figure 3.2, three discharging modes are considered during islanding:

-Discharging Mode d: the bank of batteries is discharged during islanding; -Discharging Mode d+: the bank of batteries and the EV batteries are discharged during islanding;

-Discharging Mode d++: the bank of batteries and the EV batteries are discharged during islanding but in a deep way, the minimum state of charge is above 5% for the bank of batteries and 10% for the EV batteries, but can be lower than 20%.

Depending on the capacity of the batteries, successful islanding can be achieved for the whole NMG, for some MGs or for none of the MGs. That is why the MPC approach decides which MG can be islanded and how batteries can be discharged to ensure successful islanding, giving priority to Class 1 MGs, then to Class 2 MGs and finally to Class 3 MGs. The way the discharging mode is chosen is described later in Section 3.2. The 7 islanding operations are:

-

Power purchase agreement

In this study, the same considerations as in [START_REF] Mannini | Predictive Management of Batteries in Microgrids Equipped with Electric Vehicles[END_REF] apply for both the green electricity purchase tariffs A5 (C r ) and CO 2 emissions (G r ). C r and G r are normalized. In the remainder of this chapter, the addition of those two normalized quantities (α) is considered. The German power generation-related CO 2 emissions are used for Islanding Scenario 1 whereas French power generation-related CO 2 emissions are used for the Islanding Scenario 2 and Islanding Scenario 3.

Reward for successful islanding

After deciding for the islanding operation, the EMS informs the main grid operator of the NMG islanding capacities. Depending on the operation, the operator modifies the electricity prices accordingly. S i (3.6) is the total power consumption of islanded MGs while P i,l is the power consumption of MG l. G b (3.7) is a bonus given to the NMG if he can achieve successful islanding as a whole. Coefficient ω 1 (3.7) is chosen by the main grid operator. r i (3.8) is the ratio of the total power consumption of islanded MGs to the power consumption of the whole NMG. P c is the power consumption of MG l (l is the MG index). The updated electricity prices are then calculated using (3.9). If the whole NMG cannot achieve successful islanding, the prices are reduced as the NMG informs of the amount of power it will have to buy from the main grid during instability periods. The main grid operator can decide for a coefficient ω 2 with a higher value than 1 if islanding is successful for MG l whereas if islanding is not successful, the coefficient is set to a value lower than 1 in order to penalize the NMG. If islanding is successful for the whole NMG, a reward (G t ) (3.10) is given. G i can be defined by the main grid operator. The received reward compensates for the purchase of electricity (3.11), with P r the power bought by MG l from the main grid.

S i = n l=1 Hp i=1 P i,l (k + i) (3.6) G b = S i N p × ω 1 (3.7) r i = S i n l=1 H p i=1 P c,l (k + i) (3.8) C r (k + i) = C r (k + i) ω 2 × (1 -r i ) (3.9) G t = G b + G i (3.10) C t = 1 N p n l=1 ( Hp i=1 (P r (k + i, l) × C r (k + i)) -G t (3.11)
Electricity prices are initially fixed to 0.8 e/kWh during islanding. The rule-based algorithm is not subject to those specific rewards as it is not able to anticipate the future NMG behaviour and, as a result, to inform the main grid operator.

Management strategies

In this section, two management strategies are presented. The first strategy is rule-based and considered as the reference strategy. It is presented in Section 3.1. The second strategy is a predictive strategy relying on MPC. It is presented in Section 3.2. Both strategies are based on rules to decide (i) how the energy stored in the batteries is shared among MGs (Section 3.3) and (ii) how the PV power generation surplus is shared among MGs (Section 3.4). For all strategies, the time step is 15 minutes.

Rule-based strategy

In this study, a classical rule-based strategy (RB) is considered as the reference strategy. The rules are formulated in [START_REF] Mannini | Predictive Management of Batteries in Microgrids Equipped with Electric Vehicles[END_REF]. The strategy is based on France's electricity prices. The main idea behind the rule-based strategy is to charge the batteries with the PV power generation surplus or when the electricity prices are low. The bank of batteries is discharged when the electricity prices are high or in case of islanding or when a period of high electricity prices is over. The rule-based strategy is not capable of detecting in real time which MG is able to disconnect from the main grid. The bank of batteries is discharged for the whole NMG and EV batteries cannot be discharged.

Predictive strategy

MPC is used in order to anticipate the future behaviour of the NMG. First, the algorithm determines which MG is able to disconnect from the main grid and which discharging mode can be used during islanding. Secondly, the algorithm decides for the best moments to charge and discharge the batteries. The state of charge profiles of both the bank of batteries and the EV batteries can be considered independently, which is the standard strategy. However, a strategy based on considering all batteries as a single (fictitious) battery can be used. In this case, their state of charge profiles are the same. This strategy, which is the one used in this chapter, is presented and evaluated in [START_REF] Mannini | Predictive Management of Batteries in Microgrids Equipped with Electric Vehicles[END_REF]. Such a strategy allows reducing the computational cost related to the efficient management of the batteries. Once the batteries are grouped as a fictitious battery, a calculation is made to know how this fictitious battery is charged and discharged. Then, the amount of charged or discharged energy is used to calculate each state of charge. The power of the fictitious battery P f n is calculated using (3.12). The optimization vector is P rn , which corresponds to the electricity bought from the main grid for the whole NMG. P pn and P cn are the PV power generation and the power consumption of the whole NMG, respectively.

P f n (k + i) = P cn (k + i) -P pn (k + i) -P rn (k + i) (3.12)
At the first time step of the performed 1-day simulation, a rule-based algorithm initializes the use of the batteries and check for the feasibility of Operation 1 (Figure 3.2). There are two rules: batteries are charged at the beginning of the simulation and discharged during islanding.

If power is furnished to all Class 1 MGs, then the feasibility of Class 2 MGs is tested, otherwise, the feasibility of islanding using Discharging Mode d+ is tested. The process is repeated for each arrow of Figure 3.2. For example, for Class 2 MGs, if the islanding operation is successful using Discharging Mode d, Class 3 MGs are tested using the same discharging mode, otherwise Discharging Mode d+ for Class 2 MGs is tested. However, there are some specificities. For Operation 7, if at this step, islanding is not possible, Operation 5 is selected. For Operation 5 as well, if this operation and Operation 6 are not possible, Operation 1 is finally selected. Let us note that the rule-based strategy (see Section 3.1) is not able to perform prioritization at all. MPC relies on a constrained optimization problem. The main goal of the proposed predictive strategy is to minimize both the economic cost (P r • C r ) and CO 2 emissions (P r • G r ) to ensure the full charge of the EV batteries (∆ε), while minimizing the penalties and satisfying different system constraints labelled as γ t (those constraints can be found in [START_REF] Mannini | Predictive Management of Batteries in Microgrids Equipped with Electric Vehicles[END_REF]), over a prediction horizon H p whose length is 24 h. The objective function J NMG (3.13) is minimized using the pattern search algorithm (3.14). Weights (ϕ) are assigned to the different goals (e.g., reducing the economic cost). The term γ f refers to the success of islanding: if it is lower than 1, islanding is not successfully achieved for the given class of MGs.

J NMG = 1 N p n l=1 ( Hp i=1 (ϕ a P r,l (k + i)C r,l (k + i) + ϕ b P r,l (k + i)G r (k + i))) + ϕ c ∆ε + γ t + ϕ f γ f (3.13) P * rn = arg min J NMG (P rn ) (3.14)
When islanding is planned, its non-respect is penalized in the objective function. In order to so, the following rules (3.15) and (3.16) are applied:

R1: if I s,l (k + i) = 1 then C r,l (k + i) = 100 -m and G r,l (k + i, l) = 100 -m and m := m + 1 (3.15) R2: if I s,l (k + i) = 0 and P r,l (k + i) > 0 then γ d := γ d + Ω (3.16)
Let us note that in order to evaluate the economic cost reduction achieved by the MPC strategy, regarding the updated electricity prices (see Section 2.7), two MPC strategies have been proposed. MPC ST refers to the MPC strategy with standard electricity tariffs. MPC UT refers to the MPC strategy with updated electricity tariffs.

Stored energy sharing

The way the stored energy is shared among the MGs has to be decided. For both strategies, each MG receives a part of the PV power generation surplus to charge the batteries or, when there is no surplus, the batteries are charged with power bought from the main grid. The batteries are discharged according to the respective MG needs. Equation (3.17) shows how batteries are charged using the PV power generation surplus. In case NMG PV power generation is lower than the NMG power consumption, the batteries are charged with the power extracted from the main grid (3.18) (after MG PV power generation surplus have been used to charge batteries). If power consumption is higher than PV power generation, the batteries are discharged (3.19), so each MG gets an equal part of the stored electricity. MGs receive an amount of electricity which is proportional to their needs, in comparison to the whole NMG needs:

R1: if P f n (k + i) ≤ P pn (k + i) -P cn (k + i) and P cn (k + i) ≤ P pn (k + i) then P f,l (k + i) = P f n (k + i) × r p,l (k + i) (3.17) R2: if P pn (k + i) ≤ P cn (k + i) then P f,l (k + i) = P f n (k + i) -P pn (k + i) -P cn (k + i) n (3.18) R3: if P pn (k + i) ≤ P cn (k + i) and P p,l (k + i) ≤ P c,l (k + i) then P f,l (k + i) = P f n (k + i) × r c,l (k + i) (3.19)
r c is the ratio of the power consumption of MG l to the power consumption of the whole NMG (3.20):

r c,l (k + i) = P c,l (k + i) -P p,l (k + i) P cn (k + i) -P pn (k + i) (3.20)
r p is the ratio of the PV power generation surplus of MG l to the PV power generation surplus of the whole NMG (3.21):

r p,l (k + i) = P p,l (k + i) -P c,l (k + i) P pn (k + i) -P cn (k + i) (3.21)
The power extracted from the main grid P r is calculated as follows for MG l (3.22):

P r,l (k + i) = P c,l (k + i) -P p,l (k + i) -P f,l (k + i) (3.22)
Let us note that the energy stored in the batteries cannot be injected into the main grid (3.23):

P f n (k + i) ≤ P cn (k + i) -P pn (k + i) (3.23)

PV power generation sharing

What makes a NMG interesting from an economical point of view is its potential of sharing resources among MGs. Cooperation as mentioned in Subection 1.2 is the preferable way to exchange energy among MGs. In this case study, when PV power generation in a MG is higher than power consumption, the MG gives the surplus to the other MGs in the NMG in need of electricity. The power exchanged by MG l (P e ) is formulated by (3.24) and (3.25), depending on the situation of the whole NMG, related to the PV power generation surplus (P sn ). If this surplus is higher than the power needed by the MGs (P a ), (3.24) is applied. Otherwise, (3.25) is applied. P n is the power needed by MG l. P s is the PV power generation surplus of MG l.

R1: if P sn (k + i) > P a (k + i) then P e,l (k + i) = P s,l (k + i) × P a (k + i) P sn (k + i) otherwise P e,l (k + i) = P s,l (k + i) (3.24) R2: if P sn (k + i) ≤ P a (k + i) then P e,l (k + i) = P n,l (k + i) × P sn (k + i) P a (k + i) otherwise P e,l (k + i) = P n,l (k + i) (3.25)

Results

Perfect forecasts of PV power generation, power consumption, and CO 2 emissions are considered in this study. Matlab 2020b has been used to perform 1-day simulations. Those simulations were run on a calculation server with two Intel Xeon Gold 6230 processors @ 2.10 GHz, 20 cores and 40 threads, 512 Go RAM, and an average CPU mark of 26657. The time step is 15 minutes. As a result, the computation time associated with each optimization along the MPC rolling horizon has to be lower than this time step.

Results are presented in Table 3.4, Table 3.5, and Table 3.6 for Islanding Scenarios 1, 2, and 3, respectively. Each configuration (from 1 to 7) has been tested to evaluate the associated operation (e.g., Configuration 1 is used for Operation 1) according to Islanding Scenario 1 (Table 3.4). First, one can note that whatever the management strategy used, the NMG is not capable of islanding all the MGs (in this case, the NMG islanding is not fully successful, see Table 3.1) of which it is composed for Configurations 1 to 6 (Figure 3.2). However, for such configurations, the predictive strategy is capable of deciding of the MGs to disconnect from the main grid. In addition, for all configurations (except for Configuration 4), successful islanding of at least one MG is achieved (in this case, the NMG islanding is successful or partially successful, see Table 3.1) when using the MPC strategy. Furthermore, for Configurations 1 to 6, no MG has been disconnected from the main grid with the rule-based strategy. For Configurations 2, 3 and 6 and Islanding Scenario 1, for example, combining a bank of batteries with EV batteries allows the MPC strategy to reduce the economic cost compared to the rule-based strategy, for the Discharging Mode d+ and Discharging Mode d++. Thus, thanks to MPC, both the robustness and energy self-sufficiency of islanded MGs facing critical loads are enhanced (in this case, the NMG islanding is successful or partially successful, see Table 3.1). For Configuration 4, the MPC strategy tries to disconnect MG1 from the main grid as long as possible but it is impossible for the whole islanding period (in this case, the NMG islanding is unsuccessful, see Table 3.1). For Configuration 7, both strategies achieve fully successful islanding of the whole NMG (see Table 3.1), as can be seen in Figure 3.3 (MPC strategy) and in Figure 3.4 (rule-based strategy).

The electricity produced and stored locally has been shared between the MGs, resulting in an increase in the self-consumption rate by 6% in average (the reference is non-shared systems).

Generally, when no tariff modification is applied, disconnecting a microgrid from the main grid might not result in a reduction of the economic cost, from an increase of 22% of the economic cost to a decrease of 9% with the MPC strategy compared to the rule-based strategy, as only a small part of the NMG is islanded with the MPC strategy (in this case, the NMG islanding is successful or partially successful, see Table 3.1) whereas the rule-based strategy allows reducing the consumption of the NMG but does not disconnect any part of it (in this case, the NMG islanding is unsuccessful, see Table 3.1). It can be seen for most scenarios, like in Figure 3.5 and Figure 3.6 for Configuration 3 of Islanding Scenario 3. When there are tariff modifications for the NMG and the MPC strategy is used, it results in a reduction of the economic cost (up to 35%), in comparison to the rule-based strategy (Table 3.4). In addition, let us note that the economic cost reduction is achieved through using the MPC strategy even without tariff modifications in some cases, like Configurations 2 and 3 and Islanding Scenario 2 (Figures 3.7 and 3.8).

When the main grid faces disturbances, the NMG may face a blackout with the rule-based algorithm and no critical load would be satisfied. Furthermore, when a blackout occurs, blackstarts are needed and are economically costly as voltage or frequency regulation of the main grid is greatly affected [START_REF] Nelson | Model Predictive Control of Microgrids for Real-Time Ancillary Service Market Participation[END_REF]. There is a need from the NMG and the main grid to ensure power quality from both sides, which increases maintenance costs. That is why the main grid rewards the MPC strategy for successful MG islanding. As a result, there is a significant reduction of the economic cost for the MPC strategy using the proposed reward system from 4% to 86% with an average reduction of 28%.

Furthermore, J NMG is lower when the MPC strategy is used, with a reduction ranging from 1% to 26%, but in average, this reduction is about 12% compared to the rule-based strategy. Let us note the rule-based strategy cannot disconnect the NMG, which results in a higher value of the objective function, compared with the MPC strategy. Also CO 2 emissions can be reduced (except for one case) up to 4% when the MPC strategy is used (the reference emissions are the CO 2 emissions obtained with the rule-based strategy).

Conclusion and outlook

In this chapter, a model predictive control (MPC) strategy for the management of networked microgrids (NMGs) under planned islanding operation is proposed and evaluated through simulations. Microgrids (MGs) with standard, critical, and highly critical loads are considered. Different storage configurations -the NMG is equipped with a bank of batteries and a fleet of electric vehicles (EVs) -and EV scenarios are evaluated. In addition, batteries can be discharged in a normal or in a deep way, according to three islanding discharging modes, to support MGs with critical loads. A reward system allowing to remunerate successful MG/NMG islanding has been proposed to encourage the NMG to disconnect and inform the main grid of its islanding capability.

-What contribution does the sharing of systems make to the management of the electrical resources of a networked microgrid?

-Can a networked microgrid meet the requirements of planned islanding according to load criticality?

-What economic benefit for a networked microgrid in case of successful islanding?

-What is the impact of a deep discharge of the batteries in case of islanding on the ability of a networked microgrid to meet critical loads?

-What contribution does system sharing make to the management of the electrical resources of a networked microgrid? System sharing enhances the self-consumption rate of the (see Sections 2.2 and 2.5) when the MPC strategy is used (1-day simulation). MG: microgrid. P f : power stored used for one MG. P f n : power stored used for the NMG. E f : energy stored in all batteries. E v : energy stored in all electric vehicle batteries. E b : energy stored in the bank of batteries. P p : power generation used for one MG. P pn : power generation used for the NMG. P c : power consumption of one MG. P cn : power consumption of the NMG. P r : power bought from the main grid for one MG. P rn : power bought from the main grid for the NMG. P e : power exchanged between one MG and other. I s : islanding period of microgrid l. I sn : islanding period of the NMG. C r : normalized electricity tariffs. (see Sections 2.2 and 2.5) when the rule-based strategy is used (1-day simulation). MG: microgrid. P f : power stored used for one MG. P f n : power stored used for the NMG. E f : energy stored in all batteries. E v : energy stored in all electric vehicles batteries. E b : energy stored in the bank of batteries. P p : power generation used for one MG. P pn : power generation used for the NMG. P c : power consumption of one MG. P cn : power consumption of the NMG. P r : power bought from the main grid for one MG. P rn : power bought from the main grid for the NMG. P e : power exchanged between one MG and other. I s : islanding period of microgrid l. I sn : islanding period of the NMG. C r : normalized electricity tariffs. (see Sections 2.2 and 2.5) when the MPC strategy is used (1-day simulation). MG: microgrid. P f : power stored used for one MG. P f n : power stored used for the NMG. E f : energy stored in all batteries. E v : energy stored in all electric vehicles batteries. E b : energy stored in the bank of batteries. P p : power generation used for one MG. P pn : power generation used for the NMG. P c : power consumption of one MG. P cn : power consumption of the NMG. P r : power bought from the main grid for one MG. P rn : power bought from the main grid for the NMG. P e : power exchanged between one MG and other. I s : islanding period of microgrid l. I sn : islanding period of the NMG. C r : normalized electricity tariffs. (see Sections 2.2 and 2.5) when the rule-based strategy is used (1-day simulation). MG: microgrid. P f : power stored used for one MG. P f n : power stored used for the NMG. E f : energy stored in all batteries. E v : energy stored in all electric vehicles batteries. E b : energy stored in the bank of batteries. P p : power generation used for one MG. P pn : power generation used for the NMG. P c : power consumption of one MG. P cn : power consumption of the NMG. P r : power bought from the main grid for one MG. P rn : power bought from the main grid for the NMG. P e : power exchanged between one MG and other. I s : islanding period of microgrid l. I sn : islanding period of the NMG. C r : normalized electricity tariffs. (see Sections 2.2 and 2.5) when the MPC strategy is used (1-day simulation). MG: microgrid. P f : power stored used for one MG. P f n : power stored used for the NMG. E f : energy stored in all batteries. E v : energy stored in all electric vehicles batteries. E b : energy stored in the bank of batteries. P p : power generation used for one MG. P pn : power generation used for the NMG. P c : power consumption of one MG. P cn : power consumption of the NMG. P r : power bought from the main grid for one MG. P rn : power bought from the main grid for the NMG. P e : power exchanged between one MG and other. I s : islanding period of microgrid l. I sn : islanding period of the NMG. C r : normalized electricity tariffs. (see Sections 2.2 and 2.5) when the rule-based strategy is used (1-day simulation). MG: microgrid. P f : power stored used for one MG. P f n : power stored used for the NMG. E f : energy stored in all batteries. E v : energy stored in all electric vehicles batteries. E b : energy stored in the bank of batteries. P p : power generation used for one MG. P pn : power generation used for the NMG. P c : power consumption of one MG. P cn : power consumption of the NMG. P r : power bought from the main grid for one MG. P rn : power bought from the main grid for the NMG. P e : power exchanged between one MG and other. I s : islanding period of microgrid l. I sn : islanding period of the NMG. C r : normalized electricity tariffs. α: sum of normalized electricity tariffs and normalized CO 2 emissions. networked microgrid by 6% in average.

E b E f E v 0 4 8 12
E b E f E v 0 4 8 12
E b E f E v 0 4 8 12
E b E f E v 0 4 8 12
-Can a networked microgrid meet the requirements of planned islanding according to load criticality? The proposed predictive strategy makes it possible to meet the most critical loads during islanding for the majority of configurations and scenarios.

-What economic benefit for a networked microgrid in case of successful islanding? A reward is given to the networked microgrid (400€ in average) and an economical cost reduction of 28% is observed in comparison with the rule-based strategy.

-What is the impact of a deep discharge of the batteries in case of islanding on the ability of a networked microgrid to meet critical loads? A deep discharge of the batteries allows satisfying the most critical loads.

The proposed predictive strategy is compared to a rule-based strategy. The results highlight the ability of the predictive strategy to (i) decide which MG can disconnect from the main grid and which discharging mode is adequate (ii) share in an efficient way the stored energy among MGs and (iii) supply highly critical loads, thus enhancing both the NMG robustness and energy self-sufficiency. As specific results, (i) for all configurations, with the exception of Configuration 4, successful islanding of at least one MG is achieved when using the MPC strategy (ii) for Configuration 7, both strategies achieve successful islanding of the whole NMG. Regarding the economic cost and CO 2 emissions, they are reduced when the MPC strategy is used. Here, the results highligh the benefits of equipping the MG/NMG EVs. For its part, the rule-based strategy suffers from not being capable of efficiently detecting the MGs to disconnect from the main grid.

Future work will mainly focus on improving the MPC strategy (for example by optimizing the different weights and parameters of the objective function or combining MPC with reinforcement learning) and evaluating its effectiveness thanks to a panel of islanding scenarios. Forecasting algorithms will also be developed and the robustness of the MPC strategy to forecast errors will be evaluated.

Chapter 4

Multi-energy microgrid management

Electrical microgrids and networked electrical microgrids have been studied in Chapter 2 and Chapter 3. However, other forms of microgrids exist: thermal microgrids and multi-energy microgrids. Indeed, solar hot water systems are becoming increasingly popular for space heating thanks to their environmental and economic advantages, and thus can be considered to be part of a multi-energy microgrid. Let us note that thermal-electrical microgrids are considered as multi-energy microgrids. In the literature, the word hybrid can be used to describe such systems, however, the term multi-energy is chosen in this chapter. The work presented in this chapter is part of the Interreg Sudoe project IMPROVEMENT (Integration of combined cooling, heating and power microgrids in zero-energy public buildings under high power quality and continuity of service requirements). The goal of the project is to propose hardware/software solutions allowing public buildings which may have critical loads to be transformed into net-zero energy buildings by implementing multi-energy microgrids. In this context, the development of advanced strategies are made to efficiently manage those microgrids, able to satisfy system constraints, reduce the economic cost, reduce the carbon footprint and enhance the energy self-consumption rate is necessary. In this chapter, a study is made on a real multi-energy microgrid that equips the building that hosts the national energy and geology laboratory (LNEG) in Lisbon, Portugal. This multi-energy microgrid is composed of an electrical microgrid and a thermal microgrid connected together. The latter is a solar hot water system and a heat pump providing heat to different rooms of the building and able to store heat in dedicated systems. Regarding the electrical microgrid, PV panels supply electricity to storage systems and feed the loads of the building. More details can be found in Section 2. In this chapter, several questions are asked: -How the interconnection between the thermal microgrid and the electrical microgrid can be managed? -What contribution does a predictive management approach make? Is it possible to control its computational cost? -What performance for the predictive strategy in islanded mode? To answer the first question, an idea is to take advantage of the PV power generation surplus to supply the heat pump. Then, an answer to the second question might be the implementation of a predictive strategy for which a model of the solar hot water system for space heating has to be developed. The thermal model is presented in this chapter. Two different kinds of model predictive control (MPC) strategies are developed and compared with a PID/rule-based strategy already implemented in situ. The first model predictive control strategy is optimization based, while the second one is optimization free, with the aim of reducing the computational cost and to be easily implementable in situ. Both MPC strategies focus on satisfying thermal comfort constraints and reducing the economic cost as well as the carbon footprint. An evaluation of the multi-energy microgrid ability to disconnect from the main grid is also done in this work by comparing the optimization-free MPC strategy with the PID/rule-based strategy. Results (details are given in Sections 5.1.5, 5.2.5 and 6.4) indicate that the optimization-based MPC strategy is the most efficient strategy but it requires too much computation resources to be easily implemented in situ. Even though the optimization-free MPC strategy is less efficient, it does not require large computation resources. In addition, both MPC strategies are more efficient than the PID/rulebased strategy. That is why from the above information, the optimization-free MPC strategy is a good solution for in-situ implementation. All strategies take advantage of the available PV power generation surplus. Also, during islanding, the optimization-free MPC strategy is more efficient than the PID/rule-based strategy.

Introduction

Context

In recent years, the main grid has undergone a paradigm shift from a centralised to a decentralised structure due to the integration of renewable energy sources. Integration of such energy sources can be done through the (large-scale) deployment of electrical/thermal/multi-energy microgrids. However, renewable energy sources like solar (in particular solar photovoltaics) and wind are diffuse and intermittent. That is why storage systems are needed to smooth intermittence and increasing the penetration of such sources into power distribution grids. However, the most commonly used storage systems, i.e., electro-chemical batteries, are still expansive [START_REF] Ziyati | Numerical Modeling of Large-Scale Compact Pv-Csp Hybrid Plants[END_REF]. A solution to store the PV power generation at a cheap price is to use thermal energy storage systems [START_REF] Ziyati | Numerical Modeling of Large-Scale Compact Pv-Csp Hybrid Plants[END_REF][START_REF] Le | Éco-conception d'un échangeur-stockeur thermique de type thermocline[END_REF]. This implies that electrical microgrids have faced a shift toward thermal and electrical microgrids or so called multi-energy microgrids [START_REF] Hashemi | Multi-Objective Operation of Microgrids Based on Electrical and Thermal Flexibility Metrics Using the NNC and IGDT Methods[END_REF]. The world energy consumption is not only electrical but also thermal.

The world energy consumption is not only electrical but also thermal. The numbers show that, in the world, energy consumption in buildings accounts for around 30% of the energy consumption [START_REF] Rana | Renewables[END_REF]. 77% of this consumption concerns thermal energy [START_REF] Rana | Renewables[END_REF]. For example, in the United States of America, according to the Department of Energy [START_REF] Jeon | White-Model Predictive Control for Balancing Energy Savings and Thermal Comfort[END_REF] heating, ventilation, and air-conditioning (HVAC) represents one third of the energy consumption in a building. To reduce the use of fossil fuels as well as the economic cost, solar hot water systems for space heating are booming [START_REF] Rana | Renewables[END_REF]. These past few years, developing tools for improved design and performance has become a popular topic among researchers.

In this context, the Interreg Sudoe project IMPROVEMENT has been launched at the end of year 2019 to promote multi-energy (thermal/electrical) microgrids as a good solution to transform public buildings facing critical loads (hospitals, research centres, military facilities, etc.) into nZEB (net-zero energy buildings). Of course, efficiently managing the microgrids buildings can be equipped with is a challenge to be taken up. That is why an advanced energy management system based on model predictive control (MPC) has been developed by UPVD/PROMES-CNRS, with the help of LNEG (which provided data collected in situ). The algorithms are computationally tractable as the proposed predictive energy management system is optimization free.

Two pilot buildings are considered in the framework of the project IMPROVEMENT: the first one is located in Lisbon, Portugal, and the other one in Puertollanno, Spain. Only the Lisbon pilot building (see Figure 4.1), which houses the National Energy and Geology Laboratory (LNEG), is considered in this chapter. The LNEG pilot building integrates renewable heat/cold generation systems. A multi-energy MG equips this pilot building in order to convert it into a net-zero energy building (nZEB). The advanced strategies developed for MG management, which, are easy to implement, aim at satisfying system constraints, reducing the economic cost, reducing the carbon footprint, and enhancing the energy self-consumption rate. A model of the solar thermal system used for space heating in the LNEG pilot building has been developed and is presented in this chapter. In the That is why a survey about management strategies for multi-energy microgrids is needed.

Survey on multi-energy microgrid management strategies

That being said, the MG studied in this chapter is a multi-energy MG which consists in a thermal MG connected to an electrical MG. Both MGs can be seen as a sole MG or as a networked MG. A proper definition has to be given to know exactly what system is considered in this work. EDF proposes the following definition for thermal MGs: "A thermal MG utilizes energy efficiency; renewable electricity powered heat recovery; thermal storage; and, advanced analytics and controls to provide co-optimized power and thermal services to a group of interconnected and controllable energy loads within a defined boundary" [241]. A definition proposed by the French Energy Regulation Commission (CRE) [START_REF]Thèse Sur Les Microgrids : Étude Sur Les Perspectives Stratégiques de l'Énergie[END_REF][START_REF]Les Microgrids / Introduction[END_REF][START_REF] Mannini | A Survey of Recent Advances in the Smart Management of Microgrids and Networked Microgrids[END_REF] has been given in the Introduction. The part which is interesting is: "[...] The MG concept, likely to concern different system scales (i.e., a building, a district, an industrial or a craft zone, a village, etc.) is being extended to heat and natural gas networks, and can thus be thought out in a multifaceted manner". This definition can be used for multi-energy MGs. Those multi-energy MGs can equip any kind of system, residential buildings, public buildings, industrial buildings and so on [START_REF] Fahad | Microgrids Energy Management Systems: A Critical Review on Methods, Solutions, and Prospects[END_REF], and even ships [START_REF] Huang | An Overview of Multi-Energy Microgrid in All-Electric Ships[END_REF].

Microgrids are currently deployed in European countries, like the countries of the Sudoe region, to organize in a decentralized way the power distribution system. In addition, microgrids offer the possibility to integrate non-electrical resources such as thermal resources, thus improving the renewable energy self-consumption rate [START_REF] Du | Configuration of Thermal Storage Tank of Microgrid Clusters Considering Thermal Interaction[END_REF]. In [START_REF] Chen | Dynamic Economic Dispatch for CHP-MG System Based on Mixed Logical Dynamic Model and MPC Method[END_REF] the authors manage a multi-source microgrid which combines electrical, thermal and gas systems. To perform economic dispatch, an MPC strategy was used and provided better results in simulation than conventional static methods. In a multi-energy residential MG, Arcos-Aviles et al. [START_REF] Arcos-Aviles | Fuzzy Energy Management Strategy Based on Microgrid Energy Rate-of-Change Applied to an Electro-Thermal Residential Microgrid[END_REF][START_REF] Arcos-Aviles | An Energy Management System Design Using Fuzzy Logic Control: Smoothing the Grid Power Profile of a Residential Electro-Thermal Microgrid[END_REF] have developed a fuzzy energy management strategy to enhance the energy self-consumption of the MG taking advantage of the power generation surplus to store heat the thermal-storage device. In a multienergy residential MG, Arcos-Aviles et al. [START_REF] Arcos-Aviles | Fuzzy Energy Management Strategy Based on Microgrid Energy Rate-of-Change Applied to an Electro-Thermal Residential Microgrid[END_REF][START_REF] Arcos-Aviles | An Energy Management System Design Using Fuzzy Logic Control: Smoothing the Grid Power Profile of a Residential Electro-Thermal Microgrid[END_REF] have developed a fuzzy energy management strategy to enhance the energy self-consumption rate of the MG taking advantage of the power generation surplus to store heat the thermal-storage device. In [241], a multi-energy (thermal and electrical) MG equips the Stanford facilities and is managed by an MPC controller in order to reduce the economic cost, the environmental impact and the reliance on fossil fuels, to enhance reliability and resiliency, and to reduce water usage. Those objectives have been reached thanks to the proposed approach. In [START_REF] Deboever | Modeling and Optimal Scheduling of Integrated Thermal and Electrical Energy Microgrid[END_REF], a linear model formulation has been presented for a multi-energy (thermal and electrical) MG. This model has been tested, in simulation, in the real case study, i.e., a building in Atlanta (USA). The authors claim that it can be easily integrated to an optimization problem dealing with economic cost reductions. An energy management strategy based on demand-side management is proposed by Pascual et al. [START_REF] Pascual | Energy Management for an Electro-Thermal Renewable-Based Residential Microgrid with Energy Balance Forecasting and Demand Side Management[END_REF] for a residential MG equipped with photovoltaic solar panels, a small wind turbine and solar thermal collectors. The power exchanged with the main grid is managed thanks to batteries and a controllable electric water heater. A better grid power profile is achieved while reducing the overall cost of the system (in particular, thanks to a smaller battery) by using forecasts and controlling the electric water heater. Tang et al. [START_REF] Tang | Model Predictive Control for Thermal Energy Storage and Thermal Comfort Optimization of Building Demand Response in Smart Grids[END_REF] have worked on a multi-energy (thermal and electrical) MG and have proposed a model predictive control approach to reduce the power bought from the main grid but also to satisfy thermal comfort constraints in a building. Thanks to the proposed approach, power consumption does not increase and the thermal comfort temperature is satisfied. Moreover, the reference strategy could not satisfy the comfort temperature. An interesting result is that the simplification of the model did not impact the MPC strategy results, which means that the proposed approach could be more easily integrated to a system without deterioration of the results which is not the case when using a complex model. In [START_REF] Kia | Short-Term Operation of Microgrids with Thermal and Electrical Loads under Different Uncertainties Using Information Gap Decision Theory[END_REF], the authors have developed an optimal scheduling of energy resources for a multi-energy MG. Due to the available system resources in the system, uncertainties appear and are handled by a gap decision theory methodology. The proposed strategy is able to schedule both thermal and electrical power generations and can operate in a robust way or in an opportunistic way. Depending on the chosen strategy, robustness is successfully enhanced or economic cost is reduced. Chen et al. [START_REF] Chen | Multi-Energy Microgrid Robust Energy Management with a Novel Decision-Making Strategy[END_REF] have developed a robust optimization relying on a novel cumulative relative regret decision-making strategy for a multi-energy (thermal/electrical) MG. The proposed approach is compared with a standard robust optimization approach, stochastic programming and a minimum worst-scenario regret (MWR) strategy. Thanks to the proposed approach, robustness is ensured and the economic cost is reduced. Networked multi-energy MGs are quite uncommon systems but have been studied by Zhong et al. [START_REF] Zhong | Optimal Energy Management for Multi-Energy Multi-Microgrid Networks Considering Carbon Emission Limitations[END_REF]. The authors have proposed a day-ahead scheduling strategy in order to reduce in simulation both the economic cost and the CO 2 emissions. Hirao et al. [START_REF] Hirao | Demonstrating a Predictive Control System for a Ground Source Heat Pump: A Case Study from an Industry-University-Government Cooperation Project for Renewable Energy Technologies in Japan[END_REF] have developed an MPC strategy to manage a ground-source heat pump used to heat different buildings. The proposed approach is optimization free. Once production and consumption forecasts are provided, the MPC controller selects among the different heating modes the one which is the best to apply. In this work, the authors have validated the used of an MPC strategy and claim that the proposed approach can be implemented in a real urban environment. A MPC strategy has been proposed by Garnier et al. [START_REF] Garnier | Low Computational Cost Technique for Predictive Management of Thermal Comfort in Non-Residential Buildings[END_REF] in order to satisfy thermal comfort in a non-residential building with a low computational cost technique. The idea is to determine if the immediate next time step is the right time step to turn on or off the HVAC system in order to guarantee thermal comfort for occupants. The EnergyPlus software has been used to model the system and Matlab/Simulink has been used to develop the management strategy. Thanks to the proposed approach, the energy consumption has been reduced while the thermal comfort has been satisfied while the algorithm is computationally tractable. In [START_REF] Violante | An Energy Management System for Isolated Microgrids With Thermal Energy Resources[END_REF], an MPC-based EMS is proposed for an isolated multi-energy MG in order to minimize the cost related to the use of fuel and satisfy thermal comfort constraints. This EMS is tested and validated using a real testbed. However, energy consumption could be reduced while preserving thermal comfort. In this work, an interesting idea, in order to reduce the computational cost, is to use non-uniform time intervals for the MPC strategy. A review has been proposed by Pean et al. and Fischer et al. [START_REF] Thibault | Review of Control Strategies for Improving the Energy Flexibility Provided by Heat Pump Systems in Buildings[END_REF][START_REF] Fischer | On Heat Pumps in Smart Grids: A Review[END_REF] regarding the heat pump control strategies in buildings. The two strategies reviewed are a rule-based strategy and an MPC strategy. According to the authors, the main advantage of the rule-based strategy -this strategy has satisfactory performance, over the MPC-based strategy is an easy implementation. Regarding the MPC-based strategy, results are much better than with the rule-based strategy but implementation can be a hard task due to computation requirement.

Proposed methodology

From what has been learned in the literature, there are different research works focusing on the management of multi-energy MGs. However, it is quite uncommon to work on a real case study and to take advantage of PV power generation surplus to convert it into heat thanks to heat pump or storage system in a multi-energy microgrid. To answer the first question, the work done in this chapter is inspired by the idea proposed by Arcos-aviles et al. [START_REF] Arcos-Aviles | Fuzzy Energy Management Strategy Based on Microgrid Energy Rate-of-Change Applied to an Electro-Thermal Residential Microgrid[END_REF][START_REF] Arcos-Aviles | An Energy Management System Design Using Fuzzy Logic Control: Smoothing the Grid Power Profile of a Residential Electro-Thermal Microgrid[END_REF] which is to use the power generation of a electrical MG to heat thermal storage systems of a thermal MG.

In addition, it has been seen in the literature that thermal models can be used in the development and implementation of advanced, state-of-the-art control algorithms, like model predictive control (MPC) [START_REF] Hugo | Nonlinear temperature regulation of solar collectors with a fast adaptive polytopic LPV MPC formulation[END_REF]253]. MPC is one of the most used strategies when it comes to thermal comfort management or thermal resource management [START_REF] Yaser | An Economic Model-Based Predictive Control to Manage the Users' Thermal Comfort in a Building[END_REF][START_REF] Fischer | On Heat Pumps in Smart Grids: A Review[END_REF][START_REF] Thibault | Review of Control Strategies for Improving the Energy Flexibility Provided by Heat Pump Systems in Buildings[END_REF][START_REF] Ma | Coordinated Control for Air Handling Unit and Variable Air Volume Boxes in Multi-Zone HVAC System[END_REF][START_REF] Ooi Sian En | Predictive Thermal Comfort Control for Cyber-Physical Home Systems[END_REF] because of its capacity to take into consideration a model with its disturbances depending on the future output of the system. Model predictive control aims to the best control input to reach the desired output. Moreover, as it is mentioned in [START_REF] Hirao | Demonstrating a Predictive Control System for a Ground Source Heat Pump: A Case Study from an Industry-University-Government Cooperation Project for Renewable Energy Technologies in Japan[END_REF], optimization-free MPC strategies can be chosen for in situ implementation as they perform well. The idea to use MPC with a non-uniform prediction horizon with a reducing time interval [START_REF] Violante | An Energy Management System for Isolated Microgrids With Thermal Energy Resources[END_REF] is taken in consideration in this thesis. The instant the occupancy period starts or ends is the last time step of the prediction horizon. The work done in this chapter is inspired from the idea of Garnier et al. to select the best instant to turn on or off the HVAC system [START_REF] Garnier | Low Computational Cost Technique for Predictive Management of Thermal Comfort in Non-Residential Buildings[END_REF]. Also, efforts have been made to simplify the model [START_REF] Tang | Model Predictive Control for Thermal Energy Storage and Thermal Comfort Optimization of Building Demand Response in Smart Grids[END_REF] or the optimization problem. Only a few researches has considered the main grid power generation-related CO 2 emissions when charging or discharging batteries but it has been done for thermal MGs where carbon footprint has been reduced considering the main electrical grid [START_REF] Dahl | Demand Response Potential of Model Predictive Control of Space Heating Based on Price and Carbon Dioxide Intensity Signals[END_REF][START_REF] Leerbeck | Control of Heat Pumps with CO2 Emission Intensity Forecasts[END_REF]. This is why in this work, CO 2 emissions are considered. Only a few research works deal with islanding operation for multi-energy MGs [START_REF] Mohseni | Off-Grid Multi-Carrier Microgrid Design Optimisation: The Case of Rakiura-Stewart Island, Aotearoa-New Zealand[END_REF][START_REF] Moazeni | Dynamic Economic Dispatch of Islanded Water-Energy Microgrids with Smart Building Thermal Energy Management System[END_REF][START_REF] Bagheri | A Novel Approach for Sizing Thermal and Electrical Energy Storage Systems for Energy Management of Islanded Residential Microgrid[END_REF] and furthermore, using predictive strategy for those operation and for this system does not seem to be done yet.

This chapter proposes a modelling of a thermal and electrical MG. Then, a comparison between three management strategies is carried out. The first management strategy implies PID control as well as a rule-based algorithm. Then two different model predictive control (MPC) strategies are proposed, one is optimization-free, the other one, is optimization-based. MPC strategies can be used with optimization tools such as patternsearch, genetic algorithm or particle swarm among others. However, meta-heuristic optimization tools like genetic algorithms need heavy computation resources. That is why using optimization-free MPC might be a more realistic solution for in situ implementation considering the economic cost to have large computational resources. Furthermore, islanding operations have been managed with an optimization-free MPC strategy and tested for this multi-energy MG as it is quite uncommon in the literature. The contributions of this work can be summarized as follows:

-An optimization-free MPC controller is proposed for thermal comfort and thermal resource management. Such a controller is easier to implement than an optimization-based MPC controller and requires less computational resources.

-The model of the thermal MG is partially validated with real data coming from the LNEG pilot building, which is already operational.

-MPC controllers are compared to the existing PID/rule-based controllers (in simulation).

-Real-time estimates of main grid power generation-related CO 2 emissions are taken into consideration.

-The proposed optimization-free MPC strategy has been evaluated in islanded mode.

Chapter organization

The chapter is organized as follow: the case study is described in Section 2, the modelling of all subsystems is presented in Section 3 and the validation of some models is presented in Section 4. Then, strategies for thermal comfort and thermal resource management are discussed in Sections 5.1 and 5.2, respectively. Both sections include a survey, management strategies and the results. Section 6 deals with a strategy to manage the islanding operation of the LNEG pilot building and in this section, the ability of the system to island is assessed. This chapter ends with a conclusion and perspectives in Section 7.

Case study 2.1 Description of the LNEG pilot building

The considered case study is the LNEG pilot building equipped with a multi-energy MG [17]. In this grid-connected multi-energy MG, there are two MGs: the electrical MG and the thermal MG. The system schematics is shown in Figures 4.3 and 4.5. Regarding the electrical microgrid, PV solar panels provide electricity to feed the loads or to charge a bank of batteries. The energy stored in the batteries can be discharged to feed the loads. However, if electrical resources are not sufficient, the main grid can provide electricity to the electrical MG. This electrical MG is connected via the heat pump to the thermal MG. The heat pump can be alimented in electricity by the main grid or the PV power generation surplus coming from the electrical MG. In the thermal MG, solar collectors provide heat to a hot water tank (HWT) which supplies a thermal energy storage (TES). The heat pump can also provide heat to the thermal energy storage. Finally, fan coil units (FCUs) use the heat from the TES to heat different rooms of the LNEG facility. The considered LNEG pilot building area is shown in Figure 4.2. The building has two individual offices R1 and R2 (11m 2 each), a meeting room R3 (22m 2 ) and a multi-purpose room R4 (83m 2 ). For the remaining of this study, the room R1 is taken into consideration even if it does not have a air temperature sensor. The room R1 and the room R2 are very similar, that is why the results of the room R2 are applied to the room R1 (there is a need to know the power consumption of the FCU the room is equipped with in this study). In the thermal MG, there are two hot water tanks. The first one is heated by solar collectors and provides heat to the second one. The second hot water tank is heated by the heat pump as well. To facilitate the reading of this chapter, the first hot water tank heated by the solar collectors is called hot water tank (HWT). The second hot water tank heated by the heat pump is called thermal energy storage (TES). The thermal MG is composed of: -evacuated tube solar collectors of a total surface of 4 m 2 ; -a 300 L hot water tank (HWT) BAXI accumulator FST300; -a 1 000 L thermal energy storage (TES) Lapesa G-1000-IS; -a 16 kW t heat pump (air/water) daitsu CRAD 2 UiAWP 60 T; -4 fan coil units: 2 daitsu FDLA AC TS 3IFD2007 (2.65 kW t ), 1 daitsu FMCD EC TOTAL 3IFD2010 (5.21 kW t ) and 1 daitsu FDLA AC TS 3IFD5037 (12.2 kW t ). The interested reader is referred to the datasheet of those components for details.

Control and operation of the LNEG pilot building

In MGs, the most common solution to handle a power generation surplus is to store it in chemical batteries like lithium batteries. However, lithium batteries are expensive. Taking advantage of the PV power generation to heat thermal energy storage systems is not new [START_REF] Ziyati | Numerical Modeling of Large-Scale Compact Pv-Csp Hybrid Plants[END_REF]. That is why in this study, the PV power generation surplus can provide electricity to feed the heat pump, and the heat pump can then provide heat to the TES. In the LNEG pilot building, the bank of batteries does not have a high power of charge and power consumption is very low, resulting in a high PV power generation surplus compared to the overall production. That is why the idea to use this surplus to supply the heat pump is interesting in this case study. However, if there is no PV power generation surplus, the main grid provides electricity to the heat pump. If PV panels and the bank of batteries do not have enough energy to cover the electrical needs of the building, electricity is bought from the main grid. The FCUs are used to heat four rooms. In the LNEG pilot building, three operation modes are available for the thermal MG to supply heat to the rooms: flow rate of the water circulating between the TES and the heat pump. F s : supply air flow rate. in: entering fluid. out: leaving fluid. P r : electricity bought from the main grid. P s : PV power generation surplus. The grey color and the dashed lines indicate the part of the system not available for the operating mode chosen.

-the economic mode: heat can be accumulated in the TES thanks to two sources, the solar collectors and the HWT or the heat pump. The heat stored in the TES is then transferred to the rooms.

-the economic mode with disconnected solar collectors: heat can be accumulated in the TES using the heat pump only. The heat stored in the TES is then transferred to the rooms.

-the direct mode: no heat is stored in the TES, only the heat pump directly provides heat to the rooms via the FCUs.

Only the economic mode is considered in this work in order to take advantage of the solar collectors. In direct mode, the heat pump only operates when the FCUs are on, which does not give flexibility to manage the system. The solar collectors do not contribute that much to the system, that is why this mode has been decided by the LNEG team to be compared with the economic mode in order to evaluate the percentage of heat coming from the solar collectors during operation. flow rate of the water circulating between the TES and the heat pump. F s : supply air flow rate. in: entering fluid. out: leaving fluid. P r : electricity bought from the main grid. P s : PV power generation surplus.

LNEG's data

Description

The LNEG laboratory was in charge of measuring, collecting, and transmitting data coming from the pilot building or from a meteorological station. The LNEG laboratory sent data from the year 2022 on 3 occasions, in June 2022, September 2022 and in January 2023. Models have been validated with the received data in June, management strategies have been developed immediately after. That is why the data received in September and January were not used in this work. Those new data can be used to refine the models presented in this chapter as the outliers may have been suppressed. Some quantities were not measured until May 2022, however, they can be found and calculated from other quantities like the power consumption which can be calculated from the consumed energy. All data were measured with a time interval of 10 minutes. Regarding the rooms, the following quantities have been measured, from February 18 to August 31:

-the rate of CO 2 in the air (ppm); -the relative air humidity (%); -the air temperature ( • C);

-the wall temperature of room 44 (W1, W2, W3 and W4) ( • C);

-the illuminance of room R4 (lux);

-the power consumption of the bulbs (kW) for rooms R2 and R4;

-the accumulated energy consumption of the bulbs (kWh) for rooms R2 and R4;

-the power consumption of the plugs (kW) for room R2 (from May 4 to August 31);

-the accumulated energy consumption of the plugs (kWh) for room R2.

Let us note that the CO 2 rate in the air is used to determine if people are present in a room. If this value is higher than 400 ppm, it means that there are people in this room as can be seen in Figure 4.7.

Regarding the heat pump, the following quantities have been measured:

-the power consumption (kW) (from May 4 to August 31);

-the accumulated energy consumption (kWh) (from February 18 to August 31). Regarding the PV panels and the wind turbine, the following quantities have been measured from February 18 to August 31:

-the power generation (kW);

-the energy production (kWh);

-the current (A) and voltage (V).

Let us note that the wind turbine is not working properly, that is why it is not considered in this study. Regarding the weather, the following quantities have been measured from January 1 to August 31:

-the outdoor temperature ( • C); -the relative air humidity (%); -the global irradiance at 5°(W m -2 ); -the global irradiance at 45°(W m -2 ) [used for validation of the thermal zones model].

Regarding the LNEG pilot building (the four rooms R1, R2, R3 and R4), the following quantities have been measured from February 18 to August 31:

-the power consumption (kW); -the energy consumption (kWh); -the current (A) and voltage (V).

Regarding the FCUs, the following quantities have been measured:

-the power (kW) (from April 4 to August 31); -the energy consumption (kWh) (from February 18 to August 31).

Regarding the thermal microgrid, the following quantities have been measured from April 4 to August 31: -the flow rate of the water circulating between the HWT and the TES (L h -1 ), the flow rate of the water circulating between the TES and the FCUs (L h -1 ) and the flow rate of the water circulating between the heat pump and the TES (L h -1 );

-the accumulated water entering a valve (L).

Overall, the available data are consistent. There are only a few issues in the database: less than 0.3% of the data are missing, which is not a problem as the amount of data is large, except for weather data (GTI, outdoor temperature and air humidity), which are not available from June 6 to July 8 (about 8%).

Data quality check

A quality control has been addressed to evaluate data quality. Two evaluations are made:

-Evaluation E1: measured values are compared with a minimum and a maximum value; -Evaluation E2: each increment between measured values is compared with a maximum or a minimum increment value.

For Evaluation E1 and Evaluation E2, if a measured value is out of bounds, it means that the value can be physically possible or not, so a distinction is made between a physically possible measurement which is a rare observation and an outlier which is an impossible value. Bounded values, for E1 and E2 evaluations of each measured quantity, can be found in Table 4.1. Let us note that temperature, flow rate, and electrical bounds were chosen based on system measurements.

For the rate of CO 2 in a room, the National Agency for Food, Environmental and Occupational Health Safety (Anses) [START_REF]Dioxyde de carbone (CO2) dans l'air intérieur[END_REF] puts a limit value of 1500 ppm. A high value indicates a very poor air quality. It can happen if there is no FCU in a room. However, in the LNEG pilot building, there is one FCU in each room, thus ensuring a good air quality. If the measured rate of CO 2 in a room excesses the limit, it means that the FCU may not work properly. The recommended illuminance of a conference room is 300 lux [258], however, the illuminance sensor in room R4 is put next to a window, so it is expected for the measured value to be sometimes high due to solar irradiance. To compensate the fact that the illuminance sensor is next to the window, a value of 1500 lux has been chosen as an upper bound. For the voltage, a 10% limit has been considered above the recommended 230 V.

For the measured GTI, a non-SI (International System of Units) unit which was used by the LNEG team: hJ cm -2 . Equation (4.1) has been applied to convert the data into W m -2 . GT I c is the converted GTI while GT I m is the measured GTI by the LNEG team. . Regarding the electrical microgrid, the accumulation of energy is not taken into consideration in the quality check procedure as this value only corresponds to an increment of the measured power. But some precautions have to be taken towards the measured energy and power of the FCUs, as there is an error that can go up to 2% when they are operating between the measured energy and the measured power. The wind turbine is not taken into consideration as it is very rarely operating. Taking a look at Table 4.2, it can be noted that there are a few rare observations and barely any outlier. The data quality is very good. Regarding the wall temperature in room R4, the measured values were -327.67 • C, which is not physically possible. Regarding the rate of CO 2 in the same room rare observations can be found for some days in July (0.7% of the database). The rate of CO 2 went above 1500 ppm, which indicates a very poor air quality. In fact, the FCUs were not operating for those days, as shown in the database. However, because the measured value saturates at 1975 ppm, the real value should be above the one measured. Regarding the temperature of the water inside the HWT and the temperature of the water circulating from the HWT to the TES, rare observations can be reported for 0.39% and 0.13% of the database, respectively. Normally, during summer, the solar collectors are covered with a canvas so they do not overheat the system. However, during some days of July, there are some periods where the water in the HWT seems to have been heated by the fluid circulating in the solar collectors, until the temperature of the water in the HWT goes above 70 • C. Then, the water of the HWT transferred heat to the water of the TES while it was operating in a cooling operating mode, which corresponds to a malfunctioning. A rare observation can be reported for outdoor temperature sometimes during the year where the temperature decreases by 5 • C in 10 minutes, but it happens only 0.02% of the whole time.

Let us note that some key quantities are not measured: the temperature of the fluid passing through the solar collectors, the flow rate of the fluid circulating in the solar collectors and the supply air flow rate of the FCUs. For the FCUs, the total power of all the units is known but there are 4 FCUs, so it makes it is hard to know which one is on and which one is off, and what are their respective power consumption. Also, during the night, the flow rate of the water circulating between the FCUs and the TES is zero in the data. However, the water coming back from the FCUs is cooling the TES from the middle to the bottom, while the top of the TES remains hot according to the data. This is suspicious because the flow rate of the water circulating between the FCUs and the TES is zero at this moment of the night. Thanks to the answers of the LNEG team, considerations were made to address this issue and understand what was going on in the TES, a fluid was circulating from the TES to the FCUs and back to the TES during the night.

Electricity purchase tariffs and CO 2 emissions

In this study, the electricity purchase tariffs (C c in ce kWh -1 ) are as follows (Table 4. are the minimal and maximal values of the CO 2 emissions, respectively. In the remainder of the chapter, the addition of those two normalized quantities (α) (4.5) is considered.

C r (k + i) = C c (k + i) -C min c C max c -C min c + 1 (4.3)
G r (k + i) = G c (k + i) -G min c G max c -G min c + 1 (4.4) α(k + i) = ϕ a C r (k + i) + ϕ b G r (k + i) (4.5)

LNEG MG modelling

In this section, the model of the multi-energy MG is presented. PV power generation data and power consumption data are used for simulating the electrical MG. The model of the bank of batteries presented in Section 2.2 of Chapter 2 is used. The model of the thermal components is presented in this section. The data provided by the LNEG laboratory have been used for model development and validation.

Literature review for thermal microgrid modelling

An efficient system design can significantly affects its energy saving benefits. Moreover, the design of optimal controllers is vital to maximize the energy efficiency at minimal cost. In a nutshell, the streamlined functional models of solar energy systems are seen as tools that can help to analyse the system behaviour and design the controllers. There are numerous efforts seen in the literature presenting modelling and simulation approaches [START_REF] Pasamontes | Hybrid modeling of a solar-thermal heating facility[END_REF][START_REF] Gerard | Modelling bond graph of a thermal solar water heater for thermal comfort in a building[END_REF]. These approaches are divided in data-and first-principle-based methods. Data-based methods are very popular these days but have their own challenges like data availability, inaccuracies and noise in the available data, insufficient understanding of the system parameters and their effect on the system behaviour, etc. Contrarily, first-principle-based methods provide a deep insight into the dynamic behaviour of the system, can incorporate numerous variables, and are easy to analyse compared to data-based methods.

The modelling of solar systems for space heating has been addressed in the literature, but to the best of our knowledge, there are very few references that describe the full stack of components as an integrated model which can be used to develop advanced management strategies. For space heating, Pasamontes et al. [START_REF] Pasamontes | Hybrid modeling of a solar-thermal heating facility[END_REF] have proposed a model based on first-principle equations dealing with several subsystems: a thermal flat-solar collector field, a hot water accumulation system, and a gas heater. Discrete dynamics are included in the hybrid model, which is able to simulate the different configuration modes of the solar system for both simulation and control design purposes. More recently, Gerard et al. [START_REF] Gerard | Modelling bond graph of a thermal solar water heater for thermal comfort in a building[END_REF] have presented a study dealing with thermal comfort in a building equipped with a solar thermal system consisting in a solar thermal collector, a water storage tank, a boiler and a low temperature radiator. The Bond Graph formalism was used (a graphical representation of first-principle equations that allows to develop state-space representations of physical systems) for modelling the solar water heater to regulate a hot water radiator. More recently, solar systems for space heating have been coupled with heat pumps, as reviewed by Kasaeian et al. [263]. This work suggests that the integrated modelling needs to be improved for better economic and environmental assessment.

Regarding the modelling tools, there have been several used, like TRNSYS in [START_REF] Antoniadis | Optimization of a building integrated solar thermal system with seasonal storage using TRNSYS[END_REF] when the objective is to optimize the design of components or MATLAB/SIMULINK in [START_REF] Gerard | Modelling bond graph of a thermal solar water heater for thermal comfort in a building[END_REF] when the objective is to develop operation strategies. Other examples of MATLAB/SIMULINK applications are given in [START_REF] Kıyan | Modelling and simulation of a hybrid solar heating system for greenhouse applications using Matlab/Simulink[END_REF], where a model has been developed to predict the storage water temperature, the greenhouse indoor temperature, and the amount of auxiliary fuel, as a function of various design parameters of the greenhouse, such as its location and dimensions, and meteorological data of the region, and in [START_REF] Esmaeil | Mathematical modelling and simulation of a solar water heater for an aviculture unit using MAT-LAB/SIMULINK[END_REF], where a model of a solar water heater has been developed and simulated for an aviculture building in Tehran, Iran. Polysun, a commercial tool for the design of solar systems, is rarely used in the literature. An example can be found in [START_REF] Artur | Comparison of two dynamic approaches to modelling solar thermal systems for domestic hot water[END_REF] to the analysis of the influence of the hot water consumption profiles and hot water tank size in solar thermal systems.

Thermal MG components modelling

The model developed for the Interreg Sudoe project IMPROVEMENT is validated thanks to data collected in Lisbon. The layout of the LNEG pilot building is shown in Figure 4.3. Inspired from that building in Lisbon, the benchmark model for solar hot water system is designed and simulations that provided realistic behaviour were performed. It is essential to understand the dynamic behaviour of the units of which the solar hot water system is composed. That allows to derive the mathematical interpretation of the complete solar hot water system. These thermal behaviours are well explained using the first law of thermodynamics, i.e., mass and energy balance equations [START_REF] Buzás | Modelling and Simulation of a Solar Thermal System[END_REF][START_REF] Zeghib | Simulation of a solar domestic water heating system[END_REF]. Mass and energy balance equations are written for each unit of the benchmark defined for the solar hot water system. The available LNEG data, describing the system parameters and characteristics, are used for the simulation of these mathematical models. Evacuated tube solar collectors are installed on the site as seen in Figure 4.8. Solar collectors capture the radiant solar energy and convert it into thermal energy. This energy is transported using heat transfer fluid. Precise modelling of evacuated tube solar collectors [START_REF] Mishra | Thermal Modeling and Development of Characteristic Equations of Evacuated Tubular Collector (ETC)[END_REF] can result in a high computational cost when used along optimization-based strategies. Even if simplified models exist [START_REF] Ndiaye | Simplified Model for Dynamic Simulation of Solar Systems with Evacuated Tube Collector[END_REF][START_REF] Paradis | Thermal Modeling of Evacuated Tube Solar Air Collectors[END_REF], the simple model proposed by Buzas et al. [START_REF] Buzás | Modelling and Simulation of a Solar Thermal System[END_REF] is used as the main interest of this model is to provide the temperature of the fluid circulating in the solar collectors which are heating the HWT. As there is no accumulation of mass in solar collectors, only the energy balance equation is considered in this case. The solar energy absorbed by the collectors is Q c,solar while the heat transfer fluid is Q c,f luid and Q c,loss is the energy loss to the atmosphere. The energy balance for the solar collectors can be written as follows (4.6):

Evacuated tube solar collectors

Q c,acc = Q c,solar + Q c,f luid -Q c,loss (4.6)
The energy absorbed by the solar collectors (Q c,solar ) is a function of solar irradiance (4.7):

Q c,solar = A c ηI (4.7)
where A c is the solar collectors surface area (m 2 ), I is the global irradiance (at 45°) (W m -2 ) and η is the optical efficiency (dimensionless) [START_REF] Buzás | Modelling and Simulation of a Solar Thermal System[END_REF].

The energy transferred to the fluid Q c,f luid is formulated as follows (4.8):

Q c,f luid = ṁc c c (T in c -T out c ) (4.8)
where ṁc is the mass flow rate of the fluid (kg s -1 ) and c c is the specific heat of the fluid (J kg -1 K -1 ), T in c and T out c are the inlet and outlet temperatures, respectively.

Finally, the heat loss in the solar collector is given by Equation (4.9):

Q c,loss = U c A c T c,abs (4.9)
where U c is the heat loss coefficient (W m -2 K -1 ) and T c,abs is the absolute temperature of the solar collector surface. Although it is quite challenging to measure the surface temperature, hence for simplicity, the absolute temperature T c,abs is replaced by the approximation in Equation (4.10).

Q c,loss = U c A c T in c + T out c 2 -T o (4.10)
Now, the complete energy balance (4.11) can be written as follows, using Equations (4.7), (4.8), and (4.10):

ρ c c c V c dT out c dt = A c ηI + ṁc c c (T in c -T out c ) -U c A c T in c + T out c 2 -T o (4.11)
Note that the mass flow rate ṁc is expressed in terms of volumetric flow rate F c as ṁc = F c ρ c , where ρ c is the density of the solar heat transfer fluid. Hence, after further rearranging of Equation (4.11), the final formulation is as follows (4.12):

dT out c dt = A c η ρ c c c V c I + F c V c (T in c -T out c ) - U c A c ρ c c c V c T in c + T out c 2 -T o (4.12)
Note that from a control perspective, the solar irradiance I and the outdoor temperature T o are disturbances, while the solar heat fluid inlet and outlet temperatures T in c and T out c are controlled variables, and the solar heat fluid flow rate F c is a manipulated variable.

Hot water tank and thermal energy storage tank

The solar collectors heat the hot water tank (HWT) directly. Then, the HWT provides heat to the FCUs, which are supplying heat to the rooms, via the TES. However, when solar energy is unavailable at nights and in case of cloudy conditions, continuous space heating is ensured using the thermal energy storage (TES) tank. The TES also allows to shift energy consumption from on-peak to off-peak hours, significantly improving system performance and reducing the economic costs. The LNEG pilot building has a stratified HWT and a TES with heat exchangers. Hence, a detailed mathematical model of the stratified HWT based on the energy balance equations is presented. Note that the HWT has very similar mathematical modelling compared to the TES.

Thermal storage is based on a stratification process, where hot water sits on cold water, as depicted in Figures 4.11 and 4.12. In this work, the node-based energy balance method is used, i.e., the energy balance equation for each node (12 in this case) is evaluated in [273] and [START_REF] Nash | Dynamic Modeling of a Sensible Thermal Energy Storage Tank with an Immersed Coil Heat Exchanger under Three Operation Modes[END_REF]. Please note that the terms "node" and "layer" are used interchangeably in the literature, hence the term "layer" is chosen for convenience. For model simplification, the following assumptions are made [START_REF] Rahman | Simplified modeling of thermal storage tank for distributed energy heat recovery applications[END_REF]:

-the fluid used in the thermal storage tank is incompressible; -the pressure in the tank is assumed to be appropriate to avoid fluid phase changes; -the mixing of layers due to buoyancy force has been considered as negligible; -there is no mass flowing in or out of the system, hence the mass balance equation is not considered.

Both thanks are equipped with a heat exchanger, as can be observed in Figures 4.11 and 4.12. The fluid coming from the solar collectors circulates in the heat exchanger the HWT is equipped with, from layer 1 to layer 12. The water coming from the HWT (layer 1) circulates in the heat exchanger the TES is equipped with, from layer 6 to layer 10. Then, this water is back to the HWT (layer 12). The water circulating in the heat pump enters the top of the TES (layer 1) and leaves it at the bottom (layer 12), without circulating in a heat exchanger. The stored water leaves the TES from the top (layer 1), circulates through the FCUs and then is back to the bottom of the TES (layer 12). Let us note that the temperature of the water in layer j is calculated from the respective temperatures of the water in layer j -1 and j + 1 and the temperature of the fluid circulating in the heat exchanger (layer j).

Energy balance equation differs according to the position of the layer in the HWT. The energy balance for layer j is given by Equation (4.13) where V w is the volume of the HWT (m 3 ), F w is the flow rate of the water circulating between the HWT and the TES (m 3 s -1 ), T w,j is the temperature of the water in layer j of the HWT • C) , T a is the temperature of the air in the thermal storage room, A w,c is the HWT cross sectional surface of a layer in contact with another layer (m 2 ), and ∆x is the height of a layer (m).

dT w,j dt = F w V w (T w,j+1 -T w,j ) - U A w,l ρ w c w V w (T w,j -T a ) + k t,j+1 A w,c ρ w c w V w ∆x (T w,j+1 -T w,j ) + k t,j-1 A w,c ρ w c w V w ∆x (T w,j-1 -T w,j ) U A w,h ρ w c w V w (T h,j -T w,j ) (4.13)
Nash et al. [START_REF] Nash | Dynamic Modeling of a Sensible Thermal Energy Storage Tank with an Immersed Coil Heat Exchanger under Three Operation Modes[END_REF] introduce k t,j-1 , k t,j+1 (internal heat transfer coefficient between each layer) and ∆ i (internal heat transfer scaling parameter) in order to force the heat to be transferred downward or upward. The terms are calculated with Equations (4.14) and (4.15):

k t,j-1 :=          k t,j-1 ∆ i |T w,j -T w,j-1 |, if T w,j-1 < T w,j k t,j-1 , otherwise (4.14) k t,j+1 :=          k t,j+1 ∆ i |T w,j -T w,j+1 |, if T w,j < T w,j+1 k t,j+1 , otherwise
dT w,1 dt = F w V w (T w,2 -T w,1 ) - U A w,l ρ w c w V w (T w,1 -T a ) + k t,2 A w,c ρ w c w V w ∆x (T w,2 -T w,1 ) + U A w,h ρ w c w V w (T out c -T w,1 ) (4.16)
As the cold fluid comes from the TES, with T in w the temperature of the water entering the HWT (considered as layer 13 in the model), layer 12 (N w = 12) has the following equation (4.17):

dT w,12 dt = F w V w (T in w -T w,12 ) - U A w,l ρ w c w V w (T w,12 -T a ) + k t,11 A w,c ρ w c w V w ∆x (T w,11 -T w,12 ) + U A w,h ρ w c w V w (T h,12 -T w,12 ) (4.17)
The combination of Equations (4.13), (4.16), and (4.17) represents the dynamic behaviour of the stratified HWT. It is worth mentioning that all the system parameters used are derived from the available LNEG pilot building data. To represent the dynamic behaviour of the hot

dT h,1 dt = F h V h (T out c -T h,1 ) - U A w,h ρ h c h V h (T h,1 -T w,1 ) (4.18
)

dT h,j dt = F h V h (T h,j-1 -T h,j ) - U A w,h ρ h c h V h (T h,j -T w,j ) (4.19)
Note that the TES has the same equations as the HWT, except for the heat pump (see Figure 4.13). That is why a slight modification is made to the model: the term T p is added as the water (circulating in the heat pump) enters the first layer of the tank. Let us note that the heat exchanger heats the TES from layer 6 to layer 10, that is why there is no heat exchange with it in the first layer of the TES as can be seen in Equation (4.20).

dT e,1 dt = F t V e (T e

Fan coil units

Fan coil units (FCUs) are widely used HVAC systems in the buildings because of their ease of installation, low noise levels and mounting versatility (floor or ceiling). A typical FCU is composed of a supply fan, a heat exchanger coil, filters and noise alternators. In the heating coil, the temperature of the supply air is increased to the predefined temperature. This conditioned air is then used to heat thermal zones during occupancy periods. Note that the air filters do not directly affect the air temperature of a thermal zone, hence the dynamics of the filters is neglected.

Here, the shell and tube co-current type heating coil is considered. The mathematical model of the air-water heating coil is given by Equations (4.21) and (4.22), which are essentially the energy balance equation applied to both the shell-and tube-side fluid flow rates. The hot water in the shell coming from the tanks heats the supply air in the tube-side to the required temperature. In [START_REF] James | Chemical and Bio-process Control[END_REF][START_REF] Bourhan Tashtoush | Dynamic Model of an HVAC System for Control Analysis[END_REF], the authors present a model of the heat exchanger, which is extended to the LNEG pilot building. A more detailed model was developed by Bastida et al. [START_REF] Bastida | Dynamic Modelling and Control of Counter-Flow Heat Exchangers for Heating and Cooling Systems[END_REF]. However, a complex model might not be necessary to accurately capture the behaviour of the fan coil units and using such model would result in a higher computational cost. The required flow rate of the supply air entering the thermal zones is manipulated through the thermal zone controller. Note that the heat loss to the outside environment is considered negligible. Equations (4.21) and (4.22) deal with the dynamic behaviour of the heat exchanged between the shell-and tube-side fluids for the co-current flow [START_REF] James | Chemical and Bio-process Control[END_REF]:

dT in t dt = F t V f (T out t -T in t ) - k s A in f ∆ z ρ w c w V f (T in t -T out s ) (4.21)
dT out s dt = F s V r,z (T in s -T out s ) - k s A out f ∆ z ρ a c a V r,z (T out s -T in t ) - hAs ρ a c a V r,z (T out s -T o ) (4.22)
where A in f and A out f are the tube/air-side and shell/water-side areas (m 2 ), respectively, k s is the FCU conductive heat transfer coefficient (W m -1 K -1 ), ∆ z is the length of the tube (m), ρ a is the of supply air density (kg m -3 ), T in s and T out s are the inlet and outlet air temperatures of the heating coil ( • C), respectively. The inlet and outlet water temperatures from the stratified TES are denoted T in t and T out t ( • C), respectively. V f is the volume of the heating coil (m 3 ) and V r,z is the volume of room z (m 3 ), with F s and F t the supply air and water flow rates (m 3 s -1 ), respectively. .

Thermal zones modelling

In this work, the focus is put on the temperature in the thermal zones as a thermal comfort indicator (see Figure 4.14 shows the room R4). The RC model is used for room modelling [279,[START_REF] Bourhan Tashtoush | Dynamic Model of an HVAC System for Control Analysis[END_REF]. Equation (4.23) [279] is used, with A r,z the solar aperture of room z and g r,z the solar transmittance of the window of room z [START_REF] Stamp | Measuring and Accounting for Solar Gains in Steady State Whole Building Heat Loss Measurements[END_REF][START_REF] Ooi Sian En | Predictive Thermal Comfort Control for Cyber-Physical Home Systems[END_REF], to take into account the effect of solar irradiance. The behaviour of the thermal zones in the building is accurately described by the model based on the first law of thermodynamics. There are four rooms of interest in the building. T r,z denotes the temperature of the zone/room z (let us note that T in s is considered to be equal to T r,z in this study). The flow rate of the supply air entering zone z is represented by F s,z and the supply air temperature by T out s,z , with C a,z = ρ a c a V r,z . Let us note that an internal heat gain Maximum volumetric flow rate of the water circulating through the FCU 4 (m 3 s -1 ) Figure 4.13: Picture of the 16 kW t heat pump with a COP value of 3.3.

q (metabolic activity) has been considered with a value of 70 W m -2 for each person in room z [START_REF] Garnier | Low Computational Cost Technique for Predictive Management of Thermal Comfort in Non-Residential Buildings[END_REF] with an office activity (i.e., one person is equal to 1 m 2 ). It is supposed to perform the simulations that there are 1 person in room R1, 1 person in room R2, at least 4 persons in room R3 and at least 16 persons in room R4. That is why the same metabolic activity is considered for each room as activities are all the same. Furthermore, Equation (4.23) could be enhanced by taking into consideration quantities like the temperature of the walls, or the air temperature in the adjacent rooms, the temperature of the ceiling and the ground temperature. However, in the LNEG pilot building, not every room, nor every wall, ceiling, ground etc. is equipped with a sensor. Thus, improving Equation (4.23) cannot be done in this case study.

dT r,z dt = F s,z V r,z (T out s,z -T r,z ) - T r,z -T o R e,z C a,z + X z q C a,z + A r,z Ig r,z C a,z (4.23)

Model validation

The derived mathematical models have been simulated using numerical data from the LNEG pilot building. All the relevant numerical data of the system parameters and characteristics are presented in Tables 4.4, 4.5, 4.6, 4.7 and 4.8. Model validation (see Table 4.9) has been performed with site data and evaluated using the root-mean-square error (RMSE). RMSE is the square

(x i -x i ) 2 (4. 24
)
where n is the number of data, x are simulated data and x are measurements. For more information on the definition of this index, the interested reader is referred to

Thermal zone model validation

Validation of the thermal zones model is done without turning on the FCUs. The FCUs are not used during weekends, so, in order to validate the model, those periods are considered. Validation with the FCUs turned on is not possible as the flow rate of the water circulating in the FCUs and the FCU supply air flow rate are not measured. Global irradiance (at 45°) and outdoor air temperature have been used as model inputs. In addition, the solar aperture is modified in order to correct the global irradiance entering the rooms. The global irradiance measured at the top of the buildings located in Lisbon is different from the one entering the rooms, so some empirical adjustments have been made to get appreciable results regarding the validation of the thermal of the thermal zones model. The different rooms are not exposed to the Sun in the same way. Room R3 is exposed from the east side, from an atrium. Also, there is a high resistance to the outdoor, because there is no contact with this room and the outdoor. Furthermore, this room has a good exposure to the sun in the morning and in the middle of the day. However, rooms R2 and R2 are not exposed to the sun in the morning (see Figure 4.14). A small delay has been added to the measure of solar irradiance to be more representative of the sun behaviour for rooms R2 and R4. Let us note that all rooms have been renovated, thus the absolute thermal resistance of walls is quite high.

Time (h) T r,2 -T r,2 ( • C) T r,2 -T r,2
From what can be observed in Figures 4. 15, 4.16, 4.17, 4.18 and 4.20, the error on the air temperature for all rooms between the simulation and reality is always lower than 2 • C. This could be enhanced. However, in this work, we have decided for a simplified model to test the proposed model predictive control approaches, so such an error value is acceptable. Results can be found in Table 4.9 and RMSE is quite low for a simplified model, meaning that this model can be used to evaluate the MPC strategy. Anyway, more investigation should be done to improve the model for future work, as the reference temperature must remain between 20 and 22 • C.

Production and storage model validation

The solar collectors model cannot be validated as no sensor is available for this subsystem in the LNEG pilot building. Both the outlet and inlet solar collector fluid temperatures are unknown. That is why there is no validation in this chapter of the models of the solar collectors and the HWT as the needed quantities are not measured. Temperature and flow rate measurements have been used for the water coming from the HWT, the FCUs, and the heat pump. Only the TES model can be validated, because the only inputs available are the temperature of the water circulating in the heat pump, the temperature of the water circulating in the FCUs, the temperature of the water leaving the TES and coming from the HWT and the different valve flow rates. Let us note that, due to the COVID pandemic in 2020-2022, there are not so much days with people in the rooms. The two days chosen to validate the model are days with many people inside the rooms. The FCUs are used at maximum speed. Thus, a proper consumption profile was registered and could be used for model validation, at least for the TES model, as the quantities known are the flow rate and the temperature of the FCUs water. It can be observed on Figure 4.21 that the simulated temperature of the water in the layers 1 and 4 are close to the reality. The error is lower than 2 T e,j : simulated temperature of the water in the TES (layer j). T e,j : measured temperature of the water in the TES (layer j). F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the FCUs.

temperature is 38 • C, but a lower temperature is sufficient to heat the water circulating in the FCUs. The FCUs were turned off during the night, but a malfunction occurred in the system and the water was circulating in the TES, from the layer 1 to the layer 12. The model could be improved as it seems that the temperature of the water in the bottom of the TES (layer 12) does not have a high impact on the temperature of the top of the TES (layer 1). That is why the error the model produces is high during this period. But, during the day, the error is close to 0. The RMSE is quite low for the TES water temperature, as can be seen in Table 4.9.

Energy management system strategies

The present section deals with the developed energy management system. The principles on which thermal resource and thermal comfort management is conducted are presented in detail. The LNEG pilot building in Lisbon, Portugal, is the case study that allowed the proposed strategy to be evaluated in simulation (using real data). The strategy currently implemented in the LNEG pilot building, which is the reference strategy, is based on PID and rule-based controllers, used to satisfy thermal comfort constraints in the rooms and to efficiently manage the building's thermal resources. Regarding thermal comfort, the fan coil units (FCUs) are operated with PID controllers (PID FCU ). Regarding thermal resources, the solar collectors (SC) are operated with a PID controller (PID SC ) while the heat pump (HP) and the thermal energy storage (TES) are operated with a PID/rule-based controller (PID HP /RB TES ). This is described by Figure 4.22. The IMPROVEMENT energy management system relies on MPC. So, the two main ideas on which the system is based are (1) supervise with MPC controllers the PID/rule-based controllers currently used in the LNEG pilot building (2) take advantage of the PV power generation surplus to handle the interconnection between the electrical part and the thermal part of the microgrid the LNEG pilot building is equipped with. The MPC controllers are either optimization based or optimization free. Indeed, the implementation of MPC-based approaches can be computationally extensive and, as a result, the development of an efficient but also computationally-tractable energy management system was essential. So, with the proposed management strategy, the FCUs' PID controllers (PID FCU ) are supervised by an optimization-based MPC controller (MPC FCU ) or by an optimization-free MPC controller (MPC FCU ). The solar collectors' PID controller as well as the heat pump and TES's combined PID/rule-based controllers (PID HP /RB TES ) are supervised by an optimization-based MPC controller (MPC HP/TES ) or by an optimization-free MPC controller (MPC HP/TES ). In this chapter, thermal comfort management is presented in Section 5.1 while thermal resource management is presented in Section 5.2. For all predictive strategies, the time step is 10 minutes.

Thermal comfort management

In this section of the chapter, a review of thermal comfort management approaches is first presented, then the strategies proposed for thermal comfort management in buildings equipped with electrical and thermal microgrids are described.

Review of thermal comfort management strategies

A review is conducted first to highlight tendencies towards thermal comfort management. Ma et al. [START_REF] Ma | Coordinated Control for Air Handling Unit and Variable Air Volume Boxes in Multi-Zone HVAC System[END_REF] have proposed a coordinated strategy of distributed model predictive controller to guarantee a thermal comfort temperature for the occupants of different rooms. Sianen et al. [START_REF] Ooi Sian En | Predictive Thermal Comfort Control for Cyber-Physical Home Systems[END_REF] have developed an MPC controller to manage a HVAC system in a house in Japan. Tests were conducted for all seasons for this cyber-physical home according to three strategies: a PIDbased strategy, an MPC-based strategy taking advantage of the predicted mean vote (PMV) criteria, and an MPC-based strategy focusing on the minimization of the energy consumption. Depending on the followed objective, the MPC controller has offered better results than the PID controller. In [START_REF] Barata | Distributed Model Predictive Control for Thermal House Comfort with Auction of Available Energy[END_REF], Barata et al. use a distributed model-predictive controller to manage three different houses in order to maintain a reference temperature while minimizing the economic cost and favouring green energy. In a commercial building, Jeon et al. [START_REF] Jeon | White-Model Predictive Control for Balancing Energy Savings and Thermal Comfort[END_REF] have combined an MPC-based strategy developed under Matlab with EnergyPlus, used for modelling. The model taken into consideration is based on a real commercial building. Thus, the proposed MPC-based strategy can be compared to a reference strategy. It is shown that thanks to the proposed approach, savings were made while satisfying thermal comfort constraints. What is interesting is that the authors succeed to control the system while ensuring a low computational cost. An MPC strategy has been proposed by Garnier et al. [START_REF] Garnier | Low Computational Cost Technique for Predictive Management of Thermal Comfort in Non-Residential Buildings[END_REF] in order to satisfy thermal comfort in a non-residential building with a low computational cost. The main idea behind the strategy is to determine if the next time step is the right time step to turn on or off the HVAC system in order to guarantee thermal comfort for the occupants. The EnergyPlus software has been used to model the system and Matlab/Simulink has been used to develop the management strategy. Thanks to the computationally-tractable approach, energy consumption has been reduced while thermal comfort has been satisfied. Violante et al. [START_REF] Violante | An Energy Management System for Isolated Microgrids With Thermal Energy Resources[END_REF] have proposed an MPCbased EMS for an isolated multi-energy MG in order to minimize the fuel cost and satisfy thermal comfort constraints. This EMS is tested and validated on a real multi-energy microgrid that equips a building in Bari, Italy. Regarding thermal comfort, a small improvement can be made to reduce energy consumption even if thermal comfort is satisfied [START_REF] Violante | An Energy Management System for Isolated Microgrids With Thermal Energy Resources[END_REF]. Let us note that an interesting idea has been used to reduce the computational cost, which is to use non-uniform and reducing-time intervals for the prediction horizon of the MPC controller [START_REF] Violante | An Energy Management System for Isolated Microgrids With Thermal Energy Resources[END_REF]. Zhang et al. [START_REF] Zhang | Robustly Coordinated Operation of a Multi-Energy Microgrid With Flexible Electric and Thermal Loads[END_REF] have proposed a price-based demand response strategy to control the electrical of the thermal loads while satisfying thermal comfort constraints in a multi-energy MG. A day-ahead time window has been considered and has proven to be efficient for robust coordinated operation, maximising overall operation profits, and satisfy thermal comfort constraints [START_REF] Zhang | Robustly Coordinated Operation of a Multi-Energy Microgrid With Flexible Electric and Thermal Loads[END_REF]. Hirao et al. [START_REF] Hirao | Demonstrating a Predictive Control System for a Ground Source Heat Pump: A Case Study from an Industry-University-Government Cooperation Project for Renewable Energy Technologies in Japan[END_REF] have developed an optimization-free MPC-based strategy to manage a ground-source heat pump used to heat different buildings. Once production and consumption forecasts are provided, the optimization-free MPC strategy selects which heating mode has to be used along the prediction horizon among the different heating modes: the MPC controller switches between seven heating modes and decides for the best one. The heating mode is selected depending on thermal constraints satisfaction while energy consumption is the lowest. In this experimental approach, the authors have validated the use of an MPC strategy and claim that the approach can be implemented in a real urban environment [START_REF] Hirao | Demonstrating a Predictive Control System for a Ground Source Heat Pump: A Case Study from an Industry-University-Government Cooperation Project for Renewable Energy Technologies in Japan[END_REF]. From what has been published in the literature, there are already multiple research works dealing with MPC strategies for thermal comfort management. However, as mentioned in [START_REF] Hirao | Demonstrating a Predictive Control System for a Ground Source Heat Pump: A Case Study from an Industry-University-Government Cooperation Project for Renewable Energy Technologies in Japan[END_REF], optimization-free MPC strategies with a reducing time interval can be used for thermal comfort management [START_REF] Violante | An Energy Management System for Isolated Microgrids With Thermal Energy Resources[END_REF].

The optimization-free MPC strategy presented in this thesis has a reducing prediction horizon: the time the occupancy starts or ends is the last time step in the prediction horizon of the controller. The optimization-based MPC strategy has a prediction horizon of 24 h. Those prediction horizons are the same for thermal comfort management and thermal resource management. The work presented here is inspired from the idea of Garnier et al. [START_REF] Garnier | Low Computational Cost Technique for Predictive Management of Thermal Comfort in Non-Residential Buildings[END_REF] in order to select the best time step to turn on or off the HVAC system.

Existing PID controllers

For the currently implemented strategy (PID FCU ), the flow rate of the water circulating between the TES and the FCUs and the flow rate of the supply air between the FCUs and the rooms are operated with PID controllers. The PID parameters (Table 4.10) have been optimized thanks to PID Tuner, a fast and widely applicable single-loop PID tuning method available in Matlab. The transfer function is given by Equation (4.26), with K p the proportional gain, K i the integral gain, K d the derivative gain, e(p) the error at time step p, u the manipulated variable, and N the filter coefficient: The inverse Laplace transform is applied in order to obtain a state representation of the filtered PID controller, with x i is the integral action, x e the filtered derivative action, and t the continuous time step index:

                                ẋi (t) ẋe (t)      =      0 0 0 -N           x i (t)
x e (t)

     +      K i -N      e(t) u(t) = 1 K d N      x i (t)
x e (t)

     + K p K d N e(t) (4.27)
There are four different rooms in the building equipped with fan coil units. Each temperature's room must reach a comfort temperature of 21 • C. So each fan coil unit is controlled with the variable F s (the flow rate of the supply air) to satisfy this comfort temperature. The valve F t (the flow rate of the water circulating between the TES and the FCUs) is manipulated to maintain a temperature of 30 • C to always have enough heat for the water circulating inside the different FCUs. The PID parameters are summarized in Table 4.10. These parameters are different from one controller to another because the rooms in the LNEG building are very different in size and usage. The comfort temperature has to be satisfied between 8 AM and 6 PM each business day.

Proposed optimization-based model predictive controller

The MPC strategy presented in this section is inspired from the idea of Garnier et al. [START_REF] Garnier | Low Computational Cost Technique for Predictive Management of Thermal Comfort in Non-Residential Buildings[END_REF]. In this work, HVAC systems were used to heat rooms of a building. The idea was to check if turning on or off the HVAC system at the next time step was the best solution (or not) in order to satisfy thermal comfort constraints and to reduce energy consumption. If by turning off the HVAC system at the next time step, during an occupancy period, thermal comfort constraints are not satisfied, the best solution is to keep it running at the actual time step, otherwise the HVAC system can be turned off at the actual time step. If by turning on the HVAC system at the next time step, during a non-occupancy period, thermal comforts constraints are satisfied, then, the HVAC system is left off at the actual time step, otherwise, the HVAC system is turned on at that time step. That is why in this work an optimization-based MPC strategy (MPC FCU ) has been proposed to turn on or off the FCUs at the best time steps according to the principle previously described, but it has been enhanced. Not only the next time step is checked, but also all the time steps in the prediction horizon of the MPC controller to decide when the FCUs should be turned on or off. For both non-occupancy and occupancy periods, the objective function J FCU,z is the same (4.28). At the actual time step (k) of the simulation, J FCU,z , which is minimized (4.31), represents the energy Q FCU,z (4.29) (T in s and T out s are measured at each time step i along the prediction horizon H p ) consumed by the fan coil units and θ r,z are penalties when the comfort criteria is not satisfied. Those objectives are inspired by the ones used by Barata et al. [START_REF] Barata | Distributed Model Predictive Control for Thermal House Comfort with Auction of Available Energy[END_REF], i.e., maintaining the air temperature in the rooms between acceptable bounds and minimizing energy consumption. During winter, the aim is to keep the temperature between the chosen bounds: T min r = 20 • C and T max r = 22 • C. If the comfort temperature crosses a boundary, Equation (4.30) is used to calculate θ r,z with λ used to convert it into a valid unit ( • C h -1 ) thanks to D, the duration of the occupancy period divided by the duration of a day (10/24) and S, the length of the simulation (h). Let us note that the PID FCU strategy has to guarantee a comfort temperature of 21 • C, as PID strategies do not have as much flexibility as MPC strategies.

Y * FCU,z ia about the best time steps to turn on or off the FCU room z is equipped with. The time step is 10 min. The occupancy period lasts from 8 AM to 6 PM.

J FCU,z = ϕ f Q FCU,z + ϕ r θ r,z (4.28) Q FCU,z = 1 N p Hp i=1 ρ a × c a × F s,z × (T out s,z (k + i) -T r,z (k + i)) (4.29) θ r,z =λ H p i=1 ((T r,z (k + i) -T max r ) × (T r,z (k + i) > T max r )+ (T min r -T r,z (k + i)) × (T r,z (k + i) < T min r
)) with λ = D/S/N p (4.30)

Y * FCU,z = arg min (J FCU,z ) (4.31)

Proposed optimization-free model predictive controller

Optimization-based MPC strategies require large computation resources which makes them harder to implement in situ. The aim of this work is to propose computationally-tractable algorithms, that is why an optimization-free MPC strategy (MPC FCU ) has been developed. Doing so, this solution is easier to implement and should have a reasonable computational cost. The idea behind this optimization-free MPC strategy is the same as the previous one, i.e., anticipate the time at which the FCUs have to be turned on to reach a comfort temperature, or turned off depending on the period (which can be an occupancy or a non-occupancy period). The proposed approach is iterative. At the actual time step (k) of the simulation, the optimal time to turn on the FCUs of a room is determined with the MPC strategy. i is the time step in the prediction horizon H p of the MPC controller, with i ∈ [[1, H p ]]. During an occupancy period or a non-occupancy, the optimal time (k + i) to turn off the FCUs (occupancy period) or to turn them on (non-occupancy period) has to be found. To find this optimal time, the strategy checks at different time steps if thermal comfort constraints are satisfied in case the FCUs are turned on at these time steps. The latest time step is chosen to turn on the FCUs during a non-occupancy period. For occupancy periods, the idea is the same: turn off the FCUs as soon as possible.

For example (see Figure 4.23), k + i = 5 is the first time step selected to turn on the FCU before the occupancy period starts. If turning on the FCU at time step k + i allows the thermal comfort constraints to be satisfied, then the algorithm tests the activation of the FCU at time step k + i + 1 (k + i + 1 = 6 in the example). If the comfort temperature is still satisfied, then the Air temperature of a room when the FCU is turned on at 5 AM Air temperature of a room when the FCU is turned on at 6 AM Air temperature of a room when the FCU is turned on at 7 AM algorithm goes on and tests other future time steps above k +i+1. However, if time step k +i+1 does not allow to satisfy the comfort temperature, then the previous time step k + i is selected. In the considered example, time step k + i + 1 = 6 allows to satisfy the comfort temperature, so time step k + i + 2 = 7 is checked. However, this time step does not allow thermal comfort constraints to be satisfied, so time step k + i + 1 = 6 is chosen. Doing so, the FCU is turned on before the occupancy period starts and the PID controller works for thermal comfort. Then, the FCU is turned off before the end of the occupancy period at the optimal time step to reduce the amount of energy used to heat the rooms. The MPC controller lets the temperature in the rooms decrease.

Let us note that an estimation has been made for each room to determine what is an adequate time step to turn on or off the FCU. The MPC strategy then starts from this time step to know if this is a good instant to turn on the FCU or if there is a better time step. Thanks to that, the computational cost is reduced as not every time step has to be tested, the solution not being far from the estimation. Contrary to the PID controller which follows a temperature set-point of 21 • C, the optimization-free MPC controller, as the optimization-based MPC controller, tries to the satisfy temperature constraints (between 20 • C and 22 • C).

Thermal comfort results

In this section, comparisons between the PID/rule-based strategy and both MPC strategies are made. Those simulations were run on a calculation server composed of 2 processors Intel Xeon Gold 6230 @ 2.10GHz with 20 cores and 40 threads, 512 G o of RAM and an average CPU mark of 26657. The time step is 10 minutes. The calculation time needs to be lower than this value for each optimization in the rolling forecast horizon. Perfect forecasts are considered to A consideration has been made for the temperature of the water entering the FCUs. The goal regarding the TES is to maintain the temperature of the water in the 4 th layer at least at 38 • C. However, the first layer is hotter, but due to the distance between the storage room (which is at the top of the building) and the user rooms (floor), there is a loss in temperature. In the data collected, it can be assumed that the temperature of the water arriving in the FCUs is above 36 • C. So, this value is taken as an input for T in t . The on-site PID controllers are operating from 8 AM to 6 PM to always ensure a comfort temperature of 21 • C in each room. The simulation parameters can be found in Table 4.11.

Both MPC strategies have been able to identify the best time to turn on the FCUs at the beginning of the day and turn them off before the end of the day. Thus, the FCUs are working a little bit less time, and so energy consumption is reduced. With the PID FCU strategy, FCUs are always turned on during the day, from 8 AM to 6 PM. However, occupancy periods start at 8 AM, that is why it takes time to heat the different rooms, thus, the comfort temperature is not reached at the beginning of an occupancy period, as can be seen in Table 4.12. With the PID-based strategy (PID FCU ), the constraint violation is about 20 minutes (on average) per day. Furthermore, letting the FCUs turned on for the whole day is not necessary and results in a higher energy consumption. That is why energy consumption is lower with the MPC strategies, as can be seen in Table 4. [START_REF] Ziyati | Numerical Modeling of Large-Scale Compact Pv-Csp Hybrid Plants[END_REF].

Thanks to the prediction of the best time to turn on or off the FCUs, thermal comfort constraints are satisfied for all weather conditions and for all rooms. Furthermore, the heat transferred to the rooms is reduced by 26% for room R4, by 31% for rooms R1 and R2, and by 41% for room R3 during winter, and by 20% for room R3, by 54% for rooms R1 and R2, and by 58% for room R4 during spring with the MPC strategies, compared to the PID strategy. This high reduction observed during spring can be explained by the fact that the outdoor temperature is higher and close to the set-point temperature. So, FCUs do not have to be turned on for the whole day, ass it can be observed in Figures 4. [START_REF] Ryu | MPC Based Energy Management System for Hosting Capacity of PVs and Customer Load with EV in Stand-Alone Microgrids[END_REF] Furthermore, it has to be noted that 18 workers are used in parallel (see the Matlab website for details on parallel computing) with the MPC FCU strategy while the MPC FCU strategy does not, meaning that the computational cost could be even more reduced with similar computation parameters (the computational cost could be reduced by 60 in average). It means that the MPC FCU strategy is the strategy to choose for implementation in situ.

Energy resource management

In this section, the objective is to control the heat pump connected to the TES in order to reduce the economic cost and the carbon footprint while ensuring that system constraints are satisfied. Electricity can be bought from the main grid in order to feed the heat pump. However, an idea is to take advantage of the PV power generation surplus (see Figure 4.26 for the solar photovoltaic panels) to feed the heat pump. Doing so, less electricity is wasted and both the economic cost and the carbon footprint are reduced. To efficiently manage a multienergy microgrid, advanced strategies are needed. In the literature, some of those strategies have already been developed and the work presented in this chapter is inspired from some of those research works. In this section of the chapter, a review is first conducted to highlight the tendencies towards thermal resource management. Then, the strategy currently employed is described in Section 5.2.2, the optimization-based MPC strategy is described in Section 5.2.3 and the optimization-free strategy is described in Section 5.2.4.

Review of thermal resource management strategies

In smart grids and microgrids, heat pumps are able to enhance the penetration of renewable energy sources and allow economic cost reduction [START_REF] Fischer | On Heat Pumps in Smart Grids: A Review[END_REF]. Among the main strategies, nonpredictive control strategies (rule-based or planning strategies) and predictive control strategies [START_REF] Fischer | On Heat Pumps in Smart Grids: A Review[END_REF] can be used. A review has been conducted by Pean et al. and Fischer et al. [START_REF] Thibault | Review of Control Strategies for Improving the Energy Flexibility Provided by Heat Pump Systems in Buildings[END_REF][START_REF] Fischer | On Heat Pumps in Smart Grids: A Review[END_REF] regarding heat pump control strategies in buildings. The two kinds of strategies reviewed are rule-based strategies and MPC strategies. According to the authors, the main advantage of the rule-based strategy is its easy implementation, ensuring good performance. Regarding the MPC strategy, better results are obtained, however its implementation is hard and it is economically costly. The authors [START_REF] Thibault | Review of Control Strategies for Improving the Energy Flexibility Provided by Heat Pump Systems in Buildings[END_REF] conclude that there is a gap in the literature between theoretical experimental research works and in situ implementations regarding MPC. An optimization-based MPC strategy (a genetic algorithm is used) has been proposed by Ahmad et al. [START_REF] Waseem | The Effect of Model and Objective Function Mismatch in Model Predictive Control (MPC) for a Solar Heating System with a Heat Pump[END_REF] to manage a thermal MG equipped with a heat pump and a solar collector. In simulation, the MPC strategy performed well, but when it was tested in reality, load shifting was less effective. The authors claimed that a low-complexity objective function problem is preferable as the computational cost increases when the objective function problem is more complex.

As being said, there is a gap in the literature regarding the in-situ implementation of MPC strategies for heat pump management [START_REF] Thibault | Review of Control Strategies for Improving the Energy Flexibility Provided by Heat Pump Systems in Buildings[END_REF]. In this work, MPC strategies are proposed to manage a multi-energy microgrid equipped with a heat pump fed by the PV power generation surplus, which is quite uncommon in the literature. In addition only a few research works have considered the main grid power generation-related CO 2 emissions when charging or discharging batteries but it has been done for thermal MGs. In those cases, the carbon footprint has been reduced considering the main grid [START_REF] Dahl | Demand Response Potential of Model Predictive Control of Space Heating Based on Price and Carbon Dioxide Intensity Signals[END_REF][START_REF] Leerbeck | Control of Heat Pumps with CO2 Emission Intensity Forecasts[END_REF]. This is why, in this work, CO 2 emissions are considered in the thermal management of the LNEG's thermal MG.

Existing PID and PID/rule-based controllers

Regarding thermal resource management, there are two parts (see Figure 4.22) in the LNEG pilot building, . The first part is composed of solar collectors and a HWT. The second part is composed of a TES and a heat pump. The first part is managed with a PID controller (PID SC/HWT ), the second part is managed by a PID/rule-based controller (PID HP /RB TES ). The values of the valve controllers for the thermal resource management can be found in Table 4.15. The solar collectors supply heat to the HWT. Then, the HWT can supply heat to the TES. The water in the TES can also be heated by a heat pump. Finally, the heat of the TES is supplied to the rooms via FCUs. The temperature of the fluid leaving the solar collectors T out c is managed to reach 45 • C. The heat pump is managed using a PID controller, in order to maximise heat production (the electrical power of the heat pump is 4.84 kW). A PID controller [START_REF] Bastida | Dynamic Modelling and Control of Counter-Flow Heat Exchangers for Heating and Cooling Systems[END_REF] is here sufficient for good temperature control. For the TES, two different rules are proposed to either choose the heat pump or the HWT to supply heat to the TES. PID values of the valve controllers can be found in Table 4.15. First, the TES is heated until the temperature of the water in the layer 4 reaches 43 • C. The TES is heated again when the temperature of the water in the TES decreases below 38 • C. Secondly, the TES is heated with the HWT if the temperature of the water in the HWT is higher than one of the TES. For the heat pump, the maximum temperature is noted T max p . It has to be noted that the temperature sensor is located in the 4 th layer of the TES. That is why rules are dependent on this layer. The heat pump can only be turned on from 7 AM to 6 PM (the occupancy period starts at 8 AM, so heat is stored in advance before the occupancy period starts).

Optimization-based model predictive controller

For thermal resource management, the objectives whether the MPC strategy is optimisation based or not are the same: ensure that FCUs always have sufficient heat, reduce both the electricity cost and the carbon footprint, and take advantage of the PV power generation surplus. The heat pump can be turned on from 7 AM to 6 PM. Considering this constraint behaviour, the heat pump is heating the TES at the beginning of the day and at fixed schedules. However, α (the normalised sum of electricity prices and CO 2 emissions) in different countries may be higher in this time interval. It is necessary to use the heat pump at the best time steps while ensuring that the temperature of the water in the 4 th layer of the TES is higher than 38 • C during occupancy periods. A consideration that can also be addressed is the main grid power generation-related CO 2 emissions. When this quantity is forecasted, it is used to find periods during the day when energy is the cleanest to power up the heat pump. This idea has already been exploited by [START_REF] Dahl | Demand Response Potential of Model Predictive Control of Space Heating Based on Price and Carbon Dioxide Intensity Signals[END_REF] for the management of their heat pump.

The optimization-based MPC strategy (MPC HP/TES ) objective is to turn on the heat pump when there is a power surplus from the electrical MG or when electricity prices and CO 2 emissions are low [START_REF] Dahl | Demand Response Potential of Model Predictive Control of Space Heating Based on Price and Carbon Dioxide Intensity Signals[END_REF][START_REF] Leerbeck | Control of Heat Pumps with CO2 Emission Intensity Forecasts[END_REF]. The objective function J HP/TES (4.33) is minimized (4.36), with P HP the power used by the heat pump. k is the actual time step and i is the time step of the prediction horizon H p of the MPC controller with i ∈ [[1, H p ]]. The objective function is composed of a term ϕ a P m (k + i) × C r (k + i) referring to the minimization of the economic cost, a term ϕ b P m (k + i) × G r (k + i) referring to the minimization of the carbon footprint, with P m (k + i) the power of the heat pump, supplied by the main grid, and a term ϕ c θ h referring to the satisfaction of the minimum temperature of the water in the 4 th layer of the TES (T e,4 ), defined by Equation 4.35 converted to a valid unit ( • C h -1 ) using λ. Let us note that P m (k + i) is calculated using Equation (4.34), with P s (k + i) the PV power generation surplus.

J HP/TES = 1 N p Hp i=1 (ϕ a P m (k + i) × C r (k + i) + ϕ b P m (k + i) × G r (k + i)) + ϕ c θ h (4.33) P m (k + i) = P HP (k + i) -P s (k + i) with P m (k + i) ≥ 0 (4.34) θ h = λ H p i=1 ((38 -T e,4 (k + i))(T e,4 (k + i) < 38)) (4.35)
P * HP = arg min (J HP/TES ) (4.36)

Optimization-free model predictive controller

With the optimization-free MPC strategy (MPC HP/TES ), the way occupancy and nonoccupancy periods are handled differs but the algorithm is similar to the one used for thermal comfort management (see Section 5.1.3). An iterative research was performed. During nonoccupancy periods, the algorithm checks if the temperature of the water in the 4 th layer of the TES is higher than 38 • C during the whole occupancy period. Otherwise, the time step for which α is the lowest is selected to use the heat pump. If the thermal constraint is satisfied, the algorithm chooses this time step to turn on the heat pump. However if the TES thermal constraint is not satisfied, the algorithm looks for another time step to turn on the heat pump when α is low. During occupancy periods, the algorithm checks different time steps to turn off the heat pump and verifies if the TES thermal constraint is satisfied during the whole occupancy period. The closest time step to the actual time step is checked first to turn off the heat pump, otherwise future time steps are checked to turn it off.

Resource management results

Let us note that a parallel pool with 18 workers has been used for the MPC HP/TES strategy, whereas the two other management strategies do not rely on parallel computing. The so-called workers are Matlab computational engines executing tasks depending on the assignment given by the Parallel Computing Toolbox, the interested reader is referred to the Matlab website for details [239]. CO 2 emissions are taken into consideration thanks to electricitymap. The principal asset of the proposed MPC strategies is to choose the most suitable periods during the day to turn on the heat pump, while the PID/rule-based strategy implemented in situ can only turn it on from 7 AM to 6 PM. Comparisons between the proposed MPC strategies and the implemented strategy (the PID/rule-based strategy) are made from an economical point of view and considering the computational cost. In order to do so, 3 consecutive days are tested in simulation according to four different scenarios, defined as follows:

-Scenario 1: winter season, with a maximum global irradiance (at 45°) of 400 W m -2 , and no PV power generation surplus used;

-Scenario 2: winter season, with a maximum global irradiance (at 45°) of 400 W m -2 , and a small part of the PV power generation surplus used;

-Scenario 3: spring season, with a maximum global irradiance (at 45°) of 800 W m -2 , and no PV power generation surplus used;

-Scenario 4: spring season, with a maximum global irradiance (at 45°) of 800 W m -2 , and an important part of the PV power generation surplus used.

Regarding the economic cost (see Table 4.16) and CO 2 emissions (see Table 4.17), both MPC strategies are better than the rule-based strategy. The economic cost is divided by two, at least. This can be explained by the fact that the PID/rule-based strategy uses the heat pump during the day while electricity prices and CO 2 emissions are higher than in the night, while both MPC strategy are anticipating those periods and tend to use the heat pump when electricity prices and CO 2 emissions are lower. This behaviour can be observed in Figures 4.27, 4.28, and 4.29. Furthermore, in case of a PV power generation surplus, the amount of electricity bought from the main grid when using the MPC strategies is divided by two, at least, as both MPC strategies take into consideration the future behaviour of the system and how much heat will be provided to the TES and that it is not necessary to overheat it. Regarding the objective function J HP/TES (see Table 4.18), the PID/rule-based strategy does not always satisfy the thermal constraints, which results in penalties, as can be seen in Table 4.19 (for both MPC strategies, the value of θ h , i.e., the constraint satisfaction for the minimum temperature of the water in the 4 th layer of the TES (T e,4 ), is always 0). The average duration of constraint violation is about 2 hours and 30 minutes per day for PID FCU .

Let us note that for most scenarios, regarding the economic cost and the carbon footprint, the MPC HP/TES strategy is the best as it relies on optimization and is able to modulate the power consumption of the heat pump (between 0 and 4.84 kW) at each time step, making it more flexible to find the best solutions. The MPC HP/TES strategy can only determine the best time to turn on or off the heat pump (with a maximum power consumption of 4.84 kW), but compared to the PID HP /RB TES , strategy which is PID/rule-based, MPC HP/TES is much more efficient. A difference of 45% (during winter) to 95% (during spring) can be observed between the MPC HP/TES strategy and the PID HP /RB TES strategy, regarding the economic cost. Regarding the carbon footprint, a difference of 34% (during winter) to 95% (during spring) can be observed between the MPC HP/TES strategy and the PID HP /RB TES strategy. A difference ranging between 4.8 and 26.9% can be observed between both MPC strategies, regarding J HP/T ES . However, it can be noticed that the heat pump in case the MPC HP/TES strategy is used has many on/off sequences impacting its lifetime, which is not the case with the MPC HP/TES strategy.

Regarding the computational cost (Table 4.20), the MPC HP/TES strategy is expensive compared to the MPC HP/TES strategy, for which it is reduced by 99.9%. To conclude, from a com- T e,j : temperature of the water in the TES (layer j). F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the FCUs. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions. T e,j : temperature of the water in the TES (layer j). F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the FCUs. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions.

Islanding of the multi-energy MG

In this section of the chapter, a focus is made on islanded multi-energy microgrids.

Review of management strategies for islanded multi-energy microgrids

Only a few papers in the scientific literature deal with the management of multi-energy microgrids [START_REF] Arcos-Aviles | Fuzzy Energy Management Strategy Based on Microgrid Energy Rate-of-Change Applied to an Electro-Thermal Residential Microgrid[END_REF][START_REF] Arcos-Aviles | An Energy Management System Design Using Fuzzy Logic Control: Smoothing the Grid Power Profile of a Residential Electro-Thermal Microgrid[END_REF][START_REF] Pascual | Energy Management for an Electro-Thermal Renewable-Based Residential Microgrid with Energy Balance Forecasting and Demand Side Management[END_REF][START_REF] Tang | Model Predictive Control for Thermal Energy Storage and Thermal Comfort Optimization of Building Demand Response in Smart Grids[END_REF][START_REF] Kia | Short-Term Operation of Microgrids with Thermal and Electrical Loads under Different Uncertainties Using Information Gap Decision Theory[END_REF] in particular with the management of islanded multi-energy microgrids [START_REF] Mohseni | Off-Grid Multi-Carrier Microgrid Design Optimisation: The Case of Rakiura-Stewart Island, Aotearoa-New Zealand[END_REF][START_REF] Moazeni | Dynamic Economic Dispatch of Islanded Water-Energy Microgrids with Smart Building Thermal Energy Management System[END_REF][START_REF] Bagheri | A Novel Approach for Sizing Thermal and Electrical Energy Storage Systems for Energy Management of Islanded Residential Microgrid[END_REF]. Some papers in the literature are noticeable. This MG combines electrical, heating, cooling, hydrogen and biogas systems. Different meta-heuristic algorithms have been proposed to manage this system. Thanks to the proposed approach, the economic cost has been significantly decreased as dependence on diesel generators has been reduced. Moazeni [START_REF] Moazeni | Dynamic Economic Dispatch of Islanded Water-Energy Microgrids with Smart Building Thermal Energy Management System[END_REF] has worked on the thermal management of buildings equipped with solar photovoltaic panels and supported water demand in a multi-energy MG with a scheduling method. In addition, an energy management system is proposed in [START_REF] Bagheri | A Novel Approach for Sizing Thermal and Electrical Energy Storage Systems for Energy Management of Islanded Residential Microgrid[END_REF] to handle energy exchanges in a multi-energy MG under islanding operation in order to reduce dependence on a lithium battery allowing the authors to choose a smaller battery. Thus, studying a multi-energy MG operating in islanded mode is rare and interesting. Furthermore, managing this kind of system using a predictive strategy in the context of a real case study does not seem to have been done. This is why different tests have been conducted in the scope of this work under some considerations.

Scenarios and configurations

4-day simulations have been performed, according to 3 islanding scenarios and 4 multi-energy MG configurations:

-Scenario 1: islanding is expected at 6 PM in the first day and the multi-energy MG has to remain off-grid until the end of the simulation; -Scenario 2: islanding is expected from 1 PM in the first day to 1 PM in the third day; -Scenario 3: islanding is expected from 8 AM in the first day to 8 AM in the second day.

The different configurations are defined as follows:

-Configuration 1: power consumption and PV power generation are doubled, compared to the real data provided by the LNEG. The battery's power is 2.69 kW and the battery's capacity is 10 kWh.

-Configuration 2: power consumption is doubled and PV power generation is unchanged, compared to the real data provided by the LNEG. The battery's power is 2.69 kW and the battery's capacity is 10 kWh.

-Configuration 3: power consumption and PV power generation are multiplied by 4 and 2, respectively, compared to the real data provided by the LNEG. The battery's power is 2.69 kW and the battery's capacity is 10 kWh.

-Configuration 4: power consumption and PV power generation are multiplied by 4 and 2, respectively, compared to the real data provided by the LNEG. The battery's power is 5 kW and the battery's capacity is 15 kWh. Also, days with low global irradiance were chosen (around 400 W m -2 ) to highlight if in case of bad weather conditions, MG islanding is successfully achieved or not. The PV power generation surplus is high (thanks to the doubled PV power generation, except in one case, i.e., for Configuration 1), but the heat provided by the solar collectors is low. The islanding capability of the MG is its capability to satisfy both critical loads and constraints during islanding. In order to enhance the MG islanding capability, thermal comfort has been slashed. Previously, the air temperature set point was 21 • C for the PID/rule-based strategy and the bounds for the MPC strategies were 20 • C and 22 • C. In case of degraded situations like islanding, satisfying such temperatures might be hard during winter and this implies that thermal consumption will be high to satisfy. However, the thermal consumption of the microgrid can be reduced if a lower set point temperature is chosen. That is why we decided for a set point temperature of 19 C. The same idea is expressed for the TES in order to reduce the multienergy microgrid consumption. A lower set point temperature for the water in the TES can be chosen. There are 2 scenarios for the TES thermal constraint (4 th layer): the water temperature has to be above 36 • C or above 38 • C. Thus, four groups have been defined regarding thermal constraints, for a total of 48 tests to be conducted:

-Group A: the air temperature set point is 21 • C, the TES thermal constraint is 38

Electrical MG islanding: strategy and results

The LNEG electrical MG studied in this chapter is sized to be capable of islanding. Its islanding capability is validated in simulation (4 days) using the optimization-based MPC strategy developed for electrical NMG management (see Chapter 3 for the principles on which this strategy is founded). It has to be noted that energy consumption of the MG is always very low and lower than the PV power generation during the day. The bank of batteries is charged using the PV power generation surplus (for the solar photovoltaic panels, see Figure 4.26). During the night, energy consumption is very low and the batteries can easily support the MG load, as shown in Figure 4.30. The electrical MG can always be disconnected from the main grid, whatever the configuration. It is not worth analysing the economic cost and CO 2 emissions as the optimization-based MPC strategy do not have many possibilities to charge the bank of batteries: it is charged using the PV power generation surplus which is more than enough. Choosing a small bank of batteries is better as not a lot of energy is necessary to support the MG load. If a small bank of batteries is chosen, the PV power generation surplus would be higher. Thus, this higher PV power generation surplus could feed the thermal microgrid.

Thermal MG islanding: strategies and results

PID/RB MG and MPC MG are the PID/rule-based strategy and the optimization-free MPC strategy, respectively. Both are used for thermal resource and users' thermal comfort management. PID/RB MG combines PID FCU for FCU management and PID HP /RB TES for heat pump and TES management. MPC MG combines MPC FCU for FCU management MPC HP/TES for heat pump and TES management. A focus is now made on the multi-energy MG with a research question: will the predictive strategy perform better than the PID/rule-based strategy in a case where thermal constraints are hard to satisfy? The term C MG (4.37) is about the evaluation criterion for thermal resource and thermal comfort management. It includes the economic cost, the CO 2 emissions, the TES temperature constraints and the rooms temperature constraints. The term C HP/TES (4.38) is about the evaluation criterion for thermal resource management. Let us note that ϕ c and ϕ d have a value of 500 and 1000, respectively, as θ r,z is the most important criterion and θ h the second most important one. Those values are high as, often, the values of θ r,z or θ h are relatively small compared to the CO 2 emissions. This is an arbitrary choice that has proven to be a good option regarding the simulation results presented in this section.

C MG = 1 N p H p i=1 (ϕ a P m (k + i) × C r (k + i) + ϕ b P m (k + i) × G r (k + i)) + ϕ c θ h + ϕ d θ r,z (4.37)
6 Islanding of the multi-energy MG 4.21), the TES, with PID/RB MG , is heated until it reaches 43 • C. During islanding, regardless of the configuration, PID/RB MG is able to nearly meet the thermal demand to heat the rooms (an example is presented on Figure 4.35). Unfortunately, this is not the case with MPC MG . Indeed, the principle on which this strategy is based is to anticipate heat demand during occupancy periods. However, for this scenario, MPC MG finds a solution for the first occupancy period during which islanding starts (at 1 PM), which means that such strategy would not be able to anticipate heat demand for the second occupancy period as the first one is not finished. In Figure 4.34, it can be observed that there is still an energy consumption (related to the FCU usage) at 1:10 PM, so the occupancy period is not over and it results on unsatisfied TES constraints, as it can be seen in Figures 4. 34 and 4.35. An improvement could be to additionally take into account the islanding period that follows the next occupancy period, but it is a complex task. It would be necessary to determine if the best choice is to use the HP for two occupancy periods rather than only for one. Another idea would be to add a constraint to the TES with MPC MG in order to heat the TES until it reaches 43 • C. Doing so, maybe, enough heat would be available during islanding. It would be interesting to make these choices in future algorithm developments.

On the contrary, let us note that for Group A ( T min r ; T max r = {20 • C; 22 • C}, T e,4 ≤ 38 • C) and the Scenario 1, islanding is expected later and there is no more consumption after 1:10 PM, as a result the TES can be heated and prepared for islanding, using MPC MG , as can be seen in Figure 4.32. In addition, PID/RB MG does not stop heating the TES (Figure 4.33) during the first occupancy period as there is still a consumption after 1:10 PM with this strategy. Less heat is available in the TES with PID/RB MG . That is why during the islanding period, as the consumption of the microgrid managed with PID/RB MG is higher than with MPC MG , the TES constraint is harder to satisfy with PID/RB MG than it is with MPC MG (Table 4.22). However, there is still a small gap observed for Scenario 1 and Group C ( T min r ; T max r = {18 • C; 20 • C}, T e,4 ≤ 38 • C), Configuration 3 and Configuration 4: PID/RB MG can use a small part of the heat provided by the solar collectors at 8 AM in the third day of the simulation, when the heat demand starts. Keep in mind that satisfying the comfort temperature is the main objective to be met. When the air temperature set point in the rooms is 19 • C, it is not necessary to heat as much the TES to meet this thermal need. PID/RB MG does not satisfy the comfort temperature (Table 4.23), which is of most interest in this case, and it results in poorer results regarding the criterion C M G for PID/RB MG and for all cases (Table 4.24). Furthermore, energy consumption is reduced by 38% with MPC MG and T min r ; T max r = {18 • C; 20 • C} compared to PID/RB MG . In the remaining cases, according to the results dealing with the criteria C HP/T ES (Table 4.21) and C M G (Table 4.24), MPC MG outperforms PID/RB MG regarding constraint satisfaction. For Scenario 1, it becomes very difficult to satisfy an air temperature in the rooms of 21 • C because the islanding time is extended for three days. However, this is no longer the case when the air temperature set point is 19 • C and the TES has to satisfy a criteria of 36 • C. Duration of TES constraint violation is reduced by 80% with MPC MG compared to PID/RB MG , resulting in higher islanding capabilities for MPC MG . For Scenario 3, MPC MG gets better results in all cases compared to PID/RB MG , even if islanding lasts 2 days. An example can be seen in Figure 4.36 (MPC MG ) and in Figure 4.37 (PID/RB MG ). In all cases, when MPC MG performs better regarding the criterion C HP/T ES , this is due to the fact that the rooms do not need to be heated all the day but only for a short period.

For Group A ( T min r ; T max r = {20 4.24) show that MPC MG outperforms PID/RB MG .

When the minimal and maximal comfort temperatures are reduced, the MG islanding capabilities are enhanced by 72% with MPC MG . In this context, with MPC MG , energy consumption is reduced by 74% and the electricity bought from the grid is reduced by 80%. Let us note that the average TES constraint violation has been reduced by 80% with MPC MG , moving from Finally, the size of the PV panels does not impact that much the TES constraint for Configuration 2 (the PV power generation surplus is the same for both strategies). The way the rooms are heated is the most impacting result if the temperature to be reached is 21 • C. To conclude, it is a better choice to reduce the TES constraint and the air temperature set point in the rooms. During islanding, the situation is degraded and limiting its impact on the occupants in the building is necessary. Furthermore, MPC MG is the best candidate for an in-situ implementation. temperature of the water in the HWT. T c : temperature of the solar collector fluid. T e,j : temperature of the water in the layer j of the TES. F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the fan coil units. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions. temperature of the water in the layer j of the TES. F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the fan coil units. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions. temperature of the water in the HWT. T c : temperature of the solar collector fluid. T e,j : temperature of the water in the layer j of the TES. F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the fan coil units. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions. temperature of the water in the layer j of the TES. F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the fan coil units. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions. temperature of the water in the HWT. T c : temperature of the solar collector fluid. T e,j : temperature of the water in the layer j of the TES. F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the fan coil units. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions. This chapter deals with an integrated mathematical modelling approach for a solar hot water system for space heating based on the first law of thermodynamics. The solar hot water system is composed of solar collectors, a hot water tank, a thermal storage tank, and fan coil units. These models are simulated using MATLAB/Simulink in order to mimic the dynamics of the LNEG pilot building situated in Lisbon, Portugal. The models have been validated with data collected from that building. In this study, several questions were asked and answered:

-How to manage the interconnection between the thermal part and the electrical part of a multi-energy microgrid?

-What is the benefit of a predictive strategy? Is it possible to control its computational cost?

-What performance for the predictive strategy in islanded mode?

The first question is answered by taking advantage of the PV power generation surplus to feed the heat pump, which creates an interconnection between the electrical MG and the thermal MG. Regarding the second question, performance is increased by 39% with MPC FCU and MPC FCU (PID FCU is the reference), 89% with MPC HP/TES and 88% with MPC HP/TES (PID HP /RB TES is the reference). All constraints are satisfied. In addition, the computational cost is reduced by 98% with MPC FCU (MPC FCU is the reference) and 99.9% with MPC HP/TES (MPC HP/TES is the reference). Regarding the third question, performance is increased by 86% and the islanding capability is increased by 76% with MPC MG (PID/RB MG is the reference).

Then, two kinds model predictive control strategies were proposed, the first one is optimization-based, the second one is optimization-free. Both the optimization-based and optimization-free MPC strategies are evaluated (including in islanded mode) regarding thermal resource and thermal comfort management. The reference strategy (which is similar to the one currently applied in the real building) is PID/rule-based. Both MPC strategies outperform the PID/rule-based strategy. They provide high performance in terms of energy consumption, economic cost, and CO 2 emissions reduction. All the system constraints are satisfied. Regarding thermal comfort management, the simulations highlight that the PID/rule-based strategy used to control the fan coil units is not always capable of ensuring thermal comfort whereas both MPC strategies are successful when it comes to satisfy thermal comfort constraints in the rooms of the LNEG building. The optimization-free MPC strategy used to control the fan coil units is as effective as its optimization-based counterpart but has a lower computational cost, making this strategy the best choice for in-situ implementation.

Regarding thermal resource management, the optimization-free MPC strategy used to control both the heat pump and the thermal energy storage is very effective, compared to the PID/rule-based strategy, even if the most effective strategy is the optimization-based MPC strategy. However, the optimization-free MPC strategy has a much lower computational cost compared with its optimization-based counterpart, which, in addition, tends to degrade the heat pump lifetime. An attempt was made to include a criterion to minimize this change of state with P HP (k + i + 1) -P HP (k + i). However, it was not easy to find good coefficients in the objective function to make the MPC strategy efficient regarding every criterion. That is why the optimization-free MPC strategy used to control both the heat pump and the thermal energy storage is a very good candidate for in-situ implementation.

Finally, the optimization-free MPC strategy is better at satisfying temperature constraints than the rule-based strategy during islanding events, sometimes at the detriment of the economic cost or the CO 2 emissions. The optimization-free MPC strategy therefore appears to be a good candidate for efficient thermal resource and thermal comfort management in case of islanding, although questions remain. It should be determined what is the best choice for the use of the heat pump in certain cases: should the needs of the TES be anticipated during the current and the next periods when islanding is planned? Or should the TES be heated until it reaches 43 • C, using the MPC strategy?

It has to be taken into consideration that the thermal dynamical model has to be implemented within the programmable logic controller. Thus, it requires computational resources. This might be a barrier for in situ implementation. Simplifications of the model can be made, especially regarding the stratified thermal storage tanks.

The main contribution presented in this chapter are: (1) a computationally-tractable optimization-free MPC strategy for the management of multi-energy MGs, (2) the strategy takes advantage of the PV power generation surplus to handle the interconnection of the electrical and thermal ports of such MGs, and (3) an evaluation of the islanding capability of the LNEG's multi-energy MGs.

Future work will focus on the in situ validation of the proposed strategy. In addition, it could be interesting to investigate other MG components -hydrogen storage, wind turbines, electric vehicles -and to check for the performance of the strategy during summer. Also, a simplified model (like a discrete model instead of a dynamic model) should be used so that the implementation will be easier.

Let us note that the case study is a small-scale multi-energy MG. The strategies described in this chapter should be evaluated for one or more public buildings, or for collective buildings. In addition, batteries and electric vehicles could be used to supply energy to the heat pump used for room heating in case of critical needs, such as in a hospital.

Furthermore, model predictive control relies on forecasts. Forecasts are considered to be perfect in this study. Using forecasts may result in forecasting errors and may negatively impact the economic cost, the carbon footprint and constraints satisfaction. Let us note that the computational cost may get higher. Also, human behaviour is complex and so, hard to forecast. For example, someone may open a window, or turn off a FCU while the predictive strategy are operating in rooms, which can cause an air temperature drop, or there can be more or less people than expected etc. This directly impacts the predictive management strategies. That being said, forecast algorithms have to be developed and the robustness of the strategies to forecast errors has to be evaluated.

Conclusion and perspectives Conclusion

Nowadays, the growing distributed generation impacts the main grid. Microgrids and networked microgrids are arising in order to increase the penetration of this distributed generation into the main grid. Efficient management strategies are needed to face challenges such as resiliency, power supply reliability, and energy self-sufficiency. Thus, in this research work, mostly taking part of the Interreg Sudoe project IMPROVEMENT, predictive management strategies have been developed to reach economical, ecological, islanding, and thermal comfort objectives while satisfying system constraints in electrical, thermal, and multi-energy microgrids. However, standard predictive strategies suffer from high complexity, which is an obstacle for in-situ implementation. Generally, this complexity is also reluctant for investors and microgrid operators. Currently, rule-based algorithms are preferred for in-situ implementation. Thus, the main objective of this research work was to propose predictive management strategies for microgrids, easier to implement than standard predictive strategies. In order to produce satisfying solutions for the management of microgrids, the development of computationally-tractable algorithms and optimization-free model predictive control (MPC) strategies have been proposed. An attempt has been made to answer the question asked in the Introduction: is it possible to develop predictive algorithms that are easy to implement, require few computational resources and provide a satisfactory level of performance? To answer this question, the best compromise between performance and computational cost has to be found. The developed strategies have to be more efficient than PID/rule-based strategies (regarding economical, ecological, and technical objectives) with reduced computational cost, compared to standard predictive strategies. The contribution and the results obtained are as follows:

-a state of the art providing a picture of management strategies for microgrids has been introduced in Chapter 1. Thanks to this state of the art, some gaps have been found in the literature, like not considering CO 2 emissions, the lack of methods to deal with the management of electric vehicles (EVs), considering planned islanding operation for networked microgrids (NMGs) or multi-energy microgrids, and the lack of works dealing with real multi-energy microgrids;

-Chapter 2 focuses on the development of predictive algorithms for the management of electrical microgrids equipped with fixed and EV batteries. In microgrids equipped with a bank of batteries and EV batteries, the management of all storage systems can be a complex task. Usually, batteries are managed independently, but to achieve high performance, important computational resources are required, especially when the number of vehicles is high. Therefore, a strategy for the management of a fictitious battery (grouping all batteries together) has been proposed. The predictive strategy proposed for the management of a fictitious battery outperforms the reference strategy, which is rule-based, but is less efficient than the predictive strategy proposed for the management of independent batteries. The latter strategy has a higher computational cost than the strategy proposed for the management of a fictitious battery, making this strategy a good candidate for in-situ implementation;

Conclusion and perspectives -in Chapter 3, a predictive management strategy for NMGs has been developed considering critical loads and the availability of electric vehicles, providing robustness to the NMG in case of planned islanding. The islanding capability and the successfulness of the islanding operation (critical loads are successfully supported during islanding) have been evaluated. Islanding is one of the assets of microgrids regarding networked microgrids. In the literature, for networked microgrids, in case of islanding, priority levels are given to each microgrid depending on the criticality of their loads. Storage systems are discharged to support critical loads first and then, if it is possible, they support non-critical loads. In this manuscript, this idea has been improved: electric vehicles are now part of microgrids and can be used as storage system to support critical loads. EV batteries and a bank of batteries can be used in a standard discharging mode or in a deep discharging mode. As more energy is available, thanks to the use of EV batteries and a deep discharging mode, it is easier to achieve a successful islanding. Thanks to the proposed approach, microgrids can disconnect from the main grid, support critical loads, and are more robust and energy self-sufficient. With the MPC strategy, nearly all islanding operations, for different scenarios, considering either the standard discharging mode or the deep discharging mode, were successfully achieved. Thus, critical loads are successfully supported with the proposed strategy. A reward system has also been proposed allowing the networked microgrid to get a financial retribution and to reduce its economic cost;

-studying multi-energy (thermal and electrical) microgrids is not widespread in the literature. In Chapter 4 and in the context of the Interreg Sudoe project IMPROVEMENT, a multi-energy microgrid equips a public building. An optimization-free MPC strategy was developed to manage thermal resources and users' thermal comfort in grid-connected mode and in islanded mode. First, this strategy has been compared to an optimization-based MPC strategy in grid-connected mode. The computational cost has been significantly reduced while satisfying constraints and providing good performance regarding economic cost reduction and CO 2 emissions reduction. So, the optimization-free MPC strategy is a good candidate for in-situ implementation in grid-connected mode. In the literature, predictive strategies to manage multi-energy microgrids in case of planned islanding does not seem to have been proposed. In this manuscript, the planned islanding of the multienergy microgrid has been tested and validated in simulation. Compared to a reference strategy (PID/rule-based algorithms), the optimization-free MPC strategy performs better overall, regarding thermal resource and users' thermal comfort management. Thus, the optimization-free MPC strategy is a good candidate for the in-situ implementation whether the microgrid is operated in grid-connected mode or in islanded mode;

-main grid power generation-related CO 2 emissions are estimated in real time thanks to websites such as rte-france.com and Electricitymap.org. Taking into consideration these real-time emissions was not done for a microgrid or a network of microgrids equipped with batteries and a fleet of EVs, and rarely done for multi-energy microgrids. With the acceleration of global warming due to an increase of the rate of CO 2 in the atmosphere (among other reasons), it would be interesting to reduce the carbon footprint of a microgrid. An idea has been explored to reduce the carbon footprint of microgrids in this work. First, thanks to the previous mentioned data, it is possible to develop a forecast module to predict future main grid power generation-related CO 2 emissions. Then, it is possible to consider a term related to those emissions in the controller objective function, in order to minimize them. Thus, the carbon footprint is reduced. That is why in this manuscript, CO 2 emissions were considered in the management of microgrid resources. The CO 2 emissions were successfully reduced using predictive strategies, compared with rule-based strategies. Using the developed predictive strategies, electricity is bought from the main grid to meet the demand when CO 2 emissions are low.

In this manuscript, it has been demonstrated that developing predictive management strate-gies with high efficiency and a low computational cost for microgrids and networked microgrids for in-situ implementation is possible. An interesting compromise between performance and complexity has successfully been found. In the future, microgrids could get real-time access to computational resources. More complex strategies could be implementable, but it is debatable whether this is a good thing. Furthermore, relying on real-time access (often in a remote way) to computational resources (using standard predictive strategies) arises other problems related to cyber security, data privacy, user acceptability, environmental considerations (for example, calculation servers require a lot of water to cold them), quality of internet access for remote microgrids, etc. There will still be computational resource challenges. Thus, predictive strategies requiring low computation resources are promising tools for the near future. Implementation of the developed algorithms in an embedded system reduces dependency on large computational resources and mitigates data privacy and cyber security risks. Finally, most of the strategies presented in this thesis can be adapted to other microgrid configurations or other kind of systems, like multi-energy microgrids with different components or with more than two energy vectors or network of networked microgrids, for example.

Perspectives

Improvements can be made to the algorithms presented in this manuscript and there are still avenues of research to be investigated:

-in this work, perfect forecasts of exogenous inputs are considered. As a perspective, time series forecasting algorithms based on machine learning techniques will be developed for the intrahour/intraday forecasting of energy consumption, PV power generation, etc. The MPC strategies' robustness to forecast errors will be evaluated. Also, it could be interesting to combine the forecasts provided by different forecast modules in a context of networked microgrids. Inspired by parallel computing, this could improve forecast accuracy;

-as seen in the review on management approaches for microgrids proposed in this manuscript, most of the research works are done in simulation only, there are few experimental research works. This can be explained by the fact that such works require forecasts and important computation resources. In this manuscript, unfortunately, implementation of the algorithms was not possible due to technical reasons.

-developing a physical model is not an easy task, and inaccuracy leads to performance degradation regarding resource management in microgrids. Dynamic models can be used in the development of MPC strategies, as they are accurate but require significant computational resources. A way to decrease this computational cost is to use simplified models in the optimization process. Another possibility could be using discrete modelling instead of continuous modelling. The latter could be used for modelling the thermal microgrid studied in Chapter 4 in order to reduce the computational cost. Thus, in-situ implementation of the optimization-free MPC strategy could be facilitated.

-unfortunately, in Chapter 4, regarding thermal resource management in an islanded multienergy microgrid, the optimization-free MPC strategy is not able to anticipate heat demand for consecutive occupancy periods. Indeed, the principle on which this strategy is based is to anticipate heat demand for only one occupancy period (the next one), not two or three. An improvement could be to additionally take into account the islanding period that follows the next occupancy period, but it is a complex task. Another idea would be to increase the value of the thermal constraint related to storage systems, depending on the number of occupancy periods during a planned islanding. The thermal constraint value could increases in function of the number of occupancy periods there are in the islanding period. Doing so, enough heat would be available during islanding for consecutive occupancy periods. It would be interesting to make these choices in future algorithmic developments.

-MPC appears to be an interesting tool for managing microgrids. This kind of strategy offers stability, robustness, feasibility, and ability to manage constraints. However, it has shortcomings in terms of computational complexity and configuration. One possibility to deal with this problem is to use reinforcement learning or to combine MPC with reinforcement learning. Of course, data are needed. An interesting idea is to use reinforcement learning to configure MPC controllers.

-storage systems, flexible loads and management strategies play a major role in smart microgrids. Usually, in the industrial domain, rule-based algorithms are preferentially used in the sizing process of microgrids whereas predictive strategies should be considered. Indeed, storage systems can be reduced in size when a predictive strategy is used;

-more research should be conducted on the sizing of fixed and mobile batteries considering CO 2 emissions and other pollution-related considerations;

-different works exist in the literature dealing with voltage and frequency regulation, power quality management and energy resource management. The literature lacks predictive strategies with wide objectives combining, for example, voltage regulation with energy resource management. A complex task would be to combine energy resource management while ensuring voltage and frequency quality, in other words, to propose a versatile predictive strategy with wide coverage. In such a strategy, different time scales have to be taken into consideration: for example, voltage regulation is about milliseconds while energy flux management is about hours. Some questions can be asked: to what extent such a versatile predictive strategy performs better than standard predictive strategies operating in a decentralized way? Is the solution too complex to be implemented in situ? Can simplifications be made? Those questions need to be answered, even if the proposed solution is too complex, has a high computational cost and performance does not increase significantly.

-The impact of a deep discharge of the batteries on their lifetime has to be evaluated.

In recent years, the penetration of renewable energy sources into the main grid has increased significantly. Power generation has evolved from a centralized structure to a more decentralized one. In this context, small-scale grids, i.e., microgrids, are deployed to support distributed generation. The aim of this work is to establish the proof of concept of computationally-tractable predictive strategies for the efficient management of energy sources in thermal, electrical, and multi-energy microgrids. These strategies have to provide better economical, ecological, and technical performances compared to PID/rule-based strategies. Firstly, a model predictive control strategy has been developed to manage the electrical resources of a microgrid equipped with electric vehicles. In this strategy, a fictitious battery, i.e., a unique batteries combining a bank of batteries and EV batteries, is managed. Secondly, a model predictive control strategy has been developed to manage the electrical resources of a networked microgrid. This strategy is able to disconnect the networked microgrid from the main grid while satisfying critical loads by taking advantage of storage systems. Finally, this work is part of the Interreg Sudoe project IMPROVE-MENT, whose aim was to help transforming public buildings facing critical loads into net-zero energy buildings thanks to multi-energy microgrids. To this end, a computationally-tractable optimization-free predictive strategy has been proposed in order to manage the microgrid thermal resources and users' thermal comfort. In addition, the microgrid islanding capability has been evaluated. According to the results obtained in simulation for all microgrids, the proposed computationally-tractable predictive strategies are more efficient (regarding economical, ecological, and technical objectives) than PID/rule-based strategies. Such predictive strategies have similar performance and a lower computational cost than standard predictive strategies, which is of most interest in the context of in-situ implementation.

Résumé

Ces dernières années, la pénétration des sources d'énergie renouvelable au sein du réseau électrique de distribution a considérablement augmenté. La production d'électricité, auparavant centralisée, a évolué vers une structure plus décentralisée. Dans ce contexte, des réseaux à petite échelle, appelés microréseaux, sont déployés pour soutenir cette production décentralisée. L'objectif de cette thèse est d'apporter la preuve de concept de stratégies prédictives à coût calculatoire maîtrisé pour la gestion efficace des microréseaux thermiques, électriques et multi-énergies. Celles-ci doivent fournir de meilleures performances économiques, écologiques et techniques par rapport à des stratégies fondées sur du contrôleur PID ou des règles. Premièrement, une stratégie prédictive a été développée afin de piloter les ressources d'un microréseau électrique équipé de véhicules électriques. Comparativement à des stratégies prédictives standard, elle implique la gestion d'une batterie fictive, c'est-à-dire d'une batterie regroupant un banc de batteries et les batteries de véhicules électriques. Deuxièmement, une stratégie prédictive a été développée afin de piloter les ressources d'un réseau de microréseaux électriques équipé de systèmes de stockage. Elle permet de déconnecter le réseau de microréseaux du réseau électrique et de satisfaire les charges critiques en tirant profit des systèmes de stockage. Enfin, cette thèse s'inscrit dans le cadre du projet Interreg Sudoe IMPROVEMENT, qui avait pour objectif de transformer des bâtiments publics ayant à faire face à des charges critiques en bâtiments à faible consommation d'énergie, grâce à des microréseaux multi-énergies. Pour ce faire, une stratégie prédictive sans optimisation, à coût calculatoire maîtrisé, a été proposée afin de gérer les ressources thermiques et le confort thermiques des usagers. Sa capacité d'îlotage a été évaluée. Au vu des résultats obtenus en simulation, les stratégies prédictives à coût calculatoire maîtrisé sont plus efficaces que des stratégies PID ou basées sur des règles. De plus, ces stratégies prédictives présentent de très bonnes performances économiques, écologiques et techniques avec l'avantage d'un coût calculatoire inférieur à celui de stratégies prédictives standard. Ceci est d'un grand intérêt, dans une optique d'implémentation in situ.

  . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Schematic of a multi-energy microgrid (IMPROVEMENT) [17]. . . . . . . . . . . 8 Hospital equipped with a multi-energy microgrid facing critical loads (IMPROVE-MENT) [17]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Schematic of the energy management system developed within the framework of the Interreg Sudoe project IMPROVEMENT [17]. . . . . . . . . . . . . . . . . . 10 xi LIST OF FIGURES 1.1 Number of research papers dealing with MG and NMG management published in peer-reviewed journals owned by the leading publishers of scientific content from 2002 to 2021. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 1.2 The methods used for MG/NMG management with a focus on years 2011, 2016 and 2021. The research papers considered here -these papers deal with different aspects of MG/NMG management -are published in peer-reviewed journals owned by the leading publishers of scientific content. . . . . . . . . . . . . . . . . 22 1.3 MG management vs. NMG management with a focus on years 2011, 2016 and 2021. The research papers considered here -these papers deal with different aspects of MG/NMG management -are published in peer-reviewed journals owned by the leading publishers of scientific content. . . . . . . . . . . . . . . . . . . . . 22 1.4 Time line of some MG projects. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.1 Synopsis of the studied electrical microgrid. . . . . . . . . . . . . . . . . . . . . . 55 2.

  E f b b : energy stored (bank of batteries) with the MPC fb strategy. E ib b : energy stored (bank of batteries) with the MPC ib strategy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 2.9 Picture of the calculation server. . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 LIST OF FIGURES 2.10 Computation time with ϕ a = 1 (1-day simulation). T f b : computation time associated with the predictive management of a fictitious battery. T ib : computation time associated with the predictive management of independent batteries. The index corresponds to the selected microgrid. . . . . . . . . . . . . . . . . . . . . . 2.11 Computation time with ϕ b = 1 (1-day simulation). T f b : computation time associated with the predictive management of a fictitious battery. T ib : computation time associated with the predictive management of independent batteries. The index corresponds to the selected microgrid. . . . . . . . . . . . . . . . . . . . . . 2.12 Computation time with ϕ c = 1 (1-day simulation). T f b : computation time associated with the predictive management of a fictitious battery. T ib : computation time associated with the predictive management of independent batteries. The index corresponds to the selected microgrid. . . . . . . . . . . . . . . . . . . . . . 2.13 Computation time with ϕ d = 1 (1-day simulation). T f b : computation time associated with the predictive management of a fictitious battery. T ib : computation time associated with the predictive management of independent batteries. The index corresponds to the selected microgrid. . . . . . . . . . . . . . . . . . . . . . 2.14 Computation time with ϕ e = 1 (1-day simulation). T f b : computation time associated with the predictive management of a fictitious battery. T ib : computation time associated with the predictive management of independent batteries. The index corresponds to the selected microgrid. . . . . . . . . . . . . . . . . . . . . . 2.15 Computation time with ϕ f = 1 (1-day simulation). T f b : computation time associated with the predictive management of a fictitious battery. T ib : computation time associated with the predictive management of independent batteries. The index corresponds to the selected microgrid. . . . . . . . . . . . . . . . . . . . . . 3.1 Synopsis of the studied electrical networked microgrid. . . . . . . . . . . . . . . . 3.2 NMG operations (1 to 7) and discharging modes (d, d+ and d++). . . . . . . . . 3.3 Networked microgrid (NMG) behaviour for Islanding Scenario 1 and Operation 6

  C r : normalized electricity tariffs. α: sum of normalized electricity tariffs and normalized CO 2 emissions. . . . . . . . . . . . . 96 4.1 Picture of the LNEG pilot building in Lisbon, Portugal. . . . . . . . . . . . . . . 101 4.2 Drawing of the LNEG pilot building in Lisbon (Portugal). . . . . . . . . . . . . . 104 4.3 LNEG pilot building equipped with a multi-energy MG. See Figure 4.5 for details about the thermal MG. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105

  F s : supply air flow rate. in: entering fluid. out: leaving fluid. P r : electricity bought from the main grid. P s : PV power generation surplus. . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.6 Schematic of the LNEG thermal MG operated in economic mode, with disconnected solar collectors. EMG: electrical MG (see Figure 4.3). HP: heat pump. SC: solar collectors. HWT: hot water tank. TES: thermal energy storage. FCU: fan coil units. T c : temperature of the fluid circulating in the solar collectors. T w : temperature of the water in the HWT. T p : temperature of the water circulating in the heat pump. T e : temperature of the water in the TES. F c : flow rate of the fluid circulating in the solar collectors. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the FCUs. F p : flow rate of the water circulating between the TES and the heat pump. F s : supply air flow rate. in: entering fluid. out: leaving fluid. P r : electricity bought from the main grid. P s : PV power generation surplus. The grey color and the dashed lines indicate the part of the system not available for the operating mode chosen. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.7 Rate of CO 2 in room R4 due to human activity, from May 11 to May 12. . . . . 4.8 Picture of the 4 m evacuated tube solar collectors. . . . . . . . . . . . . . . . . . 4.9 Picture of the LNEG's 300 L hot water tank. . . . . . . . . . . . . . . . . . . . . 4.10 Picture of the LNEG's 1000 L thermal energy storage. . . . . . . . . . . . . . . . 4.11 Schematic of the LNEG's 300 L HWT. T c : temperature of the fluid circulating in the solar collectors. T w : temperature of the water in the HWT. in: entering fluid. out: leaving fluid. The heat exchanger (from layer 1 to layer 12) is represented by the coil in red. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.12 Schematic of the LNEG's 1000 L TES. T h : temperature of the water circulating in the heat pump. T e : temperature of the water in the TES. T w : temperature of the water in the HWT. in: entering fluid. out: leaving fluid. The heat exchanger (from layer 6 to layer 10) is represented by the coil in red. . . . . . . . . . . . . . 4.13 Picture of the 16 kW t heat pump with a COP value of 3.3. . . . . . . . . . . . . 4.14 Picture of the room R4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

  F t : flow rate of the water circulating between the TES and the FCUs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 4.22 MG management strategy (IMPROVEMENT energy management system). EMG: electrical microgrid. HP: heat pump. SC: solar collectors. HWT: hot water tank. TES: thermal energy storage. FCU: fan coil unit. PID SC/HWT : SC/HWT PID controller. PID FCU : FCU PID controller. PID HP : HP PID. RB TES : TES rulebased controller. MPC FCU : FCU optimization-based MPC controller. MPC FCU : FCU optimization-free MPC controller. MPC HP/TES : HP/TES optimizationbased MPC controller. MPC HP/TES : HP/TES optimization-free MPC controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 132 4.23 An example of predictive control operation. This figure shows an example of operation of using the MPC controller, where the bounds of the air temperature in a room are T min r and T max r

  P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.29 Optimization-based MPC strategy MPC HP/TES (3-day simulation). T w : temperature of the water in the hot water tank (HWT). T c : temperature of the fluid circulating in the solar collectors. T e,j : temperature of the water in the TES (layer j). F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the FCUs. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.30 Electrical MG islanding (4-day simulation). Strategy: optimization-based MPC strategy. Scenario: 1. Configuration: 1. P p : power generation. P c : power consumption. P f b f : power stored in the bank of batteries. α: sum of normalized electricity tariffs and normalized CO 2 emissions. I s : islanding period. . . . . . . 4.31 Picture of the LNEG's 30 kWh bank of batteries. . . . . . . . . . . . . . . . . . . 4.32 TES water temperature management (4-day simulation). Strategy: MPC MG ). Scenario: 1. Configuration: 1. Air temperature constraint: 21 • C. TES constraint: 38 • C. T w : temperature of the water in the HWT. T c : temperature of the solar collector fluid. T e,j : temperature of the water in the layer j of the TES. F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the fan coil units. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.33 TES water temperature management (4-day simulation). Strategy: PID/RB MG ). Scenario: 1. Configuration: 1. Air temperature constraint: 21 • C. TES constraint: 38 • C. T w : temperature of the water in the HWT. T c : temperature of the solar collector fluid. T e,j : temperature of the water in the layer j of the TES. F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the fan coil units. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.34 TES water temperature management (4-day simulation). Strategy: MPC MG ). Scenario: 2. Configuration: 1. Air temperature constraint: 19 • C. TES constraint: 38 • C. T w : temperature of the water in the HWT. T c : temperature of the solar collector fluid. T e,j : temperature of the water in the layer j of the TES. F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the fan coil units. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 156 4.35 TES water temperature management (4-day simulation). Strategy: PID/RB MG ). Scenario: 2. Configuration: 1. Air temperature constraint: 19 • C. TES constraint: 38 • C. T w : temperature of the water in the HWT. T c : temperature of the solar collector fluid. T e,j : temperature of the water in the layer j of the TES. F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the fan coil units. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 157 4.36 TES water temperature management (4-day simulation). Strategy: MPC MG ). Scenario: 3. Configuration: 3. Air temperature constraint: 19 • C. TES constraint: 36 • C. T w : temperature of the water in the HWT. T c : temperature of the solar collector fluid. T e,j : temperature of the water in the layer j of the TES.F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the fan coil units. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 158 4.37 TES water temperature management (4-day simulation). Strategy: PID/RB MG ). Scenario: 3. Configuration: 3. Air temperature constraint: 19 • C. TES constraint: 36 • C. T w : temperature of the water in the HWT. T c : temperature of the solar collector fluid. T e,j : temperature of the water in the layer j of the TES.

  transferred to a room by a FCU (Wh) Q c,acc SC energy balance (Wh) Q c,f luid Energy carried by the fluid circulating in the SC (Wh) Q c,loss Energy loss to the atmosphere by the SC (Wh) Q c,solar SC absorbed energy (Wh) R Absolute thermal resistance of a wall between a room and the outdoor (W K -1 ) r c Ratio of the total power consumption of a MG to the power consumption of the whole NMG r i Ratio of the total power consumption of islanded MGs to the power consumption of the whole NMG r p Ratio of the total photovoltaic power generation surplus of a MG to the photovoltaic power generation surplus of the whole NMG RM SE Root mean squared error RM SE n Normalised root mean squared error S Duration of the simulation (days) S i Total power consumption of islanded MGs (kW) T a Temperature of the air in the thermal storage room ( • C) T c Temperature of the SC fluid ( • C) T e Temperature of the water in the TES ( • C) T o Outdoor air temperature ( • C) T p Temperature of the water circulating in the HP ( • C) T r Temperature of the air inside a room ( • C) T s Temperature of the air supply by a FCU ( • C) T t Temperature of the water circulating in a FCU ( • C) T w Temperature of the water circulating in the HWT ( • C) T e,h Temperature of the water circulating in the TES heat exchanger ( • C) T f Computation time for the management of a fictitious battery (s) T i Computation time for the management of independent batteries (s) T w,h Temperature of the water inside the HWT heat exchanger ( • C) u Manipulated variable (PID controllers)

Figure 2 -

 2 Figure 2 -Synoptique du microréseau électrique étudié.

Figure 3 -

 3 Figure 3 -Synoptique du réseau de microréseaux étudié.

Figure 5 -

 5 Figure 5 -Synoptique du microréseau thermique du LNEG. EMG : microréseau électrique. HP : pompe à chaleur. SC : collecteurs solaires. HWT : ballon d'eau chaude solaire. TES : système de stockage thermique et FCU : ventilo-convecteurs. T c : température de l'eau des SC. T w : température de l'eau du HWT. T h : température de l'eau de la pompe à chaleur. T e : température de l'eau du TES. F c : débit des SC. F w : débit d'eau entre le HWT et le TES. F e : débit d'eau entre le TES et les FCUs. F h : débit d'eau entre le TES et la pompe à chaleur. F s : débit d'air des FCUs. in : fluide entrant. out fluide sortant. P r : électricité achetée depuis le réseau. P s : surplus de puissance photovoltaïque.

  Figure 5 -Synoptique du microréseau thermique du LNEG. EMG : microréseau électrique. HP : pompe à chaleur. SC : collecteurs solaires. HWT : ballon d'eau chaude solaire. TES : système de stockage thermique et FCU : ventilo-convecteurs. T c : température de l'eau des SC. T w : température de l'eau du HWT. T h : température de l'eau de la pompe à chaleur. T e : température de l'eau du TES. F c : débit des SC. F w : débit d'eau entre le HWT et le TES. F e : débit d'eau entre le TES et les FCUs. F h : débit d'eau entre le TES et la pompe à chaleur. F s : débit d'air des FCUs. in : fluide entrant. out fluide sortant. P r : électricité achetée depuis le réseau. P s : surplus de puissance photovoltaïque.

Tableau 10 -

 10 Critère d'évaluation C MG pour les opérations d'îlotage (simulations sur 4 jours). Is. : scénario d'îlotage. Cf. : configuration (voir sous-section 5.5.2). PID/RB MG : stratégie PID/fondée sur des règles. MPC MG : stratégie MPC sans optimisation. T r : température de confort.Te,4 : contrainte de température pour l'eau dans le ballon d'eau chaude (couche 4). En vert : meilleure performance.

Figure 7 :

 7 Figure 7: Global power generating capacity, from 2008 to 2018 (GW) [4].

Figure 8 :

 8 Figure 8: Electric car global stock from 2014 to 2018 [4].

Figure 9 :

 9 Figure 9: MG components: loads, renewable energy generation sources, conventional generation sources, energy storage systems, and electric vehicles. The energy management system (EMS) and the supervisory control and data acquisition (SCADA) coordinate energy demand and supply between the dispatchable generators and the different loads [131].

Figure 10 :

 10 Figure 10: Schematic of a multi-energy microgrid (IMPROVEMENT) [17].

Figure 11 :

 11 Figure 11: Hospital equipped with a multi-energy microgrid facing critical loads (IMPROVEMENT) [17].

Figure 1 . 4 :

 14 Figure 1.4: Time line of some MG projects.

Figure 2 . 1 :

 21 Figure 2.1: Synopsis of the studied electrical microgrid.

  is described by (2.1), with k the actual time step, i the time step in the prediction horizon H p with i ∈ [[1, H p ]], N p the number of time steps per hour and P b the power of the batteries. E b is bounded by E min b (20%) and E max b (95%) (2.2). P b [231] is bounded by P min b (-50 kW) and P max b (50 kW) (2.3). The time step is 15 minutes -it is the same for all models -. E b

r

  and E b (k) < E max b then P v,j (k) = P min v and P b (k) = P min b (2.11) R3: if h > 13 and C r (k) = C max r and E b (k) > E min b then P b (k) = P max b (2.12) R4: if h > 19 then P b (k) = P max b (2.13) R5: if i f > 13 then P v (k) = P min v (2.14)

Figure 2 . 3 :Figure 2 . 4 :Figure 2 . 5 :Figure 2 . 6 :Figure 2 . 7 :Figure 2 . 8 :Figure 2 . 9 :

 23242526272829 Figure 2.3: Microgrid MG 1 equipped with 16 electric vehicles (7-day simulation). P p : power generation. P c : power consumption. P f b f : power

3 ibFigure 2 . 10 :

 3210 Figure 2.10: Computation time with ϕ a = 1 (1-day simulation). T f b : computation time associated with the predictive management of a fictitious battery. T ib : computation time associated with the predictive management of independent batteries. The index corresponds to the selected microgrid.

3 ibFigure 2 . 11 :

 3211 Figure 2.11: Computation time with ϕ b = 1 (1-day simulation). T f b : computation time associated with the predictive management of a fictitious battery. T ib : computation time associated with the predictive management of independent batteries. The index corresponds to the selected microgrid.

Figure 2 . 12 : 3 ibFigure 2 . 13 :

 2123213 Figure 2.12: Computation time with ϕ c = 1 (1-day simulation). T f b : computation time associated with the predictive management of a fictitious battery. T ib : computation time associated with the predictive management of independent batteries. The index corresponds to the selected microgrid.

Figure 2 . 14 :

 214 Figure 2.14: Computation time with ϕ e = 1 (1-day simulation). T f b : computation time associated with the predictive management of a fictitious battery. T ib : computation time associated with the predictive management of independent batteries. The index corresponds to the selected microgrid.

3 ibFigure 2 . 15 :

 3215 Figure 2.15: Computation time with ϕ f = 1 (1-day simulation). T f b : computation time associated with the predictive management of a fictitious battery. T ib : computation time associated with the predictive management of independent batteries. The index corresponds to the selected microgrid.

-Figure 3 . 1 :

 31 Figure 3.1: Synopsis of the studied electrical networked microgrid.

  .2) corresponds to a given operation. The energy level E b of the bank of batteries in the work of [231] is described by (3.1), with k the actual time step, i the time step in the prediction horizon H p with i ∈ [[1, H p ]], N p the number of time steps per hour and P b the power of the bank of batteries. E b is bounded by E min b and E max b (95%) (3.2). In this chapter, the bank of batteries can be used either in a normal way (E min b = 20%) or in a deep way (E min b = 5%). P b is bounded by P min b and P max b (3.3):

Figure 3 . 2 :

 32 Figure 3.2: NMG operations (1 to 7) and discharging modes (d, d+ and d++).

Operation 1 :

 1 fully successful islanding of Class 1 MGs using Discharging Mode d; -Operation 2: fully successful islanding of Class 1 MGs using Discharging Mode d+; -Operation 3: fully successful islanding of Class 1 MGs using Discharging Mode d++; -Operation 4: unsuccessful islanding of Class 1 MGs using Discharging Mode d++; -Operation 5: fully successful islanding of Class 1/2 MGs using Discharging Mode d; -Operation 6: fully successful islanding of Class 1/2 MGs using Discharging Mode d+; -Operation 7: fully successful islanding of the NMG using Discharging Mode d.

5 : 6 :

 56 Performance assessment, for Islanding Scenario 2 (see Section 2.2) (1-day simulation). For configuration and operation, see Sections 2.3 and 2.5. MPC ST : MPC strategy with standard electricity tariffs. MPC UT : MPC strategy with updated electricity tariffs. RB: rule-based strategy. C c : economic cost. G t : reward. G Performance assessment, for Islanding Scenario 3 (see Section 2.2) (1-day simulation). For configuration and operation, see Sections 2.3 and 2.5. MPC ST : MPC strategy with standard electricity tariffs. MPC UT : MPC strategy with updated electricity tariffs. RB: rule-based strategy. C c : economic cost. G t : reward. G

Figure 3 . 3 :

 33 Figure 3.3: Networked microgrid (NMG) behaviour for Islanding Scenario 1 and Operation 6(see Sections 2.2 and 2.5) when the MPC strategy is used (1-day simulation). MG: microgrid. P f : power stored used for one MG. P f n : power stored used for the NMG. E f : energy stored in all batteries. E v : energy stored in all electric vehicle batteries. E b : energy stored in the bank of batteries. P p : power generation used for one MG. P pn : power generation used for the NMG. P c : power consumption of one MG. P cn : power consumption of the NMG. P r : power bought from the main grid for one MG. P rn : power bought from the main grid for the NMG. P e : power exchanged between one MG and other. I s : islanding period of microgrid l. I sn : islanding period of the NMG. C r : normalized electricity tariffs. α: sum of normalized electricity tariffs and normalized CO 2 emissions.

Figure 3 . 4 :

 34 Figure 3.4: Networked microgrid (NMG) behaviour for Islanding Scenario 1 and Operation 6(see Sections 2.2 and 2.5) when the rule-based strategy is used (1-day simulation). MG: microgrid. P f : power stored used for one MG. P f n : power stored used for the NMG. E f : energy stored in all batteries. E v : energy stored in all electric vehicles batteries. E b : energy stored in the bank of batteries. P p : power generation used for one MG. P pn : power generation used for the NMG. P c : power consumption of one MG. P cn : power consumption of the NMG. P r : power bought from the main grid for one MG. P rn : power bought from the main grid for the NMG. P e : power exchanged between one MG and other. I s : islanding period of microgrid l. I sn : islanding period of the NMG. C r : normalized electricity tariffs. α: sum of normalized electricity tariffs and normalized CO 2 emissions.

Figure 3 . 5 :

 35 Figure 3.5: Networked microgrid (NMG) behaviour for Islanding Scenario 3 and operation 3(see Sections 2.2 and 2.5) when the MPC strategy is used (1-day simulation). MG: microgrid. P f : power stored used for one MG. P f n : power stored used for the NMG. E f : energy stored in all batteries. E v : energy stored in all electric vehicles batteries. E b : energy stored in the bank of batteries. P p : power generation used for one MG. P pn : power generation used for the NMG. P c : power consumption of one MG. P cn : power consumption of the NMG. P r : power bought from the main grid for one MG. P rn : power bought from the main grid for the NMG. P e : power exchanged between one MG and other. I s : islanding period of microgrid l. I sn : islanding period of the NMG. C r : normalized electricity tariffs. α: sum of normalized electricity tariffs and normalized CO 2 emissions.

Figure 3 . 6 :

 36 Figure 3.6: Networked microgrid (NMG) behaviour for Islanding Scenario 3 and Operation 3(see Sections 2.2 and 2.5) when the rule-based strategy is used (1-day simulation). MG: microgrid. P f : power stored used for one MG. P f n : power stored used for the NMG. E f : energy stored in all batteries. E v : energy stored in all electric vehicles batteries. E b : energy stored in the bank of batteries. P p : power generation used for one MG. P pn : power generation used for the NMG. P c : power consumption of one MG. P cn : power consumption of the NMG. P r : power bought from the main grid for one MG. P rn : power bought from the main grid for the NMG. P e : power exchanged between one MG and other. I s : islanding period of microgrid l. I sn : islanding period of the NMG. C r : normalized electricity tariffs. α: sum of normalized electricity tariffs and normalized CO 2 emissions.

Figure 3 . 7 :

 37 Figure 3.7: Networked microgrid (NMG) behaviour for Islanding Scenario 2 and operation 2(see Sections 2.2 and 2.5) when the MPC strategy is used (1-day simulation). MG: microgrid. P f : power stored used for one MG. P f n : power stored used for the NMG. E f : energy stored in all batteries. E v : energy stored in all electric vehicles batteries. E b : energy stored in the bank of batteries. P p : power generation used for one MG. P pn : power generation used for the NMG. P c : power consumption of one MG. P cn : power consumption of the NMG. P r : power bought from the main grid for one MG. P rn : power bought from the main grid for the NMG. P e : power exchanged between one MG and other. I s : islanding period of microgrid l. I sn : islanding period of the NMG. C r : normalized electricity tariffs. α: sum of normalized electricity tariffs and normalized CO 2 emissions.

Figure 3 . 8 :

 38 Figure 3.8: Networked microgrid (NMG) behaviour for Islanding Scenario 2 and operation 2(see Sections 2.2 and 2.5) when the rule-based strategy is used (1-day simulation). MG: microgrid. P f : power stored used for one MG. P f n : power stored used for the NMG. E f : energy stored in all batteries. E v : energy stored in all electric vehicles batteries. E b : energy stored in the bank of batteries. P p : power generation used for one MG. P pn : power generation used for the NMG. P c : power consumption of one MG. P cn : power consumption of the NMG. P r : power bought from the main grid for one MG. P rn : power bought from the main grid for the NMG. P e : power exchanged between one MG and other. I s : islanding period of microgrid l. I sn : islanding period of the NMG. C r : normalized electricity tariffs. α: sum of normalized electricity tariffs and normalized CO 2 emissions.

Figure 4 . 1 :

 41 Figure 4.1: Picture of the LNEG pilot building in Lisbon, Portugal.

Figure 4 . 2 :Figure 4 . 3 :

 4243 Figure 4.2: Drawing of the LNEG pilot building in Lisbon (Portugal).

Figure 4 . 4 :

 44 Figure 4.4: Schematic of the LNEG thermal MG operated in direct mode. EMG: electrical MG (see Figure 4.3). HP: heat pump. SC: solar collectors. HWT: hot water tank. TES: thermal energy storage. FCU: fan coil units. T c : temperature of the fluid circulating in the solar collectors. T w : temperature of the water in the HWT. T h : temperature of the water circulating in the heat pump. T e : temperature of the water in the TES. F c : flow rate of the fluid circulating in the solar collectors. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the FCUs. F h :flow rate of the water circulating between the TES and the heat pump. F s : supply air flow rate. in: entering fluid. out: leaving fluid. P r : electricity bought from the main grid. P s : PV power generation surplus. The grey color and the dashed lines indicate the part of the system not available for the operating mode chosen.

Figure 4 . 5 :

 45 Figure 4.5: Schematic of the LNEG thermal MG operated in economic mode. EMG: electrical MG (see Figure 4.3). HP: heat pump. SC: solar collectors. HWT: hot water tank. TES: thermal energy storage. FCU: fan coil units. T c : temperature of the fluid circulating in the solar collectors. T w : temperature of the water in the HWT. T p : temperature of the water circulating in the heat pump. T e : temperature of the water in the TES. F c : flow rate of the fluid circulating in the solar collectors. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the FCUs. F h :flow rate of the water circulating between the TES and the heat pump. F s : supply air flow rate. in: entering fluid. out: leaving fluid. P r : electricity bought from the main grid. P s : PV power generation surplus.

Figure 4 . 6 :

 46 Figure 4.6: Schematic of the LNEG thermal MG operated in economic mode, with disconnected solar collectors. EMG: electrical MG (see Figure 4.3). HP: heat pump. SC: solar collectors. HWT: hot water tank. TES: thermal energy storage. FCU: fan coil units. T c : temperature of the fluid circulating in the solar collectors. T w : temperature of the water in the HWT. T p : temperature of the water circulating in the heat pump. T e : temperature of the water in the TES. F c : flow rate of the fluid circulating in the solar collectors. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the FCUs. F p : flow rate of the water circulating between the TES and the heat pump. F s : supply air flow rate. in: entering fluid. out: leaving fluid. P r : electricity bought from the main grid. P s : PV power generation surplus. The grey color and the dashed lines indicate the part of the system not available for the operating mode chosen.

Figure 4 . 7 :

 47 Figure 4.7: Rate of CO 2 in room R4 due to human activity, from May 11 to May 12.

  Multi-energy microgrid management -the temperature of the water in the 4 th layer of the HWT ( • C) (from February 18 to August 31);-the temperature of the water in the 1 st and in the 4 th layer of the TES ( • C) (from February 18 to August 31);-the temperature of the water circulating between the HWT and the TES ( • C) and the temperature of the water circulating between the TES and the FCUs ( • C);

1 )

 1 Simulations were made to compare GT I c and the GTI provided by PVSyst in 2020. Similar GTI profiles were found. Let us note that GT I c = I, with I the solar irradiance which is used for the remaining of this work. Regarding the bounds used in Evaluation E2, the upper bound value for GTI is calculated from the extraterrestrial irradiance, which is I 0 = 1366 W m -2[START_REF] Renné | 2 -Resource Assessment and Site Selection for Solar Heating and Cooling Systems[END_REF] 260] with Equation (4.2). 0 < GT I c < 1.2 × I 0 (4.2)

  3): Data quantifying how carbon intensive electricity G c (expressed in gCO 2 kWh -1 eq ), are provided by electricitymap.org [103] and RTE's website [102]. Both the electricity purchase tariffs (C r ) (4.3) and the CO 2 emissions (G r ) (4.4) are normalized between 1 and 2 in order to reduce the economic cost and the carbon footprint with an equal importance with MPC strategies (see Sections 5.2.3 and 5.2.4). Let us note that C min c and C max c are the minimal and maximal values of the economic cost, respectively. G min c and G max c

Figure 4 . 8 :

 48 Figure 4.8: Picture of the 4 m evacuated tube solar collectors.

Figure 4 . 9 :

 49 Figure 4.9: Picture of the LNEG's 300 L hot water tank.

Figure 4 . 10 :

 410 Figure 4.10: Picture of the LNEG's 1000 L thermal energy storage.

Figure 4 . 11 :

 411 Figure 4.11: Schematic of the LNEG's 300 L HWT. T c : temperature of the fluid circulating in the solar collectors. T w : temperature of the water in the HWT. in: entering fluid. out: leaving fluid. The heat exchanger (from layer 1 to layer 12) is represented by the coil in red.

Figure 4 . 14 :

 414 Figure 4.14: Picture of the room R4.

Table 4 . 8 : 1 )

 481 Thermal zones parameters. Quantity Value Description R e,1,2 2.3 Absolute thermal resistance of the walls of rooms R1 and R2 (K W -1 ) R e,3 3.2 Absolute thermal resistance of the walls of room R3 (K W -1 ) R e,4 0.4 Absolute thermal resistance of the walls of room R4 (K W -W m -2 )root of the average of squared errors and its formula is given in Equation (4

  [281]. The normalized RMSE is given in Equation (4.25): nRMSE = RMSE x max -x min (4.25)

  0

Figure 4 . 16 :

 416 Figure 4.16: Model validation for room R2, from May 1 to May 4. T r,2 : simulated air temperature in room R2. T r,2 : measured air temperature in room R2. T o : outdoor temperature.

3 -

 3 T r,3

Figure 4 . 3 -

 43 Figure 4.17: Model validation for room R3, from February 19 to February 20. T r,3 : simulated air temperature in room R3. T r,3 : measured air temperature in room R3. T o : outdoor temperature.

Figure 4 . 18 :T r, 4 -

 4184 Figure 4.18: Model validation for room R3, from May 1 to May 4. T r,3 : simulated air temperature in room R3. T r,3 : measured air temperature in room R3. T o : outdoor temperature.

Figure 4 . 19 : 4 -

 4194 Figure 4.19: Model validation for room R4, from February 19 to February 20. T r,4 : simulated air temperature in room R4. T r,4 : measured air temperature in room R4. T o : outdoor temperature.

Figure 4 . 20 :

 420 Figure 4.20: Model validation for room R4, from May 1 to May 4. T r,4 : simulated air temperature in room R4. T r,4 : measured air temperature in room R4. T o : outdoor temperature.

Figure 4 . 21 :

 421 Figure 4.21: Validation of the thermal energy storage (TES) model, from May 11 to May 12.T e,j : simulated temperature of the water in the TES (layer j). T e,j : measured temperature of the water in the TES (layer j). F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the FCUs.

Figure 4 . 22 :

 422 Figure 4.22: MG management strategy (IMPROVEMENT energy management system). EMG: electrical microgrid. HP: heat pump. SC: solar collectors. HWT: hot water tank. TES: thermal energy storage. FCU: fan coil unit. PID SC/HWT : SC/HWT PID controller. PID FCU : FCU PID

Figure 4 . 23 :

 423 Figure 4.23: An example of predictive control operation. This figure shows an example of operation of using the MPC controller, where the bounds of the air temperature in a room are T min r

  and 4.25. Results of both MPC strategies are exactly the same. The computational cost has been largely reduced (by 60 times in average) with the MPC FCU strategy, making it the more interesting one to be implemented in situ, as

Figure 4 . 26 :

 426 Figure 4.26: Picture of the LNEG's 4kWp solar photovoltaic panels.

Figure 4 . 27 :

 427 Figure 4.27: PID/rule-based strategy PID HP /RB TES (3-day simulation). T w : temperature of the water in the hot water tank (HWT). T c : temperature of the fluid circulating in the solar collectors.T e,j : temperature of the water in the TES (layer j). F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the FCUs. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions.

Figure 4 . 28 :

 428 Figure 4.28: Optimization-free MPC strategy MPC HP/TES (3-day simulation). T w : temperature of the water in the hot water tank (HWT). T c : temperature of the fluid circulating in the solar collectors.T e,j : temperature of the water in the TES (layer j). F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the FCUs. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions.

Figure 4 . 29 :

 429 Figure 4.29: Optimization-based MPC strategy MPC HP/TES (3-day simulation).T w : temperature of the water in the hot water tank (HWT). T c : temperature of the fluid circulating in the solar collectors. T e,j : temperature of the water in the TES (layer j). F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the FCUs. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions.

Figure 4 . 30 :

 430 Figure 4.30: Electrical MG islanding (4-day simulation). Strategy: optimization-based MPC strategy. Scenario: 1. Configuration: 1. P p : power generation. P c : power consumption. P f b f : power stored in the bank of batteries. α: sum of normalized electricity tariffs and normalized CO 2

Figure 4 . 31 :

 431 Figure 4.31: Picture of the LNEG's 30 kWh bank of batteries.

  26. For Group C ( T min r ; T max r = {18 • C; 20 • C}, T e,4 ≤ 38 • C), the economical cost (related to the purchase of electricity) and the CO 2 emissions are reduced, unfortunately to the detriment of the TES constraint, as described above. For Group D ( T min r ; T max r = {18 • C; 20 • C}, T e,4 ≤ 36 • C), for Scenario 2 and Scenario 3, both the economic cost and the CO 2 emissions are almost always reduced, except for one case. For Scenario 1, the economic cost and CO 2 emissions are not always reduced, but the TES constraint is satisfied. The evaluation criterion C M G values (Table

=

  {20 • C; 22 • C} to T min r ; T max r = {18 • C; 20 • C}, thus slashing thermal comfort. Furthermore, with PID/RB MG , the comfort temperature constraint violation has been reduced by 43% and the average duration of constraint violation has been reduced by 29%.

Figure 4 . 32 :

 432 Figure 4.32: TES water temperature management (4-day simulation). Strategy: MPC MG ). Scenario: 1. Configuration: 1. Air temperature constraint: 21 • C. TES constraint: 38 • C. T w :temperature of the water in the HWT. T c : temperature of the solar collector fluid. T e,j : temperature of the water in the layer j of the TES. F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the fan coil units. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions.

Figure 4 . 33 :

 433 Figure 4.33: TES water temperature management (4-day simulation). Strategy: PID/RB MG ). Scenario: 1. Configuration: 1. Air temperature constraint: 21 • C. TES constraint: 38 • C. T w :temperature of the water in the HWT. T c : temperature of the solar collector fluid. T e,j : temperature of the water in the layer j of the TES. F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the fan coil units. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions.

Figure 4 . 34 :

 434 Figure 4.34: TES water temperature management (4-day simulation). Strategy: MPC MG ). Scenario: 2. Configuration: 1. Air temperature constraint: 19 • C. TES constraint: 38 • C. T w :temperature of the water in the HWT. T c : temperature of the solar collector fluid. T e,j : temperature of the water in the layer j of the TES. F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the fan coil units. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions.

Figure 4 . 35 :

 435 Figure 4.35: TES water temperature management (4-day simulation). Strategy: PID/RB MG ). Scenario: 2. Configuration: 1. Air temperature constraint: 19 • C. TES constraint: 38 • C. T w :temperature of the water in the HWT. T c : temperature of the solar collector fluid. T e,j : temperature of the water in the layer j of the TES. F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the fan coil units. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions.

Figure 4 . 36 :

 436 Figure 4.36: TES water temperature management (4-day simulation). Strategy: MPC MG ). Scenario: 3. Configuration: 3. Air temperature constraint: 19 • C. TES constraint: 36 • C. T w :temperature of the water in the HWT. T c : temperature of the solar collector fluid. T e,j : temperature of the water in the layer j of the TES. F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the fan coil units. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions.

Figure 4 . 37 :

 437 Figure 4.37: TES water temperature management (4-day simulation). Strategy: PID/RB MG ). Scenario: 3. Configuration: 3. Air temperature constraint: 19 • C. TES constraint: 36 • C. T w :temperature of the water in the HWT. T c : temperature of the solar collector fluid. T e,j : temperature of the water in the layer j of the TES. F h : flow rate of the water circulating between the heat pump and the TES. F w : flow rate of the water circulating between the HWT and the TES. F t : flow rate of the water circulating between the TES and the fan coil units. P s : PV power generation surplus. α: sum of normalized electricity tariffs and normalized CO 2 emissions.

F t, 4 (m 3 s - 1 )F t, 4 IslandingFigure 4 . 38 :

 4314438 Figure 4.38: Air temperature in room R4 (4-day simulation). Strategy: PID/RB MG . Air temperature constraint: 19 • C. TES constraint: 36 • C. T r,4 : air temperature in room R4. T o : outdoor temperature. F s,4 : supply air flow rate of FCU 4. F t,4 : flow rate of the water circulating between the TES and FCU 4.

F t, 4 (m 3 s - 1 )F t, 4 IslandingFigure 4 . 39 :

 4314439 Figure 4.39: Air temperature in room R4. (4-day simulation). Strategy: MPC MG . Air temperature constraint: 19 • C. TES constraint: 36 • C. T r,4 : air temperature in room R4. T o : outdoor temperature. F s,4 : supply air flow rate of FCU 4. F t,4 : flow rate of the water circulating between the TES and FCU 4.

C

Table 4 . 24 :

 424 Evaluation criterion C MG (thermal resource and thermal comfort management) during islanding (4-day simulation). Is.: islanding scenario. Cf.: configuration (see Section 6.2). MPC MG : optimization-free MPC strategy. PID/RB MG : PID/rule-based strategy. T r : thermal comfort constraint ( • C). T e,4 : TES constraint ( • C). The values in green indicate the best results. C

  Context . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Les méthodes utilisées pour la gestion des MGs/NMGs avec un accent sur les années 2011, 2016 et 2021. Les documents de recherche considérés ici -ces articles traitent de différents aspects de la gestion des MGs/NMGs -sont publiés dans des revues à comité de lecture appartenant aux principaux éditeurs de contenu scientifique. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxvii Synoptique du microréseau électrique étudié. . . . . . . . . . . . . . . . . . . . . xxxviii Synoptique du réseau de microréseaux étudié. . . . . . . . . . . . . . . . . . . . . xlii Opérations d'îlotage (1 à 7) et modes de décharge (d, d+ et d++). . . . . . . . . xliv Synoptique du microréseau thermique du LNEG. EMG : microréseau électrique. MPC HP/TES : stratégie prédictive sans optimisation pour le contrôle de la pompe à chaleur et du TES. MPC HP/TES : stratégie prédictive avec optimisation pour le contrôle de la pompe à chaleur et du TES. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xlix Global power generating capacity, from 2008 to 2018 (GW) [4]. . . . . . . . . . . 2 Electric car global stock from 2014 to 2018

	List of Figures

en français xxxi 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxi 1.1 Contexte . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxi 1.2 Travaux de thèse . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiii 1.3 Cas d'étude . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xxxiv Introduction 1 HP : pompe à chaleur. SC : collecteurs solaires. HWT : ballon d'eau chaude solaire. TES : système de stockage thermique et FCU : ventilo-convecteurs.

T c : température de l'eau des SC. T w : température de l'eau du HWT. T h : température de l'eau de la pompe à chaleur. T e : température de l'eau du TES. F c : débit des SC. F w : débit d'eau entre le HWT et le TES. F e : débit d'eau entre le TES et les FCUs. F h : débit d'eau entre le TES et la pompe à chaleur. F s : débit d'air des FCUs. in : fluide entrant. out fluide sortant. P r : électricité achetée depuis le réseau. P s : surplus de puissance photovoltaïque. . . . . . . . . . . . . . . . . . . xlviii Stratégie de gestion du microréseau thermique. EMG : microréseau électrique. HP : pompe à chaleur. SC : collecteurs solaires. HWT : réservoir d'eau chaude. TES : stockage d'énergie thermique. FCU : ventilo-convecteurs. PID FCU : stratégie PID pour le contrôle des FCUs. MPC FCU : stratégie prédictive sans optimisation pour le contrôle des FCUs. MPC F CU : stratégie prédictive avec optimisation pour le contrôle des FCUs. PID SC/HWT : stratégie PID contrôlant les SC et le HWT. PID HP : stratégie PID pour le contrôle de la pompe à chaleur. RB TES : stratégie fondée sur des règles pour le contrôle du TES.

  4.15 Model validation for room R2, from February 19 to February 22. T r,2 : simulated air temperature in room R2. T r,2 : measured air temperature in room R2. T o : outdoor temperature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 4.16 Model validation for room R2, from May 1 to May 4. T r,2 : simulated air temperature in room R2. T r,2 : measured air temperature in room R2. T o : outdoor temperature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 4.17 Model validation for room R3, from February 19 to February 20. T r,3 : simulated air temperature in room R3. T r,3 : measured air temperature in room R3. T o : outdoor temperature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 4.18 Model validation for room R3, from May 1 to May 4. T r,3 : simulated air temperature in room R3. T r,3 : measured air temperature in room R3. T o : outdoor temperature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 4.19 Model validation for room R4, from February 19 to February 20. T r,4 : simulated air temperature in room R4. T r,4 : measured air temperature in room R4. T

o : outdoor temperature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 4.20 Model validation for room R4, from May 1 to May 4. T r,4 : simulated air temperature in room R4. T r,4 : measured air temperature in room R4. T o : outdoor temperature. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 4.21 Validation of the thermal energy storage (TES) model, from May 11 to May 12.

  day simulation). T r,4 : air temperature in room R4. T o : outdoor temperature. F s,4 : supply air flow rate of FCU 4. F t,4 : flow rate of the water circulating between the TES and FCU 4.139

4.25 MPC FCU strategy for thermal comfort management in room R4 (3-day simulation). T r,4 : air temperature in room R4. T o : outdoor temperature. F s,4 : supply air flow rate of FCU 4. F t,4 : flow rate of the water circulating between the TES and FCU 4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 139 4.26 Picture of the LNEG's 4kWp solar photovoltaic panels. . . . . . . . . . . . . . . . 140 4.27 PID/rule-based strategy PID HP /RB TES

  4.38 Air temperature in room R4 (4-day simulation). Strategy: PID/RB MG . Air temperature constraint: 19 • C. TES constraint: 36 • C. T r,4 : air temperature in room R4. T o : outdoor temperature. F s,4 : supply air flow rate of FCU 4. F t,4 : flow rate of the water circulating between the TES and FCU 4. . . . . . . . . . . 160 4.39 Air temperature in room R4. (4-day simulation). Strategy: MPC MG . Air temperature constraint: 19 • C. TES constraint: 36 • C. T r,4 : air temperature in room R4. T o : outdoor temperature. F s,4 : supply air flow rate of FCU 4. F t,4 : flow rate of the water circulating between the TES and FCU 4. . . . . . . . . . . . . . . . 160 1 Articles discutés mettant en évidence les avancées récentes en matière de stratégie de gestion des MGs/NMGs, selon la méthode utilisée. . . . . . . . . . . . . . . . xxxv 2 Évaluation des performances pour des simulations sur 7 jours. La stratégie fondée sur des règles RB est la stratégie de référence. MPC fb est la stratégie de gestion prédictive d'une batterie fictive. MPC ib est la stratégie de gestion prédictive de batteries indépendantes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xl 3 Coût calculatoire pour des simulations sur 7 jours. MPC fb est la stratégie de gestion prédictive d'une batterie fictive. MPC ib est la stratégie de gestion prédictive de batteries indépendantes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xli 4 Facture d'électricité, émissions de CO 2 (G PID HP /RB TES : stratégie PID/fondée sur des règles pour le contrôle de la pompe à chaleur et du TES. MPC HP/TES : stratégie prédictive sans optimisation pour le contrôle de la pompe à chaleur et du TES. MPC HP/TES : stratégie prédictive avec optimisation pour le contrôle de la pompe à chaleur et du TES. . . . . . . . . . . . . . . . . . . . . . . . . . . . . liv 9 Critère d'évaluation C HP/TES pour les opérations d'îlotage (simulations sur 4 jours). Is. : scénario d'îlotage. Cf. : configuration (voir sous-section 5.5.2). PID/RB MG : stratégie PID/fondée sur des règles. MPC MG : stratégie MPC sans optimisation. T r : température de confort. T e,4 : contrainte de température pour l'eau dans le ballon d'eau chaude (couche 4). En vert : meilleure performance. . . . . . . . . . lvii 10 Critère d'évaluation C MG pour les opérations d'îlotage (simulations sur 4 jours). Prediction of the end date for the exploitation of fossil and fissile resources [121, 122]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.1 Review papers (part 1/2). AC: alternative current. DC: direct current. DER: distributed energy resource. EMS: energy management system. EV: electric vehicle. MAS: multi-agent system. MG: microgrid. MPC: model predictive control. NMG: networked microgrid. RES: renewable energy system. . . . . . . . 17 1.2 Review papers (part 2/2). AC: alternative current. DC: direct current. DER: distributed energy resource. EMS: energy management system. EV: electric vehicle. MAS: multi-agent system. MG: microgrid. MPC: model predictive control. NMG: networked microgrid. RES: renewable energy system. . . . . . . . 18 1.3 Discussed papers highlighting recent advances in MG/NMG management, according to the method used (see Section 3). . . . . . . . . . . . . . . . . . . . . . . . 24 1.4 Key dates, source of funding, and project scale. . . . . . . . . . . . . . . . . . . . 29 : networked microgrid. PTEM: production task and energy management. WT: wind turbine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 1.11 A focus on papers dealing with robust optimization (RO) for MG/NMG management. DG: distributed generator. DR: demand response. ESS: energy storage system. MG: microgrid. NMG: networked microgrid. WT: wind turbine. . . . . . 42 A focus on papers dealing with artificial intelligence (AI) methods for MG/NMG management (part 2/2). ANFIS: adaptive neuro-fuzzy inference system. ANN: artificial neural network. DG: distributed generator. DR: demand response. DSM: demand-side management. ESS: energy storage system. MG: microgrid. NMG: netwoked microgrid. RL: reinforcement learning. WT: wind turbine. . . . 1.14 A focus on papers dealing with droop control for MG/NMG management. DC: direct current. DG: distributed generator. ESS: energy storage system. MESU: multiple energy storage unit. MG: microgrid. NMG: networked microgrid. NR: Newton-Raphson. SOC: state-of-charge. UPS: uninterruptible power system. WT: wind turbine. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.15 A focus on significant papers dealing with other programming methods than the ones considered previously for MG/NMG management. DC: direct current. DG: distributed generator. DSM: demand-side management. ESS: energy storage system. EWH: electric water heater. MG: microgrid. MILP: mixed-integer linear programming. NMG: networked microgrid. WT: wind turbine. . . . . . . . . . . Performance assessment, for Islanding Scenario 1 (see Section 2.2) (1-day simulation). For configuration and operation, see Sections 2.3 and 2.5. MPC ST : MPC strategy with standard electricity tariffs. MPC UT : MPC strategy with updated electricity tariffs. RB: rule-based strategy. C c : economic cost. G t : reward. G c : CO 2 emissions. J NMG : objective function. . . . . . . . . . . . . . . . . . . . . . . 3.5 Performance assessment, for Islanding Scenario 2 (see Section 2.2) (1-day simulation). For configuration and operation, see Sections 2.3 and 2.5. MPC ST : MPC strategy with standard electricity tariffs. MPC UT : MPC strategy with updated electricity tariffs. RB: rule-based strategy. C c : economic cost. G t : reward. G c : CO 2 emissions. J NMG : objective function. . . . . . . . . . . . . . . . . . . . . . . 3.6 Performance assessment, for Islanding Scenario 3 (see Section 2.2) (1-day simu-.22 TES average temperature constraint violation per hour (θ h ) during islanding (4day simulation). Is.: islanding scenario. Cf.: configuration (see Section 6.2). MPC MG : optimization-free MPC strategy. PID/RB MG : PID/rule-based strategy. T r : thermal comfort constraint ( • C). T e,4 : TES constraint ( • C). The values in green indicate the best results. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4.23 Average air temperature constraint violation per hour (θ r,z ) during islanding (4-day simulation). MPC FCU : optimization-free MPC strategy. PID HP /RB TES : PID/rule-based strategy. T r : thermal comfort constraint ( • C). T e,4 : TES constraint ( • C). The values in green indicate the best results. . . . . . . . . . . . . . 4.24 Evaluation criterion C MG (thermal resource and thermal comfort management) during islanding (4-day simulation). Is.: islanding scenario. Cf.: configuration (see Section 6.2). MPC MG : optimization-free MPC strategy. PID/RB MG : PID/rule-based strategy. T r : thermal comfort constraint ( • C). T e,4 : TES constraint ( • C). The values in green indicate the best results. . . . . . . . . . . . . . 4.25 Economic cost (C c ) during islanding (4-day simulation). Is.: islanding scenario. Cf.: configuration (see Section 6.2). MPC MG : optimization-free MPC strategy. PID/RB MG : PID/rule-based strategy. T r : thermal comfort constraint ( • C). T e,4 : TES constraint ( • C). The values in green indicate the best results. . . . . . . . . 4.26 CO 2 emissions (G c ) during islanding (4-day simulation). Is.: islanding scenario.

				NOMENCLATURE
	Nomenclature Abbreviations and acronyms AC/DC Alternative current/direct current ANFIS Adaptive neuro-fuzzy inference system ANN Artificial neural network APPM -RE Aggregate production planning model with onsite renewable energy ARIMA Autoregressive integrated moving av-erage ARMA Autoregressive moving average BESS Battery energy storage system CCHP Combined cooling heating and power CES Community energy storage CHP Combined heat and power CSP Combined solar and power DER Distributed energy resource DG Distributed generator DP Dynamic programming DR Demand response DSM Demand-side management DSO Distribution system operator EMS Energy management system ESS Energy storage system EV Electric vehicle FCU Fan coil unit G2V Grid-to-vehicle GHI Global horizontal irradiance GTI Global tilted irradiance GT Game theory QPSO Quantum particle swarm optimization RES Renewable energy source RL Reinforcement learning RMSE Root mean squared error RNN Recurrent neural network RO Robust optimization SARIMA Seasonal autoregressive integrated moving average SCADA Supervisory control and data acquisi-tion SC Solar collector SG Smart grid SOC State-of-charge SP Stochastic programming SUDOE Region of south-west Europe TES Thermal energy storage UPS Uninterruptible power system V2G Vehicle-to-grid VSI Voltage-source inverter WP Work package WT Wind turbine List of symbols ØJ α Sum of normalized economic cost and CO 2 emissions β Round-trip efficiency (%) β C Round-trip efficiency when charging batteries (%) β D Round-trip efficiency when discharging batteries (%) x Simulated data x Real data ∆ Constraint on the full charge of Electric vehicles ω 2 Coefficient applied to the electricity tar-iffs in case of unsuccessful islanding ρ c SC fluid density (kg m -3 ) ρ w Water density (kg m -3 ) ρ a Air density (kg m -3 ) θ h TES average temperature constraint de-viation by hour ( • C h -1 ) θ r Average air temperature constraint de-viation by hour ( • C h -1 ) ϕ Objective function coefficient A c SC Surface (m 2 ) A r Solar aperture of a window in a room (m 2 ) A e,c Cross sectional surface of one TES layer(m 2 ) A in C HP/T ES Thermal resource management eval-uation criterion C M G Thermal resource and thermal comfort management evaluation criterion D Duration of the occupancy period for a day (10/24h) d Possible discharging power (fictitious battery) (kW) d e Diameter of the TES heat exchanger (m) d w Diameter of the HWT heat exchanger ∆x ∆ i HVAC Heating, conditioning HWT Hot water tank ventilation IBDR Incentive-based demand response and ICA Imperialistic competition algorithm MAS Multi-agent system MESU Multiple energy storage unit METBG Microgrid energy trading Bayesian air-game MG Microgrid MILCQP Mixed-integer linear constrained quadratic programming MILP Mixed-integer linear programming MINLP Mixed-integer nonlinear programming MIP Mixed-integer programming MIQCP Mixed-integer quadratically con-strained programming MOSOS Multi-objective symbiotic organism search MPC Model predictive control NG Nanogrid NMG Networked microgrid NR Newton-Raphson nZEB Net-zero energy building P2P Peer-to-peer PCC Point of common coupling PID Proportional integral derivative PI Proportional integral PMV Predicted mean vote PSO Particle swarm optimization PTEM Production task and energy manage-ment Internal heat transfer scaling parameter (HWT/TES) ∆ z FCU length of tube (m) ṁ Mass flow rate (kg s -1 ) η Optical efficiency γ a Life-cycle objective γ b Inrush-current constraint γ c Purchased power penalties γ d Islanding constraint λ Coefficient to convert θ r,z or θ h to a value expressed in • C h -1 MPC FCU FCU optimization-free MPC con-troller MPC HP/TES HP/TES optimization-free MPC controller MPC TMG Optimization-free MPC strategy for thermal resource and users' thermal comfort management MPC fb Predictive management strategy of a fictitious battery MPC FCU FCU optimization-based MPC con-troller MPC HP/TES HP/TES optimization-based MPC controller mal resource and users' thermal comfort management PID FCU FCU PID controller PID HP /RB TES HP/TES PID/rule-based con-troller PID SC SC PID controller RB Rule-based strategy Ω Penalties applied to the objective func-tion if islanding is not successfully achieved ω 1 Coefficient applied to the electricity tar-DOD Depth of discharge (%) e Control error (PID controllers) E b Bank of batteries state of charge (kWh) E f Fictitious battery state of charge (kWh) E v EV battery state of charge (kWh) E cb Bank of batteries capacity (kWh) E cv EV battery capacity (kWh) E vr EV battery real state of charge (kWh) E vs EV battery expected state of charge (kWh) F c Flow rate of the water circulating be-tween the SC and the HWT (m 3 s -1 ) F G b Economic bonus for fully successful NMG islanding G c CO 2 emissions (kgCO 2 kWh -1 eq ) G i Economic bonus for information related MPC ib Predictive management strategy of in-to the NMG islanding capability dependent batteries C r Normalized economic cost G r Normalized CO 2 emissions MPC ST Predictive management strategy with standard electricity tariffs MPC UT Predictive management strategy with PID/RB TMG PID/rule-based strategy for ther-C a Heat capacity of air (J kg -1 K -1 ) updated electricity tariffs C t Electricity paid after electricity tariffs g r Solar transmittance of a window are updated and a reward is given in case of successful NMG islanding (e) G t Total economic bonus
	HP	Heat pump (m)	PV	Photovoltaic iffs in case of successful islanding
			xxv

α: sum of normalized electricity tariffs and normalized CO 2 emissions. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 159 c ) et valeur de la fonction objectif (J NMG ) pour les deux stratégies, selon la configuration d'îlotage (simulations sur 1 jour). MPC : commande prédictive. RB : algorithme fondé sur des règles. Sc. : scénario. Op. (MPC) : opération (MPC). Conf. : configuration (voir Sous-section 4.3.1). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . xlvi 5 Chaleur produite Q FCU,z (kWh) par le FCU équipant la pièce z (simulation de 3 jours

). PID FCU : stratégie PID pour le contrôle des FCUs. MPC FCU : stratégie prédictive sans optimisation pour le contrôle des FCUs. MPC FCU : stratégie prédictive avec optimisation pour le contrôle des FCUs. . . . . . . . . . . . . . . li 6 Coût calculatoire pour une pièce (simulations de 3 jours). PID FCU : stratégie PID pour le contrôle des FCUs. MPC FCU : stratégie prédictive sans optimisation pour le contrôle des FCUs. MPC FCU : stratégie prédictive avec optimisation pour le contrôle des FCUs. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . lii 7 Coût de l'électricité soutirée au réseau électrique C c (simulations de 3 jours). PID HP /RB TES : stratégie PID/fondée sur des règles pour le contrôle de la pompe à chaleur et du TES. MPC HP/TES : stratégie prédictive sans optimisation pour le contrôle de la pompe à chaleur et du TES. MPC HP/TES : stratégie prédictive avec optimisation pour le contrôle de la pompe à chaleur et du TES. . . . . . . . . . . liii 8 Coût calculatoire (simulations de 3 jours). Is. : scénario d'îlotage. Cf. : configuration (voir sous-section 5.5.2). PID/RB MG : stratégie PID/fondée sur des règles. MPC MG : stratégie MPC sans optimisation. T r : température de confort. T e,4 : contrainte de température pour l'eau dans le ballon d'eau chaude (couche 4). En vert : meilleure performance. . . . . . . . . . lviii xix LIST OF TABLES 11 1.5 Energy resources, features, and novel aspects of demonstration projects (part 1/2). MG: microgrid. PV: photovoltaics. . . . . . . . . . . . . . . . . . . . . . . . 30 1.6 Energy resources, features, and novel aspects of demonstration projects (part 2/2). EMS: energy management system. EV: electric vehicle. RNN: recurrent neural network. SCADA: supervisory control and data acquisition. V2G: vehicleto-grid. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 1.7 A focus on papers dealing with model predictive control (MPC) for MG/NMG management. CHP: combined heat and power. EMS: energy management system. ESS: energy storage system. MG: microgrid. NMG: networked microgrid. PCC: point of common coupling. PI: proportional integral. RES: Renewable energy source. VSI: voltage-source inverter. WT: wind turbine. . . . . . . . . . . . . . . 34 1.8 A focus on papers dealing with multi-agent systems (MASs) for MG/NMG management. DER: distributed energy resource. DR: demand response. ESS: energy storage system. IBDR: incentive-based demand response. MG: microgrid. NMG: networked microgrid. WT: wind turbine. . . . . . . . . . . . . . . . . . . . . . . . 36 1.9 A focus on papers dealing with game theory (GT) methods for MG/NMG management. EMS: energy management system. ESS: energy storage system. MG: microgrid. MIP: mixed integer programming. NMG: networked microgrid. PSO: particle swarm optimization. WT: wind turbine. . . . . . . . . . . . . . . . . . . 39 1.10 A focus on papers dealing with stochastic programming (SP) for MG/NMG management. APPM-RE: aggregate production planning model with onsite renewable energy. DG: distributed generator. ESS: energy storage system. MILCQP: mixed integer linear constrained quadratic programming. MILP: mixed-integer linear programming. MINLP: mixed-integer nonlinear programming. MG: microgrid. NMG1.12 A focus on papers dealing with artificial intelligence (AI) methods for MG/NMG management (part 1/2). ANFIS: adaptive neuro-fuzzy inference system. ANN: artificial neural network. DG: distributed generator. DR: demand response. DSM: demand-side management. ESS: energy storage system. MG: microgrid. NMG: netwoked microgrid. RL: reinforcement learning. WT: wind turbine. . . . 45 1.13 2.1 Electric vehicle (EV) schedules. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Performance assessment (7-day simulation). RB: rule-based (reference) strategy. MPC fb : predictive management strategy of a fictitious battery. MPC ib : predictive management strategy of independent batteries. . . . . . . . . . . . . . . . . . . . 2.3 Economic cost assessment (7-day simulation). RB: rule-based (reference) strategy. MPC fb : predictive management strategy of a fictitious battery. MPC ib : predictive management strategy of independent batteries. . . . . . . . . . . . . . . . . . . . 2.4 CO 2 emissions assessment (7-day simulation). RB: rule-based (reference) strategy. MPC fb : predictive management strategy of a fictitious battery. MPC ib : predictive management strategy of independent batteries. . . . . . . . . . . . . . . . . . . . 2.5 Computational cost (7-day simulation). MPC fb : predictive management strategy of a fictitious battery. MPC ib : predictive management strategy of independent batteries. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 Islanding assessment. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 Bank of batteries configurations. . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.3 EV scenarios. The state of charge is given for EVs arriving at the NMG parking lot. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.4 lation). For configuration and operation, see Sections 2.3 and 2.5. MPC ST : MPC strategy with standard electricity tariffs. MPC UT : MPC strategy with updated electricity tariffs. RB: rule-based strategy. C c : economic cost. G t : reward. G c : CO 2 emissions. J NMG : objective function. . . . . . . . . . . . . . . . . . . . . . . 4Cf.: configuration (see Section 6.2). MPC MG : optimization-free MPC strategy. PID/RB MG : PID/rule-based strategy.

T r : thermal comfort constraint ( • C). T e,4 : TES constraint ( • C). The values in green indicate the best results. . . . . . . . . e Internal diameter of the TES (m) ØJ w Internal diameter of the HWT (m) e Height of one TES layer (m) ∆x w Height of one HWT layer (m) f FCU shell/water-side area (m 2 ) A out f FCU tube/air-side area (m 2 ) A w,c Cross sectional surface of one HWT layer (m 2 ) c Possible charging power (fictitious battery) (kW) C c Economic cost (e kWh -1 ) c c Specific heat of the solar fluid (J kg -1 K -1 ) p Flow rate of the water circulating between the HP and the TES (m 3 s -1 ) F s FCU supply air flow rate (m 3 s -1 ) F t Flow rate of the water circulating between the FCUs and the TES (m 3 s -1 )

F w Flow rate of the water circulating between the HWT and the TES (m 3 s -1 )

  Total volume of the TES heat exchanger (m 3 )

	V h	Total volume of the HWT heat ex-
		changer (m 3 )
	V w	Total volume of the water in the HWT
		(m 3 )
	X	Space in a room occupied by people
		(m 2 )
	x e	Filtered derivative action
	x i	Integral action
	Y FCU Optimization vector for comfort man-
		agement
	Subscripts
	f b	Fictitious battery
	i	Time step index
	i f	Time step index at which an electric ve-
		hicle leaves the parking lot
	ib	Independent batteries
	in	Inlet
	j, l, m, p, t, z Indices
	k	Actual time step index
	max Maximum
	min Minimum
	out	Outlet

  , 68, 69, 70, 71, 72, 73, 74, 75, 76, 77]

	Contrôle de statisme	[78, 79, 80, 81, 82, 83, 84, 85, 86, 87]
	Autres méthodes de programmation	[88, 89, 90, 91, 92, 10, 93, 94, 95, 96]

Chapitre 2, qui aborde le microréseau électrique, une gestion prédictive de batteries indépendantes (où chaque batterie dispose de son propre profil de charge), une gestion prédictive d'une batterie fictive (où toutes les batteries partagent le même profil de charge, dans l'idée de réduire le temps de calcul), et une gestion fondée sur des règles ont été développées, puis comparées. Dans le Chapitre 3, qui traite d'un réseau de microréseaux, une stratégie de gestion prédictive a été développée afin de réaliser une opération d'îlotage. Enfin, dans le Chapitre 4, des stratégies de gestion prédictive ont été développées. Ces stratégies reposent sur des stratégies prédictives sans optimisation et sont comparées à des stratégies prédictives reposant sur de l'optimisation. Enfin, une synthèse du travail est réalisée dans la Conclusion.

  nombre croissant de générateurs décentralisés ainsi que le déploiement des VEs et des systèmes de stockage d'énergie hybrides augmentent la complexité globale à gérer. Cette complexité est également accrue par le déploiement des NMGs. C'est pourquoi des stratégies capables de prendre en compte des systèmes (décentralisées) complexes et des incertitudes

												533 (33%)
						244 (15%)
						216 (13%)
	2021			147 (9%)
		65 (4%)
					178 (11%)
						226 (14%)
								334 (51%)
		28 (4%)
		51 (8%)
	2016	48 (7%)
		34 (5%)
			74 (11%)
			88 (13%)
									Commande prédictive
		63 (48%)						Systèmes multi-agents
		14 (11%)							Théorie des jeux
		9 (7%)							Programmation stochastique
	2011	4 (3%)							Optimisation robuste
		8 (6%)							Intelligence artificielle
		29 (22%)						Contrôle de statisme
		3 (2%)
	0	50	100	150	200	250	300	350	400	450	500	550	600

Nombre d'articles de recherche traitant de la gestion des MGs/NMGs publiés dans des revues à comité de lecture. Figure 1 -Les méthodes utilisées pour la gestion des MGs/NMGs avec un accent sur les années 2011, 2016 et 2021. Les documents de recherche considérés ici -ces articles traitent de différents aspects de la gestion des MGs/NMGs -sont publiés dans des revues à comité de lecture appartenant aux principaux éditeurs de contenu scientifique.

croissantes sont nécessaires. La littérature manque d'un cadre pour ce type de stratégie. Dans ce contexte, la théorie des jeux (voir Section 1.9) est un outil prometteur. En outre, mentionnons que le développement et la mise en oeuvre de stratégies efficaces de gestion de l'énergie nécessitent des données, une instrumentation adaptée, des systèmes d'acquisition de données et des protocoles de transmission efficaces.

Tableau 2 -

 2 Évaluation des performances pour des simulations sur 7 jours. La stratégie fondée sur des règles RB est la stratégie de référence. MPC fb est la stratégie de gestion prédictive d'une batterie fictive. MPC ib est la stratégie de gestion prédictive de batteries indépendantes.

			Performances [J MG ]
			Nombre de véhicules électriques
	Microréseau Stratégie	8	16
		RB	241,2	251,3
	MG 1	MPC fb	231,3	241,3
		MPC ib	236,6	242,1
		RB	308,4	336,6
	MG 2	MPC fb	302,1	313,6
		MPC ib	300,6	309,7
		RB	400,7	440,2
	MG 3	MPC fb	392,7	414,0
		MPC ib	386,1	404,7

  Coût calculatoire pour des simulations sur 7 jours. MPC fb est la stratégie de gestion prédictive d'une batterie fictive. MPC ib est la stratégie de gestion prédictive de batteries indépendantes.

			Coût calculatoire
			Nombre de véhicules électriques
	Microréseau Stratégie	8	16
	MG 1	MPC ib MPC fb	344538 538128	1054242 631548
	MG 2	MPC ib MPC fb	522270 242298	1125810 633312
	MG 3	MPC ib MPC fb	551970 417330	1778616 639864
	avec une gestion indépendante des batteries (MPC

Le coût calculatoire a été évaluée dans ce chapitre. Ce dernier est défini comme suit

(4)

:

coût calculatoire = temps de calcul × nombre d unités d exécution

(4)

D'après le Tableau 2, la stratégie qui donne les meilleurs résultats est la stratégie MPC Tableau 3ib ), au prix d'un coût calculatoire élevé qui s'accroit grandement avec l'augmentation du nombre de VEs, comme on peut le voir dans le Tableau 3. En effet, comparé à la stratégie de référence, avec 16 VEs, les performances sont meilleures de 3,6 % pour le MG 1 et de 8 % pour les MGs 2 et 3, cependant, le temps de calcul est compris entre 60 000 et 100 000 secondes (avec la stratégie MPC ib ). La stratégie MPC avec gestion d'une batterie fictive (MPC fb ) permet de meilleurs résultats que la stratégie de référence (RB) mais se démarque de la première stratégie prédictive (MPC ib ) car son temps de calcul reste maîtrisé, même quand le nombre de VEs augmente. En effet, les performances pour 16 VEs sont meilleures de 4 % pour le MG 1, de 6,8 % pour le MG 2 et de 6 % pour le MG 3 alors que le temps de calcul reste stable, environ 35 000 sec pour un coût calculatoire de de 63 500, soit deux fois moins que pour la stratégie (MPC ib ) au minimum. C'est pourquoi, lors d'une implémentation in situ, la stratégie MPC fb est à privilégier.

5 Gestion d'un microréseau multi-énergie (électrique et ther- mique) 5.1 Introduction

  qu'il ne l'est pas avec la stratégie basée sur des règles. De plus, la stratégie MPC utilise les véhicules électriques lors de l'îlotage ce qui augmente l'autonomie du NMG. Ainsi, moins d'énergie est achetée au réseau électrique. Dans tous les cas, les émissions de CO 2 et la valeur de la fonction objectif J NMG sont plus faibles lorsque la stratégie MPC est utilisée. Notons que l'algorithme fondé sur des règles ne peut pas îloter le NMG, ce qui entraîne une

	du scénario 3. Il est dangereux que le réseau électrique subisse des perturbations et que le NMG soit confronté à un black-out avec l'algorithme fondé sur des règles et qu'aucune charge critique ne soit satisfaite. De plus, comme les pannes sont des événements coûteux économiquement, des démarrages à froid sont nécessaires et sont malheureusement coûteux économiquement. C'est pourquoi le réseau électrique récompense la stratégie MPC pour l'îlotage des MGs. En consé-quence, on observe une réduction économique des coûts pour la stratégie MPC. En outre, notons que la réduction du coût économique obtenue grâce à la stratégie MPC est observée même sans modification des tarifs d'achat d'électricité dans certains cas, comme pour la configuration 2 du scénario 2. En effet, pour le scénario 2 (configuration 2) le MG1 est îloté avec succès avec la stratégie MPC alors Tableau 4 -Facture d'électricité, émissions de CO 2 (G c ) et valeur de la fonction objectif (J valeur plus élevée pour la fonction objectif par rapport à la stratégie MPC à cause des pénalités. NMG ) pour les deux stratégies, selon la configuration J NMG RB MPC 17320 13499 16547 14412 16751 14300 22419 21013 13864 13603 17015 13331 19897 19721 La stratégie MPC est donc intéressante pour déterminer comment îloter les MGs d'un NMG. Les systèmes d'eau chaude solaire pour le chauffage des bâtiments sont de plus en plus populaires du fait de leurs avantages environnementaux et économiques. Cependant, la faisabilité économique dépend de manière significative de la capacité à effectuer une évaluation précise d'îlotage (simulations sur 1 jour). MPC : commande prédictive. RB : algorithme fondé sur des règles. Sc. : scénario. Op. (MPC) : opération Facture d'éléctricité (e) Emissions de CO du fonctionnement du système selon différentes conditions. Les microréseaux électriques et les 2 ) MPC 106 98 97 2684 97 106 2819 réseaux de microréseaux électriques ont été étudiés précédemment. Ce ne sont pas les seules formes de microréseaux, il en existe d'autres parmi lesquelles : des microréseaux thermiques et des microréseaux multi-énergies (thermiques-électriques dans le cas d'étude de ce chapitre). 2 (kgCO RB MPC RB 1055 771 106 752 698 100 812 683 101 1200 1148 2700 541 84 98 878 733 106 750 393 2840 Une étude est menée concernant un microréseau multi-énergie réel qui équipe un bâtiment public au Portugal. Ce bâtiment est équipé de systèmes de stockage d'énergie thermique, de capteurs solaires, d'une pompe à chaleur, de ventilo-convecteurs, d'une centrale photovoltaïque, d'un banc de batteries. Des stratégies de gestion prédictive sont proposées afin d'assurer le confort thermique, de stocker la chaleur et de tirer profit du surplus de production PV. Plusieurs questions se posent alors dans la gestion du système étudié : -comment gérer l'interconnexion entre les microréseaux thermiques et électriques ? -est-il possible d'implémenter facilement une stratégie de gestion prédictive efficace pour gérer le microréseau thermique-électrique ? Dans ce travail, une approche de modélisation modulaire complète du système d'eau chaude solaire utilisé pour le chauffage des pièces du bâtiment est présentée. Cette approche de modé-lisation évalue la dynamique définie à l'aide de la première loi de la thermodynamique et est validée en partie dans le cadre du projet IMPROVEMENT. Ensuite, pour répondre aux ques-tions précédentes, deux types différents de contrôleurs MPC sont comparés à des contrôleurs fondés sur des règles et des contrôleurs PID. Le premier contrôller MPC ne nécessite pas d'opti-(MPC). Conf. : configuration (voir Sous-section 4.3.1). 2 1 1 2 2 2 3 3 2 1 4 4 3 5 7 2 6 1 1 7 7 misation alors que le second repose sur une optimisation. L'objectif de ce travail est de proposer Sc. Conf. (batteries) Op. (MPC) une stratégie facile à mettre en oeuvre et efficace.

  • C afin de toujours disposer de suffisament de chaleur pour l'eau des différents systèmes de ventilation. La température de confort à respecter est programmée entre 8h et 18h. Cette stratégie est notée PID FCU .

	Réseau	HP EMG Pièces	SC HWT TES FCUs	PID HP /RB TES → PID HP /RB TES + MPC HP/TES PID FCU → PID FCU + MPC FCU	PID SC/HWT ou ou	PID HP /RB TES → PID HP /RB TES + MPC HP/TES PID FCU → PID FCU + MPC FCU	Electricité Fluide Fluide Vanne	fournie froid chaud	Figure 6 -Stratégie de gestion du microréseau thermique. EMG : microréseau électrique. HP : pompe à chaleur. SC : collecteurs solaires. HWT :	réservoir d'eau chaude. TES : stockage d'énergie thermique. FCU : ventilo-convecteurs. PID FCU : stratégie PID pour le contrôle des FCUs.	MPC FCU : stratégie prédictive sans optimisation pour le contrôle des FCUs. MPC F CU : stratégie prédictive avec optimisation pour le contrôle des	FCUs. PID PID HP : stratégie PID pour le contrôle de la pompe à chaleur. RB TES : stratégie SC/HWT : stratégie PID contrôlant les SC et le HWT.	MPC HP/TES : stratégie prédictive sans optimisation pour le contrôle de la pompe à chaleur et du fondée sur des règles pour le contrôle du TES.	TES.

Tableau 5 -

 5 Chaleur produite Q FCU,z (kWh) par le FCU équipant la pièce z (simulation de 3 jours). PID FCU : stratégie PID pour le contrôle des FCUs. MPC FCU : stratégie prédictive sans optimisation pour le contrôle des FCUs. MPC FCU : stratégie prédictive avec optimisation pour le contrôle des FCUs.

	Q FCU,z [kWh]
	Pièce

  • C. Le TES est chauffé à nouveau par la pompe à chaleur lorsque sa température descend en dessous de 38 • C. La deuxième règle est de chauffer le TES avec le HWT, si la température du HWT est plus élevée que celle du TES. Cette stratégie est notée PID HP /RB TES . Tableau 6 -Coût calculatoire pour une pièce (simulations de 3 jours). PID FCU : stratégie PID pour le contrôle des FCUs. MPC FCU : stratégie prédictive sans optimisation pour le contrôle des FCUs. MPC FCU : stratégie prédictive avec optimisation pour le contrôle des FCUs.

					Coût calculatoire
					Pièce
	Saison	Stratégie	R1/R2	R3	R4
		PID FCU		36	81	22
	Printemps MPC FCU	a	132192	280980	149436
		MPC FCU		2891	2827	3072
		PID FCU		34	47	23
	Hiver	MPC FCU	a	203940	283518	162846
		MPC FCU		5185	2754	2848

c [e] Surplus de production PV

	Saison	Stratégie	Non	Oui
		PID HP /RB TES	26,36	21,91
	Hiver	MPC HP/TES	13,54	11,18
		MPC HP/TES	14,08	12,34
		PID HP /RB TES	13,41	7,53
	Printemps	MPC HP/TES	0,31	0,35
		MPC HP/TES	0,42	0,42
	à cette période. Pour des questions de flexibilités dans, la pompe à chaleur peut être utilisée la
	nuit avec les stratégies prédictives. Il est donc nécessaire d'utiliser la pompe à chaleur au bon
	moment tout en s'assurant que la température de la 4 e couche du TES est supérieure à 38 • C et
	qu'elle soit utilisée lorsque les tarifs d'achat de l'électricité sont bas ou lorsqu'il y a un surplus
	de production photovoltaïque qui peut alimenter la pompe à chaleur. Une considération qui
	également peut être prise en compte sont les émissions de CO 2 liées à la production du réseau
	électrique, ces données prévisionnelles sont utilisées pour trouver des moments dans la journée
	où l'énergie est propre pour alimenter la pompe à chaleur. Cette idée a déjà été exploitée par
	[109] pour l'utilisation d'une pompe à chaleur.

Tableau 8 -

 8 Coût calculatoire (simulations de 3 jours). PID HP /RB TES : stratégie PID/fondée sur des règles pour le contrôle de la pompe à chaleur et du TES. MPC HP/TES : stratégie prédictive sans optimisation pour le contrôle de la pompe à chaleur et du TES. MPC HP/TES : stratégie prédictive avec optimisation pour le contrôle de la pompe à chaleur et du TES.

				Coût calculatoire
				Surplus de production PV
	Saison	Stratégie		Non	Oui
		PID HP /RB TES	126	179
	Hiver	MPC HP/TES	a	3280284	3229758
		MPC HP/TES		2824	2566
		PID HP /RB TES	157	176
	Printemps MPC HP/TES	a	2788524	2589102
		MPC HP/TES		1950	2669
	a 18 unités d'exécution utilisées en parallèle.

5.5.3 Stratégies de gestion PID

  /RB MG et MPC MG sont respectivement la stratégie PID et fondée sur des règles et la stratégie MPC sans optimisation. Toutes deux sont appliquées à la gestion des ressources thermiques et du confort thermique des usagers. PID/RB MG associe la stratégie PID FCU pour le contrôle des FCUs et la stratégie PID HP /RB TES pour le contrôle de la pompe à chaleur et du TES. MPC MG associe la stratégie MPC FCU pour le contrôle des FCUs et la stratégie MPC HP/TES pour le contrôle de la pompe à chaleur et du TES.

	8 h le premier jour de la simulation à 8 h le deuxième jour.
	Les configurations étudiées sont les suivantes :
	-Configuration 1 : la puissance consommée est multipliée par deux par rapport aux données
	réelles, la production solaire PV est celle du pilote. La puissance de la batterie est 2,69
	kW, sa capacité est 10 kWh.
	-Configuration 2 : la puissance consommée et la production solaire PV sont multipliées par
	2 et par 0,5, respectivement, par rapport aux données réelles. La puissance de la batterie
	est 2,69 kW, sa capacité est 10 kWh.
	-Configuration 3 : la puissance consommée et la production solaire PV sont multipliées par
	4 et par 2 respectivement, par rapport aux données réelles. La puissance de la batterie est
	2,69 kW, sa capacité est 10 kWh.
	-Configuration 4 : la puissance consommée et la production solaire PV sont multipliées par
	4 et par 2, respectivement, par rapport aux données réelles. La puissance de la batterie est
	5 kW, sa capacité est 15 kWh.
	4 groupes de contraintes existent :
	-Groupe A : la température de confort est 21 • C, la contrainte de température pour l'eau
	présente dans le TES est 38 • C.
	-Groupe B : la température de confort est 21 • C, la contrainte de température pour l'eau
	présente dans le TES est 36 • C.
	-Groupe C : la température de confort est 19 • C, la contrainte de température pour l'eau
	présente dans le TES est 38 • C.
	-Groupe D : la température de confort est 19 • C, la contrainte de température pour l'eau
	présente dans le TES est 36 • C.

5.5.4 Résultats Concernant

  le microréseau électrique, il faut noter que sa consommation est toujours très faible et inférieure à la production solaire PV pendant la journée et, grâce au surplus de production solaire PV, le banc de batteries est chargé. Pendant la nuit, la consommation est très faible et les batteries peuvent facilement supporter la charge. Sont présentés dans cette section les résultats en matière de gestion du microréseau thermique lors d'un îlotage. Plusieurs observations peuvent être faites selon les Tableaux 9 et 10 qui présentent respectivement les valeurs des critères d'évaluation C MG et C MG . C HP/TES associe coût économique, émissions de CO 2 et contrainte de température pour l'eau présente dans le TES. C M G associe C HP/T ES et contrainte de température pour l'air des pièces. Dans ces tableaux, il est à noter que la stratégie prédictive est meilleure que la stratégie PID/fondée sur des règles selon C MG . Cependant, des améliorations restent à apporter concernant la stratégie prédictive de gestion des ressources. En effet, selon C HP/TES , la commande prédictive sans optimisation présente un défaut : si durant le pas de temps actuel, la période est une période d'occupation, le microréseau doit répondre aux besoins thermiques au cours de cette période. Dans ce cas, la stratégie prédictive ne peut pas prédire les besoins au cours d'une seconde période d'occupation, c'est ce qu'il se passe pour le groupe C (T r = 19 • C, T e,4 = 38 • C) des contraintes, selon le scénario 2 de l'îlotage. Dans tous les autres cas, à l'exception d'un cas (le scénario 2, configuration 1 du groupe D (T r = 19 • C, T e,4 = 38 • C), la stratégie prédictive est meilleure. Notons que C MG prend en compte un élément essentiel : le confort thermique des pièces. Ce critère n'est pas bien respecté par la stratégie PID/fondée sur des règles, ce qui rend la stratégie prédictive intéressante. De plus, la consommation liée au chauffage des pièces est réduite grâce à la commande prédictive, ce qui explique les écarts élevés observés pour C MG et pour le groupe A (T r = 21 • C, T e,4 = 38 • C).

	Tableau 9 -Critère d'évaluation C HP/TES pour les opérations d'îlotage (simulations sur 4 jours). Is. : scénario d'îlotage. Cf. : configuration (voir	sous-section 5.5.2). PID/RB MG : stratégie PID/fondée sur des règles. MPC MG : stratégie MPC sans optimisation. T r : température de confort.	T e,4 : contrainte de température pour l'eau dans le ballon d'eau chaude (couche 4). En vert : meilleure performance.

  microréseaux et peuvent être utilisés comme système de stockage. Les systèmes de stockage peuvent être utilisés selon un mode de décharge standard ou selon un mode de décharge profonde. Avec la stratégie prédictive, l'îlotage planifié est réalisé en prenant en compte la criticité de la charge, le recours aux véhicules électriques et le mode de décharge. Grâce à l'approche proposée, les microréseaux peuvent s'îloter plus facilement, ils sont donc plus robustes et autonomes en énergie. Un système de récompense a également été proposé dans ce manuscrit, permettant au NMG étudié d'obtenir une récompense et de réduire son coût économique. La commande prédictive réussit à déterminer, pour les périodes d'îlotage, le mode de décharge des batteries à utiliser pour les MGs composant le NMG. La méthode d'optimisation utilisée est la recherche directe, qui ne nécessite donc pas d'importantes ressources calculatoires, ce qui permet à la stratégie développée d'être une bonne candidate à une implémentation in situ.-l'étude des microréseaux multi-énergies (thermiques et électriques) n'est pas répandue dans la littérature mais le potentiel d'interaction en matière d'échange d'énergie est tout à fait intéressant et nécessite d'être étudié. Dans ce manuscrit et dans le cadre du pro-

le Chapitre 2 traite développement d'un algorithme prédictif pour la gestion d'un microréseau électrique équipé de batteries fixes et mobiles. Dans un microréseau équipé d'un banc de batteries fixes et de véhicules électriques, la gestion de tous les systèmes de stockage peut être complexe. Habituellement, les batteries sont gérées indépendamment. Cependant, même s'il s'agit d'une stratégie efficace, des ressources de calcul sont d'autant plus importantes que le nombre de véhicules électrique est important. C'est pourquoi une stratégie pour la gestion d'une batterie unique (fictive) est proposée. Dans ce manuscrit, chaque véhicule électrique a un ordre de priorité et chaque état de charge est connu grâce à l'approche prédictive proposée. L'utilisation de cette méthode pour réduire le temps de calcul a été un succès même si l'efficacité (coût économique et émissions de CO 2 ) est un peu diminuée. Notons que les stratégies MPC étudiées dans ce chapitre sont plus performantes que la stratégie de référence, qui est fondée sur des règles.

-ensuite, une stratégie de gestion prédictive a été développée pour piloter et, si besoin, îloter un réseau de microréseaux, ou une partie de celui-ci, en fonction de la charge critique et de la disponibilité des véhicules électriques, apportant ainsi de la robustesse au NMG. L'îlotage est l'un des atouts des microréseaux et des NMG. Dans la littérature, pour des NMG, en cas d'îlotage, des niveaux de priorité ont été donnés à chaque microréseau en fonction de la criticité des charges. Les systèmes de stockage sont déchargés pour soutenir d'abord les charges critiques et ensuite, si cela est possible, ils soutiennent les charges standard. Dans ce manuscrit, cette idée a été améliorée. Les véhicules électriques font désormais partie des jet Interreg Sudoe IMPROVEMENT, un véritable microréseau multi-énergie qui équipe des bâtiments publics est étudié. Enfin, une stratégie de gestion prédictive, sans optimisation, a été développée pour gérer les ressources thermiques de ce système et le confort thermique des usagers, en mode connecté au réseau électrique ou en mode déconnecté du réseau. Cette stratégie a été comparée à une stratégie prédictive standard, reposant sur une l'optimisation, en mode connecté au réseau électrique. Le temps de calcul a été réduit de manière significative tout en proposant des résultats quasiment aussi bons concernant les contraintes, la réduction du coût économique et des émissions de CO 2 . En raison du temps de calcul élevé de la stratégie prédictive reposant sur une optimisation, la stratégie prédictive sans optimisation est préférable (en mode connecté au réseau éléctrique). Par ailleurs, des scénarios avec de l'îlotage planifié ont été testés et validés en simulation, ce qui ne semble jamais avoir été fait pour des microréseaux multi-énergies.

  The research work of this thesis then evolves within the framework of the Interreg Sudoe project IMPROVEMENT (Integration of Combined Cooling, Heating and Power Microgrids in Zero Energy Public Buildings with High Power Quality and Continuity Requirements). This project is founded by the European Union, under the Interreg Sudoe program [17].

Table 1 .

 1 1: Review papers (part 1/2). AC: alternative current. DC: direct current. DER: distributed energy resource. EMS: energy management system. EV: electric vehicle. MAS: multi-agent system. MG: microgrid. MPC: model predictive control. NMG: networked microgrid. RES: renewable energy system.

	1 Introduction

Table 1 .

 1 2: Review papers (part 2/2). AC: alternative current. DC: direct current. DER: distributed energy resource. EMS: energy management system. EV: electric vehicle. MAS: multi-agent system. MG: microgrid. MPC: model predictive control. NMG: networked microgrid. RES: renewable energy system.

Table 1 .

 1 3: Discussed papers highlighting recent advances in MG/NMG management, according to the method used (see Section 3).

	Method		Discussed papers		Section
	Model predictive control	[19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31]	3.1
	Multi-agent systems	[32, 33, 34, 35, 36, 37, 38, 39, 40, 41]	3.2
	Game theory		[8, 42, 43, 44, 45, 46, 47, 48, 49]	3.3
	Stochastic programming		[50, 51, 52, 53, 54, 55, 56, 57]		3.4
	Robust optimization		[58, 59, 60, 61, 62, 63, 64]		3.5
	Artificial intelligence	[65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77]	3.6
	Droop control	[78, 79, 80, 81, 82, 83, 84, 85, 86, 87]	3.7
	Other programming methods	[88, 89, 90, 91, 92, 10, 93, 94, 95, 96]	3.8
			o f A
	K y t h n o s , G r e e c e S a n t a R i t a j a i l , U n i t e d S t a t e s S e n d a i , J a p a n o f A B o r n h o l m I l l i n o i s , D i n s t i t u t e e n m a r k o f t e c h n o l o g y , U m n i t e d e r i c a S t a t e s
	2005	2010	2015	2020

Table 1 .

 1 4: Key dates, source of funding, and project scale.

	MG's name/Place	Key dates	Source of funding	Scale
	Kythnos, Greece	Operational since 2001.	FP5 and FP6	Group of 12 houses.
	Santa Rita jail, USA	PV installed in 2002.	CERTS	Group of jail buildings. Peak consumption: 3 MW.
	Sendai, Japan	Designed in 2004. After some test, operational since 2008. Islanding operation in 2011.	NEDO	University and public buildings (2007-2008). Peak consumption: 1,6 MW.
	Bornholm, Denmark	Islanding tests in 2007, 2008 and 2009.	FP7 : Ecogrid UE	District/Regional city of Bornholm (2000 households). Peak consumption: 63 MW.
	Illinois institute of Technology, USA	Microgrid conception in 2008.	DOE	Campus. Peak consumption: 10 MW.
	Nicegrid, France	Project launched in 2011. Islanding tests in 2015.	FP7 -Grid4EU	District of Carros (MG). Peak consumption: 230 kW.
	iBats in Sierre, Switzerland	First presentation of the project in 2012.	HES-SO Valais-Wallis, CSEM	More than 50 companies in the Sierre technopole.
	REIDS, Semakau island, Singapour	Roadmap proposed in 2015.	REIDS	District of 250 apartments.
	Bornholm 2.0, Denmark	Tests from 2016 to 2019.	Ecogrid 2.0	District/Regional city of Bornholm (1000 households).
	Simris, Sweden	Constructed in 2017.	H2020 -interflex	Village of Simris. Peak consumption: 800 kW.

Table 1 .

 1 6: Energy resources, features, and novel aspects of demonstration projects (part 2/2). EMS: energy management system. EV: electric vehicle. RNN: recurrent neural network.SCADA: supervisory control and data acquisition. V2G: vehicle-to-grid.

	MG's name/Place	Energy resources	Features	Novel aspects
	iBats, Sierre, Switzerland	Total power: 203,5 kW. Total capacity: 25 kWh.	Smart management thanks to forecast consumption and production, load control, smart meters, EMS.	Smart management thanks to forecast power consumption and power generation.
			Islanding with a full	Demonstration project on
			autonomy, utilization of	the easy and cheap access
			EVs in V2G, frequency	to renewable energies to
	REIDS, Semakau island, Singapour	Total power: 4 MW.	regulation thanks to EVs, weather forecast, optimized flux management, remote	disadvantaged communities, EVs with V2G asset, frequency
			control, SCADA, smart	control thanks to EVs,
			meters, load control, cyber	cyber security, EMS,
			security.	remote control.
	Bornholm 2.0, Denmark	Total power: 112,5 MW.	Islanding operation, smart meters, load control, energy market, EVs.	EVs used in a V2G way, energy market.
			Islanding operation,	100% of renewable energies
			smooth islanding	during islanding operation,
		Total power:	transition, power and	smooth islanding
	Simris, Sweden	2,420 MW. Total capacity:	frequency control, peak shaving, demand response	transition, theoretic study of the MPC for a
		1,38 MWh.	program, smart meter,	demonstration project,
			EVs, energy market	RNN forecast, energy
			peer-to-peer.	market peer-to-peer.

Table 1 .

 1 7: A focus on papers dealing with model predictive control (MPC) for MG/NMG management. CHP: combined heat and power. EMS: energy management system. ESS: energy storage system. MG: microgrid. NMG: networked microgrid. PCC: point of common coupling. PI: proportional integral. RES: Renewable energy source. VSI: voltage-source inverter. WT: wind turbine.

	Syst.	Main features	MG/NMG resources	Islanding operation	Noticeable results	Ref.
	NMG	A cooperative MPC framework is proposed for energy management; each local MPC-based EMS MG is equipped with a	Heat pumps, CHP plants, ESSs	-	Cost savings are achieved; grid is lowered the amount of electricity extracted from the main	[19]
		MPC is used for ESS
	NMG	management, a genetic algorithm enables optimizing the ESS	PV solar panels, WTs, ESSs	-	Economic cost is lifetime is extended maximized; battery's	[20]
		schedule
	MG	MPC is compared with PI control for regulation of frequency fluctuations	WTs, diesel generators	-	Frequency regulation is improved using MPC	[21]
	MG	A decentralized MPC control scheme is proposed for hybrid source parallel-connected VSIs converters and	PV solar panels, ESSs		Voltage quality, load enhanced sharing at the PCC and load conditions are	[22]
		MPC is used for EV
		management; feedback			Robustness to
	MG	from aggregated EVs is	WTs, EVs	-	multi-uncertainty of EVs	[23]
		used for higher forecasting			is enhanced
		accuracy
	MG	A 2-level MPC-based EMS is proposed	PV solar panels, diesel generators, ESSs, EVs		Hosting capacity of solar improved PV, EV integration, and voltage quality are	[24]
	MG	MPC is used for frequency regulation in a MG equipped with EVs	Diesel generators, EVs		Frequency deviation is reduced to nearly zero	[25]
	MG	MPC with seamless transfer characteristics is proposed for VSIs	-		Voltage regulation is improved	[26]
	MG	A robust MPC-based EMS is proposed	PV solar panels, generators, ESSs WTs, diesel		Robustness is improved	[27]
		MPC is used for MG
		management; a genetic	PV solar panels,		Operating costs are
	MG	algorithm is used as an	WTs, microturbines,	-	reduced; the ESS is better	[28]
		optimizer for the proposed	diesel generators		managed
		MPC controller
		An MPC strategy is
	MG	proposed to improve MG operation under real-world	PV solar panels, WTs	-	Total economic cost is significantly reduced	[29]
		conditions
		MPC is used in a MG
		demonstration project	PV solar panels,		RESs are favoured;
	MG	with an important	WTs, diesel		islanding operation time is	[30]
		proportion of renewable	generators, ESSs		extended
		energy sources
		MPC is used for power	PV solar panels,		Power supply is ensured
	NMG	flow management in a	WTs, water tanks,	-	without any support from	[31]
		highly constrained NMG	ESSs		the main grid

Table 1 .

 1 8: A focus on papers dealing with multi-agent systems (MASs) for MG/NMG management. DER: distributed energy resource. DR: demand response. ESS: energy storage system. IBDR: incentive-based demand response. MG: microgrid. NMG: networked microgrid.WT: wind turbine.

	Syst.	Main features	MG/NMG resources	Islanding operation	Noticeable results	Ref.
	NMG	MAS is introduced for intelligent scheduling of NMG; a 3-layer coordinate control system framework is designed	PV solar panels, WTs, gas turbines, ESSs		Optimal scheduling of MG islanded modes is achieved operation both in grid-connected and	[32]
	NMG	A MAS-based bidding and trading mechanism of DERs is proposed	PV solar panels, microturbines, ESSs WTs, diesel generators,	-	Coordination and are effective interaction between the NMG and the main grid	[33]
	MG	A MAS-based approach for MG operation with included vehicle-to-grid system is proposed	PV solar panels, WTs, ESSs, EVs	-	The amount of electricity grid is minimized extracted from the main	[34]
		A MAS-based technique
		for electrical power	PV solar panels,		MG reliability is
	MG	delivering and electricity	WTs, fuel cells,	-	improved; robust energy	[35]
		price uncertainties control	ESSs, EVs		scheduling is achieved
		is proposed
	MG	A 3-layer MAS for distributed hierarchical control is proposed for islanded MGs	Cyber-physical MG platform		Effectiveness of the conditions method is validated in real hardware-in-the-loop time and under	[36]
	MG	A MAS-based sliding mode control for state of charge balancing is proposed	PV solar panels, ESSs		Current balance and improved power quality are	[37]
	NMG	A MAS-based decentralized approach with fault tolerance control is proposed	PV solar panels, ESSs, microturbines	-	Frequency and voltage tolerance is improved control is efficient; fault	[38]
		A 3-layer MAS
	NMG	architecture is proposed for NMG coordinated operation; a 2-level optimization with	PV solar panels, WTs, ESSs, fuel cells, microturbines	-	Regulation costs are reduced	[39]
		cooperation is done
		A MAS-based
	NMG	reinforcement learning approach is proposed for distributed energy	PV solar panels, WTs	-	Economic profits are increased	[40]
		scheduling in NMGs
					Daily operating costs are
	MG	A MAS-based DR strategy built on an IBDR model is proposed	PV solar panels, WTs, ESSs	-	reduced; the strategy sources to be properly enables all the energy	[41]
					managed

Table 1 .

 1 9: A focus on papers dealing with game theory (GT) methods for MG/NMG management. EMS: energy management system. ESS: energy storage system. MG: microgrid.MIP: mixed integer programming. NMG: networked microgrid. PSO: particle swarm optimization. WT: wind turbine.

	Syst.	Main features	MG/NMG resources	Islanding operation	Noticeable results	Ref.
	NMG	A hybrid EMS based on canonical coalition games for cooperative power proposed exchange management is	PV solar panels, WTs	-	Power exchange canonical coalition game management in NMG should be modeled as a	[8]
	MG	Two GT techniques are proposed for sizing and comparative analysis of a grid-connected NMG	PV solar panels, WTs, ESSs	-	Shapley values provide the play in a cooperative way best results; actors have to	[42]
		The Nash bargaining
	MG	game is selected for MG optimal planning; a PSO	PV solar panels, WTs, ESSs	-	Optimal planning is achieved	[43]
		algorithm is used
		A coalitional-game-theory-
	NMG	based local power exchange algorithm is	PV solar panels, WTs	-	Individual MG utility in the network is increased	[44]
		proposed
		A GT-based strategy for
	NMG	day-ahead economic dispatch capable of solving	PV solar panels, ESSs	-	Each actor achieves its own economic goals	[45]
		MIP problems is proposed
		A multi-scale energy			Operating costs are
	NMG	management strategy and a hierarchical day-ahead distributed algorithm are	PV solar panels, WTs, ESSs		reduced; each aggregator each user maximizes its maximizes its revenue;	[46]
		proposed			payoff
					Total economic cost is
	NMG	A MG energy trading Bayesian game is proposed	PV solar panels, WTs, ESSs, EVs	-	reduced; energy storage's charging and discharging	[47]
					capacity is increased
		A game-theoretic
	NMG	approach is used for day-ahead scheduling; a response program is shiftable-load demand	PV solar panels, ESSs WTs, gas turbines,		Market power, operating deviations are reduced costs, losses, and voltage	[48]
		implemented
	MG	A game theoretic analysis for community MGs is proposed	PV solar panels, ESSs	-

Table 1 .

 1 10: A focus on papers dealing with stochastic programming (SP) for MG/NMG management. APPM-RE: aggregate production planning model with onsite renewable energy. DG: distributed generator. ESS: energy storage system. MILCQP: mixed integer linear constrained quadratic programming. MILP: mixed-integer linear programming. MINLP: mixed-integer nonlinear programming. MG: microgrid. NMG: networked microgrid. PTEM: production task and energy management. WT: wind turbine.

	Syst.	Main features	MG/NMG resources	Islanding operation	Noticeable results	Ref.
		A stochastic MINLP
	MG	model is proposed for optimal operation of	DGs, WTs, ESSs		Total operating costs are reduced	[50]
		islanded droop-based MGs
		A combined SP and			The strategy is efficient
	MG	receding horizon control strategy is proposed; the problem is formulated as a	PV solar panels, WTs, ESSs	-	for islanded and operating costs are grid-connected modes;	[51]
		MILCQP one			reduced
		An optimal risk
		assessment strategy is	PV solar panels,		Integration of EVs and
	MG	proposed, the model is	WTs, diesel		demand response reduce	[52]
		formulated as a MILP	generators, EVs		total operating costs
		2-stage stochastic one
		A MILP framework-based
	MG	model for optimal operation of a MG is	PV solar panels, ESSs, EVs	-	Total expected daily cost is lowered	[53]
		proposed
		The operation of a MG
	MG	equipped with dispatchable generators is formulated as a 2-stage stochastic optimization	PV solar panels, WTs, ESSs, EVs	-	MG flexibility is increased; reduced operating costs are	[54]
		problem
		A regret-based risk-averse
		stochastic PTEM model			The proposed PTEM
	MG	for industrial MG is proposed; the model is	PV solar panels, microturbines	-	approach is effectively risk-averse; economic cost	[55]
		formulated as a MILP			is reduced
		SP-based problem
	MG	An APPM-RE model is proposed; the model is a 2-stage SP considering uncertainties	PV solar panels, WTs, ESSs	-	The model can assist firms MGs in accurately anticipating to wind-and solar-based the effect of transitioning	[56]
	NMG	A chance constrained stochastic conic program model for NMG planning is proposed	PV solar panels, microturbines, ESSs		Operational risks are planning model is effective controlled; the proposed	[57]

Table 1 .

 1 11: A focus on papers dealing with robust optimization (RO) for MG/NMG management. DG: distributed generator. DR: demand response. ESS: energy storage system. MG: microgrid. NMG: networked microgrid. WT: wind turbine.

	Syst.	Main features	MG/NMG resources	Islanding operation	Noticeable results	Ref.
	MG	A 2-stage RO model is proposed for balancing MG operation economy and robustness of	PV solar panels, ESSs WTs, microturbines,	-	System's robustness is are reduced achieved; operating costs	[58]
		The impact of price-based
	NMG	and incentive-based DR programs and batteries sizing on NMG operation	PV solar panels, WTs, ESSs	-	Operating costs are reduced	[59]
		is analyzed
	NMG	A robust distributed energy management scheme is proposed	PV solar panels, WTs, diesel generators, ESSs	-	Operating costs are reduced	[60]
		A 2-stage robust	PV solar panels,		Operating costs are
	NMG	scheduling model is	WTs, fuel cells,	-	reduced; electric power	[61]
		proposed	microturbines, EVs		dispatch is optimized
	MG	A RO-based method is proposed to reduce voltage harmonic distortion	DGs		The developed controller distortion is reduced is robust and efficient; voltage harmonic	[62]
		A robust game-theoretic			The uncertainty of
	NMG	optimization model is proposed for NMG	PV solar panels, WTs, ESSs	-	renewable-based distributed generators is	[63]
		economical operation			tackled
		A 2-stage robust			Operating costs are
	MG	day-ahead optimization model is proposed for	DGs, ESSs		reduced; load shedding is avoided during islanding	[64]
		resilient MG operation			events

Table 1 .

 1 [START_REF] Ziyati | Numerical Modeling of Large-Scale Compact Pv-Csp Hybrid Plants[END_REF]: A focus on papers dealing with artificial intelligence (AI) methods for MG/NMG management (part 2/2). ANFIS: adaptive neuro-fuzzy inference system. ANN: artificial neural network. DG: distributed generator. DR: demand response. DSM: demand-side management. ESS: energy storage system. MG: microgrid. NMG: netwoked microgrid. RL: reinforcement learning. WT: wind turbine.

	Islanding operation	Noticeable results	Ref.

Table 1 .

 1 14. If a paper deals with MG islanding operation, this is highlighted in the table.

Table 1 .

 1 14: A focus on papers dealing with droop control for MG/NMG management. DC: direct current. DG: distributed generator. ESS: energy storage system. MESU: multiple energy storage unit. MG: microgrid. NMG: networked microgrid. NR: Newton-Raphson.SOC: state-of-charge. UPS: uninterruptible power system. WT: wind turbine.

	Syst.	Main features	MG/NMG resources	Islanding operation	Noticeable results	Ref.
		MG coordinated
		controllers are designed,	PV solar panels,		Reliable operation is
	MG	the DC link voltage is used	WTs, microturbines,		achieved; stability is	[78]
		as a feedback parameter in	ESSs		enhanced
		the droop control loop
		A hierarchical control			Validity of the control
		strategy is proposed to			strategy is proved by
	MG	maintain frequency	DGs, WTs, ESSs		theoretical analysis,	[79]
		stability in an islanded			time-domain simulations,
		medium-voltage MG			and field tests
					Voltage/frequency
					recovery and accurate
		A distributed hierarchical			power sharing are
	MG	control with three levels is	DGs		achieved in islanded mode;	[80]
		proposed for AC MGs			flexible power flow
					regulation is achieved in
					grid-connected mode
	MG	A distributed hierarchical control framework is formulated as a three-layer structure	Diesel generators, microsources, ESSs	-	Improved economic regulation are achieved dispatch and frequency	[81]
		An average power sharing
		control strategy for			Power sharing is
	MG	parallel operation of voltage source inverter	DGs	-	improved; circulating current in the parallel	[82]
		based on modular UPSs is			modules are eliminated
		proposed
	MG	A 2-level controlled voltage source is inserted droop control loop into the conventional	DGs		Power sharing is improved; impedances are eliminated unmatched feeder	[83]
		A SOC balancing and
	MG	coordinated control strategy based on the adaptive droop coefficient algorithm for MESUs is	PV solar panels, MESUs		SOC balance and bus achieved voltage stability are	[84]
		proposed
	MG	An enhanced NR approach for power flow analysis in MGs is proposed droop-controlled islanded	DGs		The proposed approach low computation time has excellent accuracy and	[85]
	MG	A pre-synchronisation control strategy based on proposed improved droop control is	DGs		Voltage/frequency accuracy and stability are suppressed provoked by inverters are improved; harmonics	[86]
		A decentralized adaptive			Current sharing error and
	MG	droop control approach for	DGs	-	voltage variations are	[87]
		DC MGs is proposed			reduced

Table 1 .

 1 15: A focus on significant papers dealing with other programming methods than the ones considered previously for MG/NMG management. DC: direct current. DG: distributed generator. DSM: demand-side management. ESS: energy storage system. EWH: electric water heater. MG: microgrid. MILP: mixed-integer linear programming. NMG: networked microgrid. WT: wind turbine.

	Syst.	Main features	MG/NMG resources	Islanding operation	Noticeable results	Ref.
	MG	A rule-based strategy is proposed for DSM in a residential MG	PV solar panels, EWHs, ESSs solar thermal collectors, WTs,	-	Overall cost of the system is reduced	[88]
		A 3-stage stochastic EMS
	MG	framework is proposed for solving optimal day-ahead scheduling with the use of quantum particle swarm	PV solar panels, WTs, microturbines, gas turbines	-	Operating costs are reduced	[89]
		optimization
		The optimization platform	PV solar panels,		Hybrid MGs are more
	MG	REopt to explore multiple	diesel generators,		resilient and cost-effective	[90]
		cost savings	ESSs		than diesel-only MGs
		An adaptive optimal			Effectiveness of the
	MG	defense mechanism is proposed to establish	PV solar panels, microturbines		proposed approach when islanding occurs is	[91]
		secure islanding			demonstrated
		A Monte-Carlo-based
		model is proposed for
	MG	optimization of MG's day-ahead operation, the	PV solar panels, WTs, ESSs, EVs	-	Total operating costs are reduced	[92]
		problem is formulated as a
		MILP
					Operating profit is
		A 2-level optimization			improved by
	NMG	model is proposed for ESS sizing, the problem is	DGs, ESSs		interconnecting MGs, reliability and resilience in	[10]
		formulated as a MILP			case of grid outages are
					enhanced
	MG	An annealing mutation particle swarm proposed optimization algorithm is	PV solar panels, WTs, diesel EVs microturbines, ESSs, generators,	-	Operating costs and environmental protection improved operation reliability is costs are reduced; MG	[93]
	NMG	A distributed secondary control algorithm is designed to regulate islanded MGs frequency and voltage in	DGs		The proposed control communication topologies algorithm is efficient and robust to switching	[94]
		An autonomous smart MG
		is designed and simulated	PV solar panels,		Power is adequately
	MG	for energy independence,	diesel generators,		supplied by the MG to its	[95]
		the automatic control	ESSs		community
		system is rule-based
		An exact feedback
		linearization method
		based on the nonlinear
	MG	differential geometry	DGs, ESSs	-
		theory is proposed to
		linearize bi-directional
		DC/DC converters

Table 2 .

 2 1: Electric vehicle (EV) schedules.

	Electric vehicles Arrival time Departure time SOC (%) a
	EV 1 & EV 9	8 AM	5 PM	4
	EV 2 & EV 10	9 AM	10:30 PM	20
	EV 3 & EV 11	8 AM	5 PM	10
	EV 4 & EV 12	5:15 AM	12:45 PM	20
	EV 5 & EV 13	10:45 AM	4:45 PM	20
	EV 6 & EV 14	5:15 AM	4:45 PM	20
	EV 7 & EV 15	5:15 AM	9:45 PM	20
	EV 8 & EV 16	3:15 AM	11:45 AM	20

In this study, ZOE r135 electric vehicles

[232]

equipped with a 50 kWh batteries E cv , slow charging stations for which P min v is -22 kW and P max v is 22 kW are considered. Different EV scenarios are defined and 2 to 16 electric vehicles are considered (see Table 2.1). The proposed a When arriving at the parking lot of the microgrid. strategies are validated in simulation, with electric vehicles arriving or leaving the parking lot at certain times. As an example, the MG could be an hospital with different schedules for the arrival and departure of employees. According to Kostopoulos et al. [233], the use of the EV batteries is constraint by E min v (20%) and E max v

  21)The same calculation is done for the bank of batteries with E v and P max v being replaced by E b and P max b in (2.18), (2.[START_REF] Parisio | Cooperative MPC-Based Energy Management for Networked Microgrids[END_REF]), (2.20), and (2.21), respectively (with l = n v + 1). The battery state is constrained by the minimum and maximum states of charge (2.6), according to the following power limits P min

	f	(2.22) and P max f	(2.23):

Table 2 .

 2 2: Performance assessment (7-day simulation). RB: rule-based (reference) strategy. MPC fb : predictive management strategy of a fictitious battery. MPC ib : predictive management strategy of independent batteries.

			Performance [J MG ]
			Number of electric vehicles
	Microgrid Strategy	8	16
		RB	241.2	251.3
	MG 1	MPC fb	231.3	241.3
		MPC ib	236.6	242.1
		RB	308.4	336.6
	MG 2	MPC fb	302.1	313.6
		MPC ib	300.6	309.7
		RB	400.7	440.2
	MG 3	MPC fb	392.7	414.0
		MPC ib	386.1	404.7

Table 2 .

 2

			Economic cost [e]
			Number of electric vehicles
	Microgrid Strategy	8	16
		RB	1550.1	1604.7
	MG 1	MPC fb	1398.2	1444.0
		MPC ib	1446.3	1394.9
		RB	1984.6	2132.1
	MG 2	MPC fb	1886.4	1927.6
		MPC ib	1814.0	1840.4
		RB	1621.0	1780.3
	MG 3	MPC fb	1511.5	1573.1
		MPC ib	1390.3	1404.1

3: Economic cost assessment (7-day simulation). RB: rule-based (reference) strategy. MPC fb : predictive management strategy of a fictitious battery. MPC ib : predictive management strategy of independent batteries.

Table 2 . 4 :

 24 CO 2 emissions assessment (7-day simulation). RB: rule-based (reference) strategy. MPC fb : predictive management strategy of a fictitious battery. MPC ib : predictive management strategy of independent batteries.

			CO 2 emissions [kgCO 2 ]
			Number of electric vehicles
	Microgrid Strategy	8	16
		RB	45.7	47.7
	MG 1	MPC fb	44.6	46.6
		MPC ib	45.5	47.2
		RB	950.3	988.9
	MG 2	MPC fb	939.4	978.2
		MPC ib	942.0	973.2
		RB	729.6	773.1
	MG 3	MPC fb	716.9	757.1
		MPC ib	716.7	756.8

Table 2 .

 2

5: Computational cost (7-day simulation). MPC fb : predictive management strategy of a fictitious battery. MPC ib : predictive management strategy of independent batteries.

Computational cost (

with 18 workers used in parallel) Number of electric vehicles

	Microgrid Strategy	8	16
	MG 1	MPC ib MPC fb	344538 538128	1054242 631548
	MG 2	MPC ib MPC fb	522270 242298	1125810 633312
	MG 3	MPC ib MPC fb	551970 417330	1778616 639864

Table 3 .

 3 1: Islanding assessment.

	Highly critical loads Critical loads Stantard loads	Islanding
	Satisfied	Satisfied	Satisfied	Fully successful
	Satisfied	Satisfied	Not satisfied	Successful
	Satisfied	Not satisfied	Not satisfied	Partially successful
	Not satisfied	Not satisfied	Not satisfied	Unsuccessful

Table 3 .

 3 2: Bank of batteries configurations.

	Configuration Power of the batteries (kW) Capacity of the batteries (kWh)
	1	95	300
	2	65.5	230
	3	55	200
	4	20	50
	5	350	800
	6	250	700
	7	400	1000

Table 3 .

 3 3: EV scenarios. The state of charge is given for EVs arriving at the NMG parking lot.

	Electric vehicles Arrival time Departure time State of charge (%)
	EV 1 & EV 9	8 AM	5 PM	50
	EV 2 & EV 10	9 AM	10:30 PM	50
	EV 3 & EV 11	8 AM	5 PM	50
	EV 4 & EV 12	5:15 AM	12:45 PM	50
	EV 5 & EV 13	10:45 AM	4:45 PM	50
	EV 6 & EV 14	5:15 AM	4:45 PM	50
	EV 7 & EV 15	5:15 AM	9:45 PM	50
	EV 8 & EV 16	3:15 AM	11:45 AM	50

Table 3 .

 3 4: Performance assessment, for Islanding Scenario 1 (see Section 2.2) (1-day simulation). For configuration and operation, see Sections 2.3 and 2.5.

		t [e]
		G
		c [e]
		C
	MPC ST : MPC strategy with standard electricity tariffs. MPC	Configuration Operation Number of islanded MGs	(batteries) (both MPCs)

UT : MPC strategy with updated electricity tariffs. RB: rule-based strategy. C c : economic cost. G t : reward. G c : CO 2 emissions. J NMG : objective function.

  α: sum of normalized electricity tariffs and normalized CO 2 emissions.

			P r,1		P f,1	P c,1	P r,2	P f,2	P c,2
			P e,1	P p,1	I s,1	P e,2	P p,2	I s,2
							400
	Power (kW)	0 200				Power (kW)	0 200
		-200					-200
		0	4	8 12 16 20 24	0	4	8 12 16 20 24
			P r,3		P f,3	P c,3	P rn	P f n	P cn
			P e,3	P p,3	I s,3	P pn	I sn
		200					1,000
	Power (kW)	-200 0				Power (kW)	-500 0 500
		0	4	8 12 16 20 24	0	4	8 12 16 20 24
			E bn		E f n	E vn
		1,500
	Energy (kWh)	500 1,000
		0
		0	4	8 12 16 20 24	0	4	8 12 16 20 24
					Time (h)

  α: sum of normalized electricity tariffs and normalized CO 2 emissions.

			P r,1		P f,1	P c,1	P r,2	P f,2	P c,2
			P e,1	P p,1	I s,1	P e,2	P p,2	I s,2
							200
	Power (kW)	0 50 100				Power (kW)	-100 0 100
		-50
		0	4	8 12 16 20 24	0	4	8 12 16 20 24
			P r,3		P f,3	P c,3	P rn	P f n	P cn
			P e,3	P p,3	I s,3	P pn	I sn
		400					600
	Power (kW)	0 200				Power (kW)	0 200 400
	-200					-200
		0	4	8 12 16 20 24	0	4	8 12 16 20 24
		600
	Energy (kWh)	200 400
		0
		0	4	8 12 16 20 24
					Time (h)

  α: sum of normalized electricity tariffs and normalized CO 2 emissions.

			P r,1		P f,1	P c,1	P r,2	P f,2	P c,2
			P e,1	P p,1	I s,1	P e,2	P p,2	I s,2
	Power (kW)	0 50 100				Power (kW)	-100 0 100
		-50
		0	4	8 12 16 20 24	0	4	8 12 16 20 24
			P r,3		P f,3	P c,3	P rn	P f n	P cn
			P e,3	P p,3	I s,3	P pn	I sn
		400					600
	Power (kW)	0 200				Power (kW)	0 200 400
	-200					-200
		0	4	8 12 16 20 24	0	4	8 12 16 20 24
		600
	Energy (kWh)	200 400
		0
		0	4	8 12 16 20 24
					Time (h)

  α: sum of normalized electricity tariffs and normalized CO 2 emissions.

				P r,1		P f,1	P c,1	P r,2	P f,2	P c,2
				P e,1	P p,1	I s,1	P e,2	P p,2	I s,2
		200						200
	Power (kW)	0 100					Power (kW)	-100 0 100
	-100	0	4	8 12 16 20 24	0	4	8 12 16 20 24
				P r,3		P f,3	P c,3	P rn	P f n	P cn
				P e,3	P p,3	I s,3	P pn	I sn
	Power (kW)	0 200					Power (kW)	0 200 400 600
								-200
			0	4	8 12 16 20 24	0	4	8 12 16 20 24
	Energy (kWh)	200 400 600
		0
			0	4	8 12 16 20 24
						Time (h)

  α: sum of normalized electricity tariffs and normalized CO 2 emissions.

			P r,1		P f,1	P c,1	P r,2	P f,2	P c,2
			P e,1	P p,1	I s,1	P e,2	P p,2	I s,2
		200					200
	Power (kW)	0 100				Power (kW)	-100 0 100
		0	4	8 12 16 20 24	0	4	8 12 16 20 24
			P r,3		P f,3	P c,3	P rn	P f n	P cn
			P e,3	P p,3	I s,3	P pn	I sn
	Power (kW)	0 200				Power (kW)	0 200 400 600
							-200
		0	4	8 12 16 20 24	0	4	8 12 16 20 24
	Energy (kWh)	200 400 600
		0
		0	4	8 12 16 20 24
					Time (h)

Table 4 .

 4 1: Bounded values for Evaluation E1 and Evaluation E2. E1 evaluates each measured value and compares it with boundaries (see Section 2.3.2). E2 evaluates each increment between measured values and compares it with an absolute maximum increment (see Section 2.3.2). Results of the data quality check are mentioned in Table 4.2. Only data presenting outliers and/or rare observations (Evaluations E1 and E2) are presented in this table

	E1	E2

Table 4 .

 4 2: Quality check performed on the LNEG pilot building measurements with Evaluation E1 and Evaluation E2. E1 evaluates each measured value and compares it with boundaries (see Section 2.3.2). E2 evaluates each increment between measured values and compares it with an absolute maximum increment (see Section 2.3.2).

	E1	E2

Table 4 .

 4 3: Electricity purchase tariffs (C c ) for different periods of time.

	Time Period	C c [ce/kWh -1 ]
	10:00 PM -8:00 AM	13
	8:00 AM -10:30 AM	17
	10:30 AM -1:00 PM	26
	1:00 PM -7:30 PM	17
	7:30 PM -9:00 PM	26
	9:00 PM -10:00 PM	17

Table 4 .

 4 4: Solar collector parameters.

	Quantity	Value	Description
	U c	1.33	Solar heat loss coefficient (W m -2 K -1 )
	η	0.5	Optical efficiency
	N c	2	Number of collectors (m 2 )
	A c	2.4	Solar collector plate surface area (m 2 )
	ρ c	1012	Solar collector fluid density (kg m -3 )
	c c	4074	Solar collector plate specific heat (J kg -1 K -1 )
	F c	1.7 × 10 -4	Heat transfer fluid flow rate (m 3 s -1 )
	V c	0.0009	Solar collector fluid volume (m 3 )

Table 4 .

 4 5: Hot water tank parameters.

	Quantity Value	Description
	H w	1.8	Height (m)
	V w	0.3	Total volume (m 3 )
	N w	12	Number of layers
	ØJ w	0.5	Internal diameter (m)
	∆x w	0.15	Height of one layer (m)
	A w,c	0.1963	Cross sectional surface of a layer (m 2 )
	k m	398	Thermal conductivity of the coil material (W m -1 K -1 )
	k t	50	Internal heat transfer coefficient between each layer (W m -1 K -1 )
	∆ i	100000	Internal heat transfer scaling parameter
	U A w,h	400	Overall heat transfer coefficient of the heat exchanger (W m -2 K -1 )
	U A w,l	3.07	Overall heat loss coefficient (W m -2 K -1 )

Table 4 .

 4 6: Thermal energy storage parameters. Schematic of the LNEG's 1000 L TES. T h : temperature of the water circulating in the heat pump. T e : temperature of the water in the TES. T w : temperature of the water in the HWT. in: entering fluid. out: leaving fluid. The heat exchanger (from layer 6 to layer 10) is represented by the coil in red.

	Quantity Value	Description
	H e	2	Height (m)
	V e	1	Total volume (m 3 )
	N e	12	Number of layers
	ØJ e	0.8	Internal diameter (m)
	∆x e	0.167	Height of one layer (m)
	A e,c	0.7088	Cross sectional surface of a layer (m 2 )
	U A e,h	500	Overall heat transfer coefficient of the heat exchanger (W m -2 K -1 )
	U A e,l	3.5	Overall heat loss coefficient (W m -2 K -1 )

Table 4 .

 4

			7: Fan coil unit (FCU) parameters.
	Quantity	Value	Description
	k s	401	Heat transfer coefficient between shell-and tube-sides (W m -2 K -1 )
	h	8.33	Coefficient of convective heat transfer (W m -2 K -1 )
	∆ z,1/2	1	Length of the tube for FCUs 1 and 2 (m)
	∆ z,3	2	Length of the tube for FCU 3 (m)
	∆ z,4	9	Length of the tube for FCU 4 (m)
	V f,1/2	0.000124	Volume of the water circulating through the FCUs 1 and 2 (m 3 )
	V f,3	0.000252	Volume of the water circulating through the FCU 3 (m 3 )
	V f,4	0.00259	Volume of the water circulating through the FCU 4 (m 3 )
	ρ a	1.225	Air density (kg m -3 )
	c a	1003.5	Heat capacity of air (J kg -1 K -1 )
	F s,1/2	0.14	Maximum volumetric flow rate of supply air for FCUs 1 and 2 (m 3 s -1 )
	F s,3	0.27	Maximum volumetric flow rate of supply air for FCU 3 (m 3 s -1 )
	F s,4	0.69	Maximum volumetric flow rate of supply air for FCU 4 (m 3 s -1 )
	F t,1/2	1.139 × 10 -4	Maximum volumetric flow rate of the water circulating through the FCUs 1 and 2 (m 3 s -1 )
	F t,3	2.267 × 10 -4	Maximum volumetric flow rate of the water circulating through the FCU 3 (m 3 s -1 )
	F t,4	6.3 × 10 -4

  Figure 4.15: Model validation for room R2, from February 19 to February 22. T r,2 : simulated air temperature in room R2. T r,2 : measured air temperature in room R2. T o : outdoor temperature.

	Temperature ( • C)		12	24	36 T r,2	48 T r,2	60	T o	72	84	96
	-T r,2 ( • C)					T r,2 -T r,2
	T r,2
		0	12	24	36	48	60		72	84	96
						Time (h)
	Temperature ( • C)	0	12	24	36 T r,2	48 T r,2	60	T o	72	84	96
	-1	0	12	24	36	48	60		72	84	96

Table 4 .

 4 9: Model validation. T r,z : air temperature in room z. T e,j : temperature of the water in the TES (layer j).

	Thermal zones		TES
	February	May	May
	T r,2 T r,3 T r,4 T r,2 T r,3 T r,4 T e,1 T e,4
	RM SE 0.75 0.27 0.56 1.00 0.39 0.51 2.27 2.35
	RM SE n 0.11 0.18 0.14 0.21 0.29 0.14 0.21 0.31

  • C. In this case, this error is acceptable, as the reference

						T e,1	T e,4	T e,1	T e,4
	Temperature ( • C)	42 44 46
			0	4	8	12 16 20 24 28 32 36 40 44 48
						T e,1 -T e,1	T e,4 -T e,4
	• C)	2
	-T e,j (	0
	T e,j	-2	0	4	8	12 16 20 24 28 32 36 40 44 48
	Volumetric flow rate (m 3 s -1 )	0 2 4 6	0 •10 -4 4	8	12 16 20 24 28 32 36 40 44 48 F h F w F t
							Time (h)

Table 4 .

 4 10: PID controllers (parameters). TES: thermal energy storage. FCU: fan coil unit.

	PID controller	K p		K i		K d	N
	TES-FCU1	2.87 × 10 -5 4.14 × 10 -6 4.24 × 10 -5	2.67
	TES-FCU2	2.87 × 10 -5 4.14 × 10 -6 4.24 × 10 -5	2.67
	TES-FCU3	7.80 × 10 -5 1.31 × 10 -5 8.72 × 10 -5	24.77
	TES-FCU4	2.14 × 10 -4 7.85 × 10 -6 1.22 × 10 -3	2.23
	FCU-Room R1/R2/R3	7.25		3.45		0.50	9.83
	FCU-Room R4	3.65	1.16 × 10 -1	3.86	6.57 × 10 -1
	u(p) = K p e(p) +	K i p	e(p) +	K d pN p + N	e(p)	(4.26)

Table 4 .

 4 11: Simulation parameters. Let us note that a parallel pool with 18 workers [239] has been used for the MPC FCU strategy, while the other strategies, PID FCU and MPC FCU , do not rely on parallel computing. The so-called workers are Matlab computational engines executing tasks depending on the assignment given by the Parallel Computing Toolbox, the interested reader is referred to the Matlab website for details[239]. The computational cost is defined as follows (4.32):

	Parameters	R1 R2 R3 R4
	Number of people in the room	1	1	4	16
	Beginning of the occupancy period		8 AM
	End of the occupancy period		6 PM
	Air temperature set point (occupancy period)		21 • C
	Minimum air temperature (non-occupancy period)		20 • C
	Maximum air temperature (non-occupancy period)		22 • C
	Air temperature set point (non-occupancy period)		None
	perform the simulations.

computational cost = computation time × number of workers

(4.32)

Table 4 .

 4 12: Average air temperature constraint violation per hour (θ r,z ) (3-day simulation). PID FCU : PID strategy. MPC FCU : optimization-free MPC strategy. MPC FCU : optimization-based MPC strategy.

	θ r,z [ • C h -1 ]

Table 4 .

 4 13: Heat delivered by the FCUs (3-day simulation). PID FCU : PID strategy. MPC FCU : optimization-free MPC strategy. MPC FCU : optimization-based MPC strategy.

	Q FCU,z [kWh]

Table 4 .

 4 Figure 4.25: MPC FCU strategy for thermal comfort management in room R4 (3-day simulation). T r,4 : air temperature in room R4. T o : outdoor temperature. F s,4 : supply air flow rate of FCU 4. F t,4 : flow rate of the water circulating between the TES and FCU 4. 14: Computational cost (3-day simulation). PID FCU : PID strategy (raw result). MPC FCU : optimization-free MPC strategy (raw result). MPC FCU : optimization-based MPC strategy (raw result).

	Temperature ( • C)	0 10 20	0 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72 T r,4 T min r T max r T o
	F s,4 (m 3 s -1 )	0 0.2 0.4 0.6	F s,4	F t,4	•10 -4	0 2 4 6	F t,4 (m 3 s -1 )
			0 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60 64 68 72
			Time (h)

Figure 4.24: PID FCU strategy for thermal comfort management in room R4 (3-day simulation). T r,4 : air temperature in room R4. T o : outdoor temperature. F s,4 : supply air flow rate of FCU 4. F t,4 : flow rate of the water circulating between the TES and FCU 4.

a 18 workers used in parallel.

Table 4 .

 4 [START_REF] Rana | Renewables[END_REF]: PID controllers (parameters). SC: solar collectors. HWT: hot water tank. HP: heat pump.

	System	K p	K i	K d	N
	SC/HWT -2.84 × 10 -4 -2.73 × 10 -5 1.72 × 10 -4 8.00 × 10 -1
	HP	2.87 × 10 -5	4.14 × 10 -6	4.24 × 10 -5	2.67

Table 4 .

 4 16: Electricity bought from the main grid (3-day simulation). PID HP /RB TES : PID/rule-based strategy. MPC HP/TES : optimization-free MPC strategy. MPC HP/TES : optimization-based MPC strategy.

			Electricity bought from the main grid [€]
	Season	Strategy	No use of PV power generation surplus	Use of PV power generation surplus
		PID HP /RB TES	26.36	21.91
	Winter	MPC HP/TES	14.08	12.34
		MPC HP/TES	13.54	11.18
		PID HP /RB TES	13.41	7.53
	Spring	MPC HP/TES	0.42	0.42
		MPC HP/TES	0.31	0.35

Table 4 .

 4 17: CO 2 emissions related to the electricity bought from the main grid (3-day simulation). PID HP /RB TES : PID/rule-based strategy. MPC HP/TES : optimization-free MPC strategy. MPC HP/TES : optimization-based MPC strategy. MPC HP/TES strategy is the best choice for in-situ implementation as it does not degrade the economic cost significantly.

	CO 2 emissions [kgCO 2 ]

Table 4 .

 4 18: Objective function J HP/TES (3-day simulation). PID HP /RB TES : PID/rule-based strategy. MPC HP/TES : optimization-free MPC strategy. MPC HP/TES : optimization-based MPC strategy.

	Objective function [J HP/TES ]

Table 4 .

 4

	Season	Strategy	No use of PV power generation surplus	Use of PV power generation surplus
	Winter PID HP /RB TES	1.43	1.41
	Spring PID HP /RB TES	0.19	0.06

19: Average temperature constraint violation per hour θ h (3-day simulation). PID HP /RB TES : PID/rule-based strategy.

θ

h [ • C h -1 ]

Table 4 .

 4 20: Computational cost (3-day simulation). PID HP /RB TES : PID/rule-based strategy. MPC HP/TES : optimization-free MPC strategy. MPC HP/TES : optimization-based MPC strategy.

	Computational cost

a 18 workers used in parallel.

  • C, and the new bounds are 18 • C and 20 • C. So, there are two scenarios for the air temperature set point: 19 • C or 21

  • C; -Group B: the air temperature set point is 21 • C, the TES thermal constraint is 36 • C; -Group C: the air temperature set point is 19 • C, the TES thermal constraint is 38 • C; -Group D: the air temperature set point is 19 • C, the TES thermal constraint is 36 • C.

  • C; 22 • C}, T e,4 ≤ 38 • C), electrical costs are reduced in half of the cases, CO 2 emissions are reduced with MPC MG in the majority of the cases, as can be observed in Table 4.25 and Table 4.26. For Group B ( T min {20 • C; 22 • C}, T e,4 ≤ 36 • C), no CO 2 emissions or economic cost are reduced by MPC MG , but the constraints are met, as can be observed in Table 4.25 and Table 4.

r ; T max r =

Table 4 .

 4 21: Evaluation criterion C HP/TES (thermal resource management) during islanding (4-day simulation). Is.: islanding scenario. Cf.: configuration (see Section 6.2).

	PID/RB
	MPC MG : optimization-free MPC strategy.

MG : PID/rule-based strategy. T r : thermal comfort constraint ( • C). T e,4 : TES constraint ( • C). The values in green indicate the best results.

Table 4 .

 4 22: TES average temperature constraint violation per hour (θ h ) during islanding (4-day simulation). Is.: islanding scenario. Cf.: configuration (see Section 6.2).

	PID/RB
	MPC MG : optimization-free MPC strategy.

MG : PID/rule-based strategy. T r : thermal comfort constraint ( • C). T e,4 : TES constraint ( • C). The values in green indicate the best results.

Table 4 .

 4 23: Average air temperature constraint violation per hour (θ r,z ) during islanding (4-day simulation).

	0.01
	0.00
	0.01
	0.14
	18.54

TES : PID/rule-based strategy. T r : thermal comfort constraint ( • C). T

Table 4 .

 4 [START_REF] Pan | Model Predictive Load Frequency Control of Isolated Micro-Grid with Electrical Vehicles[END_REF]: Economic cost (C c ) during islanding (4-day simulation). Is.: islanding scenario. Cf.: configuration (see Section 6.2).

	MPC MG :

MG : PID/rule-based strategy. T r : thermal comfort constraint ( • C). T e,4 : TES constraint ( • C). The values in green indicate the best results.

Table 4 . 26 :

 426 CO 2 emissions (G c ) during islanding (4-day simulation). Is.: islanding scenario. Cf.: configuration (see Section 6.2).

	MPC MG :

MG : PID/rule-based strategy. T r : thermal comfort constraint ( • C). T e,4 : TES constraint ( • C). The values in green indicate the best results.

-la commande prédictive apparaît comme un outil pertinent pour le pilotage des microréseaux. Elle offre stabilité, robustesse, faisabilité et est capable de gérer les contraintes. Cependant, elle présente certaines lacunes, comme un coût calculatoire élevé, les contrôleurs MPC pouvant par ailleurs être difficiles à paramétrer. Une possibilité est de se tourner vers l'apprentissage par renforcement afin de paramétrer correctement ces contrôleurs.-les systèmes de stockage, les charges flexibles et les stratégies jouent un rôle majeur dans la gestion intelligente des microréseaux. Le dimensionnement d'un microréseau doit prendre en compte l'utilisation d'une stratégie prédictive. Habituellement, dans le domaine industriel, des algorithmes à base de règles sont préférentiellement utilisés dans les études des projets.-plus de travaux de recherche devraient être effectués sur le dimensionnement des batteries fixes et mobiles en ce qui concerne les émissions de dioxyde de carbone et d'autres considérations liées à la pollution de ces systèmes.-la stratégie de gestion prédictive proposée pour contrôler un microréseau multi-énergie en situation d'îlotage doit être améliorée pour la prise en compte de différentes périodes d'occupation.-différents travaux existent dans la littérature traitant de la régulation de la tension et de la fréquence, de la qualité de l'énergie et de la gestion des ressources. La littérature manque de stratégies prédictives avec des objectifs larges combinant, par exemple, la régulation de la tension et la gestion des ressources. Une tâche complexe consisterait à combiner la gestion des ressources tout en garantissant une haute qualité de tension et de fréquence, c'est-à-dire proposer une stratégie prédictive polyvalente.

Islanding of the multi-energy MG

Remerciements 4.3 Work packages

The project IMPROVEMENT is split into five work packages (WP): -WP1: System definition, business model and implementation plan. The main participants are the Andalusian Energy Agency and the Junta de Andalucia; -WP2: Power management. The main participants are the University of Córdoba and the University of Castilla-La Mancha; -WP3: Thermal management system. The main participants are the Laboratório Nacional de Energia e Geologia (Lisbon) and the Instituto Superior Técnico (Lisbon);