Commençons tout logiquement par remercier les personnes essentielles au bon déroulé de cette thèse.

Merci aux équipes administratives et techniques du G2Elab pour fournir des conditions de travails propices à la réussite d'une thèse. En particulier, un grand merci à toi Cédric, j'ai beaucoup appris à tes côtés et tu as été probablement plus important pour ma thèse (et pour Nanoé) que tu ne le penses. Merci à vous 3 Bertrand, David et Marie-Cécile pour l'encadrement de thèse, j'espère que l'on continuera à travailler ensemble. Je tiens aussi à te remercier Nassim pour ta motivation et ton ambition lors de ton stage de M2, au plaisir de se recroiser. Merci aux collègues et ami.es du labo, on aura bien ri (et bien râlé) et nos discussions scientifiques ont grandement participé à la réussite de ce doctorat.

Merci à Nanoé. Franchement, c'est solide comme entreprise. Bravo à vous 2 Nolwenn et Nico pour avoir mis tous ça en place. Je ne doute pas que cela va continuer à se développer et j'espère en être l'un des moteurs dans les années à venir. Merci aux équipes Malgaches. Vous avez été d'un grand soutien lors de mes missions terrain à Madagascar et j'ai hate de venir travailler avec vous à Mada. Jamil, merci, tu es et restera le premier à avoir fait un micro-réseau avec Nanoé.

Merci au jury d'avoir évalué mes travaux. J'ai apprécié nos discussions pendant la soutenance de thèse et j'espère vous avoir donné envie de travailler davantage sur l'accès à l'électricité.

Vient ensuite le temps de la famille et des ami.es. Dans un parcours scolaire et professionnel, j'imagine que peu d'étapes sont aussi marquantes que la fin d'un doctorat. C'est donc une occasion en or pour remercier toutes les personnes qui m'entourent et qui ont pu contribuer à mon épanouissement personnel.

Merci à toute la famille, les Lillois, les Parisiens, les Nantais, les Montagnards, les Sudistes. Les parents, vous m'avez donné le goût de la découverte et c'est probablement la chose la plus importante. En quelque sorte, cette thèse a commencé au Mali en 2006, bien joué. Merci aux frérots, être le dernier, c'est une chance, quoiqu'on en dise. vi Acknowledgments Je tiens bien sûr à remercier tous mes ami.es. Déménager souvent, c'est aussi une chance même si vous êtes tous à droite à gauche car cela m'aura permis de tous vous rencontrer. Je ne vous vois pas aussi souvent que je le voudrais, mais je pense à vous. À la prochaine ! Les colocs, merci. Arcueil, Brisbane, le KB19, Grenoble, la coloc de couples, c'était super de vivre avec vous. Vive les maisons en U. Anto, je pense souvent à toi, j'espère que tu aurais été fier de là où j'en suis.

Enfin, Béa ! Cette fin de thèse coïncide aussi

List of Tables

List of Tables V.1 Different optimization options for the nanogrid kits. . . . . . . . . . . . . . V.2 Impact of the selected solar irradiance data on the microgrid operation. . . V.3 Impact of communal loads on the microgrid resource sizing and its operation with the detailed electrical method. . . . . . . . . . . . . . . . . . . . V. 4 Optimization results of the aggregated energy method. . . . . . . . . . . . V.5 Impact of communal loads on the microgrid resource sizing and its operation with the aggregated energy method. . . . . . . . . . . . . . . . . . . . V. [START_REF]Long-Term Joint European Union & African Union Research and Innovation Partnership on Renewable Energy[END_REF] Comparison of the detailed electrical and the aggregated energy methods.

AC

Alternating Highlighted by the United Nations' Sustainable Development Goals to ensure universal access to clean, reliable and modern energy services by 2030 [START_REF]The Sustainable Development Goals Report 2022[END_REF], the world is increasingly getting concerned by energy poverty and its consequences on human development and the environment. Yet, even if numerous initiatives and a significant amount of money are directly addressed to tackle the low energy access challenges, more than 770 million people are still lacking access to electricity worldwide, mainly in rural places of Sub-Saharan Africa [2]. In addition, the COVID-19 pandemic and the energy crisis triggered by the Russian war have slowed down the recent progress witnessed in the past decade, with the number of people without access to electricity increasing once again between 2019 and 2021. The African continent also experiences a high-level of unemployment, especially for the youth, and overall shows poor socio-economic development. These developing countries are therefore facing two energy challenges of different timescales:

• the short-term challenge, energy access, consists in quickly providing basic and affordable modern energy services to rapidly improve the living conditions of millions of people,

• the long-term challenge, sustainable development, aims at boosting the socio-economic development of these developing countries through the building of decarbonized smart power infrastructures and enhanced energy access for end-users while contributing to the reinforcement of an entire employment sector, the energy industry.

However, nowadays, current solutions favored to cope with the energy situation in Sub-Saharan Africa unfortunately fail to answer both challenges simultaneously. On the one hand, grid-based solutions, gathering national grid extension and conventional centralized minigrids, do achieve sustainable development where they are installed but their high investment costs drastically limit their perimeter of intervention to relatively dense villages surrounded by stable and financially supportive institutional environments. On the other hand, off-grid solutions, such as Solar Home System, offer a stop-gap measure able to rapidly provide low-quality access to electricity to millions of people but fail to cope with development challenges and lack long-term sustainability, due to their short expected lifetime, a lack of modularity and scalability and the inability to offer productive use of energy services.

Based on these observations, Nanoé, a French-Malagasy social company created in 2017 [3], proposes a third way, the Lateral Electrification model, which aims to respond simultaneously to both energy challenges encountered in developing countries. The Lateral Electrification is a concept of progressive and collaborative building of smart power infrastructures in a bottom-up manner, through renewable energies, digital technologies and local entrepreneurship. This rural electrification model, experimented by Nanoé in Madagascar, is technologically inspired by the swarm electrification concept of progressive building of power infrastructures in a bottom-up manner. This progressive building enables modularity and scalability, by nimbly and progressively extending the energy services delivered to end-users through the diffusion and the aggregation of basic smart power units gathering solar power generation, storage and distribution (called nanogrids in the Lateral Electrification model).

The first step of this approach has already been successfully developed and confirmed by Nanoé, with more than 2 000 nanogrids powering over 8 500 end-users installed in 400 villages in the North of Madagascar over the past six years. However, the progressive approach of the Lateral Electrification model contains inherent technical and scientific research questions to which this thesis contributes. In particular, the transition from the nanogrids to the microgrid, i.e. the interconnection of the nanogrids within a villagewide balancing microgrid, opens up many interesting research problems, from microgrid topology to control, power electronics, operation and planning. This thesis aims at proving the technical feasibility of the Lateral Electrification model and therefore focuses on the development of DC microgrids with decentralized production and storage, from the lab to the field.

To achieve this objective, this thesis is being carried out in partnership between Nanoé and G2Elab [4], the Grenoble Electrical Engineering lab, based in Grenoble, France, and in particular with the Power Electronics and the Power Systems teams. Therefore, this thesis has received funding from the French National Association for Research and Technology (ANRT), an association gathering the French private and public research actors [5]. Moreover, this research is a part of the LEAP-RE (Long-Term Joint European Union & African Union Research and Innovation Partnership on Renewable Energy) project and has been funded by the European Union's Horizon 2020 research and innovation program under grant agreement N°963530 [START_REF]Long-Term Joint European Union & African Union Research and Innovation Partnership on Renewable Energy[END_REF].

This thesis has the particularity of aiming at quickly confronting the proposed solutions to the reality of the field in Madagascar, to rapidly lift the main uncertainties on the technical and scientific gridlocks of the DC microgrids with decentralized production and storage and then to be able to build on field test feedback. This field-oriented mindset has driven most of the progress of the thesis, whose different Chapters are presented below. This thesis work has been presented in four conference papers, two journal papers and has won one international prize organized by the IEEE Power Electronics Society rewarding the best scalable solutions to tackle energy poverty, as summarized in the List of Publications & Awards. While the proposed microgrid is directly linked to the business model of the Lateral Electrification model, most of the cost analyses performed during this thesis (mainly the nanogrid and microgrids costs) are omitted from this manuscript for confidentiality reasons.

In Chapter I, the energy situation in developing countries and the current solutions to tackle rural electrification are firstly presented to set the scene of this work. Then, the Lateral Electrification model is described in detail, and is illustrated through an example of application in Madagascar. The research questions raised by the progressive approach of the Lateral Electrification model are highlighted and the objectives of the thesis are set, i.e. the development of DC microgrids with decentralized production and storage from the lab to the field.

Next, Chapter II studies the structure and the control of DC microgrids with decentralized production and storage, after justifying the technical and economic relevance of interconnecting nanogrids. High-level long-term simulations of a microgrid interconnecting five nanogrids are then introduced to validate the proposed decentralized and communicationfree control algorithm of each nanogrid by observing the power flows on the microgrid. Finally, experimental validations are carried out on a lab test bench. Overall, this Chapter presents a crucial part of any microgrid design, i.e. the simulation and experimental validation in the lab, indispensable before any field test, often time-consuming and capitalintensive and which must therefore be preceded by a thorough analysis (in the lab) of the microgrid operation to eliminate the main risks for the field test.

The proposed microgrid structure entirely relies on the power electronic based interconnection modules linking the nanogrids to the microgrid DC bus and their control of the energy sharing on the microgrid. Chapter III describes the design, hardware and firmware realization of the interconnection module used during the field test. Firstly, a paradigm shift on the use of power electronics for grid operation is discussed before applying it to the choice of the interconnection module architecture and specifications, with a particular focus on start-up and protections services, considered of utmost importance for the proper operation of the microgrid. Then, an exhaustive search algorithm to cost optimize the number of arms of the proposed converter and the microgrid DC bus voltage is introduced, with the objective of co-designing the power electronic structure and the power system application. Finally, the interconnection module prototype is presented and some experimental results are illustrated.

Chapter IV details the field deployment of a pilot village-wide microgrid in Ambohimena, a typical Malagasy village in the North of Madagascar, whose socio-economic situation is firstly described. The deployed microgrid interconnects 24 nanogrids, including one nanogrid without battery, and a communal load kiosk where DC productive use of energy appliances have been tested as well as AC loads powered through an AC inverter. This successful field deployment validates the work presented in Chapter II and III and is an important milestone for the Lateral Electrification model as it gives a proof of concept of its technical feasibility. The microgrid installation and field test results are thoroughly illustrated before discussing about the microgrid impact on end-users' services.

Chapter V proposes preliminary planning studies for DC microgrids with decentralized production and storage. The field deployment of Chapter IV has raised many challenges and opportunities for the installation and operation of the proposed DC microgrids, which definitely needs further studies. Therefore, planning problems inherent to the progressive approach of the Lateral Electrification model are highlighted and preliminary optimization algorithms are proposed with their results illustrated, both for microgrid resources (solar panels and batteries) and for microgrid layout (cables and electrical poles). This exploratory Chapter aims at opening up a vast new research field on planning for decentralized DC microgrids for rural electrification.

I.1 The energy situation in developing countries

Developing countries, mainly located in Sub-Saharan Africa and South-East Asia, are not able most of the time to guarantee proper socio-economic conditions to the majority of their population. To tackle this huge obstacle to development, they are facing two energy challenges of different timescales somewhat antagonist:

• the short-term challenge, rapid universal and affordable energy access,

• the long-term challenge, sustainable development through decarbonized power infrastructures.

I.1.a The short-term challenge

The short-term challenge, energy access, consists in quickly providing basic and affordable modern energy services to improve rapidly the living conditions of millions of people living off the grid. Indeed, despite the Sustainable Development Goal 7 (SDG 7) of the United Nations (UN) of ensuring universal access to affordable, reliable and sustainable modern energy services for all by 2030 [START_REF]The Sustainable Development Goals Report 2022[END_REF], more than 770 million people are still lacking access to electricity and more than 2.4 billion access to clean cooking [2]. In 2020, 77% of the unelectrified population lived in Sub-Saharan Africa, mainly in rural areas, often far from any national electrical infrastructure [START_REF]The Sustainable Development Goals Report 2022[END_REF]. Despite significant differences, all Sub-Saharan countries are facing high percentage of unelectrified population (with the exception of South Africa), as indicated in Fig. I.1, showing the high complexity of solving an international and very scattered problem.

Furthermore, the economic downturn caused by the COVID-19 pandemic and the ongoing energy crisis triggered by the Russian war have had dramatic effects in the energy access sector. Progress has stalled since 2019, and the population without access to electricity has even increased between 2019 and 2021 by 15 million in Sub-Saharan Africa, reducing almost all the gains made over the past five years [2], as shown in Fig. I.2. The African continent is also facing a rapid population growth and is expected to grow by 350 million people to reach 1.7 billion inhabitants by 2030 [2]. As a consequence to this rapid growth and the slow progress in energy access, the United Nations estimates that 670 million people will still lack access to electricity worldwide by 2030 [START_REF]The Sustainable Development Goals Report 2022[END_REF], far from the UN SDG 7 of ensuring universal access.

Low energy access is directly linked to poor socio-economic development and poor living conditions. Overall, there is a clear correlation between energy consumption and the Human Development Index (HDI) as stated in [START_REF] Sarkodie | Electricity access, human development index, governance and income inequality in Sub-Saharan Africa[END_REF][START_REF] Alstone | Decentralized energy systems for clean electricity access[END_REF]. Indeed, low access to modern and affordable energy has severe environmental, social and economic consequences in unelectrified areas. For instance, poor energy access communities usually rely on unhealthy, low quality and expensive alternatives such as kerosene lighting or biomass cooking, both emitting harmful fumes for humans and the environment. Africa contains around 16% of the world forest but the annual rate of forest loss is much higher (0.6%) in Africa that worldwide (0.1%). Biomass cooking has a major responsibility in this increased deforestation, driven, among other factors, by inefficient and unsustainable charcoal production [START_REF]International Energy Agency (IEA)[END_REF][START_REF]International Energy Agency (IEA)[END_REF]. In addition, basic health facilities cannot operate without a reliable energy supply, directly threatening the life expectancy of millions of people living in unelectrified areas. Finally, many Africans, especially women and children, are trapped in time-consuming and inefficient daily tasks to counteract low energy access, impeding them to improve their life standards, access good-quality study or generate revenues. Therefore, there is an urgent need to rapidly tackle the poor energy access situation described above in Sub-Saharan Africa. Overall, this situation is drastically impeding the improvement of the living conditions of millions of people worldwide, damaging the environment and creating unsuitable and unsustainable socio-economic environments. This is the short-term challenge.

I.1.b The long-term challenge

The long-term challenge, sustainable development, aims at fostering the socio-economic development of the African continent through decarbonized smart power infrastructures while contributing to the reinforcement of an entire sector of employment, the energy industry. This challenge is in line with the UN SDG 8 of ensuring decent work and economic growth for all [START_REF]The Sustainable Development Goals Report 2022[END_REF].

The African continent is struggling with poor socio-economic development and a high level of unemployed, young and low-skilled workforce. According to the African Development Bank, in 2015, one third of the 420 million African youth aged between 15 and 35 were unemployed and discouraged, as shown in Fig. I.3. In addition, 15 million people are joining the labor force each year [2], with only three to four million jobs created annually [START_REF]Jobs for Youth[END_REF]. Following the Covid-19 pandemic, 30 million jobs were lost in 2020 and informal employment reached up to 80% of the active population (versus 70% of informal employment for the youth contributing to the economy in 2015, see Fig. I.3) [2], deteriorating even more the conditions of the African workers, usually working without a fixed and sufficient revenue nor social security. [START_REF]Jobs for Youth[END_REF].

Moreover, the lack of economic perspectives for the African youth fuels a sense of injustice and maintains a heavy social climate, destabilizing the African continent, from international migration to insecurity [START_REF]Jobs for Youth[END_REF].

Therefore, there is a strong need to create millions of jobs to foster the socio-economic development of the African continent. In 2019, the energy sector was already formally hiring two million Africans (i.e. 0.5% of the labor force) and up to 11 million considering informal employment [START_REF]International Energy Agency (IEA)[END_REF] but according to the International Energy Agency (IEA), providing access to modern energy services in Africa by 2030 would create up to 2.8 million additional jobs in the Sustainable Africa Scenario (SAS), as shown in Fig. I. 4. Jobs creation would happen at all levels with around 55% of jobs in operation and maintenance [START_REF]World Energy Employment 2022[END_REF]. The creation of energy-related jobs would benefit to the vast majority of the population from unskilled to skilled labor, not only in the main cities but also in the countryside. Overall, the youth of the Sub-Saharan African population should be considered as an opportunity for the energy challenges, which should rely on this highly motivated part of the population to accelerate the energy revolution. To capitalize on one of the continent's greatest assets for prosperity, the responsibility for building sustainable 21st century electrical infrastructures should be put within the hands of the large and growing population of talented and motivated young African people [START_REF]Jobs for Youth[END_REF]. Furthermore, from the end-user point of view, a reliable and affordable electricity access could unlock many new economic opportunities. Productive use of energy is crucial to support local socio-economic development through income generation, employment opportunities, improved productivity and diversification of economic activities [START_REF]Off-grid solar: A growth engine for Jobs[END_REF]. The use of more powerful machines (e.g. agro-processing machines, refrigerators, craftsmanship tools) must be considered when tackling energy poverty to help end-users not only improve their living conditions but also get a return on their energy investments.

For all these reasons, the energy access sector must focus on the construction of sustainable 21st century power infrastructures able to participate in the uptake of the whole African continent. This is the long-term challenge.

I.2 Overview of current solutions for rural electrification

The rural electrification sector is composed of a multitude of diverse actors, of all sizes (local, national or international), either public or private, focused on regulation, funding, engineering or operation. Even if all actors pursue the same objective of achieving universal access to electricity by 2030, they promote a wide range of solutions, from national grid extension, centralized minigrids to off-grid solutions. The following subsections present the current solutions proposed in the rural electrification sector and analyze their limits. Then, an emerging and promising trend, swarm electrification, is introduced.

I.2.a Conventional methods and their limits

Current practices for rural electrification can be broadly divided in two families:

• grid-based solutions including national grid extension and conventional centralized minigrids (i.e. minigrids with centralized production and storage),

• off-grid solutions, mainly represented by Solar Home Systems (SHS).

These solutions gather almost the totality of projects for access to electricity, with for instance more than US $ 11 billion invested annually in electrical grids in Africa [START_REF]International Energy Agency (IEA)[END_REF] and around US $ 4 billion of total sales value in the off-grid solar sector in 2022 [START_REF]Off-grid solar: A growth engine for Jobs[END_REF]. Yet they present serious limitations. Note that, in the following thesis, the term minigrid refers to the conventional centralized AC minigrids presented in this subsection whereas the term microgrid refers to the DC microgrids with decentralized production and storage developed in this thesis.

I.2.a-i Grid-based solutions

Centralized AC minigrids and national grid extension can be grouped in a first family of grid-based solutions that have in common to rely on the construction and operation of heavy and costly power production and distribution infrastructures to cover an entire village, district or region in order to sell 230 V AC power to end-users in a regulated public service approach.

National grid extension and to a lesser extent minigrids have been the "business as usual" solutions for decades and have consistently failed to deliver universal electricity access in Africa. Such grid-based solutions present serious limitations:

• at the stage of infrastructure development mainly because of high investment costs and long deployment times,

• during operation mostly because of the affordability gap for end-users and technical issues.

Firstly, both solutions require initial high investment costs, drastically reducing the reach of such solutions. Most unelectrified communities are located in rural places, far from any national grid. Above a certain distance (around 5 to 20 kilometers according to [START_REF]International Energy Agency (IEA)[END_REF][START_REF] Moner-Girona | Decentralized rural electrification in Kenya: Speeding up universal energy access[END_REF]), grid extension is not economically viable because of the high upfront connection costs, therefore restraining national grid extension to a small perimeter of the electricity access problem (with an estimated 30% of unelectrified communities at reach of national grid extension) [START_REF]International Energy Agency (IEA)[END_REF]. Similarly, even if in 2019, around 1 500 minigrids had already been installed in Africa powering around 15 million people and 4 000 more were planned [START_REF]International Energy Agency (IEA)[END_REF], with numerous companies proposing minigrid services [START_REF]OnePower Africa presentation website[END_REF][START_REF]Mesh Power Rwanda presentation website[END_REF][START_REF]WeLight presentation website[END_REF][START_REF]Havenhill Synergy Limited presentation website[END_REF][START_REF]ENGIE Energy Access presentation website[END_REF], minigrids solutions are usually only economically viable in densely populated villages (300-500 households or more) and need fairly stable and financially supportive institutional environments, unfortunately not the typical place where most off-grid Africans live today. Indeed, their CAPEX (Capital Expenditure) per end-users are dramatically high, from US $ 750 per Tier 1 connection to a bit less than US $ 2 000 per Tier 3 connection for PV minigrids, as shown in Fig. I.5 from a World Bank study from 2017 [START_REF]Benchmarking study of Solar PV mini grids investment costs : preliminary results[END_REF], and confirmed by more recent studies with an average connection cost per end-user around US $ 1 000 to 1 500 [START_REF]Africa Minigrid Developers Association (AMDA)[END_REF][START_REF]Okra Network Planner: Electrification Rapid Site Assessment Tool[END_REF]. In opposition to binary metrics (having access or not), the Multi-Tier framework, proposed by the UN [START_REF]World Bank and Energy Sector Management Assistance Program (ESMAP)[END_REF], aims to measure access to electricity as a continuum through six different levels (from Tier 0 to Tier 5) by considering all attributes of electricity supply (peak capacity, availability, reliability, quality, affordability, legality and safety), while being technology and fuel neutral. Moreover, conventional AC minigrids are usually oversized when installed, generating large upfront costs hard to recover, and may become undersized after a few years of operation due to the increasing demands of the communities. This is mainly due to the lack of modularity of the minigrid design and their long lifetime (usually around 20 years) not adapted to rapidly changing socio-demographic situations. In addition, because of the heavy engineering works (design and field installation) required to install them and the long administrative procedures to obtain legal permits in most countries, grid-based solutions suffer from very long deployment times. Combined with their high investment costs, this leads to long payback times, a huge drawback in risky and rapidly evolving socio-economic environments such as rural Sub-Saharan Africa.

For all these reasons, conventional minigrids and national grid extension offer little replicability and are then confined to a small perimeter of the electricity access problem, reducing the inclusivity of such solutions and failing to ensure universal access.

Furthermore, even in areas where they are successfully installed, they do not necessarily ensure access to sustainable and reliable electricity services. For instance, more than 110 million African people are even living "under the grid" [START_REF]International Energy Agency (IEA)[END_REF], i.e. in an area covered by the national grid, but without the financial capability to pay the required connection costs or to afford electricity once connected. However, African electricity utilities are already in a very perilous financial state, with more than US $ 150 billion of operating losses in 2020 shared between all African utilities [START_REF]International Energy Agency (IEA)[END_REF]. The majority of African electrical utilities do not apply cost-reflective tariffs [START_REF]International Energy Agency (IEA)[END_REF][START_REF] Trimble | Financial viability of electricity sectors in Sub-Saharan Africa: quasi-fiscal deficits and hidden costs[END_REF] and therefore sell electricity at a lower price than its actual costs, benefiting from large subsidies from the government, a highly unsustainable practice. In most Sub-Saharan countries, the cash collected per kWh billed does not even compensate the OPEX (Operational Expenditure), as confirmed in Fig. I.6. Individual bill collection is an additional difficulty, with the median bill collection rates over all Sub-Saharan countries at 93% [START_REF] Trimble | Financial viability of electricity sectors in Sub-Saharan Africa: quasi-fiscal deficits and hidden costs[END_REF].

Similarly, minigrids usually provide electricity at a higher levelized cost than national grid [START_REF]International Energy Agency (IEA)[END_REF] to a population largely poorer than in the urban centers, reducing even more the possibility for operators to propose cost-reflective tariffs for the end-users. In addition, minigrid operators are often granted a monopoly in the zone in which they intervene even if they usually only connect the denser and richer part of their intervention zone. Therefore, some inhabitants are trapped without any other options, either because they cannot afford the minigrid services or because it is too expensive for the minigrid operator to reach them.

Moreover, grid-based solutions often rely on fuel-based generation, which negatively impacts their OPEX. This limits their resilience (to fuel prices) and their economic and environmental sustainability in a geopolitical and economic context where fuel prices are rapidly and unpredictably changing.

Finally, both solutions offer little technical reliability although for different reasons. National grids are usually unreliable and technically constrained (and thus exposed to failures) because of aging and poor quality electrical infrastructures. Most grid-connected end-users in Sub-Saharan countries experience between 100 and 2 000 hours of electricity outages each year, dramatically reducing the quality of the electricity supplied and its ability to foster socio-economic development [START_REF]International Energy Agency (IEA)[END_REF]. Transmission and distribution losses, whether they are technical (transmission and substation losses) or non-technical (theft, lack or faulty meters), are estimated to account for 30% of the total cash losses between the generation and sale of electricity [START_REF] Trimble | Financial viability of electricity sectors in Sub-Saharan Africa: quasi-fiscal deficits and hidden costs[END_REF], with network losses averaging 15% across the continent in 2020, compared to 8% worldwide [START_REF]International Energy Agency (IEA)[END_REF]. Minigrids are also experiencing a high level of technical issues, mainly due to poor operating conditions and a lack of maintenance. Poor operating conditions (high temperature and humidity, frequent manual connections and disconnections, etc.) usually deteriorate the electrical equipments (batteries, inverters, etc.) much quicker than in more-controlled environments, resulting in early failures. For instance, in Senegal, 52% of 98 minigrids installed between 2006 and 2017 were completely stopped in 2020 and the remaining ones operate well only three hours per day in average [START_REF]État des lieux des ERIL et développement de concepts permettant la réhabilitation des mini-réseaux existants[END_REF]. Similar situations are numerous all over Sub-Saharan Africa. Last but not least, the impact of grid-based solutions to create new economic opportunities and added value for local players appears limited because:

• given their prohibitive investment costs, grid-based solutions are often the prerogative of foreign players, limiting the local economic impact of these projects,

• they do not create a high amount of perennial jobs in the electricity sector, especially grid extension as confirmed by Fig.

I.4.
However, it has to be noted that socio-economic development is theoretically possible thanks to high-power electrical services but only to the small share of the population that can afford the electricity services. Overall, national grid extension or conventional minigrids seem to be solutions of the past, relying on centralized top-down architectures, designed to distribute to millions of small users electricity produced by a small number of large production plants. Indeed, it deprives the African energy sector from the opportunity of a major technological leapfrog toward a decentralized, bottom-up power infrastructure, a challenge that developed countries are nowadays struggling to overcome. As experienced with the telecommunication sector, for which Africa has directly embraced the wireless revolution, the African continent can jump to a progressive construction of decarbonized and decentralized electrical infrastructure that offers modularity and scalability.

It appears clear from the analysis above that grid-based solutions do not fully tackle the energy challenges Sub-Saharan countries are facing nowadays, in particular energy access as they do not reach the majority of unelectrified communities. Due to reliability and cost issues, sustainable development, even if possible in theory where these solutions are deployed, stays uncertain, finishing to undermine the relevance of such electrification solutions.

I.2.a-ii Off-grid solutions

Solar Home Systems (SHS), small power kits composed of a solar panel ranging from 10 Wp to 350 Wp and a battery enabling a few hours of autonomy at night [START_REF]Off-Grid Solar Market Trends Report 2022: State of the Sector[END_REF], and on a smaller scale solar lanterns, have been undoubtedly gaining momentum in the rural electrification sector for more than a decade. Indeed, they have already proven their ability to cope with the short-term energy access challenge by quickly providing basic energy services and improving the living conditions of millions of households across Africa and South-East Asia [START_REF]International Energy Agency (IEA)[END_REF][START_REF]International Energy Agency (IEA)[END_REF][START_REF]Off-grid solar: A growth engine for Jobs[END_REF][START_REF]Off-Grid Solar Market Trends Report 2022: State of the Sector[END_REF]. SHS enable to provide basic lighting services and to power a wide range of low-power appliances (radio, TV, fan...). Solar energy kits, combining SHS and solar lanterns, are giving access to electricity to nearly 500 million people worldwide as shown in Fig. I.7, despite a clear slow-down in sales due to COVID-19 [START_REF]Off-Grid Solar Market Trends Report 2022: State of the Sector[END_REF]. These numbers were historically driven by South-East Asia, especially India, Bangladesh and Pakistan, but since 2018 East Africa has become the largest market with 721 000 SHS and three million solar lanterns sold in 2020, followed by West Africa and Central Africa [START_REF]Off-Grid Solar Market Trends Report 2022: State of the Sector[END_REF]. The advent of PAYGo technologies (Pay-As-You-Go), i.e. payment of a technology or a service through successive small payments, has enabled this rapid growth in the off-grid sector [START_REF]Off-grid solar: A growth engine for Jobs[END_REF][START_REF]Off-Grid Solar Market Trends Report 2022: State of the Sector[END_REF]. Numerous companies are now proposing PAYGo solutions, with mobile money payments [START_REF]ENGIE Energy Access presentation website[END_REF][START_REF]M-KOPA presentation website[END_REF][START_REF]Solaris Offgrid presentation website[END_REF]. Similarly, a large number of small and big companies are selling SHS [START_REF]ENGIE Energy Access presentation website[END_REF][START_REF]Fosera presentation website[END_REF][START_REF]SunCulture presentation website[END_REF][START_REF]SunKing presentation website[END_REF][START_REF]D.light presentation website[END_REF] in South-East Asia and Africa.

However, off-grid solutions are only a stopgap measure failing to cope with development challenges, as they lack long-term sustainability:

• technically and economically due to the reduced lifetime of off-grid solutions, their lack of interoperability, modularity and expandability and their low power level impeding productive use of energy applications,

• socially and environmentally due to ownership risk transfer and a high amount of toxic wastes rarely recycled.

The technical limitations of the off-grid solutions definitely reduce the economic sustainability of these solutions. Indeed, SHS are usually low power solutions, with a short expected lifetime of two to four years (aligned on the lifetime of the batteries whereas other SHS components can last much longer). These solutions are thus extremely economically inefficient in the long term due to frequent replacement costs. Moreover, off-grid solutions, restricted to domestic energy needs, are unable to answer productive energy needs and to foster socio-economic development, as shown in Fig. I.7. SHS and solar lanterns only offer up to Tier 2 access to electricity. Even more problematic, SHS usually do not enable scalability and modularity, which impedes the final users to progressively climb the energy ladder by increasing their electricity consumption throughout time in a cost-effective manner. SHS and other off-grid solutions are usually not interoperable (i.e. different solutions can not necessarily connect to each other), even if significant efforts have been made in the past years regarding this topic [START_REF]Off-Grid Solar Market Trends Report 2022: State of the Sector[END_REF]. Therefore, SHS end-users are often trapped with Tier 1 to Tier 2 electricity access, and must wait for the national grid extension, if it ever happens, to be able to increase their level of electricity services. In addition, SHS providing Tier 3 or above are very rare as they are economically extremely inefficient. Off-grid solutions also give up on an essential feature of electrical infrastructures, i.e. the aggregation of different consumption patterns into one global and smoother electrical load, which overall enables to reduce the cost of electricity delivery thanks to the mutualization of production, storage and distribution assets. Finally, even if they are significantly less expensive than grid-based solutions for low Tiers, off-grid solutions still have an affordability issue, as shown in Furthermore, SHS are neither socially nor environmentally sustainable. Firstly, sales of off-grid solutions have very little local economic impact as job creation is limited to the distribution sector only (thus excluding manufacturing, field installation and maintenance). Secondly, SHS ownership transfers many risks usually taken by the energy provider to the consumers, who must deal with material thefts, breakdowns and recycling or disposal of end-of-life products. African countries are already struggling to cope with the high amount of toxic wastes generated by end-of-life SHS and solar lanterns, which are too complicated to collect and gather to create economic incentives. The off-grid solar market is flooded with low-quality products, and customer education in Sub-Saharan countries is usually quite low, impacting the relevance of SHS and solar lantern end-user investments. For instance, nearly 20% of solar products stopped working 18 months after purchase in Kenya [START_REF] Cross | The afterlives of solar power: Waste and repair off the grid in Kenya[END_REF].

According to [START_REF] Kinally | Off-grid solar waste in Sub-Saharan Africa: Market dynamics, barriers to sustainability, and circular economy solutions[END_REF], 12 000 tonnes of e-waste was generated in 2020 in Sub-Saharan Africa, an increase of 545% compared to 2016, with informal recycling practices having extremely serious environmental and health consequences. Overall, the environmental impact of these solutions are not clear, as they replace CO2-intensive methods (kerosene lighting, diesel generators, etc.) but also generate a lot of toxic waste.

The analysis above clearly proves that, despite rapidly providing electricity access to millions of people, SHS and solar lantern lack sustainability and do not enable long-term socio-economic development.

I.2.b An emerging trend: Swarm electrification

The swarm electrification concept relies on the progressive building of decentralized electrical infrastructures in a bottom-up manner. Many definitions have been proposed for the swarm electrification concept, originally introduced in the past decade by researchers from TU Berlin [START_REF] Koepke | Against the Odds: The Potential of Swarm Electrification for Small Island Development States[END_REF], but all agrees that swarm electrification proposes an agile process of progressively extending the electricity services delivered to the end-users (from Tier 1 to Tier 5 [START_REF]World Bank and Energy Sector Management Assistance Program (ESMAP)[END_REF]) through the organic growth of electrical infrastructures from basic smart power units (SHS, picogrids, nanogrids, solar lanterns, etc.) to the interconnection of these basics units within a microgrid to the final connection of the microgrid to the regional or national AC grid [START_REF] Koepke | Against the Odds: The Potential of Swarm Electrification for Small Island Development States[END_REF][START_REF] Groh | Swarm Electrification: Investigating a Paradigm Shift Through the Building of Microgrids Bottom-up[END_REF][START_REF] Groh | A System Complexity Approach to Swarm Electrification[END_REF][START_REF] Babajide | Powering the Commercial Sector in Nigeria Using Urban Swarm Solar Electrification[END_REF][START_REF] Hoffmann | Simulating the potential of swarm grids for preelectrified communities -A case study from Yemen[END_REF][START_REF] Sheridan | Swarm electrification: A comprehensive literature review[END_REF].

This concept is inspired by swarm intelligence, i.e. the collective behavior of decentralized, self-organized systems, whether they are natural or artificial (such as a swarm of bees for instance). Swarm intelligence, widely used in artificial intelligence works, is transposed to electrical networks where the connection between neighboring agents (SHS, nanogrids, etc.) enables to create a structure showing better performances (higher power, higher reliability, etc.) and at the same time a high level of resilience as each agent can operate independently [START_REF] Koepke | Against the Odds: The Potential of Swarm Electrification for Small Island Development States[END_REF].

Numerous papers analyze the swarm electrification concept and prove its superiority on many aspects over conventional methods to tackle rural electrification, whether they are based on national grid extension, minigrids or SHS [START_REF] Koepke | Against the Odds: The Potential of Swarm Electrification for Small Island Development States[END_REF][START_REF] Groh | A System Complexity Approach to Swarm Electrification[END_REF][START_REF] Nasir | Scalable solar DC microgrids[END_REF]. Decentralized infrastructures derived from the swarm electrification concept are highly scalable, generate less distribution losses, require fewer large areas of land for production and storage, allow for progressive increase in the consumption levels of end-users and overall present lower CAPEX and OPEX costs than conventional minigrids and national grid extension while offering higher inclusivity to low-income end-users.

However, there are very few projects based on swarm electrification. To the knowledge of the author, in 2023, only four companies, in addition to Nanoé presented in the next Section, deploy on the field electricity access solutions inspired by the swarm electrification concept:

• SOLshare, a Bangladeshi company created in 2014 [START_REF]SOLshare presentation website[END_REF],

• Solarworx, a German company created in 2017 [START_REF]Solarworx presentation website[END_REF],

• Power-Blox, a Swiss company created in 2015 [START_REF]Power-Blox presentation website[END_REF],

• Okra, an Australian company created in 2016 [START_REF]Okra presentation website[END_REF].

SOLshare, based in Bangladesh, has installed, as of mid 2023, more than 110 SOLgrids, i.e. peer-to-peer microgrid energy exchange networks, all over Bangladesh for a total of around 1 750 customers [START_REF]SOLshare presentation website[END_REF]. These SOLgrids interconnect already installed SHS and power new end-users, previously unable to buy SHS but able to afford electricity on the SOLgrids. Basically, households equipped with a SHS can sell excess power into the microgrid network, where neighboring households or businesses can buy it in small increments using mobile money. The SOLgrid is based on the SOLbox, a bidirectional DC electricity meter, which enables the formation of the peer-to-peer DC microgrid and deals with mobile money payment, grid monitoring and management.

Solarworx, initially a SHS and appliance manufacturer, has been developing for a few years DC mesh-grids, i.e. decentralized DC microgrids that enable peer-to-peer energy trading through the interconnection of SHS, in a similar fashion to SOLshare. A few pilot projects have been installed in 2021 and 2022 in Zambia and Cameroon through partnership with local off-grid distribution companies. The main purposes of these DC microgrids are to harvest the unused potential of SHS, limiting their curtailment through peer-to-peer exchange, to include villagers without SHS and to supply higher power appliances. In addition, a connection cost of US $ 120 per end-user is attained for mesh-grids with respect to at least US $ 1 000 US per end-user for conventional AC minigrids [START_REF]Solarworx presentation website[END_REF]. Similarly to SOLshare, the mesh-grids are based on a Grid module, installed at each household and basically composed of a bidirectional DC-DC converter controlling the current absorbed or injected on the mesh-grid.

Power-Blox has developed the PBX-200 products combining the features of a SHS (i.e. with solar production, battery storage and local loads) with the scalability of a minigrid. This 200 Wp stackable power cube can be interconnected within a swarmgrid, an AC decentralized minigrid up to 10 kW [START_REF]Power-Blox presentation website[END_REF]. Pilot projects are ongoing in Laos, Mozambique and Vanuatu. However, very little information are available concerning these projects.

Okra develops and installs through partnership with local companies a DC mesh-grid technology based on the Okra Pod, a hardware box dealing simultaneously with the solar production, the battery storage, the local loads and the creation of a mesh-grid. Multiple mesh-grid have been installed in Cambodia, Philippines, Haiti and Nigeria, interconnecting between 17 to 212 households [START_REF]Okra presentation website[END_REF]. In addition, Okra offers an online platform, called Harvest, accompanying electrical operators on their rural electrification projects and a Network Planner tool to analyze the least-cost options to electrify an area, comparing Okra mesh-grids with traditional AC minigrids.

Despite embracing successfully the swarm electrification concept, these initiatives are suffering from three major drawbacks.

• Firstly, in most cases, the end-users own the production and storage resources and must therefore act as "prosumers" for the peer-to-peer microgrid to be continuously used [START_REF] Kirchhoff | Key drivers for successful development of peer-to-peer microgrids for swarm electrification[END_REF]. Then, the prosumer education and willingness to participate in the microgrids dramatically limit the endless economic and technical possibilities offered by such microgrids. Furthermore, the business model, relying on commissions on the electricity sold on the microgrids, seems complicated to maintain in the long-term due to the very low amount of possible revenues at stake.

• Secondly, such peer-to-peer microgrids can only reach areas where SHS are already well established, reducing the reach of these solutions.

• Thirdly, except for SOLshare, these companies are not actually implanted in the field in Sub-Saharan Africa or South-East Asia and are rather solution provider companies. Therefore, they need to find and convince local partners to deploy their electrification solutions, a time-consuming process that can lead to inefficient usage of time, money and resources.

Nevertheless, the rural electrification sector is currently experiencing a small revolution, centered around the swarm electrification concept. In addition, to support this promising concept, many companies are developing high-power efficient DC appliances suited for rural electrification, to enable productive use of energy [START_REF]Agsol presentation website[END_REF][START_REF]Village Infrastrucre Angels presentation website[END_REF][START_REF]Productive Solar Solutions presentation website[END_REF]. To the belief of the author, swarm electrification coupled with productive use of energy services for end-users and a strong field presence is emerging in the rural electrification sector as the most viable solution. However, knowledge dissemination and capitalization efforts specifically directed towards funders and electrical operators are urgently needed to finish to convince them of the benefits of swarm electrification.

I.3 The Lateral Electrification model

Conventional methods, whether they are grid-based solutions (national grid extension or conventional centralized minigrids) or off-grid solutions (SHS, solar lanterns, etc.), represent nowadays the vast majority of electricity access projects but they have been failing to tackle simultaneously the short-term and the long-term challenges of the energy sector for decades. In addition, it is highly unlikely that any technological, business or regulatory adaptation of these models could allow them to do so.

Considering that a radical rethinking of the approach to electricity access is necessary, Nanoé, a French-Malagasy social company created in 2017 [3], proposes a model named Lateral Electrification, aiming at tackling simultaneously the energy access and the sustainable development challenges encountered in Sub-Saharan Africa. The Lateral Electrification is a concept of progressive and collaborative building of smart power infrastructures in rural Africa from the bottom-up based on renewable energies, digital technologies and local entrepreneurship. This is also a holistic approach that differs from traditional methods not only in terms of technology, but also in terms of industry organization and service offer to the end-users. To accomplish its goals, it relies on three pillars presented below. The Lateral Electrification model is also presented in detail in a journal paper published during this thesis [START_REF] Richard | A New Electrification Model to End Energy Poverty: An example from a novel rural electrification approach in Madagascar[END_REF] and in French in [START_REF]Électrification Latérale: Vers un Nouveau Modèle d'Électrification Pour l'Afrique[END_REF].

I.3.a Pillar 1: Progressive technologies

Technologically wise, the Lateral Electrification model follows the swarm electrification concept of progressive building of power infrastructures in a bottom-up manner, enabling modularity and scalability, by nimbly and progressively extending the energy services delivered to the end-users (from Tier 1 to Tier 5 as defined by the multi-tier framework proposed by the UN [START_REF]World Bank and Energy Sector Management Assistance Program (ESMAP)[END_REF]) through the diffusion and the aggregation of basic smart power units regrouping solar power generation, storage and distribution as described in Then, once a critical density of nanogrids is achieved within a settlement (typically a village), these systems can be clustered to form a village-wide microgrid for an enhanced electricity access up to Tier 3-4, ensuring better reliability, clean cooking and productive use of energy through communal loads (e.g. agro-processing machines, craftsmanship tools, water pumps, etc.). The final step of this progressive building of electrical infrastructures is the interconnection of multiple microgrids or their connection to a national or local AC grid to further extend the energy services delivered to the communities to industrial and thermal uses, such as air conditioners, electric ovens or small production plants.

This progressive approach offers many advantages for the communities and the grid operator.

• On the one hand, the proposed electrification scheme can grow with the needs of the communities, enabling them to progressively climb the energy ladder at their desired pace.

• On the other hand, for the grid operator, the modular aspect of this electrification model reduces the investment risk by breaking down large capital expenditures in small successive investments with short payback periods.

In addition, the flexibility of the proposed microgrid allows better use of resources by removing or adding new production and storage capacities as needed to optimize the production-consumption equilibrium over time. By mutualizing installed production and storage capacities, such a microgrid would use them more efficiently improving the economic viability and sustainability of this rural electrification model.

I.3.b Pillar 2: Exhaustive service offer

Secondly, the Lateral Electrification model also differs from current electrification solutions by a singular marketing approach, which relies on an exhaustive service offer, the Lateral Electrification operator being a power producer, a grid operator, an appliance provider and a domestic electrician. This contrasts with usual economic actors in the electricity access sector, which normally either sell electricity (i.e. kWh) or electrical materials. In opposition to urban and mature power system environments where each market-segment is sufficiently large to be economically viable on its own, remote rural environments do not favor vertical specialization. Therefore, vertical integration is essential in rural African areas to allow small locally-implanted operators to generate sufficient revenues from their activity and to decrease the overall cost of the energy services while guarantying highquality services (with a high level of safety and reliability).

Thus, the Lateral Electrification business model rests on a hybrid commercial offer with an initial fee for device and then a recurrent fee for service as shown in Fig. I.11. End-users must first buy appliances proposed by the operator, who deals with their installation and maintenance. This permits to ensure that only energy-efficient, long-life and high-quality devices are used in the nanogrids, improving the economic and environmental sustainability of the proposed technological approach. In addition, end-users are equipped with tailored and fixed circuitry designed to last, traducing the durability of the proposed electrical services in comparison to plug & play temporary installations such as SHS. Once equipped and connected, each customer has to pay a daily fee to power these appliances. Several subscription levels are proposed, with different maximum power and daily energy, to adapt to the needs and purchasing power of different communities. This tariff structure offers many advantages.

• For the clients, it is more flexible as they only pay the days when they consume.

• For the operator, the initial fee for device enables to assess the motivation and financial health of the end users, which helps to limit installations of nanogrids to clients who will later not use them, and to decrease the economic risk of the nanogrid investment for the owner.

• Such an economic scheme is also more cost-reflective than selling kWh (as the majority of the nanogrid costs reside in the CAPEX with very little OPEX thanks to the solar production) and better reflects the energy situation in Sub-Saharan Africa where the reliability and safety of the electricity services are equally important to its power and energy rating.

In addition, this tariff structure offers a progressive electrical consumption path for the end-users who can increase their subscription level throughout time, as the electrical operator guaranties to add or replace PV panels and batteries if necessary. This limits the risks of legacy infrastructures which often prevent the end-users to enhance their electricity services for economic reasons.

Lastly, this marketing approach permits to better deal with end-of-life products as they are not left with the end-users, but rather managed by a skillful electrical operator, gathering and recycling at once a high amount of end-of-life products, increasing the economic viability of the heavy recycling process.

I.3.c Pillar 3: Horizontal organization powered by local entrepreneurship

To achieve its goals, this novel electrification model rests on an innovative organizational approach. Indeed, it relies on an horizontal industry organization powered by local entrepreneurship, which highly differs from traditional and large vertically integrated energy operators of the occidental world. A decentralized industry organization composed of a multitude of locally-implanted entrepreneurs appears both more realistic to reach lastmile areas and more ambitious as it puts electrification within the technical and financial reach of local rural entrepreneurs. The breakdown of large investments in small and successive ones is the most revolutionary aspect of the Lateral Electrification model as it offers local entrepreneurs a progressive path to develop their own business.

Furthermore, the complexity of the energy situation and social organization in Sub-Saharan Africa makes it almost impossible for a single electrical operator to operate simultaneously on different villages distant from each other without a regular on-field presence. Through a multitude of locally-implanted and trained entrepreneurs, it becomes possible to disseminate the proposed electrification solutions to thousands of remote villages across an entire country and even a continent. Indeed, local entrepreneurs have a better understanding of the social organization of the community and the reality of the field. They are also more prone to convince communities of the merits of the proposed electrification solutions and to develop a trustful lasting relationship with end-users, ensuring a good customer relationship thanks to a regular on field presence. In addition, such an organization creates far more value locally, participates in socio-economic development through the creation of multiple local electrical operators and enables knowledge transfer and capacity building with an initial four month free training.

While conventional ways to tackle low access to electricity mostly benefit to American, European and Chinese companies, the Lateral Electrification model aims to bring the economic benefits of rural electrification to the local communities, installing and exploiting the electrical infrastructures. The implementation of an electricity revenue sharing scheme between the company (20%), the nanogrid operator (20%) and the nanogrid owner (60%), who can be either the company, the nanogrid operator or a third party, participates in the creation of a trustful economic situation. Indeed, each actor is financially rewarded up to its participation, reducing significantly corruption, risks of theft by the local entrepreneurs and low-quality services, on the contrary to centralized minigrids or small power plants usually operated by a single (and then locally powerful) employee, thus often with very little possibility of control from the employers due to their geographical remoteness. The overall organization is summarized in

I.3.d Application of the Lateral Electrification model in Madagascar

Nanoé has developed and tested on the field in the past six years the Lateral Electrification model in the North of Madagascar, as shown in Fig. I.13. The first step of the progressive building of power infrastructures, i.e. the nanogrid, the horizontal organization and the exhaustive service offer have been successfully validated with thorough field testing. Nanoé has already installed more than 2 000 nanogrids in 400 villages, delivering up to Tier 2 access to 8 500 end-users (households, community buildings, health facilities or public lighting), thanks to a team of 50 employees and the training of 150 local entrepreneurs in four different intervention zones. Nanoé uses five different kit sizes for the nanogrids (as can be seen in Table . I.1) and offers seven main different subscription levels to its end-users (from basic lighting services to multimedia and cooling services). A specific kit is installed depending on the expected total nanogrid consumption with respect to the subscription levels chosen by the end-users. After an initial experimental phase with the installation of 1 000 nanogrids, Nanoé is now building on its experience to conduct the consolidation phase with the objectives of disseminating the nanogrid solution in nine different rural districts in the North of Madagascar. The nanogrid phase is then already mature and on track for large national scalability. Overall, Nanoé aims to replicate the Lateral Electrification model on an international scale to maximize its impact and help to reach universal access as soon as possible.

I.4 Objectives of the thesis

This thesis focuses on the second step of the progressive building of power infrastructures presented in Fig. I.9, from the nanogrid to the microgrid. This technological step is crucial to prove the technical and economic feasibility of the Lateral Electrification model. Therefore, a partnership between Nanoé and G2Elab, the Grenoble Electrical Engineering lab [4], based in Grenoble, France, has been concluded through an industrial thesis carried out over three years, within the Power Electronics and the Power System teams.

I.4.a Research questions for microgrids with decentralized production and storage

Microgrids with decentralized production and storage raise many research questions. Firstly, the optimal topology of the microgrid associated with its control must be determined with respect to its technical feasibility and economic relevance. Such microgrids can either be based on DC or AC voltage. Following the Lateral Electrification model, the decentralized feature of the microgrid structure (i.e. with production and storage disseminated all over the microgrid) is not challenged in this thesis and justifying thoroughly its relevance is out of the scope of this thesis as numerous papers already prove its economic and technical superiority over centralized topologies [START_REF] Nasir | Scalable solar DC microgrids[END_REF][START_REF] Nasir | Analysis on central and distributed architectures of solar powered DC microgrids[END_REF][START_REF] Nasir | Sustainable Rural Electrification Through Solar PV DC Microgrids-An Architecture-Based Assessment[END_REF]. However, the control of such microgrids with decentralized production and storage can either be centralized, hierarchical [START_REF] Shafiee | Hierarchical control for multiple DC-microgrids clusters[END_REF][START_REF] Bidram | Hierarchical Structure of Microgrids Control System[END_REF], distributed [START_REF] Shafiee | Distributed consensus-based control of multiple DC-microgrids clusters[END_REF][START_REF] Nasirian | Distributed Cooperative Control of DC Microgrids[END_REF] or decentralized [START_REF] Nasir | A Decentralized Control Architecture Applied to DC Nanogrid Clusters for Rural Electrification in Developing Regions[END_REF][START_REF] Nasir | Integration and Decentralized Control of Standalone Solar Home Systems for Off-Grid Community Applications[END_REF][START_REF] Nasir | Dual-loop control strategy applied to the cluster of multiple nanogrids for rural electrification applications[END_REF][START_REF] Samende | State of Charge Based Droop Control for Coordinated Power Exchange in Low Voltage DC Nanogrids[END_REF]62,63,[START_REF] Lu | Double-quadrant state-of-charge-based droop control method for distributed energy storage systems in autonomous DC Microgrids[END_REF]65,[START_REF] Nasir | Dual-loop control strategy applied to PV/battery-based islanded DC microgrids for swarm electrification of developing regions[END_REF], and can either require communication or be communication-free. The optimal topology with its associated control remains an open research questions even if numerous papers have been investigating this topic. Note that a more detailed literature review is carried out in each Chapter.

Secondly, no matter the topology and control adopted, microgrids with decentralized production and storage usually entirely rely on power electronic converters and their local control. Therefore, converters must be developed with respect to these particular applications, and it is of interest to study the network services that the converter could offer, such as protection and start-up services [67]. Usually, the rural electrification sector is very cost-sensitive and needs fast results to prove its viability. In addition, it has to deal with diverse end-users applications and the intervention zones are generally logistically difficult to reach. For all these reasons, power electronic structures must be designed while taking into account cost, ease and time of design, user-friendliness and additional network services [START_REF] Odo | A Comparative Study of Single-phase Non-isolated Bidirectional DC-DC Converters Suitability for Energy Storage Application in a DC Microgrid[END_REF]69]. Furthermore, the microgrids and the associated power electronic structures are intertwined and it is of interest to study how the microgrid specifications impact the converter design and vice versa [67]. This usually differs from traditional converter design, which generally follows clear and precise product specifications.

Thirdly, the stability of microgrids with decentralized production and storage is an open research question [START_REF] Sheridan | Swarm electrification: A comprehensive literature review[END_REF][START_REF] Kirchhoff | Control and Stability of Modular DC Swarm Microgrids[END_REF]71,[START_REF] Liu | Stability and Bifurcation Analysis of DC Microgrid with Multiple Droop Control Sources and Loads[END_REF]73,74]. The influence of the number of production and storage locations, their distance from each other and of the microgrid layout, is definitely a challenging topic. The relationship between power converter local control (speed, bandwidth, etc.) and the overall stability of the microgrid must also be assessed. Such studies require complex and heavy mathematical models to describe the behavior of the microgrid and then to perform stability analyses based on system eigenvalues [START_REF] Kirchhoff | Control and Stability of Modular DC Swarm Microgrids[END_REF]71,[START_REF] Liu | Stability and Bifurcation Analysis of DC Microgrid with Multiple Droop Control Sources and Loads[END_REF]74]. How-ever, these models are generally specific to the microgrid under study and its associated control, hence the difficulty to obtain a global approach to stability analyses, even if general trends can be observed.

Finally, microgrids with decentralized production and storage raise many planning research problems, whether it is their optimal layout (electrical cable and pole locations) or their optimal resource allocation. The building of microgrids in rural areas can be a challenge due to logistical issues, commuting times and geographical constraints, therefore decision-aid algorithms to optimize the microgrid layout with respect to a certain number of constraints would certainly be of great help [START_REF] Sheridan | Swarm electrification: A comprehensive literature review[END_REF][START_REF] Corigliano | Holistic geospatial databased procedure for electric network design and least-cost energy strategy[END_REF][START_REF] Vinicius | Rural electrification planning based on graph theory and geospatial data: A realistic topology oriented approach[END_REF][START_REF] De Sousa | Planning the LV Network of Microgrids Using Geographic Data with PREMO Grid Tool[END_REF]. Due to the different nature of decentralized microgrids in comparison to traditional national grid infrastructures, new research works must be carried out to consider the specificities of these power infrastructures in the optimization problems. Similarly, resource allocation in microgrids with decentralized production and storage is a completely different and more complex problem than in traditional infrastructures [START_REF] Rodríguez-Gallegos | A Siting and Sizing Optimization Approach for PV-Battery-Diesel Hybrid Systems[END_REF][START_REF] Kolluri | Siting and sizing distributed storage for microgrid applications[END_REF]80,81,[START_REF] Khon | Comprehensive Low Voltage Microgrid Planning Methodology for Rural Electrification[END_REF][START_REF] Yon | Microgrids planning for rural electrification[END_REF] due to the great number of different resource sizes and locations. However, this represents a great economic opportunity for the decentralized microgrid operators who will then be able to balance productionconsumption equilibrium (by removing or adding production or storage units as needed) based on the results of optimization algorithms. By mutualizing installed production and storage capacities, these resources would be used more efficiently in the microgrid decreasing its overall costs, increasing its economic viability and the sustainability of the project. It is thus crucial that new research works tackle the resource allocation question within microgrids with decentralized production and storage.

I.4.b From the lab to the field

This thesis aims at proving the technical and economical feasibility of the Lateral Electrification model, in particular the progressive building of electrical infrastructures in a bottom-up manner for rural electrification. One of the main goal of this thesis was to rapidly test on the field a first prototype of the decentralized microgrid, within the first half of the thesis. This approach of quickly going to the field was chosen to rapidly lift the main uncertainties on the technical and scientific gridlocks of the proposed microgrid topology, and then to be able to build on this first experience.

This particular aspect of this thesis undoubtedly defines the research problems tackled in this work. The main contribution of this work is the design and realization of a DC microgrid with decentralized production and storage from the lab to the field, with a special focus on its topology, its control and the associated power electronic structure. The main novelty of this work resides in the thorough approach from design through software simulations to lab test-bench to field deployment. This is believed to be of major importance in the microgrid research field due to the unavoidable difficulties and the important human and technical feedback field deployments bring.

High-quality research works on stability [START_REF] Kirchhoff | Control and Stability of Modular DC Swarm Microgrids[END_REF]71] have enabled to understand stability issues on decentralized microgrids and therefore to avoid them in the proposed microgrid design. Thus, a thorough study of stability, even if of great interest, has been considered out of the scope of this thesis. In addition, the progressive approach to design the microgrid, from simulations to test bench to the field, is helpful to lift the main uncertainties about stability before testing the microgrid in real conditions on the field.

Finally, still with a field-oriented mind, the planning research questions have been addressed in this work. Once a successful proof of concept of the microgrid operation on the field is obtained, and with the objectives of installing many more microgrids in the coming years, it becomes essential to study the planning of these microgrids, both in terms of optimal layout and in terms of optimal resource allocation. The main novelty of this work in terms of planning lies in the inclusion of the decentralized features within the planning algorithms. This exploratory work on planning aims at opening a new and large research field for planning of microgrids following the swarm electrification concept.

I.5 Conclusion

This Chapter has described the situation of the energy sector in developing countries, which must cope with two energy challenges of different timescales and of equal importance, rapid energy access and long-term sustainable development. The conventional methods to tackle the energy situation in Sub-Saharan Africa have been failing for decades, whether through national grid extension or centralized minigrids unable to reach the vast majority of unelectrified people for economic reasons or through off-grid solutions unable to boost socio-economic development for technical reasons. However, the swarm electrification concept is undoubtedly gaining momentum in the rural electrification sector and new actors are proposing solutions based on the progressive building of electrical infrastructures in a bottom-up manner. Nanoé, a French-Malagasy company created in 2017, proposes an ambitious electrification model, named Lateral Electrification, based on renewable energies, digital technologies and local entrepreneurship, which is technically inspired by the swarm electrification concept.

This thesis lies within the technical approach of the Lateral Electrification model and examines the technical and scientific challenges of interconnecting collective smart solar power systems in a village-wide microgrid. This research work is really field-oriented with the goal of rapidly confronting proposed solutions with field testing in Madagascar, and focuses on the development from the lab to the field of microgrids with decentralized production and storage.

II.1 Introduction

This Chapter focuses on the transition from the first step to the second step of the Lateral Electrification model, as shown in Fig. I.9. The transition from nanogrids to villagewide microgrids necessitates to design a DC microgrid with decentralized production and storage. The question of its topology and its control, logically the first step in developing such microgrids, is the core of this Chapter which describes thoroughly the design of a DC microgrid with decentralized production and storage through software simulations and experimental validation in the lab.

Firstly, Section II.2 examines the state of the art of microgrid topology and control. Then, in Section II.3, after an initial justification of the relevance of interconnecting nanogrids, the topology of the microgrid is presented and the decentralized and communication-free control algorithm associated with each nanogrid is described in detail. Thirdly, high-level long-term simulations are introduced in Section II.4 to study the long-term power flows in the proposed microgrid and validate its topology and associated control. Following this design through simulations, experimental validation is conducted in Section II.5 with the development of a lab microgrid test bench. Finally, Section II.6 gives concluding remarks. This Chapter is highly inspired from a journal paper published during this thesis [84].

II.2 State of the art

The microgrid research field has been historically dominated by research works focused on microgrid applications in the occidental world. A microgrid is defined as an electrical system composed of multiple loads and generation units acting as a controllable structure able to island or not from the main grid [START_REF] Saeed | A Review on Microgrids' Challenges & Perspectives[END_REF]. A very large number of papers have been published over the last few decades, investigating their topology, their control, their stability and their possible network services. Nevertheless, there is still no clear consensus in the literature on the proper definition (size, applications, etc.) of a microgrid, and the microgrid term can sometimes be quite confusing, as it encompasses very diverse systems.

However, fewer research works focus on the use of microgrids for rural electrification, even though this field has been increasingly tackled in the past years. In addition, within the rural electrification sector, decentralized microgrid (i.e. with decentralized production and storage resources) is a relatively recent field of research although all agree that it is a promising solution.

This Section studies the state of the art of microgrid topology and microgrid control, with a special attention on microgrids designed for rural electrification, and helps to position this thesis within the vast and relatively confusing microgrid research field.

II.2.a Microgrid topology

This subsection analyzes the choice of AC or DC voltage for rural microgrids before comparing the different microgrid architectures.

II.2.a-i Microgrid voltage nature

The choice of AC or DC voltage for microgrids in the rural electrification sector, whether they are hybrid (wind, solar and diesel) or fully solar based [START_REF] Nasir | Scalable solar DC microgrids[END_REF][START_REF] Pires | DC Microgrids: Benefits, Architectures, Perspectives and Challenges[END_REF]87,[START_REF] O'neill-Carrillo | The long road to community microgrids: Adapting to the necessary changes for renewable energy implementation[END_REF], remains an open question. However, when only solar production is chosen (for environmental reasons but also for cost reasons as fuel prices are rising), a clear trend emerges in the research world towards DC microgrids, primarily for efficiency and economic reasons [START_REF] Nasir | Scalable solar DC microgrids[END_REF][START_REF] Pires | DC Microgrids: Benefits, Architectures, Perspectives and Challenges[END_REF][START_REF] Dragičević | DC Microgrids-Part II: A Review of Power Architectures, Applications, and Standardization Issues[END_REF][START_REF] Nasir | Solar PV-based scalable DC microgrid for rural electrification in developing regions[END_REF], although the industry still favors conventional AC solar minigrids, presented in Chapter I. The production sources (i.e. solar), the storage resources (i.e. lead-acid or lithium batteries) and the majority of loads (i.e. USB charger, LEDs and even multimedia) being native in DC, DC microgrids enable to suppress costly AC/DC converters, reducing overall losses on the microgrids and the microgrid CAPEX. In addition, DC microgrids are offering higher reliability than their AC counterparts due to the reduction in the number of power converters and the absence of frequency regulation and synchronization issues usually present in AC systems [START_REF] Pires | DC Microgrids: Benefits, Architectures, Perspectives and Challenges[END_REF]. Finally, the extra low voltage threshold is greater for DC voltage than for AC (i.e. 120 V DC versus 50 V AC), hence the possibility to operate safely microgrids at a greater voltage level in DC than AC. For all these reasons, the Lateral Electrification has opted for DC microgrids, on which this thesis focuses.

II.2.a-ii Microgrid architecture

To design a DC microgrid, the size and the location of its production and storage resources are of utmost importance. For the resource locations, DC microgrids can have different architectures:

• fully centralized (i.e. with production and storage located at the same place) [START_REF] Nasir | Optimal Planning and Design of Low-Voltage Low-Power Solar DC Microgrids[END_REF],

• partially centralized (i.e. with production located at one place and with storage distributed at each household) [START_REF] Madduri | Scalable DC Microgrids for Rural Electrification in Emerging Regions[END_REF],

• fully decentralized (i.e. with both production and storage distributed at each household) [START_REF] Nasir | A Decentralized Control Architecture Applied to DC Nanogrid Clusters for Rural Electrification in Developing Regions[END_REF][START_REF] Nasir | Integration and Decentralized Control of Standalone Solar Home Systems for Off-Grid Community Applications[END_REF][START_REF] Li | A Module-Based Plug-n-Play DC Microgrid with Fully Decentralized Control for IEEE Empower a Billion Lives Competition[END_REF].

Several papers justify the superiority of the fully decentralized approach over the other ones, for efficiency and economic reasons [START_REF] Nasir | Scalable solar DC microgrids[END_REF][START_REF] Nasir | Analysis on central and distributed architectures of solar powered DC microgrids[END_REF][START_REF] Nasir | Sustainable Rural Electrification Through Solar PV DC Microgrids-An Architecture-Based Assessment[END_REF]. Decentralized architectures have a smaller (and thus less expensive) land footprint needed to install the production and storage resources. Regarding efficiency, power flows are typically between neighboring households, hence with less current losses and voltage drops than in the centralized architectures where power flows are going from the centralized resource location (possibly far from the village) to all households through highly loaded electrical lines able to support the maximum production capacity [START_REF] Nasir | Analysis on central and distributed architectures of solar powered DC microgrids[END_REF][START_REF] Nasir | Sustainable Rural Electrification Through Solar PV DC Microgrids-An Architecture-Based Assessment[END_REF]. Therefore, decentralized architectures usually require shorter and of smaller conductor size distribution lines, significantly reducing the overall CAPEX of the decentralized installations. Finally, following the swarm electrification concept, decentralized architectures enable a scalable and modular way of building electrical infrastructures in a bottom-up manner while being economically viable [START_REF] Groh | Swarm Electrification: Investigating a Paradigm Shift Through the Building of Microgrids Bottom-up[END_REF][START_REF] Groh | A System Complexity Approach to Swarm Electrification[END_REF][START_REF] Nasir | Scalable solar DC microgrids[END_REF][START_REF] Richard | A New Electrification Model to End Energy Poverty: An example from a novel rural electrification approach in Madagascar[END_REF] whereas fully and partially centralized architectures usually impede to increase production and storage capacities in a cost-effective manner. The advantages and drawbacks of centralized versus decentralized architectures are summarized in Table II

II.2.b Microgrid control

This subsection first compares the different control structures possible for DC microgrids before focusing on decentralized control methods.

II.2.b-i Control structure

Four main categories of control structures can be defined for DC microgrids [START_REF] Meng | Review on Control of DC Microgrids and Multiple Microgrid Clusters[END_REF][START_REF] Dragičević | DC Microgrids-Part I: A Review of Control Strategies and Stabilization Techniques[END_REF][START_REF] Boche | Understanding Microgrid Sustainability: A Systemic and Comprehensive Review[END_REF], as illustrated in • centralized, based on a central control unit collecting and transmitting information to local units (basically power electronic converters in such microgrids),

• decentralized, only based on local measurements [START_REF] Nasir | A Decentralized Control Architecture Applied to DC Nanogrid Clusters for Rural Electrification in Developing Regions[END_REF][START_REF] Nasir | Integration and Decentralized Control of Standalone Solar Home Systems for Off-Grid Community Applications[END_REF][START_REF] Nasir | Dual-loop control strategy applied to the cluster of multiple nanogrids for rural electrification applications[END_REF][START_REF] Samende | State of Charge Based Droop Control for Coordinated Power Exchange in Low Voltage DC Nanogrids[END_REF]62,63,[START_REF] Lu | Double-quadrant state-of-charge-based droop control method for distributed energy storage systems in autonomous DC Microgrids[END_REF]65,[START_REF] Nasir | Dual-loop control strategy applied to PV/battery-based islanded DC microgrids for swarm electrification of developing regions[END_REF],

• distributed, based on local measurements and neighboring communication [START_REF] Shafiee | Distributed consensus-based control of multiple DC-microgrids clusters[END_REF][START_REF] Nasirian | Distributed Cooperative Control of DC Microgrids[END_REF],

• hierarchical, based on a single upper level controller and multiple local controllers communicating with each other [START_REF] Shafiee | Hierarchical control for multiple DC-microgrids clusters[END_REF][START_REF] Bidram | Hierarchical Structure of Microgrids Control System[END_REF].

These four control structures present advantages and disadvantages. While centralized, distributed and hierarchical methods necessitate a communication layer, the decentralized structure is communication-free, a feature usually essential to rural electrification projects often deployed in areas where communication signals are inexistent or unreliable. Moreover, centralized and hierarchical structures present a single point of failure, i.e. a component whose failure would compromise the operation of the whole system [START_REF] Meng | Review on Control of DC Microgrids and Multiple Microgrid Clusters[END_REF][START_REF] Dragičević | DC Microgrids-Part I: A Review of Control Strategies and Stabilization Techniques[END_REF]. In addition, they both need more complex hardware and software capabilities, increasing the complexity of the technical implementation of these methods. Finally, for all these reasons (communication, single point of failure, ease of implementation), the decentralized approach performs better in terms of reliability and costs than the other methods. The plug & play feature, i.e. the ability for a local unit (a SHS, a nanogrid, etc.) to connect or disconnect from the microgrid without impacting the rest of the microgrid, is crucial in rural electrification, especially if the swarm electrification approach is embraced with the possibility to progressively extend the microgrid over time. However, centralized and hierarchical structures do not enable plug & play and each addition of a new agent on the microgrid would necessitate to reset the control layer, drastically reducing the ease of operation of such systems [START_REF] Meng | Review on Control of DC Microgrids and Multiple Microgrid Clusters[END_REF].

Finally, the centralized, hierarchical and distributed control structures enable better performances in terms of microgrid operation and offer the possibility of enhanced features (such as perfect current sharing between units, better voltage regulation, etc.) [START_REF] Meng | Review on Control of DC Microgrids and Multiple Microgrid Clusters[END_REF][START_REF] Dragičević | DC Microgrids-Part I: A Review of Control Strategies and Stabilization Techniques[END_REF]. Overall, Table II.2 summarizes the main advantages and drawbacks of each control structure, with the advantages indicated in green.

Based on the above analysis, it appears clear that the decentralized control structure is the most suitable for the Lateral Electrification model, mainly for its absence of communication layer and single point of failure as well as its plug & play ability and reduced costs. [START_REF] Meng | Review on Control of DC Microgrids and Multiple Microgrid Clusters[END_REF][START_REF] Dragičević | DC Microgrids-Part I: A Review of Control Strategies and Stabilization Techniques[END_REF]. Droop control links DC voltage deviation from a certain reference voltage with the injected or absorbed current on the microgrid. Regarding DC microgrids with decentralized production and storage, almost all research works propose SoC-based droop control, but they either implement voltage droop control (V-I droop) [START_REF] Samende | State of Charge Based Droop Control for Coordinated Power Exchange in Low Voltage DC Nanogrids[END_REF]62,[START_REF] Lu | Double-quadrant state-of-charge-based droop control method for distributed energy storage systems in autonomous DC Microgrids[END_REF] or current droop control (I-V droop) [START_REF] Nasir | A Decentralized Control Architecture Applied to DC Nanogrid Clusters for Rural Electrification in Developing Regions[END_REF][START_REF] Nasir | Integration and Decentralized Control of Standalone Solar Home Systems for Off-Grid Community Applications[END_REF][START_REF] Nasir | Dual-loop control strategy applied to the cluster of multiple nanogrids for rural electrification applications[END_REF][START_REF] Li | A Module-Based Plug-n-Play DC Microgrid with Fully Decentralized Control for IEEE Empower a Billion Lives Competition[END_REF]. These droop controls aim at determining a voltage or a current reference for the power electronic structures forming the microgrid and controlling its power flows. V-I droop methods regulate the DC voltage based on the output current whereas I-V droop methods controls the output current based on the DC voltage [START_REF] Meng | Review on Control of DC Microgrids and Multiple Microgrid Clusters[END_REF][START_REF] Dragičević | DC Microgrids-Part I: A Review of Control Strategies and Stabilization Techniques[END_REF]. Therefore, I-V droop control only necessitates the setting of one proportional-integrator (PI) regulator and offers faster dynamics in comparison to V-I droop (which requires the setting of two PI regulators) [START_REF] Nasir | A Decentralized Control Architecture Applied to DC Nanogrid Clusters for Rural Electrification in Developing Regions[END_REF]67]. In addition, in most cases, the voltage of a microgrid is maintained between limits and it is the current exchanged between the different units that impose the power flows on the microgrid. A control algorithm based on a current reference and centered on a certain voltage has thus more physical meaning than if based only on a voltage reference.

The objectives of the proposed control algorithms can vary, from SoC equalizing or balancing between the batteries distributed over the microgrid to communal load supporting. However, exact SoC equalizing is usually considered suboptimal as it generates more losses on the microgrids [START_REF] Nasir | A Decentralized Control Architecture Applied to DC Nanogrid Clusters for Rural Electrification in Developing Regions[END_REF]. It appears more logical that the proposed control algorithm impedes the SoC of any distributed batteries to reach a very low level, whereas above a certain threshold, it is not relevant to continue to support a lower level battery to reach the same SoC for all distributed batteries and it can even be detrimental for instance for lead-acid batteries.

Finally, all research papers design and validate their proposed control algorithm through software simulations but only a few [START_REF] Nasir | A Decentralized Control Architecture Applied to DC Nanogrid Clusters for Rural Electrification in Developing Regions[END_REF][START_REF] Nasir | Integration and Decentralized Control of Standalone Solar Home Systems for Off-Grid Community Applications[END_REF][START_REF] Nasir | Dual-loop control strategy applied to the cluster of multiple nanogrids for rural electrification applications[END_REF][START_REF] Nasir | Solar PV-based scalable DC microgrid for rural electrification in developing regions[END_REF][START_REF] Li | A Module-Based Plug-n-Play DC Microgrid with Fully Decentralized Control for IEEE Empower a Billion Lives Competition[END_REF] (at the Center for Research on Microgrids facilities at the University of Aalborg and at the University of Manitoba) carry out experimental validation. However, to the best of the author's knowledge, as of mid 2023, no research teams have implemented their proposed control algorithm for rural DC microgrids on the field in real conditions [START_REF] Sheridan | Swarm electrification: A comprehensive literature review[END_REF].

II.3 DC microgrids for Lateral Electrification

The analysis of the state of the art of microgrid topology and microgrid control enables to confirm the relevance of decentralized topologies and decentralized controls for rural DC microgrids, which are thus adopted in this thesis.

This Section underlines the main motivations for interconnecting nanogrids, through consumption data analysis, before introducing the topology and control algorithm of the proposed microgrid.

II.3.a Rationales for nanogrid interconnection

Initially, the nanogrid solution is progressively disseminated within a geographical area based on the individual requests of the inhabitants (who must however be grouped in a cluster of four to six end-users) and the work of the local nanogrid operator. Once a critical density of nanogrids is reached in a village (i.e. more than 10 nanogrids in a relatively close distance, from 20 to 80 meters from each other), their interconnection within a village-wide microgrid to mutualize and optimize their production and storage resources may be relevant. As an example, the spatial dissemination of nanogrids within Ambohimena, a typical village of the North of Madagascar, can be seen in Originally, the nanogrid batteries are oversized to ensure reliability, prevent any blackouts (to a certain extent) during rainy periods and adapt to the likely growing demand from end users. Therefore, their interconnection in a village-wide microgrid is expected to be relevant for two main reasons:

• an increased level of electrical services brought to the community through better reliability and higher power loads (transitioning from Tier 2 to Tier 3/4 access),

• a better economic sustainability for the local electrical operator through better usage of production and storage resources and new economic services billed to end-users.

A consumption data analysis over 27 nanogrids installed by Nanoé in the village of Ambohimena is carried out to investigate and to quantify the opportunities brought by their interconnection. The consumption data of each nanogrid are analyzed over three months (July to September 2020). The total battery and solar panel parks were respectively 3 560 Ah and 4 570 Wp in Ambohimena at the time of the analysis. For illustration purposes, Fig. II.3 shows the consumption and production pattern of a representative 12 V nanogrid over one week as well as the evolution of its SoC. Solar production is estimated following irradiation data from [START_REF]Solar radiation data[END_REF] and the SoC is calculated with a 10 minute time step. Note that the patterns observed in For this study, a day is divided in two distinct time periods, daytime from 7 am to 5 pm and nighttime from 5 pm to 7 am. The main hypothesis of this data analysis lies in the assumption that all batteries are fully charged when nighttime starts, i.e. at 5 pm. This is however consistent with field feedback, with Fig. II.3 and with a preliminary analysis of the consumption data showing that, in average, 92.4% of the consumption happens during the nighttime period. In addition, the consumption curves over Ambohimena clearly show that the time period of maximal consumption is between 7 to 10 pm.

Thus, by subtracting the nighttime consumption to a battery fully charged, the maximal Depth-of-Discharge (DoD) experienced by a battery can then be calculated each day, based on the assumption that the daily maximal DoD is encountered at the end of the nighttime period. The average daily DoD over all the Ambohimena nanogrids (i.e. the mean of each nanogrid average DoD) is therefore estimated at 13.9%, with the individual details shown in This relatively low average DoD confirms the relevance of forming a village-wide microgrid and opens up many new possibilities for the microgrid operation. The mutualization of installed production and storage capacities within a microgrid could enable to either drastically reduce the size of the global battery and solar panel park of the village or to harvest excess energy (through the reduction of solar panel curtailment or through a higher stress on batteries) to power additional loads (such as communal loads or new nanogrids without batteries and solar panels). Note that the use factor (i.e. the ratio between the energy actually consumed on a nanogrid and the maximal energy that each nanogrid can consume with respect to end-users subscription) is in average over the 27 Ambohimena nanogrids of 45% and varies between 30% to 80% depending on the nanogrid. A village-wide microgrid would enable to make the most of the diversity of usage and consumption between the different nanogrids and to benefit from the mutualization of consumption patterns. On the other hand, if the solar panel and battery parks are maintained the same as before their interconnection within a microgrid, the reduction of solar panel curtailment could enable to harvest daily 7.6 additional kWh in average on the microgrid. Similarly, with a higher stress on the batteries at night and with a average DoD target of 30%, up to 7.8 additional kWh could be used at nighttime on the microgrid, thereby also reducing PV curtailment during the day, which would have to recharge further the batteries.

This data consumption study enables to confirm the significant economic and technical possibilities that interconnecting nanogrids within a village-wide microgrid could bring. It has to be noted however that the figures given in this data analysis are only estimations used for illustration purposes and a more complete data analysis carried out over a longer period of time is needed to perform a thorough economic study of the proposed microgrid while also taking into account the microgrid costs (the distribution lines and the interconnection modules presented in Chapter III).

II.3.b Decentralized DC microgrids

The proposed microgrid is a DC microgrid with decentralized production and storage and is designed to interconnect 12 or 24 V DC nanogrids (presented in , where the nanogrids are connected to a common DC bus through DC-DC bidirectional buck-boost converters. Communal loads, such as agro-processing machines or water pumps, can be connected to the DC bus, either directly or interfaced through a DC-DC buck converter, depending on the range of their respective operating voltage levels. Such communal loads could operate at 12, 24 or 48 V DC. In addition, nanogrids without batteries and without solar panels (i.e. nanogrids with only consumption) could also be connected to the DC bus through a buck converter to increase the inclusivity of the proposed electrification model, by reaching households which cannot be grouped in a cluster of four to six households. The cable size has been selected with respect to cable availability in Madagascar (2x16 mm² and 2x25 mm² DC cables are typical distribution cables easily available across all Africa) and ease and robustness of installation.

The main element of the proposed microgrid is the DC-DC bidirectional buck-boost converter, which can interface either a nanogrid to the common DC bus or a communal load to the common DC bus (respectively in red and blue in Fig. II.6). This hardware piece is called the interconnection module. Its design and realization are presented in detail in Chapter III.

The optimal voltage level of the DC bus is still an open question that is studied in Chapter III, but a level of 60 V is initially selected as a good compromise between safety of operation (by staying far below the extra-low voltage threshold of 120 V DC) and permissible power on the DC cables (by reducing the power losses and the associated voltage drops on the DC cables).

II.3.c Decentralized and communication-free control algorithm

II.3.c-i Control objectives

For the reasons stated in the previous Section, the control algorithm of the proposed microgrid is decentralized to avoid a single point of failure and enable plug & play feature and communication-free to be affordably deployable even in areas where telecommunication signals are inexistent or unreliable. The plug & play feature is of particular importance for the swarm electrification approach as the basic power units (in this case, nanogrids) are supposed to be able to operate in full autonomy and must then be able to connect and disconnect from the microgrid without negatively impacting the rest of the microgrid. Moreover, even if a microgrid is already deployed, new nanogrids could be installed and later connected to the microgrid.

Due to its decentralized nature, the control algorithm can only rely on local variables. Therefore, this algorithm must control energy sharing between the nanogrid and the microgrid (i.e. the magnitude of current injected or absorbed) based on the DC bus voltage, representing the global level of available energy on the microgrid, and on the SoC of the nanogrid battery, indicating the level of local available energy. The higher the DC voltage, the more globally charged the microgrid is and vice versa. High and low limits (arbitrarily set at ± 10% of the reference voltage) are imposed on the DC bus voltage so that the control algorithm enables relevant power flows while maintaining the DC bus voltage within a predefined zone. This relationship between the DC bus voltage level and the global level of energy on the microgrid is crucial for further expansion of the electrical infrastructure (e.g. microgrid interconnection or connection to an AC grid). In addition, three levels of battery SoC (and thus three nanogrid states) are defined:

• weak from 0 to 60% SoC, traducing a battery level that really needs urgent support if possible,

• medium for 60 to 80% SoC, traducing a battery that can either support other batteries if needed or can be recharged if excess energy is available on the microgrid,

• and strong for above 80% SoC, traducing a battery level high enough to continuously support other lower level batteries if needed.

The control algorithm must ensure that any nanogrid with a higher SoC range supports the other nanogrids with a lower SoC range, with respect to their own energy reserve.

II.3.c-ii Mode-based control

The control algorithm, inspired by [START_REF] Nasir | A Decentralized Control Architecture Applied to DC Nanogrid Clusters for Rural Electrification in Developing Regions[END_REF] with additional modifications on the mode equations, defines different modes of current injection or absorption depending on the DC bus voltage and the local SoC, as shown in To avoid any edge or pumping effects, the 3D map of the control algorithm (i.e. the current reference versus the DC bus voltage and battery SoC) should be made continuous with respect to the DC bus voltage and the SoC to prevent steep successive changes of modes with a high current reference amplitude. For this control, this is done through the introduction of hyperbolic tangents and the 3D map (which can be handled only on a PDF viewer, e.g. Adobe Acrobat Reader, by clicking on it) is shown in Fig. II.8. A safety limit called I rated is also set on the maximum absorbed or injected current to avoid deterioration of the battery lifetime. Table II.3 summarizes the different parameters of the control algorithm, whose values have been tuned through software simulations and could easily be modified if necessary to adapt to other use cases. The proposed control algorithm is also presented in detail in a conference paper published during this thesis [98].

Pure Injection

The nanogrid is strong with a SoC above SoC max whereas, within the microgrid, some nanogrids can absorb current, as the DC bus voltage is below V max . The nanogrid therefore injects current I ref (see equation II.1) with respect to its own SoC, and the higher the SoC, the greater the current injected. A limit is set on the maximum injected current with I rated equal to C bat /10. The α exponent enables faster power sharing by increasing the current reference value at a given SoC in comparison with a linear evolution. Lastly, as previously mentioned, to avoid any edge or pumping effects when the control algorithm suddenly changes mode or is blocked around a DC bus voltage at the boundary between two modes, the current reference function is made continuous with respect to the DC bus voltage through the introduction of hyperbolic tangents.

I ref = I rated • SoC -SoC max 1 -SoC max α • tanh γ v • (V max -V bus ) (II.1)

Pure Absorption

In contrast to Pure injection, the nanogrid is weak with a SoC below SoC min whereas, within the microgrid, some nanogrids can inject current, as the DC bus voltage is above V min . The nanogrid therefore absorbs current I ref (see equation II.2) with respect to its SoC, and the lower the SoC, the greater the current absorbed. A limit is set on the maximum absorbed current at I rated at a SoC equal or below SoC lim . The roles of α and of the hyperbolic tangent are the same as in the Pure Injection mode.

I ref = max -I rated , -I rated • SoC-SoC min SoC lim -SoC min α • tanh γ v • (V bus -V min ) (II.2)

Voltage-controlled Injection

The nanogrid is in the medium zone with its SoC between SoC min and SoC max and the microgrid is globally discharged as indicated by a DC bus voltage below

V ref .
Therefore, the nanogrid injects current I ref (see equation II.3) with a SoCbased droop control with an injected current proportional to the DC bus voltage deviation from V ref .

The droop coefficient varies between 1/R d at SoC min and 2/R d at SoC max so that the higher the SoC, the greater the current injected to the microgrid. The maximal current injected is also limited to I rated . An additional coefficient C bat Cmax is included to take into account the battery capacity so that the higher the battery capacity, the greater the current injected. For similar reasons to modes 1 and 2, hyperbolic tangents are introduced (on the SoC this time) to make the current reference function continuous with respect to the SoC.

   I ref = min I rated , k d • C bat Cmax • V ref -V bus ) k d = 1 R d • 1 + SoC-SoC min SoCmax-SoC min • tanh γ s • (SoC max -SoC) • tanh γ s • (SoC -SoC min ) (II.3)

Voltage-controlled Absorption

The nanogrid is in the medium zone with its SoC between SoC min and SoC max and the microgrid is globally charged as indicated by a DC bus voltage above V ref .

Therefore, the nanogrid absorbs current I ref (see equation II.4) with a SoC-based droop control with an absorbed current proportional to the DC bus voltage deviation from V ref .

The droop coefficient varies between 2/R d at SoC min and 1/R d at SoC max so that the lower the SoC, the greater the current absorbed from the microgrid. In a similar fashion to the Voltage-controlled Injection, a current limit, a coefficient C bat Cmax and hyperbolic tangents are introduced.

   I ref = max -I rated , k c • C bat Cmax • V ref -V bus ) k c = 1 R d • 2 -SoC-SoC min SoCmax-SoC min • tanh γ s • (SoC max -SoC) • tanh γ s • (SoC -SoC min )
(II.4)

Voltage-regulated Injection

The nanogrid is in the weak zone with a SoC below SoC min as well as the rest of the microgrid, as indicated by a voltage below V min . Therefore, the nanogrid must support the DC bus voltage to bring it back to V min through a voltage-droop control with a V min setpoint (see equation II.5). A limit at I rated is set. This Voltageregulated Injection mode is counter-intuitive as a weak nanogrid must inject to the microgrid but is necessary to maintain the microgrid on and to guarantee that the DC bus voltage stays within a predefined zone (between V min and V max ). However, the nanogrids should rarely be in this mode or at least they should be between modes 2 and 5 with a DC bus voltage settled at V min (with I ref then at 0 A), indicating an overall weak microgrid.

I ref = min I rated , V min -V bus R d (II.5)

Voltage-regulated Absorption

The nanogrid is in the strong zone with a SoC above SoC max as well as the rest of the microgrid, as indicated by a voltage above V max . Therefore, the nanogrid must support the DC bus voltage to bring it back to V max through a voltage-droop control with a V max setpoint (see equation II.6). A limit at I rated is set. This Voltageregulated Absorption mode is counter-intuitive as a strong nanogrid must absorb current from the microgrid but is necessary to guarantee the DC bus voltage stays within a predefined zone (between V min and V max ). However, the nanogrids should rarely be in this mode or at least they should be between modes 1 and 6 with a DC bus voltage settled at V max (with I ref then at 0 A), indicating an overall strong microgrid.

I ref = max -I rated , V max -V bus R d (II.6)
A selfish behavior can also be added to the control algorithm to favor self-charging before supporting the other nanogrids in the medium zone, by staying longer in modes 3 or 4. To this end, SoC max can first be set at 95%. Once the SoC of the nanogrid has reached 95% (i.e. self-charging can be considered almost complete), SoC max is then changed to 80% to fully support the other nanogrids by shifting to Pure Injection mode. This behavior is reset every day, i.e. SoC max is reinitialized at 95% every day. However, this selfish behavior still enables to support the weak nanogrids through modes 3 and 4.

Table II.3: Parameters of the control algorithm.

V ref V min V max SoC max SoC min SoC lim R d α γ v γ s C bat I rated 60 V 54 V 66 V 80% 60% 30%
I ref = V LS -V setpoint k d (II.7) k d = ∆V max I max (II.8) Figure II.9: Droop control I-V characteristic.
For instance, following these equations, if a communal load operating around 48 V needs 10 A to operate (i.e. approximately a 500 W communal load), with a droop coefficient k d equal to 0.1 Ω, the low-side voltage stabilizes at 47 V, hence with a current reference for the interconnection module at 10 A, satisfying the communal load need. An equilibrium point is then found by the interconnection module regulating 10 A by maintaining 47 V on the low-voltage side.

II.4 High-level long-term simulations

The design of a control algorithm for microgrid operation goes hand in hand with the associated microgrid simulations to validate and precisely tune the control algorithm and to study the effects of each parameter on the long-term operation of the microgrids.

This Section presents the microgrid model developed in Matlab-Simulink before illustrating the microgrid operation through extensive results. Additional simulation results are also proposed in [84,98].

II.4.a Simulink model

High-level long-term simulations are carried out using Matlab-Simulink [START_REF]Simulink presentation webpage[END_REF] to observe long-term power flows on the DC microgrid for a few days of operation. The simulated microgrid interconnects five nanogrids, as shown in Fig. II.10, based on five real nanogrids of Ambohimena (as can be seen in Fig. II.2 in the previous Section). The nanogrids are fully modeled with PV production, household consumption and lead-acid battery storage. Each nanogrid is then connected to the 60 V DC bus through a current-controlled bidirectional buck-boost converter whose current reference is given by the control algorithm presented in the previous Section. To enable long-term simulations within a few minutes of calculations, average models are used for the DC-DC converters and the batteries of the nanogrids and for the interconnection modules connecting the nanogrids to the DC bus [100].

Real data collected on site by Nanoé in Ambohimena are used for the nanogrid consumption and the same irradiation profile from [START_REF]Solar radiation data[END_REF] is used for all nanogrids. The SoC of each nanogrid battery evolves therefore according to its local production/consumption balance and its exchange with the microgrid. Furthermore, the simulation model includes the resistance of the DC cables.

Finally, communal loads can be included within the simulation with adjustable power consumption to study their impact on the microgrid operation. The model can also easily be extended with additional nanogrids or communal loads, although at the expense of an increased computational burden.

II.4.b Simulation results

This subsection illustrates through two use cases two important features of the proposed microgrid: long-term energy exchange between the nanogrids and communal load operation.

II.4.b-i Energy sharing between nanogrids

The evolution of the DC bus voltage, the currents exchanged between the nanogrids and the SoC of the five nanogrids from September 21, 2020, at 3:40 pm to September 25 at 12:00 pm are respectively shown in Fig. II.11, II.12 and II.13. For illustration purposes, the consumption data of nanogrids 29 and 168 are artificially doubled to simulate a scenario of high increase in the nanogrid demand. Nanogrids 29 and 168 are then undersized. Note that the selfish behavior for the nanogrids is implemented here, with a SoC max initially at 95% then at 80% to favor self-charging, and that a positive current is injected into the microgrid and vice versa, i.e. the nanogrids are modeled in active sign convention. Also, as a reminder, the value of the current reference is often directly proportional to the nanogrid capacity (as I rated is equal to a tenth of the battery capacity C bat /10). In addition, to ease the analysis of the microgrid operation, the currents exchanged shown in Fig. II.12 are all expressed on a 12 V basis, therefore the injected currents of the 24 V nanogrids have been doubled to be in the 12 V basis.

The following steps are illustrated in From these results, it can also be confirmed that the DC bus voltage reflects well the average level of available energy on the microgrid, as shown in Fig. II.11 where the microgrid average SoC (i.e. the average of the five nanogrid SoCs) and the DC bus voltage are clearly correlated.

In addition, the evolution of the SoC of the five nanogrids in autonomous operation is shown in Fig. II.14. The SoC of nanogrids 29 and 168 reach dramatic levels, which would deteriorate the lifetime of the batteries and cause nanogrid blackouts, whereas the other three nanogrids have plenty of energy to share. To support a twice bigger demand, nanogrids 29 and 168 would need a bigger installation (i.e. a bigger kit), increasing their CAPEX. Moreover, in autonomous operation, the solar panels of nanogrids 1, 54 and 211 would often curtail their production as the local battery on the nanogrids would be full. These results confirm that interconnecting nanogrids enables a better usage of production and storage resources and increases reliability.

II.4.b-ii Communal load operation

The operation of the DC microgrid with a 500 W communal load operating between 12 pm and 3 pm every day (i.e. usually at the time of highest energy availability) and located between NGs 54 and 168 as indicated in [START_REF]Mesh Power Rwanda presentation website[END_REF] and II.17. The interconnection module linking the communal load with the DC bus implements the droop control presented in equation II.7. When the communal load starts to absorb power, its bus voltage decreases and to counteract this, the interconnection module absorbs current from the microgrid. Each nanogrid then contributes to power the communal load with respect to their own SoC, their battery capacity and their distance to the communal load, as illustrated in Fig. II.16.

The consumption of nanogrids 29 and 168 is not artificially doubled here as the microgrid is already experiencing a higher demand due to the communal load. Indeed, a communal load of 1 500 Wh per day is quite important for a microgrid composed of only five nanogrids as 1 500 Wh represents in that case nearly 15% of the total microgrid capacity. However, the microgrid succeeds in powering the communal load, while the nanogrids do not reach the weak SoC zone. In comparison, without the communal load, the SoCs obtained are shown in Fig. II.18 and are much higher. Ultimately, the choice to install a communal load on the DC microgrid is a compromise between the DoD of the batteries and the additional electrical services brought to the community. Powering communal loads only when the DC bus voltage is high is also a possibility, as this reflects a high level of available energy on the microgrid. This is particularly relevant for flexible and controllable loads such as water pumps which must fill a tank: their time of operation can easily be shifted by a few hours without significantly impacting their performances.

It can be noted that due to the voltage drops on the lines, at equivalent SoC and battery capacity, the closer a nanogrid is from the communal load, the greater the current it injects on the DC bus as it sees a more representative image of the DC bus voltage with respect to the communal load. This is illustrated in Fig. II.15 with nanogrids 54 and 168 measuring a lower voltage than the other nanogrids. Overall, the farther a nanogrid is from a consumption point, the greater the voltage drop, and the less representative the DC bus voltage with respect to the consumption point. This shows that the geographical dissemination of strong and weak nanogrids as well as of communal loads must be carefully planned to obtain a balanced microgrid.

Overall, the results and analysis presented above prove the viability of the proposed control algorithm and validate the microgrid operation, both for energy sharing between nanogrids and for supplying high power communal loads. The proposed control algorithm enables relevant power flows to increase the reliability and quality of the electric services for the end-users while maintaining the DC bus voltage within predefined limits.

High-level long-term simulations with average models for the power electronic converters have definitely been needed in that case, as modeling precisely the converters impedes simulation over long periods of time. This microgrid model needs around seven minutes to run to simulate over three days of operation for five nanogrids. Extending the model or the time period is then easily doable if needed.

II.5 Experimental validation in the lab

To the belief of the author, in the microgrid field, lab testing is unavoidable to provide a complete experimental validation of the microgrid topology and control designed with the help of simulations. Furthermore, field deployment of DC microgrids in rural places is expensive, logistically difficult and time consuming, making it important to conduct extensive lab testing to avoid any unexpected problems during field deployment, which might be impossible to solve once on the field. The development of an experimental test bench for the proposed microgrid and its associated results, presented below, is also available in [67], a conference paper publish during this thesis.

II.5.a Development of a test bench

The objective of the test bench is to create a lab environment replicating as closely as possible the real field conditions, with additional safety, monitoring, ease of installation and testing capacities, in order to validate the proposed microgrid topology and its associated control through the study of the microgrid power flows.

The test bench consists of three DC-DC bidirectional buck-boost converters interconnected through resistive and inductive lines (hereafter referred to as RL lines), which emulate the impedance of the electrical lines of the field (with four typical distances available: 20, 40, 60 and 80 meters). The cabling set-up can be reconfigured easily as indicated on the schematic of the test bench in Fig. II.19, enabling grid reconfiguration to test different grid layouts (i.e. radial or meshed). The test bench represents a microgrid with three nanogrids interconnected. A real battery or a power supply in parallel with an electronic load emulating a battery are placed at the input of each converter. The solar panels and the local loads of each nanogrid are not considered in the test bench as they have no instantaneous impact on the power flows on the microgrid (although they have an impact in the long-term due to the modifications of the SoC of the battery). An adjustable power resistor can be directly connected to the DC bus to emulate a communal load. The developed test bench can be seen in Fig. II.20, where most of the cables (except the ones linking the converters) have been omitted for the sake of clarity.

The DC-DC converter developed for this test bench is considered as a black-box and is not described in this Chapter but more details can be found in [67] and in Chapter III where a second and more elaborate version of the DC-DC converter is presented. The converters in the test bench are individually controlled by a dedicated RIO Embedded Controller from National Instruments programmed using LabVIEW [START_REF]LabVIEW presentation website[END_REF]. The individual RIO controllers, in addition to controlling the switches of the converters, implement the decentralized and communication-free control algorithm, enable data recording every 25 ms and scenario studies through an emulated and adaptable SoC estimator of the nanogrid batteries based on a Coulomb counting method. Moreover, a Graphic User Interface (GUI) offers ease of monitoring and enables external actions on the test bench (e.g. converter start-up, SoC variations, etc.). The RIO controller determines the current reference with the decentralized and communication-free control algorithm, presented in Section II.3, that the converter must follow. A digital PI regulator is used to regulate the current of the converter to its reference value I ref . Finally, Table II.4 summarizes the parameters of the developed test bench.

II.5.b Experimental results

As for the simulation results, the experimental results illustrate two main features of the proposed microgrid: energy sharing between nanogrids and communal load operation.

II.5.b-i Energy sharing between nanogrids

The test bench enables to monitor the power flows between the three converters. The evolution of the SoC of the emulated batteries, the DC bus voltage and the currents For the sake of clarity, the selfish feature of the control algorithm has not been implemented in this test (i.e. SoC max is always equal to 80%) and I rated is set equal to 9 A. It is interesting to note that when NG 2 starts to inject current at t = 220 s, the DC bus voltage shortly stabilizes at 66 V because NG 1 and NG 3 do not respond quickly enough to the increase in voltage. Indeed, they are both in Voltage-controlled Absorption mode but with a SoC very close to 60% (i.e. SoC min ) and thus their current reference I ref is initially close to 0 A as indicated by equation II.4. However, the DC bus voltage is still safely maintained at 66 V by the control algorithm, which reduces NG 2 injection until NGs 1 and 3 start to absorb more as soon as their SoCs increase slightly. 1. The SoCs of the emulated batteries are initialized between 60% and 80%, in the medium range, with the three NGs at the boundary between Voltage-controlled Absorption and Voltage-controlled Injection modes.

2. A t = 10 s, a 60 W power resistor is connected and the three NGs inject current on the DC bus with respect to their SoC in Voltage-controlled Injection mode, i.e. the higher the SoC, the higher the current injected.

3. Then, the consumption of the power resistor is increased from t = 30 s to t = 40 s to 120 W. The three NGs adapt to the increase in power consumption and inject more on the microgrid. In this test, the three nanogrids are most of the time in Voltage-controlled Injection mode, and the bigger the voltage deviation, the greater the current injected. The relationship between the DC bus voltage and the global available energy of the microgrid is confirmed with the DC bus voltage being lower when the power resistor consumption is greater, as there is less available energy left on the microgrid due to the high consumption of the power resistor. Note here that the current injected by NG 2 is higher than the others with respect to its SoC due to its proximity to the communal load, as indicated in Fig. II.19. A zoom on the DC bus voltage in Fig. II.22 shows that NG 2 sees a DC bus voltage respectively 0.3 V and 0.1 V lower than NGs 1 and 3 (due to lower voltage deviations on the lines), and thus injects more on the DC bus. These results validate the operation of the microgrid with a communal load and confirm the importance of carefully selecting the location of high-power communal loads, as the neighboring nanogrids contribute the most.

Overall, this test bench and its associated results validate the proper operation of the proposed microgrid with a high number of subsequent successful tests performed (meshed or radial layouts, 12 or 24 V nanogrids, different line lengths, protection and start-up features [67]) but whose results are not presented here for the sake of clarity.

In addition, these experimental results have enabled to further tune the control algorithm during the preliminary phases of testing. In particular, the slope of the voltage hyperbolic tangent (i.e. γ v ) has been decreased to avoid oscillations on the current reference, which should not evolve too fast. This illustrates the crucial need to confront theoretical control algorithms to the reality of test benches. Overall, the control algorithm needs to be less aggressive to prevent any oscillations in the current reference. It is the belief of the author that the regulation must also purposefully be slowed down (i.e. by setting a relatively slow PI regulation) to enhance stability margins. Finally, the experimental results show that the control algorithm enables relevant power flows on the DC microgrid while maintaining the DC bus voltage within a predefined limit.

Eventually, thanks to the RIO embedded controller and LabVIEW, the fast prototyping of a test bench, presented in more detail in [67], is easily achievable and permits to quickly validate the design of the microgrid and its control algorithm without the long engineering time associated with the use of micro-controllers.

II.6 Conclusion

This Chapter has presented the design of a DC microgrid with decentralized production and storage, specifically adapted to the need of the Lateral Electrification model, and its software and experimental validation. The decentralized approach, even if considered as a core assumption in this thesis due to the Lateral Electrification model, has been justified through an analysis of the state of the art of microgrid topology and control. Decentralized approaches offer many advantages over centralized ones, from the absence of single point of failure and communication layer, higher reliability and lower losses to plug & play feature and reduced costs.

Then, the proposed microgrid has been presented, with a particular focus on the decentralized and communication-free control algorithm, whose multiple modes and equations are thoroughly explained. A high-level long-term simulation model is introduced to validate the proposed control method. The setting of a lab test bench to experimentally implement and validate the control algorithm is then detailed. Software and experimental results are extensively illustrated to ease the understanding of the microgrid operation with respect to its control algorithm. It can be concluded that the proposed control algorithm

Abstract

This Chapter presents the design, hardware and firmware realization of a so-called "pre-industrialized" version of the interconnection module. After the analysis of the academic and industry state of the art, the optimal converter architecture and its specifications are detailed with respect to the needs of the microgrid application. In particular, the interconnection module not only ensures the power transfers but also the start-up and protection functions in an all-in-one structure.

Then, an exhaustive search algorithm to optimize the number of arms of the converter and the microgrid DC bus voltage with respect to the cost of the interconnection module is developed. Finally, the hardware and firmware realization is illustrated and some features of the interconnection module are validated experimentally.

III.1 Introduction

The operation of the DC microgrid with decentralized production and storage principally relies on the power electronic based interconnection modules linking the nanogrids to the microgrid DC bus. The development of the interconnection module is therefore of utmost importance for the microgrid as it is its main brick, both to step up the nanogrid voltage to the microgrid DC bus voltage and to implement the decentralized and communication-free control algorithm presented in Chapter II. However, the rural electrification sector implies a few specificities in the design of a power electronic converter, whose objectives are mostly dominated by costs, ease of operation and maintenance and modularity. Weight and volume, usually predominant in power electronics design nowadays, do not matter too much as this is a stationary application.

In addition, the design of this power electronic structure is directly linked to its specific application. Indeed, in order to obtain an optimal global system, addressing simultaneously the field of power electronics and the field of power systems is definitely necessary. The microgrid operation and the converter design are intertwined as the application of the converter, i.e. the proposed microgrid, is still under development and is open to changes. This is very different from traditional works on converter design for power systems where the converter specifications (including its main functionalities and the constraints to support under fault conditions) are usually very well framed by the power system applications and the task repartition between network control, protection devices and production/consumption elements. The use of power electronics in power systems is undergoing a paradigm shift, from the converter being a "passive" add-on brick which needs to adapt and follow the grid characteristics to a more "active" brick proposing grid services and defining the grid operation. The absence of norms for the proposed decentralized DC microgrids opens up huge possibilities to perform co-design between the converter and the microgrid and to enhance their global performances.

Therefore, after analyzing the state of the art of converter design for DC microgrids and converter optimization in Section III.2, Section III.3 highlights the paradigm shift ongoing in the use of power electronics in grid operation, before applying it for the choice of the interconnection module architecture. Secondly, in Section III.4, the theoretical study of an interleaved converter is presented, followed by an exhaustive search algorithm to determine the cost-optimized number of arms and DC bus voltage for the DC-DC converter. Thirdly, the practical realization of the interconnection module is thoroughly described and validated experimentally in Section III.5, before giving concluding remarks in Section III.6. This work aimed at developing an interconnection module achieving a TRL (Technology Readiness Level) of 7, in order to manufacture at least 30 copies of the interconnection module for field deployment. A part of this Chapter is also presented in a conference paper [START_REF] Richard | Specifications and Design of a DC-DC Converter for Decentralized DC Microgrids in Rural Africa[END_REF]. A master thesis carried out by Nassim Bennacer during this thesis has also highly contributed to the development and findings of this Chapter.

III.2 State of the art

The field of power electronics design for rural electrification is not very active in research. The power electronics community is usually convinced that energy access is not a question of technologies anymore, believed to be already developed and available to answer energy access needs, but rather a question of economics and politics. However, recently, some researchers are trying to highlight the needs for new power electronics research works and the role that power electronics can play in energy access [START_REF] Popovic | Energy Access: A New Power Electronics Story[END_REF][START_REF]IEEE Empower a Billion Lives[END_REF][START_REF] Catuogno | Open source Hardware Technology, a sustainable solution to achieve energy for all the global south[END_REF].

In particular, co-design between power electronics and power systems is of utmost interest as this represents a new opportunity to combine two fields usually dissociated, but which can bring a lot to each other. The influence between power electronics design and grid operation is definitely an open question that could lead to a paradigm shift in the use of power electronics to ease grid operation and protection and reduce constraints on the power electronic structures. In addition, cost-optimized design of power converters, usually performed by large power electronics companies with proprietary know-how, should be tackled by the research community to democratize power electronics knowledge and help small actors (very present in the rural electrification sector) to develop cost-efficient power electronic solutions. The state of the art of academic research and industry examples are therefore presented in this Section.

III.2.a Academic research

The role of power electronics in grid operation is definitely changing [START_REF] Kolar | Vision -Power Electronics[END_REF][START_REF] Zhang | Role of power electronics in grid 3.0[END_REF]. Power systems can be defined as the association of four main elements, i.e. a distribution grid with electrical characteristics (current and voltage limits, impedances) and its associated control to ensure stability and relevant power flows, production units (either synchronous generators or converter-based generation), protection systems (fuses, circuit breakers, etc.) to handle faults and finally loads. Moreover, different events inducing transient behaviors have to be mitigated on power systems (e.g. black start, disturbances, etc.). Until recently, the power electronic converters installed on power systems always had to adapt to the grid characteristics which usually strongly constrain their design. For instance, power systems have a high short-circuit power capability, i.e. production units are supposed to be able to inject and support three to seven times more than their nominal current, for the protection systems to be capable of detecting a fault and thus opening. On the contrary, power electronic converters are usually often limited to 1.2 times their nominal current. Hence, to adapt to classic protection systems, they are either highly oversized to be able to withstand much higher current than their nominal operating current or they are suffering high constraints on their components during the fault or transient events, significantly impacting their lifetime. While such events are very rare in developed countries, the electrical infrastructures of developing countries suffer from low investments, poor operation and use by customers which thus lead to a higher number of outages and constraints on the power converters. This example typically illustrates how the design of power electronic converters and power systems are intertwined, with until now a large domination of power systems over power electronics.

To mitigate the impact of power grid operation on power converters, one solution usually selected is to harden (and often oversize) the converters. However, a paradigm shift based on the rethinking of the interactions between the different elements of a power system might ease the use of power electronic structures within power grids. These research questions are new as historically power systems have been largely dominated by synchronous generation with very few power converters installed on the grid. Despite a clear increase in power electronic applications on the grid (to interface renewable energy generation or electric vehicles for instance), the grid characteristics still limit the design of the power electronic converters. Therefore, researchers and engineers are obliged to comply with grid specificites, drastically reducing the possibilities that power electronics could bring to power systems. However, islanded microgrids for rural electrification, whether they are AC or DC, centralized or decentralized, are relatively new power systems which could benefit from the new possibilities offered by power electronics, especially as such microgrids are often not constrained to follow restrictive norms, designed for traditional centralized and synchronous-based power systems. These research questions are starting to emerge in a few laboratories worldwide (such as G2Elab in France [4] where this thesis has been carried out).

While the role of power electronics in grid operation is undergoing a paradigm shift, an increasing (even if relatively small) number of research teams already focus on power electronics for rural electrification. For instance, some research works aim at determining the optimal converter architecture for rural microgrids [START_REF] Odo | A Comparative Study of Single-phase Non-isolated Bidirectional DC-DC Converters Suitability for Energy Storage Application in a DC Microgrid[END_REF] or optimizing converter usage through losses reduction [START_REF] Samende | Power loss analysis of a multiport DC -DC converter for DC grid applications[END_REF], although they do not challenge the microgrid characteristics to co-design converters and microgrids. Overall, two main power electronic structures are often proposed:

• structures with galvanic isolation, often based on Dual or Triple Active Bridge, using a single shared magnetic core (hence providing isolation) to exchange power between different inputs/outputs [START_REF] Nasir | A Decentralized Control Architecture Applied to DC Nanogrid Clusters for Rural Electrification in Developing Regions[END_REF][START_REF] Samende | State of Charge Based Droop Control for Coordinated Power Exchange in Low Voltage DC Nanogrids[END_REF]62,[START_REF] Samende | Power loss analysis of a multiport DC -DC converter for DC grid applications[END_REF],

• structures without galvanic isolation based on non-isolated synchronous bidirectional DC-DC converters such as buck, boost or buck-boost [START_REF] Odo | A Comparative Study of Single-phase Non-isolated Bidirectional DC-DC Converters Suitability for Energy Storage Application in a DC Microgrid[END_REF][START_REF] Shaw | Modeling and control of a battery connected standalone photovoltaic system[END_REF].

It is clear that power electronic structures with galvanic isolation are more expensive than structures without galvanic isolation due to the price of the single magnetic core and the often higher number of switches needed. In addition, for DC microgrids following the swarm electrification concept, galvanic isolation is often unnecessary as the microgrid voltage stays below the extra-low voltage threshold of 120 V DC. Therefore, single-phase non-isolated bidirectional converters are often chosen for such rural DC microgrids.

A comparison of different single-phase non-isolated bidirectional structures are carried out in [START_REF] Odo | A Comparative Study of Single-phase Non-isolated Bidirectional DC-DC Converters Suitability for Energy Storage Application in a DC Microgrid[END_REF], considering half-bridge, cascaded buck-boost, SEPIC and buck-boost with tapped inductor converters. The cascaded buck-boost is selected as the best option for DC microgrids mainly due to its DC bus voltage regulation capability, its four quadrant operation and its low number of passive components [START_REF] Odo | A Comparative Study of Single-phase Non-isolated Bidirectional DC-DC Converters Suitability for Energy Storage Application in a DC Microgrid[END_REF].

However, even if such converters are highly available off-the-shelf, it is still necessary to design specific converters for the microgrid applications. Firstly, in most cases, microgrid operation requires a highly customized control algorithm, whether it is for a centralized microgrid or for a decentralized microgrid (such as the control algorithm presented in Chapter II), which can not always be integrated within off-the-shelf converters as they are not necessarily reprogrammable. Secondly, protection features of off-the-shelf converters, usually set on restrictive norms adapted to traditional distribution grids, are often too conservative for DC microgrid applications where over or undervoltage events are more prone to occur (as well as under or over frequency events for AC minigrids) [69]. Using off-the-shelf converters for such applications might trigger too often protections, reducing the quality of the electrical services delivered. Finally, the lifetime of such converters might be reduced if they have not been designed to withstand frequently disconnection and reconnection events, rare on conventional power systems but more common for rural microgrids.

To ease the design of power electronic converters, their optimization has been studied for a long time within the power electronics research community, especially since the early 2000s [START_REF] Delhommais | Review of optimization methods for the design of power electronics systems[END_REF] with an increasing number of publications every year. The main objective is to automate converter design through dedicated algorithms able to give the optimal design of a converter with respect to certain objective functions, whether they are based on cost, weight, volume, efficiency or less frequently on reliability [START_REF] Delhommais | Review of optimization methods for the design of power electronics systems[END_REF]. Power electronics optimization is a complex problem due to the high number of variables and their often discrete nature (e.g. choosing the value of a standard inductor off-the-shelf). Overall, three main approaches to converter optimization can be found in the literature:

• mathematical approaches based on differentiable models, solving the problem in "an imaginary world" through constraint relaxations where all decision variables are made continuous before using a discretization process to obtain "real life" values [START_REF] Delhommais | A Predesign Methodology for Power Electronics Based on Optimization and Continuous Models: Application to an Interleaved Buck Converter[END_REF][START_REF] Delhommais | First order design by optimization method: Application to an interleaved buck converter and validation[END_REF],

• heuristic approaches based on designer-defined rules to reduce the optimization space and often examine a high number of possible solutions of the reduced space [START_REF] Scoltock | Design optimisation and trade-offs in multi-kW DC-DC converters[END_REF],

• metaheuristic approaches, whether they are population-based or trajectory-based, often inspired from natural phenomena and highly suitable for large discrete problems [START_REF] Busquets-Monge | Power converter design optimization[END_REF][START_REF] De León-Aldaco | Metaheuristic Optimization Methods Applied to Power Converters: A Review[END_REF].

These three methods can also be hybridized with more than one algorithm used simultaneously. The metaheuristic methods, especially the population-based ones such as Genetic Algorithm (GA), tend to be more and more used as they are able to include nonlinear constraints and have a low dependency on initial solutions [START_REF] Delhommais | Review of optimization methods for the design of power electronics systems[END_REF]. However, as every optimization problem is unique due to the different objective functions, different applications and different choices or trade-offs made by the power converter designer, finding and following a general method of power converter design is generally difficult.

III.2.b Industry examples

As mentioned in Chapter I, more and more companies are installing centralized AC minigrids, thus a high number of power converters have been designed in the past for such applications. Therefore, the off-grid DC-AC inverter industry is quite mature with many large companies designing and manufacturing so-called solar inverters such as SMA, Schneider Electric, Victron, Huawei, ABB, etc. [START_REF]SMA Middle East and Africa[END_REF][START_REF]Schneider Electric Microgrid solution[END_REF]118,119,120]. However, these inverters are often designed for occidental world applications such as conventional AC minigrids, solar production on the national grid or individual home solar systems, and they might experience frequent failures or triggered protections if they are not properly adapted to rural AC minigrids whose operations are often more prone to faults, as stated in [69].

With respect to decentralized DC microgrids, very few converters have been designed for such applications in the recent years. To the best of the author's knowledge, only three companies (SOLshare [START_REF]SOLshare presentation website[END_REF], Solarworx [START_REF]Solarworx presentation website[END_REF] and Okra [START_REF]Okra presentation website[END_REF]), mentioned in Chapter I Section I.2, have developed DC-DC converters designed to enable swarm electrification through DC microgrids. Power-Blox, the fourth company mentioned in Chapter I, proposes AC microgrids and is therefore not included here.

Although it is not always possible to find detailed information, here are the main features of each product, to the extent of information available online:

• the "Okra Pod", developed for the Okra "Mesh-Grid", gathers solar production management (up to 600 W), storage through lead-acid or lithium batteries, load management with four outputs of different power allowances, and power exchange through a DC-DC converter (up to 300 W) with a 45 to 50 V DC microgrid,

• the "Grid module", developed for the Solarworx "Mesh Grid", is a 250 W 12 V input 45-72 V output DC-DC converter with IoT monitoring through LoRa communication protocol and billing via an Android app,

• the "SOLbox", developed for the SOLshare "SOLgrid", is a bidirectional 76 V output DC smart power controller composed simultaneously of a step-up converter (to inject current), a step-down converter (to absorb current) and a DC meter, that enables peer-to-peer electricity trading, smart grid management, remote monitoring and mobile money payment.

However, as these three companies are B2B companies selling their products to grid operators or to local companies, it is not possible to obtain further details on their power converter architecture. Finally, OwnTech, a recent Open-Science initiative launched in 2021, proposes an opensource smart switched-mode power converter adaptable to a high number of applications such as battery charger, laboratory power supply, motor driver and much more. This is made possible through the concept of software-defined power converters, i.e. reprogrammable power hardware with a high level of modularity and an associated open-source code library [121]. The main idea behind this initiative lies in developing useful hardware technologies, that can be used by everyone in order to democratize power electronics. Their ultimate goal is to foster a community around power electronics to provide solutions to real problems on the field. Therefore, applications for rural electrification are definitely possible with OwnTech hardware solutions, as advocated in [START_REF] Catuogno | Open source Hardware Technology, a sustainable solution to achieve energy for all the global south[END_REF]. This is clearly of interest for local people in Sub-Saharan Africa or South-East Asia willing to solve the energy access challenges without the necessary knowhow to design power electronic converters but able to build on OwnTech community and experience.

III.3 Interconnection module requirements for microgrid operation

This Section firstly discusses the paradigm shift ongoing in the use of power electronics for grid (and microgrid) operation before applying it to the choice of the optimal con-verter architecture for decentralized DC microgrids. Finally, the interconnection module specifications are presented in detail.

III.3.a Paradigm shift: from converters to systems

In addition to their primary function of distributing electricity, power systems require at least two additional features to properly operate in the long-term:

• black start or start-up feature, i.e. the ability for a grid to start autonomously and automatically,

• protection feature, i.e. the ability of a grid to protect itself from any fault (shortcircuit, open circuit, etc.) and to allow continuous operation in the portion of the grid not impacted by the fault.

Both features are highly regulated by strict norms (often called grid codes), quantifying the performances power systems must ensure in terms of start-up and protections. These features have historically been developed for traditional, centralized, synchronousbased power systems build now for more than a century. Therefore, they are totally adapted to the behavior of large synchronous generators (used for instance for nuclear, coal or gas power plants). Based on rugged electromechanical systems such as synchronous generators, classic power systems have a large short-circuit power (i.e. the power fed within a short-circuit), a feature which has been largely used by the protection systems to be able to detect and interrupt a short-circuit. These high short-circuit currents can reach three to seven times the nominal current of the production units. More generally, traditional protections trip at high current levels and thus are quite slow.

The operation of traditional power systems has a huge impact on the design of power electronic structures installed on such power systems, especially when they operate in gridfollowing mode. Power electronics design is usually only focused on the primary function of the converters (i.e. adapting the voltage and current levels between a source/a load and the grid) while purposefully forgetting to account for special grid events such as start-up or faults. External systems (such as pre-charge relays, fuses, circuit breakers, etc.) are then added to the converters to handle the faults and start-ups and their associated transients. Such transients can drastically limit the lifetime of the power converters as they often expose them to high currents. Hence, power converters are often oversized to be able to overcome these transient events. Overall, the adaptation of the power electronic converters to the protection and start-up features of traditional power systems entails great constraint on their design and operation.

Furthermore, rural power systems are often weak grids, more exposed to transient events whether they are intentional (e.g. manual disconnections and reconnections) or not (e.g. faults). Power electronic converters are therefore experiencing much higher stress on rural Sub-Saharan grids than in traditional occidental grids for which most of the power electronic structures and protection devices have been developed. This limits their lifetime and their technical sustainability.

Based on these observations, a paradigm shift in the use of power electronics in grid operation is ongoing [START_REF] Kolar | Vision -Power Electronics[END_REF]. The main idea of this paradigm shift lies in considering power electronics not anymore as a passive add-on brick which must adapt and follow the grid characteristics but rather as an active brick proposing grid services and defining the grid operation. This paradigm shift is illustrated in The power electronics community must then shift from the study of converters alone (i.e. the hardware brick and its control) to the study of systems of converters (i.e. the interaction of converters between one to the other and the opportunities they can bring to system operation). In other words, as mentioned in the 2025 Power Electronics roadmap presented at an European Center for Power Electronics (ECPE) workshop, huge opportunities arise by bridging the gaps between power electronics and power systems [START_REF] Kolar | Vision -Power Electronics[END_REF]. Converters must be considered as smart enablers capable of proposing, in addition to their primary function, grid services to optimize system operation and to replace, when needed, traditional protections and start-up schemes.

While such a paradigm shift might be complicated and tedious to carry out for traditional power systems, as they have been developed for more than a century and are strictly regulated by norms, the rural electrification sector might benefit from less norms and standardization to rapidly embrace it [START_REF] Sheridan | Swarm electrification: A comprehensive literature review[END_REF]. As an example of the opportunities such a paradigm shift can bring to microgrid operation, note that usually costly electromechanical components such as circuit breakers for protection or pre-charge relays for start-up are installed on microgrids. If technically possible, it is definitely economically interesting to include these features directly within the power electronic converters to suppress or reduce the use of these costly (and often less reliable) devices.

Many research teams already focus on the development of grid-forming control algorithms for power electronic converters, in opposition to grid-following control, for the converters to behave as a voltage source controlling voltage levels (and frequency if in AC) [START_REF] Rosso | Grid-Forming Converters: Control Approaches, Grid-Synchronization, and Future Trends-A Review[END_REF][START_REF] Rathnayake | Grid Forming Inverter Modeling, Control, and Applications[END_REF]. However, most of these research teams do not completely challenge the role of power electronics in grid operation due the presence of restrictive norms and the weight of history in terms of grid structures and operation.

III.3.b Optimal converter architecture for decentralized DC microgrids

For the DC microgrid with decentralized production and generation, the interconnection module primary functions are to step up the voltage from the nanogrid or communal load voltage (i.e. 12, 24 or 48 V) to the microgrid DC bus voltage and to regulate the injected or absorbed current to the reference given by the decentralized and communication-free control algorithm. While a boost architecture would definitely enable the interconnection module to fulfill these primary functions, protection (against microgrid faults) and microgrid start-up functions cannot be performed by such an architecture on the contrary to a buck-boost architecture. As a reminder, both architectures are shown in As the proposed decentralized DC microgrid is in the extra-low voltage range and disconnected from the national grid, norms are less restrictive (or even inexistent). Therefore, start-up and protection features can be directly included in the interconnection module.

III.3.b-i Start-up procedure

To start the proposed microgrid, the first interconnection module to launch must charge the DC bus and the associated high capacitance (composed essentially of the output capacitors of all the connected interconnection modules) to the operating voltage of the microgrid. A boost architecture would directly apply its input voltage on the DC bus (through the body diode of the high side mosfet Q4), charging instantly the DC bus capacitors at its input voltage. This would generate a very large inrush current I peak limited only by the cable and converter internal resistances. However, with a buck-boost architecture, the following start-up procedure can be implemented to lessen the inrush current.

III.3.b-ii Protection function

If the interconnection module is only composed of a boost structure, there is a permanent current path between the nanogrid and the microgrid DC bus, through the high-side mosfet Q4 body diode (Fig. III.2 left). Yet, undervoltage events on the microgrid could happen following a fault or a problem with a communal load (high transient current, DC motor suddenly blocked, etc.). If the DC bus voltage suddenly drops below the nanogrid voltage, a boost structure would not be able to limit or block the current due to the presence of the high-side mosfet Q4 body diode leading to a high uncontrolled inrush current. Therefore, only external protections would be able to interrupt the current. On the contrary, a buck-boost converter could switch to buck conversion to overcome the undervoltage event or completely disconnect the nanogrid from the microgrid by opening the high-side buck mosfet Q1 (whose body diode is in the opposite direction to Q4 body diode). Adding a buck structure to the interconnection module enables to enhance its protection features as the interconnection module can completely disconnect the nanogrid to the microgrid, in case of voltage or current exceeding predefined limits, and thus handle faults on both sides of the interconnection module. Moreover, closing the low-side mosfets Q2 and Q3 offers a free-wheel path to the current in the power inductors and then limits the constraints on the interface mosfets.

III.3.b-iii Interleaved feature

As converter design for low-voltage medium power applications usually implies a relatively high current rating of the converter, multiple phases can be put in parallel in an interleaved converter to reduce current in the power inductors. It lowers the current per arm for a specified power rating, which eases the design of the power inductors, the rating of the mosfets and the thermal management of the entire converter. This also enables to reduce output voltage and current ripples without increasing the output capacitance, thereby reducing the overall passive cost as detailed later in Section III.4. This output voltage ripple reduction is of particular importance as the DC bus measurement is an input to the control algorithm presented in Section II.3. Reducing the output voltage ripple also diminishes potential EMI (Electromagnetic Interference) issues and the associated filtering (either analog or digital) needed to obtain good quality measurements.

Multiple arms also enable power modularity which enhances the scalability of the converter and can increase efficiency (only one arm used at low power to decrease switching losses for instance) [START_REF] Gaetani-Liseo | Impact on Energy Saving of Active Phase Count Control to a DC/DC Converter in a DC Micro Grid[END_REF]. This is particularly relevant as these converters often operate far from their nominal power.

III.3.b-iv Conclusion

While both a boost and buck-boost architectures can fulfill the primary functions of the interconnection module, only the buck-boost one can include within its internal control the protection and start-up features needed for the proper operation of the microgrid. With a boost architecture, costly electromechanical elements (which often present reliability issues on the field) should be added to the interconnection module to ensure protection and start-up. This definitely increases the price of the proposed solution while reducing the reliability of the microgrid. Furthermore, the use of traditional protection and start-up systems requires to oversize the interconnection module, otherwise its lifetime might be drastically reduced due to the high stresses on its components in case of frequent transient events.

In conclusion, an interleaved buck-boost architecture is selected for the interconnection module. Note that the interconnection module is expected to operate the majority of its time only in boost mode (i.e. Q3/Q4 switching and Q1 and Q2 respectively closed and open) and that the buck part intervenes only during transient events.

III.3.c Interconnection module specifications

Based on the previous analyses and requirements, the interconnection module main specifications can be presented and are summarized in Table III.1. Firstly, the interconnection module must be able to interconnect either a nanogrid or a communal load to the microgrid DC bus. Note that a nanogrid without battery nor solar panel behaves as a communal load and both situations are considered similar in terms of operation in the following. Therefore, technically wise, the interconnection must operate with the presence or not of a battery on its low-voltage side. This modularity of usage is important in order to develop only one hardware technology for all use cases needed in the proposed microgrid. This reduces design costs and production costs (per unit) by increasing the volume of production. This also facilitates logistic to have only one product instead of multiple ones.

Secondly, to adapt to the different possible voltage levels of the nanogrids and communal loads, the interconnection module should be able of operating at 12, 24 or 48 V on its lowvoltage side. The DC bus voltage, on the high voltage side of the interconnection module, is centered around a reference value with a ± 10% variation. This reference value must stay below the extra-low voltage threshold, i.e. 120 V DC, and above the low-side voltage. Four possibilities are thus considered, i.e. 60, 72, 84 or 96 V. The maximal current rating of the interconnection module is set to 30 A, based on a thorough review of the DC communal loads available on the market, showing that the majority of these productive use of energy devices have a power rating below 1.5 kW and operate at 24 or 48 V. This is also consistent with the maximum battery size proposed in the Lateral Electrification model (260 Ah with a power exchange with the microgrid limited at a tenth of the battery size, i.e. 26 A). The maximal temperature elevation of the interconnection module ∆T max is set to 50 °C.

Thirdly, maximum levels of output voltage and input current ripples (∆V S and ∆I bat respectively at the output of the switching cell before the grid filter and at the output of the battery, see ) further reduces the DC bus voltage ripple. Such maximum ripple levels have a huge influence on the choice of the passive elements of the interconnection module. In addition, the switching frequency is set to 50 kHz, a good trade-off between the complexity of design, the reduction of passive component size, the switching losses and micro-controller capabilities.

Finally, to adapt to the different nanogrid and communal load sizes, the interconnection module includes modularity of power. Indeed, one power sizing for all interconnection modules would incur useless costs for small nanogrids or small communal loads by installing the full power whereas it would never be used. On the contrary, multiple power levels would enable to adapt better to the nanogrid or communal load size by fitting the interconnection module rating to their size. This is made possible thanks to the interleaved structure of the interconnection module. An interconnection module composed of a control card and multiple power cards (at least two) would enable to distribute the different arms of the interleaved structure on different power cards and to mount only the necessary ones with respect to the power needed. Realistically, two, three or four power levels appear possible (hence with 15 A, 10 A, 7.5 A respectively per power card). The optimal number of boost arms and the DC bus output voltage are not strictly imposed by the converter specifications as they are both expected to have a large influence on the total interconnection module cost. They are rather determined by an exhaustive search algorithm optimizing the interconnection module cost, presented in the next Section. Similarly, the level of power modularity and the number of buck arms must be found based on cost reasons. These parameters which are yet to be determined are indicated in red in Table III.1.

III.4 Design methodology

Now that the interconnection module architecture and specifications have been detailed, its design can be carried out. Firstly, the theoretical study of an interleaved boost converter is reminded, with the calculations implemented with one and two arms presented in Appendix A, before extending the results to q arms with general formulas. Secondly, an exhaustive search algorithm is described in detail to determine the optimal number of arms and the output DC bus voltage to optimize the cost of the converter. Finally, the limitations of this method are highlighted.

III.4.a Theoretical study of an interleaved converter

The proposed converter architecture is shown in The general formulas for the input current and output voltage ripple are given in equations III.1 and III.2, with q the number of boost arms and α eq the integer part of the αq product. As a reminder, for efficiency reasons, the interconnection module operates the majority of its time (except for start-up and protection events) in boost mode, i.e. with mosfets Q1 and Q5 always closed and Q2 and Q6 always open.

∆I bat = qV bat LF • (1 -α) • α - α eq q α eq + 1 q -α = qV S LF • α - α eq q • α eq + 1 q -α (III.1) ∆V S = I bat C S F • α - α eq q • α eq + 1 q -α (III.2)
The Increasing the number of arms definitely helps reduce the ripple (and can even bring it to zero in some cases). However, it also impacts the cost of the interconnection module through additional components. Therefore, a technico-economic trade-off needs to be found, as studied in the next subsection.

III.4.b Exhaustive search algorithm

The exhaustive search algorithm aims at determining the technico-economic optimal co-design of the interleaved DC-DC converter and the decentralized microgrid. The DC bus voltage (i.e. V S at the output of the switching cells or V bus after the grid filter as shown in Fig. III.4) and the number of arms q are the optimization variables, while the objective is the minimization of the switching cells' cost. Only the cost of the boost switching cells are considered, including the power inductors, the output cell capacitors, the boost mosfets, their associated drivers and thermal heatsinks and the arm current sensors. For a first approach, the input and output filters are omitted from this optimization study. As the interleaved feature of the proposed architecture already diminishes the output voltage ripple, this exhaustive search has a positive impact on the sizing of the output grid filter.

Firstly, the flowchart of the algorithm is presented. Secondly, the modeling of the costs of the converter components as well as the equations of the mosfets losses needed in the exhaustive search algorithm are described. Most of the prices used in this study were obtained in mid 2022. Note also that the cases q=2 and q=5 are not presented in this study as with only two boost arms, it is almost impossible to find off-the-shelf power inductors of the needed values with a 15 A current rating, and five arms is not divisible by two, three or four, impeding power modularity.

III.4.b-i Flowchart of the algorithm

The exhaustive search algorithm is a heuristic method based on designer-defined rules and which explores all possible (V S , q) combinations (once the search space has been reduced through user-defined design rules) to determine the associated cost of the switching cells. The input voltage V bat , centered around 12 or 24 V, varies as indicated in Table III.1 and the output voltage varies by ± 10% around V S as guaranteed by the operation of the proposed microgrid. To consider the worst case, this study is performed with a battery current set at 30 A, i.e. the maximal power rating of the converter I conv in Table III.1. Firstly, for a given (V S , q) combination, the range of the duty cycle α is determined both for a 12 V and a 24 V battery as well as the maximal current per arm (i.e. I arm = 30 q ). Then, based on equations III.1 and III.2, and with ∆I bat and ∆V S set respectively to 1 A and 0.5 V to respect the converter specifications, the values of the power inductors and the output capacitors are calculated (considering the worst case, i.e. the possible values of α which maximize L and C S ). Simultaneously, the mosfets, mosfet drivers and current sensors are selected. Based on the mosfet selection, the total mosfet losses are calculated following equations III.4, III.5 and III.6 and from the total losses, a heatsink is selected so that the elevation of temperature is kept inferior or equal to 50 °C (i.e. ∆T max ). The cost of each element is then determined, following the methods presented below. The total cost can finally be summed up for this (V S , q) combination. The number of arms q or the DC bus voltage V S is modified until all possible combinations have been evaluated Cost modeling for power inductors is definitely complicated. A first and straightforward method to implement would be to estimate general linear formulas linking the overall costs to the value of the inductance (L) and its current rating (I) through the analysis of manufacturer catalogs. However, despite numerous attempts, no general formulas were found to be satisfying even by trying to interpolate with respect to I 2 or LI 2 , as the interpolation coefficient was below 0.9 every time.

A second method would be to consider the material costs of power inductors. Based on the value of L and I, the sizing of the magnetic core and the copper wires of the power inductor can be carried out and their cost determined. When such results are compared with manufacturer's costs, high differences are observed. Indeed, power inductors are labor-intensive as confirmed by [START_REF] Burkart | Component cost models for multi-objective optimizations of switched-mode power converters[END_REF] and thus most of their costs are associated with the costs of labor, which tends to vary a lot depending on the quantities and location of the manufacturing process as well as the type of inductors (SMD, through-hole, planar inductors, etc.). This method can therefore not be used without direct help from an inductor manufacturer.

The last method relies directly on manufacturer catalog costs by considering discrete values for the power inductors. This method has the huge drawback to depend on the quantity of discrete values included in the data set. It is often difficult to find a lot of inductor values at different current rating. However, without a collaboration with manufacturers, this appears to be the only possible solution for this algorithm.

Output capacitors

In contrast to power inductors, general linear formulas can be estimated for capacitors. Their costs depend mainly on the capacitance values and much less on capacitor voltage, especially when the application voltage varies only slightly. Interpolation coefficients over 0.99 are obtained for instance for the B32520 series from the manufacturer EPCOS. This is confirmed in [START_REF] Burkart | Component cost models for multi-objective optimizations of switched-mode power converters[END_REF] where linear formulas are found for film capacitors with respect to the rated capacitance and its voltage rating (although with a much smaller coefficient for the voltage rating than for the capacitance).

In addition, these output capacitors can be placed in parallel to obtain precisely the needed capacitor value. This is even beneficial as it reduces the nominal current within each capacitor as well as the total ESR (Equivalent Series Resistance) of the output equivalent capacitor.

Power mosfets

The selection of the power mosfets depends principally on their voltage rating, i.e. the voltage they are able to withstand, and their on-state resistance (R DS in equation III.5) and their switching characteristics (t ON , t OF F and Q G in equation III.6), both of which affect the mosfet losses.

Due to switching overvoltage and for safety margin, the mosfet voltage rating V DS must ensure the following criteria with respect to the microgrid DC bus voltage V S (varying by ± 10%). This design rule is based on manufacturer feedback [START_REF]Application Note AN851: Power MOSFET Basics -Understanding Voltage Ratings[END_REF].

1.1 • V S ≤ 0.8 • V DS -10 (III.3)
Moreover, all the power mosfets considered in this design must feature power losses below 2 W to ease the choice of the heatsink.

Finally, and after a thorough review of available power mosfets on the market, two different types of components have been selected for most voltage ratings, one more expensive but generating less losses, appropriate for a small number of arms, and one less expensive but generating more losses, appropriate for a high number of arms (as the current per arm is then lower). This is summarized in Table III.2. Note that mosfet prices tend to increase significantly for a 150 V voltage rating in comparison to 120 or 100 V (between 1.5 to two times more).

Mosfet drivers

To drive the boost power mosfets, a bootstrap component is selected. The drawback of bootstrap components is that they can not maintain the high-side mosfets always closed. However, in this application, this is never the case for the boost arms as they are continuously switching to ensure voltage step-up and current regulation. An extensive review of manufacturer catalogs has shown that many bootstrap components are available for a price set at 1 e in this study.

Current sensor

A current sensor is placed in each arm to precisely measure individual currents in order to equally balance the total current. In addition, the current sensor must be bidirectional. The shunt method is not appropriate in this case as a voltage reference must be added to be able to measure bidirectional current but also because the operational amplifier might not support a 48 V input voltage (in case of 48 V communal load). For ease of design, measurement isolation and cost reasons, a Hall effect sensor is selected and, based on a catalog review, its price is set to 3 e.

III.4.b-iii Mosfet losses modeling

Mosfet losses P loss are composed of two main parts:

• conduction losses P cond , due to the current flowing in the component when closed,

• switching losses P sw , due to transitions between closed and open states.

The total losses are expressed below:

P loss = P cond + P sw (III.4)

P cond = αR DS (T j ) • I 2 ef f
(III.5)

P sw = F • (V DS • I DS • t ON + t OF F 2 + Q G • V G ) (III.6)
with α the duty cycle, R DS (T j ) the on-state mosfet resistance at the junction temperature T j (set at 75 °C in this study), I ef f the RMS current in the mosfet, F the switching frequency, V DS and I DS respectively the maximal voltage and current at the switching of the mosfet, t ON and t OF F respectively the turn-on and turn-off time, Q G the total gate charge needed to close the mosfet and V G the mosfet driver output voltage. Once a mosfet is selected in the exhaustive search algorithm, its maximal losses are calculated using equations III.4, III.5 and III.6, and the thermal resistance of the heatsinks needed to stay below a 50 °C elevation of temperature is calculated.

In this design, to ease logistics and the interconnection module mounting, using PCB as heatsink is preferred. Therefore, following Fig. III.7 from ST-Microelectronics [START_REF]Application Note 5088: Rectifiers thermal management, handling and mounting recommendations[END_REF], if the needed thermal resistance R th is above 37 K/W, no heatsink is selected except a PCB copper area around the mosfet. This graph is for DPAK packages, however this is considered to be conservative to use these values for TO-220 packages as thermal performances of TO-220 packages are similar or even better than DPAK packages at equivalent electrical characteristics. Below 37 K/W, four different heatsinks found after a catalog search are considered, with the prices indicated in Table III.3. When the PCB is used as heatsink, this is considered to be free as the cost of the PCB is usually very low and as this heatsink method is believed not to expand much (or even not at all) the total size of the PCB.

III.4.c Method limitations

Despite offering promising results detailed in the next Section, this study presents a few limitations. Firstly, developing cost models for power electronic components is a very complex task due to the influence of non-physical factors such as the location and quantity of manufacturing, the confidentiality of cost data and pricing strategies, the variation of costs over time as well as the high number of different materials and manufacturing processes involved in a component [START_REF] Burkart | Component cost models for multi-objective optimizations of switched-mode power converters[END_REF]. In particular, for this study, the costs considered for the power inductors taken in a discrete catalog influence a lot the results as the inductor cost represents up to 60% of the total costs of the switching cells. Similarly, more discrete values are needed for the heatsinks even if this may not influence final results as PCB as heatsink is often preferred. Overall, to improve the quality of the proposed method, a more precise analysis and study of cost models is needed. In addition, if discrete values are used, a more complete catalog should be gathered, although this is complicated (or very time-consuming) to obtain without a collaboration with a manufacturer or a component supplier.

Secondly, including the costs of the input and output grid filters, the buck part and the PCB within the optimization algorithm would enable to obtain a global optimal. In this case, by only considering the switching cells during the optimization process before the a posteriori sizing of the input and output grid filters, a sub-optimal global result might be obtained. In particular, the output grid filter has a great influence on the DC bus voltage ripple (hence on the sizing of the passive components of the switching cells) as well as on the voltage inertia and must be considered within the core of the optimization algorithm. The PCB should also be considered to account for the cost of using PCB as heatsink, although this is believed to be negligible. The inclusion of the buck part would enable to model the influence of the number and power of the boost arms on the buck arm sizing.

Thirdly, restricting the switching frequency to a fixed value in the exhaustive search algorithm limits the design possibilities. Indeed, the switching frequency has a huge impact on converter design, as its increase enables to reduce the size of the passive components at the expense of greater losses. Moreover, a higher switching frequency might generate more EMC problems and also reduce the resolution of the duty cycle, two consequences difficult to quantify in terms of cost. All these impacts of the switching frequency must be precisely modeled to allow the switching frequency to be a variable in the optimization algorithm. Preliminary results performed with the exhaustive search algorithm show that the total costs usually decrease up to 80 kHz, before stagnating. However, if the switching frequency is increased, external heatsinks are often required, reducing the ease of assembly of the power electronic structure obtained.

III.5 Realization of the interconnection module

Based on the design methodology presented in the previous Section, the interconnection module final characteristics are presented. The hardware and firmware realization are briefly described before validating and illustrating experimentally some features of the interconnection module.

III.5.a Design results

III.5.a-i Sizing of the boost arms

The results of the exhaustive search algorithm are shown in Table III. 4, where the total costs for different (V S , q) combinations are indicated both for a 12 V (in red) or 24 V (in black) battery input voltage. The cost differences between the 12 V and 24 configurations come mostly from the inductor, which are of higher costs in the 12 V configuration because the duty cycle α range is often less favorable for the input current ripple in the 12 V configuration than in the 24 V one, as confirmed in Table III.4: Total cost (in e) of the switching cells for different (V S , q) combinations (battery input voltage: 12 V in red, 24 V in black). III.4 highlights that configurations with three or four arms and with an output voltage at 60 V or 72 V are more favorable. Indeed, for V s equal to 84 or 96 V and for a given number of arms, the mosfet costs tend to increase significantly due to the need for a higher voltage rating. Furthermore, at a given output voltage, the costs of the mosfet drivers and current sensors increase proportionally to the number of arms whereas the decrease of single inductor cost is counterbalanced by the higher number of inductors. The increase in mosfet costs for a 84 V configuration is shown in Fig. III.9. Only the capacitor cost truly decreases when the number of arms is set at six, but this represents a very small part of the total cost, as indicated in Fig. III.9. Overall, Fig. III.9 shows that the total cost is dominated by the inductor cost, up to 60% of the total cost, followed by the costs of current sensors, mosfet and their associated drivers. It has to be noted here that most cases have opted for PCB as heatsink, therefore no costs are associated with heatsinks. This is highly linked to the value of the switching frequency used for this design (50 kHz). Based on the results from Table III.4, the configuration 72 V, four arms, is selected. The 72 V configuration is preferred to the 60 V configuration as it enables to reduce ohmic losses and voltage drops on the microgrid DC bus due to lower currents. The four arm configuration is also slightly less expensive than the three arm configuration, at 72 V. In addition, with three boost arms, the only way to achieve power modularity is to have three power levels. However, as the power cards are hosted on a control card, three different power levels imply three power cards possibly mounted through PCB to PCB connectors, whose cost is sufficiently large to aim at reducing the number of connectors. Therefore, a modularity of two power levels, i.e. N P in Table III.1, is adopted, which is not possible to realize with three boost arms. To sum up, a 72 V configuration, four boost arms (two on each power card) is selected from the results of the exhaustive search algorithm. Figure III.9: Cost breakdown for two (V S , q) configurations.

q V S 60 V 72 V 84 V 96 V 3

III.5.a-ii Sizing of the buck arms

With four boost arms (two on each power card), there are three possibilities for the number of buck arms N B , needed for start-up and protection services. The interconnection module can contain either one buck arm common for the two power cards, two buck arms (i.e. one per power card) or four buck arms (i.e. one per boost arm). Note here that the buck arms cannot use bootstrap drivers as during normal operation the high-side mosfet is always closed. Therefore, the buck driver circuit is composed of an isolated supply, an opto-driver (for the high-side mosfet) and a low-side driver. Its total cost is set to 9 e.

The costs and consequences of using one, two or four buck arms are shown in Table III.5. One or two buck arms are close in terms of price, but having two buck arms enable to avoid the use of an external heatsink and to associate one buck to each power card, which is not possible with only one buck arm. This increases the modularity of the proposed design. Indeed, if only used at half power, with one power card, only one buck arm would be mounted on the interconnection module, reducing the overall cost. Moreover, the highside buck mosfet needed in the one buck arm case is definitely more difficult to find on the market (fewer parts have all the needed characteristics), a great disadvantage due to the ongoing and unpredictable component shortage. A boost arms and one 15 A buck arm, must be designed. In addition, the interconnection module must be straightforward to assemble and to use. Therefore, the interconnection module is composed of a control card, controlling two power cards mounted through mezzanine connectors for ease of use and maintenance. A 3D-printed packaging specifically designed to enhance the user-friendliness of the interconnection module is also presented in this subsection.

III.5.b-i Control card

The control card, presented in Fig. III.11, ensures five main functionalities:

• control of the power cards through PWM signals sent by the micro-controller regulating the current reference given by the decentralized and communication-free control algorithm,

• filtering of the input and output voltages and currents to further reduce EMC issues and to enable precise measurements for the control algorithm while ensuring a certain level of DC bus voltage inertia through electrolytic capacitors to enhance stability margins,

• measurement of the input and output voltages, the boost arm currents and the temperature,

• data memory by storing each five minutes the electrical parameters, the temperature and the battery SoC of the interconnection module,

• communication either through the RS 232 connector enabling data collection and precise monitoring with a computer or with the LCD screen for quick monitoring.

III.5.b-ii Power card

Each power card contains one buck arm and two boost arms. Note that the switching cell output capacitors (i.e. C S ) are placed on the control card so that they can always benefit to both power cards, even if only one power card is mounted (e.g. for a low power nanogrid). However, some ceramic capacitors are still placed as close as possible to the switching cells to further reduce overvoltage at the switching of the boost mosfets. The power card, with its legend, is shown in

III.5.b-iii Packaging

The packaging, shown in Fig. III.13, enables to access the different connectors of the control card, i.e. the power connectors for the solar panel, battery and DC bus connection and the signal connectors for communication with the interconnection module (through the RS 232 bus). In addition, the packaging facilitates the use of the LCD screen and the two mode buttons. Finally, thanks to the packaging, the interconnection module can easily be installed on the field, on a vertical wall.

III.5.c Firmware realization

To ensure the proper operation of the microgrid, the interconnection module has three main modes of operation:

• microgrid mode (MG), in which the interconnection module exchanges energy with the DC bus following the decentralized and communication-free control algorithm,

• nanogrid mode (NG), in which the interconnection module disconnects the nanogrid battery from the microgrid DC bus,

• intervention mode (UI), during which the microgrid operator can carry out data collection, code uploading or any maintenance operations on the nanogrid or microgrid.

The microgrid mode is the "normal" operating mode for the interconnection module, expected to be in this mode most of the time.

The transitions between modes can either result from an event on the microgrid or nanogrid sides (i.e. a fault such as short-circuit, overload, etc.) or from a manual intervention from the microgrid operator (thanks to the switch buttons shown in Fig. III.11). To limit the number of interventions from the microgrid operator in case of fugitive faults, the interconnection module can restart automatically a certain number of times once the fault disappears. If too many faults happen in a short time period, an external manual intervention is required to diagnose the issues and possibly to reconnect the interconnection module to the microgrid DC bus after fixing the problem.

Practically, to guarantee the automatic operation of the microgrid, a state machine, shown in Fig. III.14, is implemented for the interconnection module, determining all the possible modes of operation and the transitions from one to the other. Two additional modes of operation are thus included to account for special and rare events on the microgrid:

• Start mode (ST), when the interconnection module is the first one to launch on the microgrid and must follow the start-up procedure explained in Section III.3,

• Wait mode (WT), when the interconnection module momentarily disconnects the nanogrid from the microgrid DC bus following an external fault (on the microgrid or battery sides) or a converter issue (e.g. internal temperature).

III.5.d Experimental validation

The normal long-term operation of the interconnection module, in microgrid mode, is described in the next Chapter, with field results. This subsection validates experimentally in the lab four main features of the interconnection module:

• low harmonic content of the DC bus voltage thanks to the interleaved characteristic of the interconnection module and its output grid filter,

• proper thermal management and satisfying power efficiency,

• reduction of the inrush current thanks to the buck arm and the associated start-up procedure,

• rapid disconnection between the nanogrid and the microgrid in case of faults.

For illustration purposes, the DC bus voltage harmonic contents at different operating points (with a 13 V input voltage and two arms in operation), before and after the grid filter, are shown in Table III. [START_REF]Long-Term Joint European Union & African Union Research and Innovation Partnership on Renewable Energy[END_REF]. The values obtained are satisfying and respect the converter specifications indicated in Table III.1. Note that the micro-controller measurement contains even less harmonics than the results presented due to the additional analog filter of the output voltage sensing circuits. As a reminder, the DC bus voltage measurement is important so that the decentralized and communication-free control algorithm has a stable and precise input.

The heat map of one power card transferring its rated current, i.e. 15 A, and the efficiency curve of the interconnection module are shown in Fig. III.16. The option of using large copper areas of the PCB as heatsink is definitely satisfying, as the elevation of temperature stays below 50 °C in Fig. III.16, as specified in the converter specifications. The ambient temperature during the test was around 27 °C. In addition, even if the efficiency of the converter was not an important criteria of the design, the interconnection module still achieves high efficiency levels (up to 91% and 94% respectively for 12 and 24 V battery voltage), even if it tends to decrease at high power, especially for the 12 V configuration. This efficiency curve also confirms the relevance of using only one or two arms at low power to increase the converter efficiency as long as the output voltage and input current ripples do not increase too much. As can be shown in Fig. III.17, the inrush battery current (in green) is drastically reduced thanks to the start-up procedure compared to the battery inrush current when the interconnection module is directly started in boost mode. This result is done with a 90 Ah lead-acid battery charged at 13 V and with only one converter connected to the DC bus. When started directly in boost mode, the initial inrush current reaches almost 40 A and is quite important for 2 ms whereas with the start-up procedure, only a 400 mA and an 1 A peak are observed respectively at the beginning of the buck part and at the end of the boost part. Overall, the start-up procedure enables to control the current with buck switching until the DC bus voltage (in pink) is close to the nanogrid voltage whereas without the buck arm, the current can not be controlled until the DC bus voltage reaches the input voltage. The initial inrush current without start-up procedure would even be worse with more interconnection modules connected to the DC bus as the bus would have a higher capacitance value. Overall, these experimental results enable to validate the design of the interconnection module with respect to the converter specifications presented in Section III.3 and the startup and protection features needed for the operation of the microgrid.

III.6 Conclusion

This Chapter has focused on the design and realization of an interconnection module for the DC microgrids with decentralized production and storage. The analysis of the academic state of the art in terms of converter design and optimization shows an unfortunate lack of research works considering both power systems characteristics and power converter design and their influence on each other. This thesis embraces the paradigm shift of considering power electronic converters as an active brick defining the grid operation and not anymore as a passive brick which should only adapt to the grid characteristics.

Therefore, in Section III.3, the new role of power electronic structures in grid operation is discussed before justifying the interconnection module architecture and specifications. In particular, the impacts of modularity and grid services such as protection and start-up on the converter architecture are highlighted. Then, an exhaustive search algorithm, based on the theoretical study of an interleaved boost converter, is developed to cost optimize the number of arms of the DC-DC converter and the DC bus voltage level. A 72 V DC microgrid and a four arm 30 A interleaved DC-DC converter is finally selected. Its hardware and firmware realization is then briefly illustrated in Section III.5 and experimental results are presented to validate specific features of the interconnection module.

However, the main purpose of the interconnection module is to be deployed on the field and to ensure the proper operation of a real microgrid. Even if some technical features could definitely be improved as the interconnection module has been developed with a fieldoriented approach and with limited available time, 30 copies of the interconnection module have been manufactured to deploy a village-wide microgrid at the end of the second year of this thesis. The installation and the associated results are detailed in the next Chapter.

Abstract

This Chapter presents the deployment of a village-wide microgrid in Ambohimena in the North of Madagascar through two field missions. After the description of the socio-economic situation of Ambohimena and the presence of Nanoé in this village, the microgrid installation is detailed both in terms of layout and construction work.

Then, field test results are thoroughly illustrated. The operation of the microgrid is analyzed through case studies focused on energy sharing between nanogrids. Additional usage of the microgrid such as communal load supply or resource reduction are also discussed. Finally, the impact of the microgrid on reliability and productive use of energy is highlighted.

IV.1 Introduction

The microgrid with decentralized production and storage and the interconnection module presented respectively in Chapter II and III have been developed with the objective of testing them on the field. Thus, this Chapter presents the field deployment of a villagewide microgrid in Ambohimena, a village of the North of Madagascar, carried out during two successive field missions at the end of 2021 and at the end of 2022. Within the rural electrification sector, it appears crucial to the author to rapidly confront and test any solutions on the field. Indeed, due to the particular context of rural Sub-Saharan zones, many unplanned and often unpredictable difficulties might arise especially for researchers and engineers with little or no experience of Sub-Saharan countries, threatening the relevance and long-term sustainability of the proposed solutions. Therefore, this two-step approach has been selected to quickly test, during the first mission after one year of thesis, the microgrid concept as well as a first version of the interconnection module on a small microgrid (interconnecting five nanogrids close to each other). After removing the main uncertainties through this first mission and benefiting from field test feedback, a larger-scale village-wide microgrid has been installed one year later to validate the second version of the interconnection module presented in Chapter III and test new use cases (e.g. communal loads and nanogrids without battery). This two-step approach has mainly driven the thesis course.

The village of intervention, Ambohimena, is described in detail in Section IV.2, before presenting the microgrid installation both in terms of layout and construction work in Section IV.3. Then, the field test results are thoroughly illustrated in Section IV.4. Finally, Section IV.5 analyzes the microgrid impact for end-users services while Section IV.6 gives concluding remarks.

IV.2 Ambohimena, a typical Sub-Saharan rural village

This Section introduces Ambohimena, a typical village of the North of Madagascar and more globally a typical village of Sub-Saharan rural Africa. The socio-economic situation of the village is firstly presented before illustrating the presence of Nanoé in Ambohimena.

IV.2.a Village description

Ambohimena is located within the Ambanja District of the Diana region in the North of Madagascar and is a crossing point halfway between Ambanja city, the closest urban municipality (see the map in Fig. IV.1) and Ankify, the closest harbor to access Nosy Be, a nearby touristic island with an international airport and greater economic opportunities. Ambohimena is therefore crossed by a national road in asphalt (although of poor quality), which is quite rare for villages where Nanoé intervenes, and is 11 kilometers away from Ambanja city and Ankify Harbor (and it takes approximately 30 minutes by car or motorcycle for each portion). Ambohimena, covering an area of 0.3 to 0.4 km², contains around 155 households and 560 inhabitants, with an average of 3.6 people per household and a population density of approximately 1 600 inhabitants per km². Most of the households contain two to five people and are usually clustered in a few houses gathering the whole extended family. The age distribution in Ambohimena is stretched toward the extremes, with a majority of young people (below 16) and older people (above 40). A high proportion of the young workforce, especially for men, have moved to bigger cities (such as Ambanja or Nosy Be). Overall, 75% of the inhabitants are cocoa and/or rice cultivators, with an average revenue below US $ 600/household/year and are thus in extreme poverty according to UN and World Bank standards. The houses are almost always owned by their residents. 90% of the houses have a sheet-metal roof whereas the remaining 10% use local tree leaves for their roof.

In addition, Ambohimena contains a town hall, a school, a church and a mosque, two or three grocery stores and two drugstores. The village is organized around a quite dense center, as shown in Fig. IV.4, but a significant number of other households are located a few hundred meters or even more from the village center. The majority of the village has cell phone reception, however with very little 4G connection, and almost half of the households have a cell phone. Finally, the village is administrated both by an elected mayor and by a traditional and local organization. Note that most of the analyses presented above are based on field surveys conducted by the Ambohimena nanogrid operator and that very few governmental data are available for this type of village.

A local but unreliable AC grid from the Malagasy electrical operator spans most of the urban municipality of Ambanja but the closest line to Ambohimena is at a distance of five kilometers. To the knowledge of the author, no grid extension is planned in a near future by the Malagasy electrical operator to connect Ambohimena nor any other rural villages near Ambanja. Energy solutions in Ambohimena are very diverse, including SHS, solar, battery and AC inverter packs, diesel generators and kerosene lighting. All the inhabitants use biomass cooking and are hand-washing their clothes. The village contains one diesel rice huller. Many inhabitants travel frequently to Ambanja for energy services (such as phone charging, hair salons, multimedia kiosks, cold services, etc.). Overall, most households spend annually between 10 to 20% of their total annual income on domestic energy expenditures, a figure consistent with estimations from the IEA [START_REF]International Energy Agency (IEA)[END_REF]. Overall, the socio-economic situation of this village is very similar to a high number of unelectrified villages in Madagascar but also in all Sub-Saharan Africa. Therefore, at the beginning of the thesis work, i.e. at the end of 2020, Ambohimena was already a perfect showcase of the successful deployment of the first step of the Lateral Electrification model (i.e. the nanogrids) and a good argument to justify the scaling potential of this rural electrification solution. In addition, very good relations are maintained between Nanoé, the Ambohimena entrepreneur and the Ambohimena political structure. Last but not least, Ambohimena is relatively close to Nanoé office in Ambanja and to an international airport, which is very practical for a first field test. For all these reasons, Ambohimena was selected as the field test site for the microgrid deployment. Note that Ambohimena was already the location of the first two nanogrids installed in June 2017.

IV.2.b Nanoé presence in Ambohimena

IV.3 Microgrid deployment

This Section describes the village-wide microgrid installed during this thesis during two field missions, including the microgrid layout, the construction work and the interconnection module installation.

IV.3.a Microgrid layout

The Ambohimena microgrid firstly interconnected five nanogrids, thanks to the first field deployment at the end of 2021. After its extension at the end of 2022, the microgrid interconnects 24 of the 32 nanogrids of Ambohimena, one of which has become a nanogrid without battery (NG 449 in black in Fig. IV.4). Moreover, a communal kiosk (K1 in black) is connected to the microgrid where 24 or 48 V DC communal loads or AC appliances can be powered respectively through an interconnection module or an AC inverter. The majority of the remaining eight nanogrids are not connected to the microgrid due to their geographical remoteness to the other nanogrids. However, two nanogrids (NG 2 and NG 193 indicated in green in Fig. IV.4) were also not included due to the difficulty to access the nanogrid installation because of the long-term absence of the household owners. These nanogrids could be connected very easily to the microgrid in a near future as the microgrid

IV.3.b Construction work

This village-wide microgrid has been installed during two field missions, firstly at the end of 2021 then at the end of 2022 with respectively three and 12 days of construction work. In total, 30 electrical wooden poles (24 for distribution and six to replace old wooden nanogrid poles not able to support higher cable load) and more than 2 250 meters of 2x16 mm² electrical cables were installed, as can be seen in Fig. IV.6. Usually, a simple rule used during the construction work was to limit the distance between two successive poles below 50 meters to be able to tension sufficiently the cables. Moreover, a particular attention was paid to avoid the passage of cables above one floor houses likely to build a second floor in a near future and roads were followed as much as possible. Similarly, wooden poles were usually placed near the road and nanogrid wooden poles already installed were used as much as possible.

However, careful and optimal microgrid layout (including pole positions and cable installations) was often difficult to perform on the field without the help of decision aid algorithms (e.g. online map tools, Minimum Spanning Tree algorithms, etc.). Indeed, several criteria come into play to decide where to install poles and cables, such as cost minimization (i.e. cable length and number of poles), geographical (e.g. houses, trees, roads, etc.) and electrical constraints (e.g. losses minimization, balanced microgrid, etc.), and including all of them while proposing a microgrid layout on the field is a complex task. Therefore, this field construction work definitely confirmed the need of studying planning algorithms to help at the installation of microgrids.

IV.3.c Interconnection module installation

During the first mission, five interconnection modules of the first version were installed. However, after one year of successful operation (despite a few minor issues), they were replaced by the interconnection module presented in Chapter III. In addition, 20 other interconnection modules were installed to extend the village-wide microgrid as indicated in Fig. IV.4, for a total of 25 interconnection modules.

These interconnection modules were locally mounted by Nanoé employees for the throughhole components and tested and calibrated in the Ambanja office in Madagascar. They were then installed in the nanogrid wooden boxes, locked and only accessible to the nanogrid operator, and which already contain the nanogrid installations (i.e. the batteries, the solar PWM regulator, the nanogrid controller and a DC circuit breaker) as shown in Fig.

IV.7. The interconnection module is placed directly at the battery terminals so that the total battery current flows through it for the SoC estimator to be able to measure it and calculate the SoC. Then, the battery output of the solar PWM regulator is connected to the interconnection module. Finally, there is a direct connection to the microgrid DC bus, even though a DC circuit breaker is added to enhance protection features for the first tests (note that this is redundant with converter internal protections and fuses and will certainly be suppressed in a near future). The electrical diagram of the nanogrid installation with the interconnection module is shown in Fig. IV.8.

Four interconnection modules were installed with the full power (i.e. with two power cards) on NGs 1, 59, 917 and for the communal load kiosk K1, and the remaining 21 with half power, i.e. with only one power card. Two interconnection modules are configured to operate without battery on the low-voltage side, one for K1 and one for the nanogrid without battery NG 449, regulating respectively around 48 V and 12 V on the low-voltage side. Only three interconnection modules operate with 24 V as battery input voltage (NGs 54, 96 and 917). Regarding the interconnection modules, their ease of mounting and user-friendliness were definitely proven during the second field mission where 25 interconnection modules were assembled and installed in a very time-efficient manner. Based on the installation and eight months of operation (as of August 2023), cable connections with the nanogrid battery, the solar PWM regulator and the microgrid DC bus can be considered straightforward and reliable. In addition, data collection through the RS232 connector is rapid and easy to perform, with no discrepancies at all in the data collected, a great improvement over the first version.

IV.4 Field test results

This Section presents field test results both from the first and second mission. Indeed, for the sake of clarity, analyzing results from the first field test is often easier as only five nanogrids were interconnected instead of 24. Firstly, case studies of energy sharing between the nanogrids are illustrated. Secondly, new use cases tested during the second mission are described in detail, both for communal load operation and for resource reduction (i.e. nanogrid without battery or solar panel). The microgrid efficiency is then discussed before concluding on the field test results.

IV.4.a Energy sharing

Energy sharing between nanogrids in normal and stress conditions is firstly illustrated. The macro-analysis of the village-wide microgrid is then presented through an use case and a preliminary data analysis carried out over five weeks of operation. Finally, a comparison of the field test results with the Simulink model is performed.

IV.4.a-i Energy sharing observations in normal conditions

The main goal of the proposed microgrid is energy sharing between the nanogrids, i.e. that nanogrids in excess of energy support nanogrids in deficiency of energy. Results from the first mission perfectly illustrate this feature in Fig. IV.9, showing the currents exchanged between the nanogrids, their SoC and their DC bus voltage from December 16 to 23, 2021. The microgrid is operating around 60 V as this was chosen for the first mission before the exhaustive search algorithm presented in Chapter III indicates a more suitable choice at 72 V. In addition, as a precaution, the interconnection modules are only used at half-power (i.e. I rated = C bat 20 ). The following steps are illustrated:

1. The microgrid is launched with NG 917 slightly undercharged, as NG 917, which contains a freezer, was momentarily undersized due to the lack of stock of a sufficiently powerful solar PWM regulator. Therefore, the four other nanogrids support NG 917 for the first 24 hours until NG 917 reaches a SoC of 80%.

2. For the next three days, NG 917 is self-sufficient and is not requesting any support from the microgrid, hence a DC bus voltage at 66 V (i.e. 60 V + 10%).

3. Then, NG 917 reaches again medium levels of SoC, below 80%, and starts to absorb current from the microgrid. Therefore, the DC bus voltage diminishes and the four other nanogrids inject current to support NG 917. For three consecutive days, they manage to bring NG 917 SoC back to 80% without leaving the strong SoC zone. These results also illustrate the importance of the layout of the microgrid, especially regarding its meshed or radial feature. Indeed, the microgrid was launched with a radial layout with the line between NG 54 and NG 917 opened (see Fig. IV.5). After one day of operation, on the afternoon of December 17 as indicated in Fig. IV.9, the microgrid was briefly stopped to close the line to create a meshed layout. NG 54 did not support much NG 917 in radial layout, as the electrical distance between NG 54 and NG 917 was important. Due to the long electrical distance between the point of consumption (i.e. NG 917) and NG 54 and the associated voltage drops on the cables, the interconnection module of NG 54 measured a high DC bus voltage and thus considered that there were no other nanogrids to support. When the microgrid was switched to a meshed layout, NG 54, one of the strongest nanogrid on the microgrid, supported NG 917 the most, as can be seen in Fig.

IV.9 from December 21. As expected, the more meshed the microgrid is, the better the energy sharing performances are. If possible, strong and weak nanogrids must be equally disseminated within the microgrid to balance it.

IV.4.a-ii Energy sharing observations in stress conditions

The operation of the microgrid for 10 days in a row during a period of stormy weather in Ambohimena is shown in Fig. IV.10. Note that the estimated SoCs are unreliable from January 23 to 27 due to very low battery SoCs (especially for NG 917, which experienced blackout). This has been improved in the second version of the interconnection module. The following steps are illustrated:

1. The microgrid global level of energy quickly collapses due to the extremely low irradiation level, and the DC bus voltage stabilizes at 54 V for five days. NG 917 even disconnects from the microgrid due to low battery voltage from January 24 to 28.

2. When the solar panels start to produce again, NGs 1 and 54, the first nanogrids to reach medium level of SoC, support the other nanogrids connected, i.e. NGs 29 and 168 both in the weak SoC zone.

3. When NG 917 reconnects to the microgrid on the 28th, all the other nanogrids strongly support NG 917 to bring its SoC to the medium and then to the high zone. These results demonstrate the relevance of a microgrid in case of extreme weather events, where the first charged nanogrids can support the other weak ones, increasing their recovery speed.

IV.4.a-iii Energy sharing macro-analysis

Village-wide observations

The proper operation of the microgrid in terms of energy sharing is definitely proven through these two case studies on the microgrid installed at the end of 2021. Similar results were also obtained for the village-wide microgrid installed during the second mission at the end of 2022, as can be seen in a dysfunctional battery, with very small capacity and which was replaced on the 12th of December. Also, the last three days (from December 13 to 15) were cloudy, resulting in lower SoCs, lower DC bus voltages and more current exchanges between the nanogrids.

The results shown in Fig. IV.11 are complicated to analyze and thus confirm the need to compute several Key Performance Indicators (KPI) for the microgrid to be able to synthesize and monitor efficiently its operation. A preliminary data macro-analysis carried out over five weeks of operation enables to illustrate how the field data could ease the understanding of the microgrid operation as well as its optimization.

Injection and absorption factor

Firstly, two indicators defined for each nanogrid in equations IV.1 and IV.2 represent respectively the injection factor IF N G→M G (i.e. the ratio between the total energy injected on the microgrid by the nanogrid under study and the total energy flowing out of its battery) and the absorption factor AF M G→N G (i.e. the ratio between the total energy absorbed from the microgrid by the nanogrid under study and the total energy flowing in its battery), with I IM the current flowing through the interconnection module, I bat and V bat the battery current and voltage and T the study period. As a reminder, the batteries and the interconnection modules are in active sign convention, i.e. the current is considered positive when flowing out of the battery and from the nanogrid to the microgrid.

IF N G→M G = T t=1 max 0, I IM (t) • V bat (t) T t=1 max 0, I bat (t) • V bat (t) (IV.1) AF M G→N G = T t=1 min 0, I IM (t) • V bat (t) T t=1 min 0, I bat (t) • V bat (t) (IV.2)
The computation of these indicators for each nanogrid enables to determine how much a nanogrid contributes to support the other nanogrids or benefits from the support of the other nanogrids, as shown in Fig. IV.12. For instance, NG 541 has an injection factor of 108% which means that it injects more than the total energy flowing out of its battery (i.e. some energy directly flows from the solar panel to the microgrid) whereas its absorption factor is only 3.4%. Overall, NG 541 highly supports the rest of the microgrid while being almost entirely self-sufficient to charge its own battery. On the contrary, NG 228 has an absorption factor of 52.6% and an injection factor of 13%, showing that it is highly supported by the microgrid (with more than half of the energy flowing into its battery coming from the microgrid) while contributing very little to support the rest of the nanogrids. In addition, as NG 449 is a nanogrid without battery, its absorption factor is logically equal to 100%. Overall, these indicators enable to visualize which nanogrids are the strongest or the weakest on the microgrid.

DC bus voltage monotone

Secondly, the DC bus voltage monotone (i.e. all the values of the DC bus voltage sorted in descending order), either extracted from all the nanogrids combined or from a single nanogrid, can illustrate the global level of energy available on the microgrid over a long period of operation. The monotone in Fig. IV.13 shows that the Ambohimena microgrid is globally charged over the five weeks of operation as the DC bus voltage is respectively 74% and 57% of the time above 72 V and 78 V. This monotone is particularly useful to determine the average state of the microgrid over a long period of time.

Power exchange monotone

The power exchanged monotone of NG 541, shown in Fig. IV.14 enables to determine the operating points of the interconnection module and whether the nanogrid benefits or supports more the microgrid. This monotone confirms the injection factor of NG 541, as NG 541 injects energy on the microgrid 89% of the time. However, even if NG 541 has a high injection factor, the interconnection module operating points are quite low, as they are 72% of the time between 0 and 20 W. This is consistent with Fig. IV.11 where the microgrid experiences with very few exchange of energy most of the time. As expected, without the reduction of the total microgrid solar panel and battery park, there are very little power flows on the microgrid, as the nanogrids were originally sized to operate autonomously. Overall, even if this preliminary data analysis needs further investigation over a longer period of time, the huge potential of KPIs to synthesize and monitor the microgrid operation and performances is clearly demonstrated. An information system calculating automatically these KPIs after a data collection would definitely facilitate data postprocessing and is actually essential as soon as the microgrid size exceeds a few interconnected nanogrids. ) to analyze the same operating points. Overall, the nanogrid currents observed on the field and calculated with the Simulink model are very similar, validating the modeling of the microgrid within Simulink. Small discrepancies are however unavoidable due to imperfect measurements on the field, especially for the current sensors of the first version of the interconnection module which have a global accuracy of ± 10%, and due to the imprecise transcription of the cable length from the field surveys to the Simulink model (accurate to ± 10 meters). In particular, at low current, a small offset on the current measurement might result in the larger deviations obtained for NG 168.

IV.4.b Communal load

During the second field mission, new use cases were tested on the field. Firstly, a 48 V 750 W DC mill from Agsol [START_REF]Agsol presentation website[END_REF], shown in Fig. IV.15, was powered through an interconnection module regulating the low-voltage side around 48 V, with the droop control presented in Chapter II. As a reminder, for communal load operation, the interconnection module current reference is expressed as indicated in equation II. [START_REF] Sarkodie | Electricity access, human development index, governance and income inequality in Sub-Saharan Africa[END_REF],

I ref = V LS -V setpoint k d
. A setpoint at 52 V with a droop coefficient of 0.2 Ω is selected so that when the mill is absorbing its full current (i.e. around 15 A), the low-side voltage is around 49 V and never drops below 48 V even during peak current (which can reach 20 A). In addition, a protection can be added to the interconnection module so that it does power the mill only if the microgrid DC bus voltage is above a predefined value traducing an overall high level of energy on the microgrid. This first communal load test is a success as shown in Fig. IV.15 and the mill has been frequently used on the microgrid over the last eight months. However, it is mainly the nanogrids closest to the communal load location which are powering it as the furthest nanogrids do not necessarily measure a lower DC bus voltage, impeding them to know that there is a high power demand. This confirms the need to equally disseminate strong and weak nanogrids and to carefully select high consumption point locations. , it is clear that the AC loads did not impact strongly the nanogrid operation and their SoC. However, as the AC loads are only supplied from a single phase, they cause the apparition of a double frequency ripple power (i.e. at 100 Hz) which can cause battery deterioration and harmonic disturbances on the power electronic converters [START_REF] Tang | Decoupling of Fluctuating Power in Single-Phase Systems Through a Symmetrical Half-Bridge Circuit[END_REF]. This can easily be prevented through the installation of large bulky electrolytic capacitors in the microgrid DC bus but this seems to be a highly cost-intensive solution. While being aware of this potential problem, the field test was conducted without additional elements to help limiting the double frequency power ripple. Thanks to all the interconnection module output capacitors distributed over the microgrid and the relatively low application power on the AC side, the tests were successful. In-depth studies are still needed to investigate the impact of such a power ripple on battery and interconnection module lifetime and operation as well as on stability to determine whether it is necessary to include additional components to reduce the amplitude of the 100 Hz power ripple.

IV.4.c Resource reduction

The proposed microgrid structure gives one major new opportunity, resource reduction, i.e. the decrease in size of the total solar panel or battery park over the microgrid. When the nanogrids are operating autonomously, it is impossible to reduce their solar panel or battery size even if they are frequently not fully used as they would still be needed during rainy days or periods of high consumption. However, the microgrid offers several technical possibilities to remove solar panels or batteries of different nanogrids without impacting their proper operation thanks to the mutualization of production and storage resources over the microgrid. This approach would also work for a nanogrid without a battery but with a solar panel. With a solar panel size selected to produce at most 10 A, the nanogrid voltage would vary between 11 V to 15 V and the interconnection module would inject the solar panel power when it is not needed on the nanogrid. However, this would require an additional control layer when the whole microgrid is fully charged to be able to cut off the solar production most likely through an in-house solar controller able to communicate with the interconnection module. Overall, the concept of nanogrids without battery but with a solar panel does not seem relevant as for now most of the nanogrid consumption is at night. This could however be of great help to supply high power communal loads, supposed to operate only during the day.

Secondly, another resource reduction test was carried out on NGs 228, 230 and 448, whose solar panels were disconnected during three days, both to emulate a technical problem and to assess the feasibility of a nanogrid with battery but without solar panels. Following the control algorithm presented in Chapter II, the microgrid supported these three nanogrids back to the medium or strong SoC zones, i.e. to 60 or 80% of SoC, as shown in Fig. IV.18, where the three nanogrids definitely absorb more current from the microgrid when their solar panels are disconnected. Therefore, if nanogrids without solar panels were to be installed, it would be needed to increase SoC min and SoC max to better recharge the nanogrid battery via the microgrid. However, similarly to nanogrids without battery but with a solar panel, the concept of nanogrids with a battery but without a solar panel seems out of interest as it would go against the Lateral Electrification model of building infrastructures in a bottom-up manner (and secondarily it would incur more power flows and then more power losses on the microgrid). Nevertheless, these results show that in case of technical problems on the solar panels of a nanogrid (low production due to soiling, misconnection, solar PWM regulator failure, etc.), the nanogrid would still be able to stay between the medium and strong SoC zones thanks to the support of the other nanogrids, until the nanogrid operator intervenes and fixes the production problem. Overall, these three tests (nanogrid without battery nor solar panel, solar panel disconnections and kit reduction) are all linked to the reduction of the microgrid production and storage resources and were successful. These three possibilities open up many new economic opportunities for the microgrid operator who is now able to better balance the production/consumption equilibrium with more leverage on the microgrid than on single autonomous nanogrids and to optimize the use of batteries and solar panels. This is studied in Chapter V.

IV.4.d Microgrid efficiency

Following the field tests, a preliminary analysis of the microgrid efficiency can be carried out, especially with the five-week macro-analysis of the village-wide microgrid. During this period, 156 kWh were injected by the nanogrids on the microgrid but only 111 kWh were absorbed, for a total efficiency of 71%. This represents in average 2.5 W of continuous losses on the power exchanged for each nanogrid.

The efficiency obtained with the Simulink model (when it includes the tabulated efficiency of the 12 V and 24 V interconnection modules as shown in Fig. III.16) for the simulation model presented in Chapter II is in the same order of magnitude, around 70%. These figures are consistent with the interconnection module efficiency (Fig. III.16) and the power exchanged monotone (Fig. IV.14). Indeed, the energy exchanged between nanogrids necessarily passes through two interconnection modules and with an average interconnection module efficiency of 85% for instance, the total efficiency is already 72.3% at most, without taking into account additional power losses on the lines. As the interconnection modules operate most of the time at low power, their average efficiencies are quite low, hence a total microgrid efficiency around 70%.

While further investigations on a longer period are needed to confirm the microgrid efficiency, the no-load losses (i.e. the interconnection module losses when they are at very low operating points, typically less than 10 W) seem to be the main cause of the overall efficiency. Indeed, by disregarding all the transferred energy when the DC bus voltage is above 79.1 V (i.e. close to V max when there is almost no power exchange on the microgrid), the total efficiency computed from the five weeks of data rises up to 84.7%. A sensitivity analysis with the Simulink model also confirms the significant impact of no-load losses on the microgrid efficiency. In addition, the Simulink model shows that the line losses have a very small impact on the global microgrid efficiency, which is mainly linked to the interconnection module efficiency.

Two main sources of losses can explain the efficiency of the interconnection module at low power:

• the constant power needed to supply the electronic components of the interconnection module (micro-controller, LCD screen, etc.), estimated approximately at 2.3 W from lab tests,

• the constant power needed to maintain the DC bus voltage at its operating point (i.e. to counterbalance the self-discharge of the DC bus capacitance) and to drive the mosfets at no-load operating points, estimated approximately at 1.5 W from lab tests.

Both sources of losses have a higher impact on the total efficiency of the interconnection module at low power than at high power, as they are approximately constant, regardless of the interconnection module operating point.

The first source of losses can be mitigated during the design stage of the interconnection module but has no influence on the microgrid efficiency as these losses are not linked to the microgrid operation (i.e. these losses are present even if the interconnection module is not connected to the microgrid DC bus and are not linked to the energy exchanged with the microgrid). On the contrary, the second source of losses is inherent to the microgrid operation and represents a major part of the average interconnection module losses on the power exchanged, estimated at 2.5 W. Therefore, to enhance the microgrid efficiency, connection and disconnection strategies for the interconnection modules should be developed. Such strategies could manage the connections and disconnections of the nanogrids to the microgrid DC bus, depending on their SoC and the DC bus voltage. For instance, an interconnection module measuring a DC bus voltage at V max while its battery SoC is in the strong SoC zone could disconnect from the microgrid (as no nanogrid seems to need its support) to reduce the interconnection module energy consumption, until the DC bus voltage lowers, indicating that another nanogrid needs support. These strategies require further research to assess if a global coordination between the interconnection modules can be attained without a communication layer and to analyze their impact on the operation of communal loads and nanogrids without battery nor solar panel.

Furthermore, the microgrid efficiency can be increased by enhancing the efficiency of the interconnection module (on the energy exchanged with the microgrid) with respect to its operating points, through two possible methods:

• during the design stage, by optimizing the efficiency of the interconnection module with respect to its expected power exchanged monotone,

• during operation, with active phase count methods [START_REF] Gaetani-Liseo | Impact on Energy Saving of Active Phase Count Control to a DC/DC Converter in a DC Micro Grid[END_REF], by modulating the number of arms of the interconnection module which are activated to gain a few % of efficiency as can be seen in Finally, such an efficiency does not challenge the relevance of interconnecting nanogrids within a village-wide microgrid. Indeed, when operating autonomously, the nanogrids significantly curtail their solar panel production as they frequently experience fully charged batteries at the beginning of the afternoon. Therefore, during the day, a majority of the energy needed to power the interconnection modules and to maintain the DC bus voltage at its operating point comes from the solar panels and would probably have been curtailed if the nanogrids were not interconnected. Similarly, a part of the energy injected on the microgrid during the day by the strong nanogrids to support the other nanogrids comes from the solar panels and would have been curtailed in autonomous operation. The definition of efficiency, taken as the ratio between the total energy injected on the microgrid and the total energy absorbed from the microgrid, might be challenged in that case as it does not take into account the reduction of the solar panel curtailment. Including the solar panel additional energy produced thanks to the microgrid within the microgrid efficiency might be more accurate. Further works are thus needed to propose a microgrid efficiency definition or other KPIs, which better traduce the energy situation of the proposed microgrids.

IV.4.e Conclusion on field tests

To conclude, the village-wide microgrid has been operating satisfactorily for more than eight months (as of August 2023). Energy sharing between nanogrids in normal and stress conditions has been thoroughly illustrated. Communal load operation and resource reduction (i.e. nanogrids without batteries nor solar panels), two of the main reasons for interconnecting nanogrids, have been successfully demonstrated. Several KPIs have been introduced to synthesize and monitor the microgrid operation and performances, which is crucial as soon as the microgrid interconnects more than a few nanogrids. An analysis of the microgrid efficiency has raised promising research leads to enhance the microgrid performances while proposing new definitions of efficiency which better reflect the energy situation of such microgrids.

Automatic protection and start-up features of the interconnection modules have also been successfully tested on the field several times in the past months. Unfortunately, the analysis of transient events on the field was not possible during the field missions due to the lack of an oscilloscope. The microgrid is experiencing a few minor issues that can be easily resolved with minor code changes. Indeed, three interconnection modules are frequently experiencing disconnections from the microgrid due to too conservative protection levels, without impacting however the proper operation of the nanogrids. A complete study on the different protection levels should be conducted in a near future to precisely tune them and avoid unwanted disconnections. Furthermore, two DC circuit breakers (installed between the interconnection module and the microgrid DC bus as indicated in Fig. IV.8) started to fail after a few months of operation. This shows once again the importance of including protection features within the interconnection module to replace DC circuit breakers believed to be an expensive and unreliable solution.

Overall, this first village-wide microgrid is a success and proves the technical feasibility of the Lateral Electrification model presented in Chapter I. This proof of concept is only the first step in the deployment in the coming years of many DC microgrids with decentralized production and storage across Madagascar and other Sub-Saharan countries.

IV.5 Microgrid impact

Although eight months of operation of a pilot microgrid are not enough to carry out a thorough analysis of its impact, it is of interest to highlight preliminary observations and to suggest possible future impacts. This Section particularly focuses on reliability and productive use of energy, two aspects of utmost importance for rural electrification solutions.

IV.5.a Reliability

Reliability in electrical services, almost forgotten by Northern hemisphere end-users as it is considered for granted, is undoubtedly a major expectation for Sub-Saharan end-users, who must often deal with long and unpredictable blackouts when connected to the national grids. Therefore, a particular attention must be paid to increase electrical service reliability, often perceived as the most decisive satisfaction criterion for Sub-Saharan end-users.

The first notable impact of the microgrid in terms of reliability concerns nanogrid support between each others. One of the main goals of the proposed microgrid, following the decentralized and communication-free control algorithm presented in Chapter II, is that nanogrids with excess energy support nanogrids deficient in energy. This excess or this deficiency in energy can come from a temporary over or under-sizing of the nanogrid installation (wrong kit size installed, battery with reduced capacity at the end of its lifetime, etc.) or from unusual consumption patterns. In autonomous operation (i.e. without the microgrid), the reliability of the electrical services is highly threatened for nanogrids experiencing deficiency in energy. Once interconnected, these nanogrids can be supported by the other nanogrids, enhancing the reliability of services. This is definitely confirmed in Fig. IV.9 where NG 917, under-sized due to the lack of stock of a sufficiently powerful solar PWM regulator, is constantly supported by the four other nanogrids. In autonomous operation, and this has been confirmed by observations on the field, NG 917 was often experiencing blackouts at the end of the nighttime, a problem solved once connected to the microgrid. Furthermore, it is clear that the reliability in case of technical problems on the nanogrids (such as dirty solar panels, PWM solar regulator breakdown or misconnection, etc.) is increased if they are interconnected to other nanogrids. Usually, on a nanogrid, the absence of solar production triggers a blackout in two to three days. Once interconnected, the nanogrid can be supported and avoids blackout until the technical problems are fixed. This is confirmed by Fig. IV.18, which shows that NGs 228, 230 and 448 operated well for a few days even when their solar panels were intentionally disconnected.

Furthermore, microgrid data, for instance the injection or absorption factors or the DC bus voltage monotone, can be used to determine the individual state of the nanogrids and the overall state of the microgrid. Remote monitoring could then be performed if these data were transferred to the microgrid operator, significantly enhancing reliability by anticipating problems and blackouts. This feature will be included in the next version of the interconnection module and will provide an essential and time-efficient tool for monitoring and assessing the state of the nanogrids, in comparison to the frequent site visits and intervention currently carried out by the nanogrid operators.

Lastly, the microgrid could drastically increase the reliability of the electrical services provided during stormy periods of the rainy seasons. Indeed, frequently (around once a year), there is a stormy weather in the North of Madagascar lasting for a week or two (and this is actually the case for many Sub-Saharan countries), where solar panel production is close to zero. In this case, most of the nanogrids experience long-term blackouts of a few days, as shown in Fig. IV.10. The only solution, often performed by nanogrid operators, is to collect the nanogrid batteries, charge them at the city office on the national grid (when available) and then bring them back on the nanogrid. This practice, however, is highly timeconsuming and not sustainable (neither environmentally, economically nor logistically) in the long-term due the high number of time-consuming round trips needed. Therefore, during stormy periods, the microgrid DC bus could be used as a supporting platform for all the nanogrids by connecting either a large charged battery bank or a temporary and mobile diesel generator. This supporting device would inject a high amount of energy on the microgrid DC bus to recharge all the nanogrids in order to reduce the duration of the blackouts or even totally suppress them. This feature has not yet been developed but brings a lot of hope as stormy periods are usually responsible for the majority of nanogrid downtime over a year. Note that after a stormy period the nanogrids are already brought back more rapidly in operation if they are interconnected, as shown in Overall, the microgrid definitely impacts positively the reliability of the electrical services provided to end-users, already through better energy sharing and support between nanogrids and soon through remote monitoring and external microgrid support in case of stormy weather.

IV.5.b Productive use of energy

Productive use of energy should be a key element of any rural electrification solutions and is at the center of the long-term challenge presented in Chapter I, sustainable development through electrical infrastructures. Indeed, productive use of energy appears crucial to boost local socio-economic development with the possibility for end-users to generate new revenues and to greatly reduce time-consuming tasks through new electrical services.

While productive use of energy on the nanogrids is limited to cold services (but only with family-size freezers), the microgrid enables to propose a whole set of new services. Two were successfully tested on the microgrid, the MicroMill from Agsol [START_REF]Agsol presentation website[END_REF] (see Fig. ). Both were very well received by Ambohimena inhabitants, directly eager for instance to use and pay for the MicroMill service to mill rice. This milling service is usually performed in the closest city, Ambanja, 30 minutes away by car or motorcycle, or by a diesel mill in Ambohimena, which has however been out of order for several years. In addition, diesel mills have many drawbacks such as tainting the flour with diesel odor and taste and a high dependency on the diesel cost. Rice cooking, fans and even a powerful speaker used for an Ambohimena celebration were tested on the AC inverter. The villagers were very excited by all the new possibilities AC loads could bring to Ambohimena.

Overall, any 24 or 48 V DC appliances less than 1 500 W can be powered by the microgrid through an interconnection module as well as AC appliances below the inverter rating (which can be selected as preferred though) as long as they do not discharge the nanogrids battery too much. This balance between microgrid new services and battery SoC is definitely an open question, which needs to be studied. However, powering these devices on a nanogrid is not economically relevant as this would imply to completely oversize it just for a few hours of communal load operation per day, a process highly cost-intensive and unprofitable.

Following field observations and discussions with Ambohimena inhabitants and based on the DC low-power appliances available on the market, a few new energy services are already planned to be developed in a near future. Multimedia salons (for internet connection and printing mostly) and hair kiosks, almost always favored first by villagers, can be powered through an AC inverter. Most other services, of interest for villagers as they often already use diesel or biomass alternatives in the village or grid alternatives in the closest city, can be proposed in 24 V or 48 V DC, such as clean cooking [START_REF]Village Infrastrucre Angels presentation website[END_REF], cold services (large freezers, ice making machines), or agro-processing services (flour milling, rice hulling, oil extraction, meat mincing, egg incubation, etc. [START_REF]Agsol presentation website[END_REF][START_REF]Village Infrastrucre Angels presentation website[END_REF][START_REF]Productive Solar Solutions presentation website[END_REF]). In many cases, these services are proposed through the use of a 48 V DC motor, below 1 500 W. These appliances can definitely be powered by the microgrid through an interconnection module. These new services require very little technical work (as long as the appliances are provided by other companies) but they necessitate a deeper analysis of end-user expectations and of the cost of grid or diesel alternatives when they exist (e.g. the diesel rice huller) in order to set relevant tariffs and be competitive. These analyses are currently performed on the field by Nanoé in Madagascar and these new services are expected to be deployed in 2024, significantly increasing the impact of the microgrid.

IV.6 Conclusion

This Chapter has detailed the successful deployment of a village-wide microgrid in Ambohimena, a village in the North of Madagascar, through two field missions at the end of 2021 and 2022. The field test location, Ambohimena, is introduced through a rapid description of its socio-economic situation and of the Nanoé achievements in Ambohimena. Then, the microgrid layout and the associated construction work are presented. Finally, field test results are thoroughly illustrated and the impacts of the microgrid in terms of reliability and productive use of energy are discussed.

Ambohimena situation is very similar to a high number of Malagasy villages and more globally to many Sub-Saharan villages. Therefore, the success of the nanogrid phase in the past six years and now of the first microgrid seems highly replicable all over rural Sub-Saharan Africa. This first microgrid is an important step for the Lateral Electrification model as it proves its technical feasibility. The next logical step is to build on the technical and end-users feedback from these first two field missions to consolidate the microgrid technology and deploy in the coming years many more microgrids in Madagascar and later in other Sub-Saharan countries.

However, the installation of this first village-wide microgrid has highlighted a few difficulties and many opportunities that need to be tackled before deploying at a larger scale. Decision aid algorithms are definitely needed to automate the microgrid layout choice and to optimize the microgrid operation in terms of resource usage and new service offers to end-users. These issues are explored through preliminary planning works in the next Chapter.

V.1 Introduction

To ease and optimize the installation and operation of the DC microgrids with decentralized production and storage presented in Chapter II, decision aid algorithms are definitely needed. Numerous challenges and opportunities have been raised by the field deployment of the village-wide microgrid described in Chapter IV. Note that in the following the terms "microgrid layout" and "microgrid resources" refer respectively to the position of the electrical cables and poles needed to interconnect the nanogrids and the production and storage resources distributed over the nanogrids.

Firstly, it appears obvious that manually designing the microgrid layout is a timeconsuming task prone to errors, whose results are far from being optimal. In particular, including electrical constraints and achieving minimization of the total microgrid layout cost seem impossible when done manually. Secondly, as shown in Chapter IV, the microgrid gives the technical possibility to optimize the solar panel and battery park over the whole microgrid, either through nanogrids without battery or through resizing the nanogrid kits. This management of the microgrid resources represents a huge economic potential for the microgrid operator, however, optimization algorithms are definitely required to help the operator to perform the proper choices while maintaining a high level of reliability on the microgrid. Indeed, the reduction of the microgrid resources would increase the probability of blackouts on the microgrid and thus reduce the quality of the service provided. A trade-off must be found between economic optimization and end-user services. Unlike the nanogrid stage, where sizing is relatively straightforward, this cannot be achieved without numeric tools.

This exploratory Chapter proposes preliminary methods for the two main planning problems raised by the microgrid stage of the Lateral Electrification model, i.e. microgrid resources and microgrid layout. In addition, a load flow tool is developed to be able to know the electrical variables of a simulated microgrid at every time step over a long study period, which is definitely needed to carry out such planning studies. Overall, this Chapter hopes to open a vast new field of planning studies for the Lateral Electrification model, or more globally for the swarm electrification concept. However, this research work does not claim to provide final results but only a first framework for the design of microgrids interconnecting nanogrids in a bottom-up approach. More in-depth works are thus required to improve the performances of the planning methods developed in this thesis. Section V.2 firstly introduces the state of the art of power system planning for rural electrification, highlighting the remaining gaps in this topic, and then focuses on planning problems for DC microgrids with decentralized production and storage. Section V.3 presents a load flow tool developed specifically to include the decentralized and communication-free control algorithm presented in Chapter II. Sections V.4 and V.5 respectively study the microgrid resource and the microgrid layout planning problems, from problem formulation to developed algorithms and their results. Finally, Section V.6 gives concluding remarks. Some of the work presented in this Chapter has been published in a conference paper [START_REF] Richard | Planning Methods for DC Lateral Electrification in Rural Africa[END_REF].

V.2 Power system planning for rural electrification

Power system planning is a key element of power system development and operation. Due to the huge investment costs, the long and incompressible engineering time needed for any power system development as well as their long service life and their limited flexibility once installed, there is a strong necessity to precisely model and evaluate the different infrastructure design options in order to forecast the optimal ones. Moreover, the recent growth of distributed renewable energy sources within the power grid has dramatically increased the complexity of power system planning due to their inherent variability. Therefore, more and more research works (from academia, industry and public sector) are focused on power system planning. Similarly, rural electrification planning, often carried out by governmental agencies in charge of the electrification of their country [START_REF]Planning tools and methodologies for rural electrification[END_REF], is increasingly performed to determine the most cost-effective options for electrifying unserved areas. This Section presents the state of the art of the sector in terms of planning for rural electrification, before highlighting the planning research problems inherent to the decentralized DC microgrids presented in this thesis.

V.2.a State of the art

Most rural electrification planning studies aim to determine the least-cost option for achieving electricity access within a predefined zone (often through a single example or at the scale of an entire region or country) [START_REF]Mapping the least-cost option for rural electrification in Burkina Faso: Scalingup renewable energies[END_REF]133,[START_REF]Innovation Energie Développement[END_REF][START_REF] Kemausuor | Electrification planning using Network Planner tool: The case of Ghana[END_REF][START_REF] Mentis | Lighting the World: the first application of an open source, spatial electrification tool (OnSSET) on Sub-Saharan Africa[END_REF][START_REF] Ciller | Optimal Electrification Planning Incorporating On-and Off-Grid Technologies: The Reference Electrification Model (REM)[END_REF][START_REF] Alqahtani | Identifying Economic and Clean Strategies to Provide Electricity in Remote Rural Areas: Main-Grid Extension vs. Distributed Electricity Generation[END_REF][START_REF] Sanoh | Local and national electricity planning in Senegal: Scenarios and policies[END_REF]. These papers compare different solutions, such as national grid extension, centralized minigrids or standalone systems such as SHS. While not all research papers use exactly the same algorithms to perform these studies, two main categories of optimization problems are often tackled by these papers [START_REF] Gamarra | Computational optimization techniques applied to microgrids planning: A review[END_REF][START_REF] Al-Ismail | DC Microgrid Planning, Operation, and Control: A Comprehensive Review[END_REF], which can be summarized as follows:

• grid layout optimization problem, i.e. determining the most cost-effective grid layout to physically reach an area [START_REF] Corigliano | Holistic geospatial databased procedure for electric network design and least-cost energy strategy[END_REF][START_REF] Vinicius | Rural electrification planning based on graph theory and geospatial data: A realistic topology oriented approach[END_REF][START_REF] De Sousa | Planning the LV Network of Microgrids Using Geographic Data with PREMO Grid Tool[END_REF], usually through national grid extension or centralized minigrids,

• resource optimization problem, i.e. the sizing and siting of production and storage resources to electrify an area [START_REF] Rodríguez-Gallegos | A Siting and Sizing Optimization Approach for PV-Battery-Diesel Hybrid Systems[END_REF][START_REF] Kolluri | Siting and sizing distributed storage for microgrid applications[END_REF]80,81,[START_REF] Khon | Comprehensive Low Voltage Microgrid Planning Methodology for Rural Electrification[END_REF][START_REF] Yon | Microgrids planning for rural electrification[END_REF], usually for centralized minigrids or for standalone systems.

These two optimization problems are often combined within a global optimization problem to increase the scope of the studies [80,[START_REF] Khon | Comprehensive Low Voltage Microgrid Planning Methodology for Rural Electrification[END_REF][START_REF] Yon | Microgrids planning for rural electrification[END_REF]. In terms of electricity production, diesel, wind, hydro or solar power can be considered, with an increasing attention to solar power over the recent years due to its cost competitiveness and the environmental concerns.

On the one hand, grid layout optimization algorithms usually rely on GIS (Geographic Information System) tools to perform cost minimization of electricity supply within a predefined region by optimizing the layout of the national grid extension or centralized minigrids [START_REF] Corigliano | Holistic geospatial databased procedure for electric network design and least-cost energy strategy[END_REF][START_REF] Vinicius | Rural electrification planning based on graph theory and geospatial data: A realistic topology oriented approach[END_REF]. The proposed algorithms aim at combining the electrical modeling of power systems, either with a load flow algorithm or energy balance equations, and geographical constraints and population clustering performed through GIS tools.

On the other hand, resource optimization problems aim at determining the cost optimal production and storage resources for different scenarios (national grid extension, centralized minigrids, etc.) while ensuring that the power system developed respects a certain number of electrical constraints (i.e. on voltage and current limits, blackout duration, storage SoC, etc.) [START_REF] Rodríguez-Gallegos | A Siting and Sizing Optimization Approach for PV-Battery-Diesel Hybrid Systems[END_REF]81,[START_REF] Fioriti | Multi-year stochastic planning of off-grid microgrids subject to significant load growth uncertainty: overcoming single-year methodologies[END_REF]. Therefore, all these papers rely on the modeling of the production and storage resources. To do so, these research works might either include a load flow algorithm to calculate the state of the power system at each time step to check the voltage and current constraints [START_REF] Vinicius | Rural electrification planning based on graph theory and geospatial data: A realistic topology oriented approach[END_REF][START_REF] Rodríguez-Gallegos | A Siting and Sizing Optimization Approach for PV-Battery-Diesel Hybrid Systems[END_REF] or analyze the power system operation at a higher level, for instance in terms of total energy flow or power balance without including the physical model of the operation of the grid [81,[START_REF] Fioriti | Multi-year stochastic planning of off-grid microgrids subject to significant load growth uncertainty: overcoming single-year methodologies[END_REF]. The choice between these two possibilities, which can be named electrical models (for the ones including the load flow) and energy models (for the ones based on power balance equations), have a great impact on the accuracy of the results and the computational burden.

Moreover, the time windows over which the studies are performed as well as the time resolution have a huge impact on the results [81,[START_REF] Fioriti | Multi-year stochastic planning of off-grid microgrids subject to significant load growth uncertainty: overcoming single-year methodologies[END_REF]. Indeed, short-time studies cannot include resource degradation or load growth over time and thus often underestimate the size of the resources needed, achieving in the long-term poorer economic performances due to unavoidable resource replacement [START_REF] Fioriti | Multi-year stochastic planning of off-grid microgrids subject to significant load growth uncertainty: overcoming single-year methodologies[END_REF]. These studies usually select typical representative days or weeks for their optimization. On the contrary, long-time studies with hourly time resolution result in computationally heavy models that are difficult or even impossible to solve [START_REF] Gamarra | Computational optimization techniques applied to microgrids planning: A review[END_REF]. A trade-off must definitely be found between the time window and its resolution and the computational burden needed to solve the optimization problem.

These optimization problems use either metaheuristic methods (such as Genetic Algorithm (GA), particle swarm optimization, etc.) [START_REF] Rodríguez-Gallegos | A Siting and Sizing Optimization Approach for PV-Battery-Diesel Hybrid Systems[END_REF][START_REF] Yon | Microgrids planning for rural electrification[END_REF], Mixed Integer Linear Programming methods (MILP) [80,[START_REF] Alqahtani | Identifying Economic and Clean Strategies to Provide Electricity in Remote Rural Areas: Main-Grid Extension vs. Distributed Electricity Generation[END_REF], graph theory algorithms (although it is only for grid layout optimization problems) [START_REF] Vinicius | Rural electrification planning based on graph theory and geospatial data: A realistic topology oriented approach[END_REF][START_REF] De Sousa | Planning the LV Network of Microgrids Using Geographic Data with PREMO Grid Tool[END_REF] or a combination of these methods. While metaheuristic methods do not guarantee to obtain the global optimal solution, MILP methods usually cannot include load flow analyses (as it is an iterative approach based on non-linear equations) and non-continuous modes of operation, often present for distributed resources. In addition, MILP methods strongly limit the possible time windows to keep the size of the problem reasonable. Unlike metaheuristic and MILP methods, which are still the subject of much research, graph theory is a mature area of research with many algorithms already developed. Their application and the resulting analyses are of great interest for rural electrification [START_REF]Okra Network Planner: Electrification Rapid Site Assessment Tool[END_REF][START_REF] Vinicius | Rural electrification planning based on graph theory and geospatial data: A realistic topology oriented approach[END_REF].

Furthermore, in line with the ongoing opening of the rural electrification sector to private companies, more and more planning tools for rural electrification are proposed by companies [START_REF]Okra Network Planner: Electrification Rapid Site Assessment Tool[END_REF]133,[START_REF]Innovation Energie Développement[END_REF][START_REF] Ciller | Optimal Electrification Planning Incorporating On-and Off-Grid Technologies: The Reference Electrification Model (REM)[END_REF] or in open-access [START_REF] Mentis | Lighting the World: the first application of an open source, spatial electrification tool (OnSSET) on Sub-Saharan Africa[END_REF]. However, the vast diversity of rural electrification solutions and intervention zones (simultaneously in terms of climatic, geographic, political, regulatory or logistic constraints) impedes the development of a single tool or algorithm capable to compare and to adapt to all situations, unfortunately justifying the need to develop once again specific tools for specific applications.

Finally, none of the tools or papers presented above tackle planning issues specific to the swarm electrification concept, with the exception of the Network Planner tool [START_REF]Okra Network Planner: Electrification Rapid Site Assessment Tool[END_REF] from Okra [START_REF]Okra presentation website[END_REF]. This tool compares the suitability of rural electrification either with the Okra mesh-grid, mentioned in Chapter I and which follows the swarm electrification concept, or with traditional centralized AC minigrids. The costs of both solutions are thoroughly described and the results illustrated on one use case. Note that the results tend to favor mesh-grids for residential off-grid communities requiring less than 1.2 kW per household [START_REF]Okra Network Planner: Electrification Rapid Site Assessment Tool[END_REF], typically the case in many rural communities. However, this software is the property of Okra and is not easily adaptable to the Lateral Electrification model as it designs mesh-grids from scratch and not through the interconnection of already installed nanogrids. Moreover, this software only studies the costs of the installation of the electrification solution and not its operation, although it is of major importance.

V.2.b Planning research problems for decentralized DC microgrids

While most of the planning research works presented above focus on top-down electrification approaches, the bottom-up nature of the Lateral Electrification model implies new and challenging planning problems. Unlike the deployment of standalone nanogrids which does not necessarily raise planning questions due its straightforward sizing and operation, the DC microgrids with decentralized production and storage presented in Chapter II entail two main specific planning questions:

• microgrid resources: from a village containing x nanogrids already interconnected, how to cost-optimize the usage of the production and storage resources distributed over the microgrid while ensuring that the microgrid operates properly over time ?

• microgrid layout: from a village containing x nanogrids not yet connected, how to cost-optimize the installation of the electrical cables and poles while ensuring the proper operation of the microgrid over time ?

These two planning questions were definitely encountered during the field deployment presented in Chapter IV. Defining the optimal microgrid layout while considering geographical constraints (trees, rivers, roads, high buildings, etc.) and electrical constraints (proper levels of SoC for all nanogrids, a balanced microgrid, etc.) is the first step in a microgrid design. This step is crucial as the distribution costs (i.e. the electrical lines and poles) amount to more than half of the microgrid cost, as estimated from the field deployment, hence a great need to optimize them. In addition, their installation represents by far the major part of the construction work, which should be reduced as much as possible to ease the microgrid deployment and therefore increase its scaling potential.

Secondly, once the microgrid has been installed, the question of the optimal usage of the production and storage resources naturally arises. Indeed, before the microgrid installation, all nanogrids are autonomous and self-sufficient and they experience frequent solar panel power curtailment due to their battery often fully charged at the beginning of the afternoon. Once interconnected, it appears clear that it is possible to reduce the total size of the solar panel and battery park of the microgrid or to increase the total consumption if the production and storage resources are kept the same as before the nanogrid interconnection. As the production and storage resources account for around two third of the nanogrid costs, their optimization represents a great economic opportunity for the microgrid operator. This was proven to be technically feasible in Chapter IV with for instance nanogrids without batteries, reduced kit size or high-power communal loads. However, the practical resource management on the field remains difficult without the help of decision aid tools to ensure that the microgrid proper operation is still maintained. Indeed, this siting and sizing planning problem must include electrical constraints as it has a direct impact on the total energy available on the microgrid, thus on the power flows and on the SoCs of the different nanogrid batteries. These electrical constraints must be considered over a time window of at least a few days as the SoCs of the batteries might experience slow decrease over a few days of operation that should be captured by the optimization algorithm. Similarly, the impact of communal load operation on the siting and sizing of the microgrid resources should be quantified by these algorithms.

Finally, these two main planning problems could be combined within one global optimization problem. From a village with x nanogrids not yet connected to each other, the simultaneous optimization of the cost of the microgrid layout and its resource siting and sizing over a predefined period of time is definitely of interest. This would enable to analyze the influence of the optimization problems on each other.

Based on the literature review and the two planning problems identified for decentralized DC microgrids, it appears clear that a load flow algorithm is essential to perform such planning studies. Indeed, both the microgrid resources and layout have a direct impact on the power flows observed on the microgrid. Planning algorithms must be able to either quantify these impacts during their optimization process or at least to check a posteriori the performances of the optimal resource allocation or microgrid layout that they output.

Overall, this Chapter contributes to the field of planning research for rural electrification:

• by developing a load flow algorithm including the decentralized and communicationfree control algorithm needed for the proper operation of the proposed microgrids,

• by identifying and defining two planning research problems, microgrid resources and microgrid layout, which are inherent to the progressive building of power infrastructures in a bottom-up manner, as advocated by the swarm electrification concept,

• by proposing and comparing two methods for each problem, one based on the electrical modeling of the microgrid operation (i.e. with the load flow algorithm included) and the other not.

V.3 Load flow algorithm for decentralized DC microgrids

This Section describes the load flow algorithm specifically developed for the DC microgrids with decentralized production and storage presented in this thesis. Such a load flow algorithm is essential so that the microgrid operation can be precisely simulated over a long period of time, with a high number of nanogrids. The knowledge of the currents and voltages at each node of the microgrid might be useful for the planning studies under consideration and is at least necessary to analyze a posteriori the results of the optimization algorithms.

However, as the microgrid operation is entirely controlled by the decentralized and communication-free control algorithm presented in Chapter II, using conventional load flow tools was not possible, hence the specific load flow algorithm presented in this Section.

V.3.a Formulation of the load flow

The proposed DC load flow is extended from [START_REF] Garcés | On the Convergence of Newton's Method in Power Flow Studies for DC Microgrids[END_REF] with the inclusion of the decentralized and communication-free control algorithm.

Generally, a microgrid is represented by its nodal admittance matrix y, and two types of nodes are considered, constant voltage (or master) node with the sub-index v, and constant power node with the sub-index p. The general model of a microgrid is then given by equation V.1.

i v i p = y vv y vp y pv y pp v v v p (V.1)
Decentralized DC microgrids are operating in islanded mode, thus they are disconnected from the master node and i v = 0. Therefore, the simplification V.2 is obtained through Kron reduction V.3.

i p = y s • v p (V.2)
y s = y pp -y pv • y -1 vv • y vp (V.3)
For the DC microgrid with decentralized production and storage proposed in the Lateral Electrification model, the different interconnection modules follow the control algorithm presented in Chapter II. Then, the current, at each node p, is given by V.4 with the function G described by the set of equations explained in Section II.3 of Chapter II.

i p = G(v p , SoC p ) (V.4)
The load flow problem consists in finding the independent state variables. In this case, the vector v p (i.e. the voltages at each nanogrid connection node) must be found. Once v p is known, i p and v v can be respectively calculated by equations V.2 and V.5 extracted from V.1. The power flows on each line of the microgrid and their associated power losses can also be easily computed.

v v = -y -1 vv • y vp • v p (V.5)
Combining the equations V.2 and V.4, the resulting non-linear algebraic system V.6 is obtained.

F (v p ) = G(v p , SoC p ) -y s • v p = 0 (V.6)
Finally, by assuming that F is a differentiable vector function (and thus also G the function representing the control algorithm), this system can be solved with the Newton's method [START_REF] Garcés | On the Convergence of Newton's Method in Power Flow Studies for DC Microgrids[END_REF]. From an initial point v 0 , usually set at 1 pu for all nodes, the solution vector v can be approached by applying iteratively the following sequence V.7 until a stopping criteria is met (e.g. the number of iterations or the value of the norm of F). This stopping criteria must be tuned as a trade-off between computational burden and accuracy of the results.

v k+1 = v k -|DF (v k )| -1 F (v k ) (V.7)
with DF (v k ) the Jacobian matrix of F evaluated at the point v k .

V.3.b Comparison with the Simulink model

The microgrid under study has been thoroughly studied and validated through simulations using the Simulink model presented in Chapter II. Therefore, the load flow validity can be verified by comparing its outputs to the Simulink simulation results. For computational reasons and ease of comparison, a small model of a microgrid composed of three nanogrids in a triangular layout is used to validate the load flow algorithm. The voltages and the currents at each node obtained from the Simulink model after a transient period and from the load flow algorithm are compared. The SoC of each nanogrid varies from 12% to 92% with 20% steps, thus 125 (i.e. The differences between the load flow and the Simulink results are very small (less than 0.1% for the voltages and less than 0.5% for the currents). These small errors can come from the Newton's method used in the load flow algorithm as well as from the transient period in the Simulink model. However, they are definitely negligible and the load flow is validated. Following the comparison in Chapter IV between the Simulink model and the microgrid deployed on the field, it can be concluded that the load flow algorithm represents well the real microgrid operation. Following this verification, a user-friendly load flow algorithm has been implemented so that it can easily be adapted to a higher number of nanogrids, including nanogrids without batteries and communal loads. In addition, distribution poles (i.e. poles not directly connected to any nanogrid) can also be modeled in the load flow algorithm. This facilitates its final integration within optimization algorithms.

V.4 Microgrid resources

This Section examines the microgrid resource optimization problem. Two different algorithms are presented, whose main difference relies on the inclusion or not of the modeling of the microgrid. The first algorithm uses the load flow algorithm presented in the previous Section to precisely model the microgrid operation and is called in the following "detailed electrical method". On the contrary, the second algorithm, based on energy models, does not include the modeling of the grid through the load flow algorithm and is called the "aggregated energy method".

Firstly, the formulation of the microgrid resource problem is detailed for both methods, except for the constraints that naturally depend on the method chosen. Then, both methods are described and their results illustrated before discussing their respective advantages and disadvantages and highlighting the perspectives for the microgrid resource optimization problem.

V.4.a Problem formulation

The objective of the microgrid resource planning problem is to cost optimize the siting and sizing of the different nanogrid kits over a whole microgrid while respecting a certain number of constraints on the nanogrid SoCs. At each nanogrid, six different kits can be installed following Table V.1, which includes the five kits proposed by Nanoé in Madagascar and an additional kit 0 for nanogrids without batteries nor solar panels. In addition, when a nanogrid kit is already installed, its replacement necessitates several hours of work. Therefore, it is of interest to include within the objective function of the optimization problem the possibility to minimize the number of kit changes with respect to the initial kit allocation. Overall, the objective function is expressed by V.8:

min x N N G i=1 α • C(x i ) C init + (1 -α) • K(x i ) N N G (V.8)
with N N G the number of nanogrids of the study, x a vector of size N N G x 1 whose value x i indicates the kit number at nanogrid i, C(x i ) the cost of the kit of nanogrid i, C init the total cost of the initial kit distribution of the microgrid before the optimization, K(x i ) a binary variable equal to 1 if there is a kit change at nanogrid i and 0 otherwise, and α the weight to favor one objective or the other. Mathematically speaking, this optimization problem aims at determining the vector x minimizing the objective function V.8 while respecting a certain number of constraints.

These constraints typically focus on the SoCs of the nanogrid batteries. However, depending on the method selected, i.e. detailed electrical or aggregated energy method, the constraints are not expressed in the same manner. Therefore, these constraints are introduced later for both methods in their respective subsection.

In this thesis, the microgrid selected for the illustration of the microgrid resource planning problem is the Ambohimena microgrid presented in Chapter IV, whose layout has been precisely transcribed for this study. The microgrid contains 26 nanogrids (i.e. N N G = 26), whose initial kits are selected as they were before the microgrid deployment for a total cost C init of 9 780 e.

V.4.b Detailed electrical method

V.4.b-i Algorithm description

The detailed electrical method includes the load flow algorithm and thus considers the operation of each nanogrid of the microgrid individually. Due to the great size of the optimization space of this problem (with 6 26 , i.e. more than 10 20 possibilities for the siting and sizing of the kits) and the need to include the load flow algorithm within the core of the optimization algorithm, the algorithm developed to solve this mixed-integer non-linear optimization problem is based on a metaheuristic method. A Genetic Algorithm is selected mainly for its parallel capabilities and its natural use of discrete values. The proposed GA is hand-coded in Matlab and the flowchart of the proposed method is shown in Fig. Each individual is composed of 26 chromosomes representing the kits installed at each nanogrid. For each generation, for each individual, the nanogrid kits are set depending on the individual chromosomes. The load flow algorithm is then performed iteratively over the whole time window of the study. At each time step t, following equation V.9, the SoC of each nanogrid is updated within the load flow algorithm.

SoC i Bat (t + 1) = SoC i Bat (t) + 1 C i Bat • E i P V (t) -E i Load (t) -E i M G (t) (V.9)
with SoC i Bat and C i Bat respectively the battery SoC and capacity of nanogrid i,

E i P V , E i
Load and E i M G respectively the energy produced by the nanogrid solar panel, the energy consumed by the nanogrid loads and the energy exchanged with the microgrid. Note that E i M G is provided by the load flow algorithm, determining the injected or absorbed current at each nanogrid depending on their SoCs.

Thanks to the load flow algorithm and equation V.9 applicable to all the nanogrids, the following constraints V.10, V.11 and V.12 can be added to the optimization problem. Unlike the aggregated energy method, the optimization problem can include these constraints as the microgrid is modeled precisely enough to analyze each nanogrid individually. Constraint V.10 ensures that each nanogrid stays above a low SoC threshold SoC low Bat at every time. In addition, constraint V.11 translates the fact that each nanogrid battery must not fall below a low daily average threshold SoC min Bat . Similarly, constraint V.12 forces each nanogrid battery to charge above SoC max Bat on average each day. These constraints are selected to maximize the lifetime of the nanogrid lead-acid batteries, with SoC with N Day the number of days of the study and i the nanogrid number. Constraints V.10, V.11 and V.12 are evaluated for all individuals, which are then given a fitness score based on their constraint and objective function values. Depending on whether or not all the constraints are respected, the fitness score is either equal to the objective function or to the maximal possible objective function value weighted by a penalty factor, whose value increases with the number of constraints not respected. Finally, the best individuals are selected and used to create the next generation through elite selection, crossover and mutation [START_REF] Katoch | A review on genetic algorithm: past, present, and future[END_REF][START_REF] Man | Genetic algorithms: concepts and applications (in engineering design)[END_REF].

The population consists of 380 individuals and a maximum number of generation of 60 is set as a good compromise between computational burden and GA convergence. The algorithm can also stop if the diversity within a generation is too low. The mutation, crossover and elite percentages have been tuned to favor a high diversity within a generation, especially as the optimization space is very large.

In this study, solar production data from [START_REF]Solar radiation data[END_REF] and load consumption from Nanoé field collection (before the microgrid deployment) are used to estimate E P V and E Load on a 10 minute basis. The time window of the study is one week with 10 minute time steps (and thus N Day = 7). For illustration purposes, the first week of September 2021 is selected.

The proposed GA requires high computational efforts due to the presence of the load flow algorithm (taking approximately three seconds to evaluate one individual for a one week time window, composed of 1 008 time steps) and because of the optimization space being very large and flat (i.e. the fact that many solutions achieve results close to each other). Therefore, the GA has been optimized in terms of computational speed (e.g. individuals with very low or high battery park are not evaluated and are directly assigned a high fitness function, individual fitness functions are recorded in order not to evaluate twice the same individual, etc.). The evaluation of each individual of a generation is also parallelized on multi-core and the code is run on a server with 48 cores.

V.4.b-ii Results

Firstly, the minimization of the nanogrid kit costs is studied without including the minimization of the number of kit changes, i.e. α is set to 1 in the objective function V.8. The GA loop takes approximately 31 minutes to run although it is running on a 48-core server. To limit the main drawback of the proposed method, which does not always give the same results as it is a metaheuristic and thus non-deterministic method, the GA is launched 20 times to counterbalance its inherent randomness. The total cost reduction and the resulting kit distribution (i.e. the total number of each kit) are shown in A total cost reduction between 36 to 40% is achieved. This variability in the proposed results is mainly due to the great size of the optimization space (> 10 20 ) and its relative flatness, confirmed by the 20 iterations all outputting different solutions while achieving similar total cost reduction. Even if these iterations do not always result in the same solution, especially for the siting of the kits, the kit distribution over the microgrid tends to be relatively the same from one solution to another, as shown on the right of Fig. V.3 with the red line and the blue box showing the median and the 25th and 75th percentiles.

Secondly, as the week selected for the solar production and load consumption data has obviously a great impact on the optimization results, a posteriori tests can be carried out with different solar production data, whose variability is believed to be greater than for the microgrid consumption. Table V.2 shows how the results obtained from the GA with the basecase week perform for different weeks with different solar production data, with T 70 , T 50 , T 30 the percentages of time steps the nanogrids are respectively below 70%, 50% and 30% of SoC, and V moy Bus the microgrid average DC bus voltage over the whole study period. The solar irradiance data in Ambohimena over the past six years have been ranked by week and the 25% worst week (quartile Q 1 ) and the tenth worst week W 10 have been selected for the a posteriori tests. The impact of the solar irradiance on the microgrid operation is clear. However, even by optimizing the nanogrid kits with a week whose irradiance is around the median of the past six years, the microgrid operates satisfactorily for a week whose irradiance is at the first quartile. For the tenth worst week, the microgrid operates well for most of the period except for a few hours of the last days. In addition, optimizing the nanogrid kits with the solar irradiance week Q 1 or week W 10 gives a total cost reduction respectively around 29% and 7.2%, much less than with the basecase week. Overall, this shows the importance of carefully selecting the solar irradiance data and its impact on the sizing and siting of the microgrid resources. A compromise between cost optimization and quality of services even in case of extreme weather events must be attained. Furthermore, the impact of adding communal loads on the microgrid is shown in Table V.3. The addition of a 600 W communal load powered each day for three hours between 12 pm and 3 pm (i.e. 1.8 kWh in total) necessarily increases the total cost of the microgrid resources, as the total microgrid demand is greater. However, it can be seen that the proper operation of the microgrid is still ensured as T 85 , T 80 and T 75 stay at similar (or even better) levels than without communal loads. The SoC indicators and the average DC bus are even better with more communal loads, as the additional production and storage resources installed to supply the communal loads also benefit all the nanogrids, especially as the communal loads are only powered three hours per day. For the microgrid operator, the impact of communal loads on the total cost reduction must be compared to the additional economic gain that the communal loads could bring to decide whether or not it is economically relevant to install them, in addition to the clear positive impact on the quality of services delivered to the end-users. Overall, the detailed electrical method enables an accurate modeling of the microgrid operation and therefore precise siting and sizing results at the expense of very large computational burden and a short study period, thus providing results that are very sensitive to the selected time period (in particular due to the variation in solar production).

V.4.c Aggregated energy method

V.4.c-i Algorithm description

The aggregated energy method relies on power balance equations expressed for the whole microgrid without analyzing the exact power flows on the microgrid within the core of the algorithm. This consists in gathering all the nanogrid batteries and solar panels within an equivalent microgrid battery and microgrid solar panel. Similarly, the total load consumption over the whole microgrid is aggregated within an equivalent load.

The total microgrid equivalent battery and solar panel method cannot include the impact of the resource position on the microgrid operation. Without considering the siting of each kit, the optimization problem is reduced to a much smaller space of solutions with "only" 169 911 possible solutions (i.e. the number of unique combinations for 26 variables which can take a value from 0 to 5, expressed as

5 i 1 =0 5 i 2 =i 1 ... 5 i 25 =i 24 5 i 26 =i 25 1).
Therefore, an exhaustive search algorithm examining all possible combinations can be implemented. This exhaustive search only provides the cost optimized kit distribution over the whole microgrid satisfying the constraints, but without specifying their optimal nanogrid siting (i.e. their repartition or allocation). An a posteriori repartition method is then needed to sit the different kits indicated by the exhaustive search part.

The algorithm developed to solve the proposed optimization problem, whose flowchart is shown in Fig. V.5, is thus composed of two parts:

• an exhaustive search, determining the optimal kit distribution for the whole microgrid by enumerating and evaluating all the possible combinations without allocating each kit to a specific nanogrid,

• an a posteriori repartition, that allocates each kit of the exhaustive search result to a specific nanogrid. The load flow algorithm can be used a posteriori (after the exhaustive search and the a posteriori repartition) to check that the microgrid proper operation is ensured. For a given combination, the aggregated energy method calculates at each time step the microgrid equivalent battery SoC following equation V. [START_REF]Off-grid solar: A growth engine for Jobs[END_REF].

SoC Bat (h + 1) = E Bat (h + 1) C Bat = 1 C Bat • E Bat (h) + E P V (h) -E Load (h) (V.13)
with SoC Bat the microgrid equivalent battery SoC, E Bat and C Bat respectively the microgrid equivalent energy level and total capacity, E P V and E Load respectively the energy produced by the microgrid equivalent solar panel and the energy consumed over the whole microgrid and h the hourly time step.

As the exhaustive search method is computationally very quick, the time window of the study is increased to eight weeks with an hourly time step and the solar and consumption data are taken from September and October 2021.

Using the energy model provided by equation V.13, the following constraints V.14 and V.15 can be added to the optimization problem, in addition to the objective function V.8. These two constraints are similar to the second and third constraints of the detailed electrical method but they are expressed at the level of the whole aggregated microgrid. After evaluating the constraints and the objective function for all the possible combinations, the algorithm lists all possible solutions with their associated fitness score, depending on whether or not they respect the constraints and depending on their objective function value. Similarly to the detailed electrical method, the fitness score is either equal to the objective function if all the constraints are respected or to the maximal possible objective function value weighted by a penalty factor, whose value increases with the number of constraints not respected. The exhaustive search then returns the solution with the best fitness score as the optimal kit distribution for the microgrid.

The exhaustive search method has a very low computational time as it does not include the load flow algorithm. In order to keep the main advantage of this method, the a posteriori repartition method requires a low computational effort and thus uses a deterministic method.

The proposed repartition method ranks the nanogrids by weight, depending on their total consumption over the time window of the study and their proximity to other production and storage resources, and allocates iteratively the biggest available kit to the nanogrid with the biggest weight. The weights of the remaining nanogrids (i.e. the ones without a kit already allocated) are then recalculated at each repartition step r s to account for the kits already installed following equation V. [START_REF]Mesh Power Rwanda presentation website[END_REF]. This kit repartition and weight calculation are repeated until all the kits are allocated to a specific nanogrid. For the first kit to install, the weights are only composed of the total consumption as there are no production and storage resources already installed on the microgrid, i.e. w i (1) =

E i Load E max Load . w i (r s ) = E i Load E max Load • N kit k=1 1 + 1 N kit • D ik • x(k) D max • x max (V.16)
with w i (r s ) the weight of nanogrid i at the repartition step r s , E i Load the load consumption of nanogrid i over the whole time window, E max Load the maximal nanogrid consumption over the microgrid, N kit the number of kits already installed, D ik the distance in meters between nanogrid i and the nanogrid with the kit already installed k, D max the distance between nanogrid with kit k and the farthest away nanogrid, x k the kit installed at nanogrid k and x max the greatest kit possible, i.e. 5 as indicated in Table V.1.

Note that the exhaustive search and the a posteriori repartition are deterministic methods, i.e. they always give the same result, unlike the GA proposed for the detailed electrical method.

V.4.c-ii Results

Similarly to the detailed electrical method, only the minimization of the nanogrid kit costs is initially studied without including the minimization of the number of kit changes (i.e. α is set to 1 in V.8). This deterministic algorithm is very quick, as it only takes 30 seconds for the exhaustive search and less than two seconds for the a posteriori repartition, on a standard computer without the need of a multi-core server. SoC max Bat is set to 95% and SoC min Bat to 80%. These values are necessarily different than in the detailed electrical method due to the different and less precise modeling here. Overall, higher values need to be set to avoid as much as possible that individual nanogrids experience low battery SoC (for instance lower than the thresholds indicated in the detailed electrical method) as here the constraints are only check on an aggregated level.

35% of total cost reduction is achieved, confirming the huge potential impact of resource optimization over the microgrid. This result is in the same order of magnitude as in the previous method, proving the relevance of using an equivalent energy model. The results obtained are slightly better (by a few %) for the detailed electrical method due to a higher modeling precision and thus more relaxed constraints. Table V.4 shows the result of the optimization problem and illustrates the a posteriori repartition method, through different KPIs, i.e. the total current injected or absorbed in absolute value by the nanogrids (total microgrid current), the total losses, the average DC bus voltage and the percentage of time step the nanogrids are below 75% of SoC.

This Table shows that the a posteriori repartition reduces the total losses by a factor of three compared to the kit distribution obtained after the exhaustive search only. Indeed, the a posteriori repartition method enables a better allocation of the kits proposed by the exhaustive search algorithm to achieve a more balanced microgrid. This is also reflected in a higher average DC bus voltage. Note that, before the optimization algorithm, the microgrid is rarely used and very little current is transferred on the microgrid DC bus. This is logical given the fact that the nanogrids are supposed to be perfectly self-sufficient when operating autonomously (i.e. when not interconnected), at the expense of a much greater total cost for the solar panels and batteries. Furthermore, the impact of adding communal loads on the microgrid can be seen in Table V.5. The results and conclusions follow the same trend than with the detailed electrical method except that the impact of communal loads on the microgrid resource total cost is smaller here at the expense of poorer microgrid performances (i.e. greater T 85 , T 80 and T 75 and lower V moy Bus especially for two or three communal loads). [START_REF]Long-Term Joint European Union & African Union Research and Innovation Partnership on Renewable Energy[END_REF] shows the Pareto front between the two objectives when considering also the minimization of the number of kit changes as well as the Pareto front of the detailed electrical method for comparison purposes. Similar conclusions can be drawn as in the previous subsection. Due to the deterministic nature of this method, the Pareto front is perfectly smooth unlike with the detailed electrical method. Note here that if the number of kit changes is forced to be greater than 20, the total cost reduction starts to drop significantly (down to 27.4% for 23 kit changes for instance).

Overall, the proposed method enables to successfully perform siting and sizing of the microgrid resources with very little computational effort and with a deterministic method, at the expense of the precise modeling of the microgrid operation. The microgrid operation is checked only a posteriori with the load flow algorithm to ensure the relevance of the proposed kit allocation. This method enables to consider a large study period, here limited to two months, but which could easily be increased for multi-year optimization.

V.4.d Discussion

Both methods described above highly differ by nature, i.e. a computationally-intensive metaheuristic method versus a fast deterministic method, and this subsection proposes their comparison. Overall, the detailed electrical method is more precise but requires a high computational effort drastically limiting its study window and its replicability potential for larger case studies whereas the aggregated energy method necessitates very low computational effort at the expense of a lower precision while still achieving good results. Therefore, the aggregated energy method enables a much larger study window, here set at two months, but which could be increased sufficiently enough to perform multi-year studies, essential to include battery degradation and load evolution over time, two phenomena of great importance for the accurate siting and sizing of microgrid resources [81,[START_REF] Fioriti | Multi-year stochastic planning of off-grid microgrids subject to significant load growth uncertainty: overcoming single-year methodologies[END_REF]. Moreover, the need for a multi-core server to run the GA significantly limits its ease of application for an electrical operator. Last but not least, the shorter the study window, the greater the impact of the solar irradiation and consumption data on the final results. By increasing the study window, which is easily achievable only for the aggregated energy method, the final results are more robust and less sensitive to the input data.

Furthermore, the detailed electrical method optimizes simultaneously the sizing and the siting of the microgrid resources. This results in a much larger optimization space than for the aggregated energy method which only optimizes the sizing of the microgrid resources before an a posteriori repartition. Thus, the detailed electrical method cannot be easily replicated to larger case studies, for instance 40 nanogrids interconnected (expected to be a maximum with respect to the maximal size of Sub-Saharan villages), unlike the aggregated energy method. With 40 nanogrids, the optimization space for the detailed electrical method is greater than 10 31 , hence an unfeasible optimization problem, whereas there are "only" 1 221 759 possible solutions for the aggregated energy method. This is around seven times more than in the optimization problem presented above, so for a two month study window, this would require around three to four minutes for the exhaustive search part. This is still very reasonable, and if needed, the exhaustive search could be speeded up by eliminating all the combinations which do not fulfill certain criteria (e.g. too small or too big microgrid equivalent battery).

In addition, modeling the microgrid operation within the core of the optimization problem might only be relevant if the objectives or the constraints necessitate to know the microgrid electrical characteristics such as the current in the lines, the DC bus voltage or the losses. On the one hand, the DC bus voltage of the microgrid is already maintained within predefined limits thanks to the decentralized and communication-free control algorithm presented in Chapter II and the 2x16 mm² lines used for the microgrid deployment have a carrying capacity much greater than what is actually observed on the microgrid. On the other hand, the losses, although important to minimize, are quite small even without trying to minimize them. The results for the detailed electrical method gives 2.25 kWh of losses for one week of operation, which seems negligible in terms of costs compared to the possible reduction in kit cost. It has to be noted however that the precise modeling of the microgrid operation enables a more straightforward tuning of the constraints, set at the nanogrid level, as opposed to the aggregated energy method where they are set on the microgrid level, and thus have less physical meaning. The impact of adding communal loads on the microgrid operation is also better reflected with the detailed electrical method as shown in Table V.3 and V.5, where the resulting microgrids seem slightly undersized with two or three communal loads with the aggregated energy method.

Finally, the aggregated energy method decouples the sizing and the siting of the nanogrid kits. This seems very relevant as it avoids comparing CAPEX and OPEX costs within the same algorithm. Indeed, the exhaustive search algorithm optimizes the CAPEX costs by selecting the optimal kit distribution able to answer the energy needs of the whole microgrid. Then, the a posteriori repartition, even if not implemented as an optimization problem, favors the reduction of the microgrid losses by proposing a balanced microgrid. This decoupled approach is very promising. It has to be highlighted here that the aggregated energy method achieves better performances in terms of losses in comparison to the detailed electrical method (1.73 kWh of losses per week versus 2.25 as indicated in Table V.2 and V.4, an increase of 30% with the detailed electrical method), even without formally including the losses within the algorithm objective and constraints.

Table V.6 summarizes the main advantages and disadvantages of both methods, with the advantages in green. The selection of one method or the other depends mainly on the goals of the optimization study and might vary from one case study to another.

V.4.e Perspectives

As this Chapter is an exploratory work for planning problems for decentralized DC microgrids, many perspectives lie ahead. Firstly, the siting of the communal loads could be included within the optimization problem [START_REF] Meunier | Optimal design of photovoltaic water pumping systems for rural communities -a technical, economic and social approach[END_REF]. Their physical location within the microgrid has definitely a strong impact on its operation and on the production and storage resource costs. For instance, in Table V.3, the first communal load installed near NGs 1 and 917 has a much stronger impact on the total cost than the second communal load installed between NGs 172 and 228 (see Fig. IV.4), due to the fact that the microgrid is already much more constrained around NGs 1 and 917 than around NGs 172 and 228. Note that for the detailed electrical method, the inclusion of the communal load siting increases the total optimization space, whereas for the aggregated energy method, it only modifies the power balance in equation V.13 and the a posteriori repartition.

Concerning the detailed electrical method, the first and most important future work is to try to drastically increase its computational speed, mainly through the reduction of the computational burden of the load flow algorithm which represents the major part of the GA total computational effort. The feasibility of the linearization of the decentralized and communication-free control algorithm must be assessed and, if feasible, its impact on the accuracy of the power flows quantified. In addition, other metaheuristic methods capable of including the load flow algorithm within the core of the optimization problem might enable to speed up the resolution of the optimization problem. If not possible, it seems that most of the future works cannot be conducted with the detailed electrical method.

Indeed, these future works mainly rely on the increase in the study window. For example, it would be of interest to account for battery degradation and load consumption evolution in a multi-year horizon. Not considering battery degradation and load growth might lead to the undersizing of the microgrid resources, and then either to energy shortages or an increase in total costs up to 15-20% over time for the replacements needed to counterbalance battery degradation and load growth [81,[START_REF] Fioriti | Multi-year stochastic planning of off-grid microgrids subject to significant load growth uncertainty: overcoming single-year methodologies[END_REF]. Furthermore, the economic modeling of the microgrid could be performed if the optimization horizon is set long enough. Costs and revenues should be accurately modeled to decide whether or not an investment is relevant. In particular, with the inclusion of the communal load siting within the microgrid resource optimization problem, it appears essential to include the economic gains within the optimization problem. Such an economic model could also include the costs of the interconnection modules and of the electrical cables and poles to obtain a complete and accurate economic modeling of the microgrid over a multi-year horizon.

Regarding the aggregated energy method, the a posteriori repartition method should be challenged, either through different weight formulas from the one proposed in equation V. [START_REF]Mesh Power Rwanda presentation website[END_REF] or through completely different methods. The results given by the exhaustive search part indicate the number of each kit and, for instance for the use case selected above, around 10 9 possibilities are left for their siting. This optimization space is relatively small and it would be of interest to study different optimization algorithms to solve it, although always with the idea to keep the computational burden low.

Finally, these planning methods should be confronted to the field and then improved in an iterative manner with field test feedback. This feedback might raise additional constraints to include within the optimization problem, possibly reducing the optimization space. For instance, constraints on the probability of blackout or the quantity of nondistributed energy, similarly to more conventional planning methods, and objectives on socio-economic impact [START_REF] Meunier | Optimal design of photovoltaic water pumping systems for rural communities -a technical, economic and social approach[END_REF] seem to better reflect field expectations. The algorithms developed also rely on many parameters and inputs (solar PV and battery efficiencies, PV and battery derating, solar production and load consumption data, etc.) and a particular focus should be paid to these parameters and inputs to enhance the accuracy of the results and their ease of application on the field. Overall, most of the perspectives above need to be studied with the objective of transferring these preliminary planning algorithms to decision aid field tools to ease the operation of the microgrids deployed in the field.

V.5 Microgrid layout

This Section focuses on the microgrid layout optimization problem. Similarly to the microgrid resource optimization problem, two algorithms are presented, one including the modeling of the power grid and the other not. The first algorithm is based on graph theory, a branch of mathematics that studies networks of points (also called nodes or vertices) connected by lines (also called links or edges). The second algorithm includes the precise electrical modeling of the microgrid operation through the load flow algorithm to account for the impact of the microgrid layout on the microgrid power flows.

Firstly, the microgrid layout optimization problem formulation is introduced. Secondly, each method is described and their results illustrated. Finally, a comparison between both methods is carried out and possible future works to enhance them are discussed.

V.5.a Problem formulation

The microgrid layout optimization problem aims at cost optimizing the installation of the electrical cables and poles interconnecting the nanogrids within a village-wide microgrid. The geographical repartition of the nanogrids is an input to the problem, as their installation precedes the microgrid installation. For instance, Fig. V.7 shows the nanogrid repartition in Ambohimena before the microgrid deployment. Field deployment feedback confirmed that manually designing the microgrid layout is time-consuming and leads to inefficient and suboptimal results, hence the need for a decision aid algorithm. In addition, it would be of interest to check the impact of the microgrid layout on the microgrid power flows and global performances. Constraints on the nanogrid SoCs could be included in the optimization problem, if doable with the selected algorithm. Overall, the layout optimization problem must decide which lines (i.e. which point to point connections from a nanogrid to another) to include within the microgrid to interconnect all the nanogrids at the least cost. The objective function of the microgrid layout optimization problem is then expressed by V.17:

min x N L i=1 C L • L i + C P • N p i • x i (V.17)
with N L the number of possible lines under study, x a vector of size N L x 1 whose value x i is 1 if the line i is included within the microgrid or 0 otherwise, C L the cost of the 2x16 mm² lines in e/m, L i the length of line i, C P the cost of an electrical pole and N p i the number of additional electrical poles needed to set line i.

Based on Nanoé warehouse costs and experience, C L is set to 1.5 e per meter, and an additional electrical pole is installed for every 50 meters of line, i.e. N p i = ⌊ L i 50 ⌋, with a cost C P equal to 80 e per pole. The village under study is the Ambohimena village presented in Chapter IV, considering its situation before the deployment of the village-wide microgrid (see Fig. V.7). Thus, there are 26 nanogrids to interconnect, with at most 325 lines to study (i.e. the number of lines in the complete graph in which each pair of nanogrids is connected by a line, expressed as

N N G •(N N G -1)

2

). Therefore, this optimization problem has a very large optimization space (with 2 325 greater than 10 97 ). Finally, as a basis for comparison for the optimization solutions, the cost of the electrical cables and poles of the microgrid deployed in Ambohimena amounts to 5 003 e for a total length of 2 002 meters and 25 additional electrical poles installed.

V.5.b Graph theory algorithms

V.5.b-i Algorithm description

Graph theory is a large branch of mathematics which deals with connections among points (vertices/nodes) by lines (edges) and which has many concrete applications (for instance transportation planning, logistics, routing).

In particular, the Kruskal's algorithm finds the Minimum Spanning Tree (MST) of an undirected edge-weighted connected graph, i.e. a graph in which each point can be connected to at least another one through lines with associated weights (e.g. distance, cost, time) [START_REF]On the Shortest Spanning Subtree of a Graph and the Traveling Salesman Problem[END_REF]. The MST is the spanning tree (i.e. a tree that interconnects all points under consideration) whose sum of line weights is the smallest possible. The Kruskal's algorithm is a deterministic algorithm whose complexity is in O(E log E), with E the number of lines of the graph under study. Thus, for the microgrid layout optimization problem and its relatively small graphs, the Kruskal's algorithm is computationally efficient and fast. The Kruskal's algorithm is perfectly suitable for the microgrid layout planning problem, with the MST representing the shortest or cheapest layout of the microgrid interconnecting all nanogrids. Constraints cannot easily be included within the Kruskal's algorithm, unless they are included in the weight calculation of the lines performed before the Kruskal's algorithm. Therefore, constraints on the SoCs of the nanogrids are not possible as their evaluation necessitates the MST results (to perform the load flow) and thus can only be done a posteriori. However, geographical constraints, impeding the passage of the electrical cables (such as trees, tall buildings), can easily be included during the weight calculation part. Indeed, the distance between two points, usually taken as the shortest distance point to point, can be replaced by the shortest distance between two points without passing through forbidden zones [START_REF] Gouin | Optimal planning of urban distribution network considering its topology[END_REF]. Note that point to point distances are usually computed with Dijkstra's algorithm [START_REF] Dijkstra | A Note on Two Problems in Connexion with Graphs[END_REF]. This only modifies the weight calculation part of the proposed method, i.e. the inputs to the Kruskal's algorithm. Overall, the flowchart of the proposed method based on Kruskal's algorithm is shown in Fig. V.8. This method returns the least-cost solution that other methods can take as a basis for comparison. While the actual field layout is much more expensive than the Kruskal layout, their performances are similar except for the losses, slightly greater in the Kruskal layout due to the fact that some nanogrids are electrically further from each other than in the field layout (e.g. NGs 59 and 228 or NGs 97 and 211). As the Kruskal layout is necessarily radial and thus less dense than the field layout, the power losses on the lines increase.

Even if the layout obtained with the Kruskal algorithm can serve as a basis for comparison, it is clear from Fig. V.9 that the proposed layout cannot directly be installed on the field. Indeed, some electrical cables and even worst some poles are placed too close to a building or even within a building, which would totally impede their installation. Therefore, adding geographical constraints to a graph theory algorithm is definitely needed so that the resulting layout can more easily be transposed to the field.

A Kruskal algorithm including geographical constraints, forbidding some areas for the passage of cables and the installation of poles, proposes the layout shown in Fig. V.10. The forbidden zones must be indicated by hand by the algorithm end-user and the minimum distances between each nanogrid are then recalculated while avoiding the forbidden zones [START_REF] Gouin | Optimal planning of urban distribution network considering its topology[END_REF]. Finally, these distances serve as an input for the Kruskal algorithm. The obtained microgrid layout achieves a total cost of 3 982 e for 1 588 meters of electrical cables and 20 additional electrical poles. Due to the geographical constraints, the total length is increased by 8.6% and the number of poles by 17.6% for a total cost increase of 12%. Overall, the inclusion of geographical constraints definitively offers a more realistic layout and necessarily increases the cost of the proposed layout. Note that the Kruskal algorithm including geographical constraints is a preliminary tool whose user-friendliness and accuracy is somehow limited (due to the geographical constraints and possible connections being indicated by hand) but these preliminary results still illustrate the importance of including geographical constraints to obtain field-ready decision aid tools.

V.5.c Detailed electrical method

V.5.c-i Algorithm description

As the methods based on graph theory cannot directly include constraints on the SoC of the nanogrid batteries and more generally the precise electrical modeling of the microgrid operation within the core of the algorithm, it is of interest to propose a method including the microgrid model. Therefore, the GA from the microgrid resource optimization model is adapted to the microgrid layout problem.

The SoC modeling (i.e. equation V.9) and its associated constraints (equations V.10, V.11 and V.12) are added to the objective function V.17. The GA must determine which lines to include within the microgrid layout to interconnect all the nanogrids under study at the least cost. As there are 325 possible lines for the microgrid (hence a maximum number of combinations greater than 10 97 ), the optimization space must initially be reduced before running the GA. To do so, a Delaunay triangulation method can be applied to reduce the number of lines included in the study [START_REF] Lee | Two Algorithms for Constructing a Delaunay Triangulation[END_REF]. The Delaunay triangulation for the nanogrids outputs the triangulation so that there are no nanogrids inside the circumcircle of any triangle. Overall, the Delaunay triangulation enables to delete all redundant lines. In addition, all the lines greater than a certain threshold can be deleted as it is highly unlikely that they belong to the optimal layout. This threshold is set manually at a value high enough so that no nanogrids can be isolated. This process results in only 48 possible lines left which gives a much smaller optimization space, with around 10 14 possible combinations.

The GA is launched with similar parameters as for the resource problem with the exception of slight differences on the number of individuals and generations, respectively reduced to 300 individuals and increased to 100 generations as a consequence of the smaller optimization space and the faster evaluation of a generation. Each individual is composed of 48 chromosomes whose value (either 1 or 0) indicates if the line under consideration is included or not within the microgrid layout. For each generation, for each individual, the microgrid layout is set based on the individual chromosomes. If all the nanogrids are interconnected, the load flow and the SoC calculation are performed before evaluating the constraints V.10, V.11 and V.12. Otherwise, if the chromosomes result in a nanogrid being isolated, the individual is given a high penalty factor. Due to the presence of the load flow algorithm, this GA also requires high computational efforts. Moreover, as the resulting microgrid layout must interconnect all the nanogrids, it must at least contain 25 lines. Therefore, the creation of each generation can be constrained so that each individual contains at least 25 lines. This enables to further reduce the optimization space and to speed up the GA. Similarly, the maximum number of lines can be constrained as it appears logical that the resulting layout will not contain a very large number of lines (e.g. probably not more than 30). This constraint on the maximum number of lines must be monitored and potentially increased if the resulting layout contains the maximum number of lines. Finally, the evaluation of a generation is parallelized on multi-core and the code is run on a 48-core server.

V.5.c-ii Results

The GA is launched 20 times to counterbalance the fact that this metaheuristic method does not always give the same result. The GA takes around 11 minutes to run once. The microgrid layout total cost and the associated cable length as well as the losses obtained over one week of operation are shown in It can be seen that the results are close to the one obtained with the graph theory method (i.e. the MST). The optimization space is very flat with very little differences between the different solutions, hence a difficult optimization problem to solve. Therefore, even if the MST shown in Fig. V.9 does respect perfectly all the constraints imposed by this optimization problem, the GA often does not find it. The proposed GA enables to include the modeling of the microgrid within the core of the algorithm. However, the constraints on the SoC do not influence the best layout as a very large number of layouts verify the SoC constraints, including the MST proposed by the Kruskal algorithm. Therefore, it could be of interest to include other electrical characteristics within the constraints or the objective function. The losses over one week of operation of the different layouts shown in Fig. V.13 are quite close from one layout to another one with a maximum difference of 1.1 kWh. Over one year (if the differences are maintained the same), this amounts to a difference of around 50 kWh for the losses, which seems quite negligible in comparison to the microgrid layout costs. For instance, even with a cost of the kWh quite high at 1 e/kWh, the yearly difference on the losses would still be less than the cost of an electrical pole or even to 35 meters of electrical cables. Moreover, the impact of the study window on the losses is high and increasing the study window requires very high computational efforts with the GA. Thus, even if it is possible with the GA to optimize the losses, it does not seem relevant nor realistic for that use case.

The inclusion of the grid modeling within the core of the algorithm also enables to study the impact of communal loads on the microgrid layout. The addition of a 600 W communal load (CC 1 indicated in black in Fig.

V.5.d Discussion

The main difference between the algorithms proposed above relies on the inclusion or not of the modeling of the microgrid operation. The detailed electrical method has shown that the inclusion of the load flow algorithm within the core of the optimization problem has very little impact on the results, as even the MST does respect the constraints imposed in the optimization problem. In addition, Table V.7, which compares the performances of the MST and the actual field layout, shows that the layout has actually very little impact on the microgrid performances, except for the losses which seems to slightly increase with a less dense layout. However, this increase in the losses is definitely negligible in comparison to the cost of the microgrid layout, even over a long period. These results tend to confirm the fact that the microgrid layout and the microgrid global performances are not really correlated, mainly due to the relatively low currents transiting on the electrical cables, hence generating very few losses.

Nevertheless, the detailed electrical method enables to illustrate the impact of the location of a communal load, as proven by Fig. V.16, which seems impossible for the graph theory method which does not analyze the operation of the microgrid. However, when a communal load is installed on the field, its location can be selected to be in a dense area of the microgrid or a posteriori reinforcement of the microgrid layout can be carried out if required. This diminishes the need to necessarily include communal load impact within the microgrid layout decision aid tool.

Overall, graph theory algorithms offer better performances than the detailed electrical method, especially if the MST respects the constraints imposed by the optimization problem, which seems to be often the case due to the small correlation between the microgrid layout and its global performances. The global performances of the microgrid are much more correlated to the kit distribution and repartition optimized within the microgrid resource problem than to the microgrid layout, as the nanogrid battery SoCs depend mainly on the production and storage resources available on the microgrid. Furthermore, graph theory algorithms are definitely more replicable to larger case studies than the GA. For instance, even for very large microgrids (i.e. with around 40 nanogrids), the Kruskal algorithm would be computationally efficient and very fast to run. Finally, adding geographical constraints and the optimization of the electrical pole locations seem much easier with graph theory methods than with detailed electrical methods. In particular, optimizing the location of additional electrical poles significantly increases the size of the optimization space, making the problem much more difficult to solve for the GA.

To sum up, the detailed electrical method offers very little additional information and analyses than the methods based on graph theory at the expense of a greater computational effort and non-deterministic results, and therefore might only be relevant if the objective is to optimize electrical characteristics such as losses or the DC bus voltage or if the constraints on the SoCs (or other electrical characteristics) are much more strict. Otherwise, decoupling the microgrid layout optimization and the microgrid operation seems to be a highly promising and efficient method. Table V.8 summarizes the comparison between the graph theory method and the detailed electrical method, with the advantages indicated in green.

V.5.e Perspectives

While these exploratory works and their preliminary results tend to favor graph theory methods for the microgrid layout optimization problem, there are still many perspectives and future works.

Firstly, the graph theory methods should include the optimization of electrical pole locations. This is definitely confirmed by Fig. V.10 where some parts of the layout are clearly not optimal. For instance, connections between NGs 49, 74 and 541 or between NGs 33, 62, 273 would definitely benefit from the optimal positioning of an additional pole that would reduce the total length of the layout. Note that the installation of an additional pole is economically relevant only if it enables to suppress around 53 meters of electrical cables (as 53 meters of cables amounts to the cost of a pole) or to mutualize two electrical poles within one. While the Kruskal's algorithm cannot optimize the positioning of new electrical poles, the Steiner tree problem can do so [START_REF] Waxman | Routing of multipoint connections[END_REF]. Considering an undirected edge-weighted graph, the Steiner tree problem aims to determine the tree of minimum weight that interconnects a subset of the graph points (usually referred to as terminals) while including additional points if needed. If all the points are terminals, the Steiner tree problem is equivalent to the MST problem. For the microgrid layout optimization problem, a graph including the nanogrids as terminals and additional points as possible electrical pole locations and lines with weights representing the cost of the electrical cables (including the additional poles) can be created as an input to a Steiner algorithm. This method can also easily include geographical constraints for the calculation of weight of the lines and for the possible electrical pole locations (i.e. the points not considered as terminals).

Secondly, the graph theory methods must be enhanced to obtain user-friendly decision aid tools. For instance, the forbidden zones could be automatically selected by the algorithm based on the map and the presence of buildings or trees. In addition, roads could be favored by the graph theory methods. To do so, the use of shapefiles (i.e. geospatial vector data format) and GIS software such as ArcGIS [152] or QGIS [START_REF]QGIS presentation webpage[END_REF] and their coupling with other coding software (Matlab, Python) is a very promising lead. This would enable to automate a great number of geographical features such as the creation of forbidden zones, zones for possible additional electrical poles, road identification, etc., which are highly useful for any graph theory algorithms. Such improvements of the graph theory methods would enable to provide field-ready microgrid layouts, i.e. layouts that are really technically feasible on the field.

Further studies also need to be carried out on the advantages that metaheuristic methods could bring. Other objective functions based on electrical characteristics could be thought so that the microgrid layout obtained achieves better performances than the MST, for instance trying to minimize voltage deviation over the microgrid in order to have a balanced microgrid. The optimization of the cable sections (i.e. by not necessarily using 2x16 mm² cables on each portion of the microgrid layout) might also only be doable with the detailed electrical methods. Moreover, constraints on the maximal current on the lines might be encountered if their sections are reduced. Overall, more thorough in-depth study of the link between the microgrid layout and the microgrid performances are needed before completely giving up metaheuristic methods based on the precise electrical modeling of the microgrid.

Furthermore, the combination of graph theory and metaheuristic methods is of interest. For instance, the Kruskal algorithm, whose input is all the lines under study with their associated weights, could be used iteratively with a metaheuristic method updating the line weights with respect to the performances obtained on the Kruskal layout. These updated weights would feed the Kruskal algorithm, which then outputs a new MST taking into account the new weights, and so on. Such a hybridization of both methods needs to be studied as it could combine the main advantages of the graph theory methods (computationally very efficient and deterministic) and of the metaheuristic methods (possibility to include constraints and more elaborate objectives, search of a large optimization space). In addition, a hybridization method could still be computationally efficient as the microgrid operation would only be performed once at each iteration (i.e. on the successive MSTs).

Finally, similarly to the microgrid resource future works, all these additional works must be carried out with the objective of rapidly confronting the proposed algorithms to the field. Indeed, the microgrid layout is highly intertwined with logistic and construction considerations and therefore feedback from the field is particularly important to develop optimization methods and more globally decision aid tools that are truly useful to ease the dissemination of the DC microgrids with decentralized production and storage. This field test feedback must intervene at an early to middle stage of the future works to avoid developing tools inappropriate to the reality of the field.

V.6 Conclusion

This Chapter has introduced planning problems for the Lateral Electrification model and more generally for the swarm electrification concept. Two main research problems, i.e. microgrid resources and microgrid layout, are highlighted and presented in detail. Firstly, the microgrid resource problem aims at cost optimizing the nanogrid kit distribution and repartition over the nanogrids once they are interconnected within a microgrid, with the overall objective to use efficiently the production and storage resources. Secondly, the microgrid layout problem aims at defining the cost optimal layout (i.e. the electrical cable and electrical pole locations) interconnecting all the nanogrids under study.

For both problems, two main methods are investigated: a computationally-intensive method including the precise modeling of the microgrid operation through the load flow algorithm specifically developed for the decentralized DC microgrids and a much faster method, which only checks the microgrid operation a posteriori. The results of the proposed algorithms are thoroughly illustrated and compared. It appears that including the microgrid model (i.e. the load flow) within the optimization algorithms drastically limits their applicability to large case studies as well as the study windows while not necessarily providing more accurate and better results. The relevance of detailed electrical methods seems restricted to the study of the impact of communal loads on the microgrid operation and to use cases where the objective function is based on electrical characteristics that necessitates a priori knowledge of the state of the microgrid throughout the entire time window.

Finally, this thesis aims at opening up a vast new research field in planning for rural electrification and therefore, many perspectives lie ahead, which are described in detail in their respective Sections. Furthermore, it would be of interest to combine both optimization problems within one, in a global or cross-optimization, even if the preliminary results tend to show that the microgrid layout has very little impact on the microgrid performances, unlike the microgrid resources. Such a study would enable to conclude whether these two optimization problems are correlated or not. Overall, these preliminary works need to be enhanced to provide field-ready decision aid tools to ease the dissemination and the scaling of the Lateral Electrification model.

General Conclusion & Outlook

This thesis falls within the Lateral Electrification model developed and experimented by Nanoé in the North of Madagascar. This model, presented in Chapter I and in one journal paper [START_REF] Richard | A New Electrification Model to End Energy Poverty: An example from a novel rural electrification approach in Madagascar[END_REF], aims at answering simultaneously the short-term challenge, universal energy access, and the long-term challenge, sustainable development, that Sub-Saharan African countries are facing nowadays in the energy sector. Current methods to tackle rural electrification, which can be broadly divided in two families, grid-based solutions (i.e. national grid extension and conventional centralized AC minigrids) and off-grid solutions (Solar Home Systems, solar lanterns, etc.), unfortunately fail to cope with both challenges simultaneously. Based on this observation, the Lateral Electrification offers a third way of progressive and collaborative building of smart power infrastructures in a bottom-up manner through renewable energies, digital technologies and local entrepreneurship. This thesis deals with the research problems inherent to the technical approach of the Lateral Electrification model and then focuses on the development of DC microgrids with decentralized production and storage, from the lab to the field.

Therefore, a microgrid topology and control adapted to the Lateral Electrification model is presented in Chapter II. A decentralized and communication-free control algorithm is designed to avoid a single point of failure, reduce costs and engineering complexity and to enable plug & play feature on the microgrid. The topology and the control proposed are thoroughly illustrated and validated on a simulation model and a lab test bench. This work has been presented in two conference papers [67,98] and one journal paper [84].

The proposed microgrid relies principally on the power electronic based interconnection modules, which must control energy sharing between the nanogrids following the control algorithm mentioned above. The design, hardware and firmware realization of the interconnection module is detailed in Chapter III. After analyzing a paradigm shift ongoing in the use of power electronics for microgrid operation, its optimal architecture and its specifications are thoroughly described. In particular, to optimize microgrid operation, start-up and protection services are directly integrated into the interconnection modules and a co-design between the interconnection module switching cells and the microgrid DC bus voltage is performed. This approach has been published in one conference paper [START_REF] Richard | Specifications and Design of a DC-DC Converter for Decentralized DC Microgrids in Rural Africa[END_REF].

Finally, a village-wide microgrid interconnecting 24 nanogrids and a communal load has been installed in Madagascar during two six-week field missions at the end of the first and second year of this thesis. This successful installation and the proper operation of the microgrid since then, as presented in Chapter IV, definitely answer the main objective of this thesis and validate the work carried out in Chapters II and III. Most importantly, it is a major milestone for the Lateral Electrification model as it proves its technical feasibility. The successful field deployment, partly presented in one journal paper [84], has also been rewarded by the Global Grand Prize of the Empower a Billion Lives II Competition [START_REF]IEEE Empower a Billion Lives[END_REF], organized by the IEEE Power Electronics Society to develop scalable solutions to energy poverty.

As confirmed by the challenges and opportunities encountered during the village-wide microgrid deployment, planning tools are crucial to enable the rapid replication of the proposed microgrid across Sub-Saharan Africa. Two planning problems specific to the Lateral Electrification model are introduced and tackled in Chapter V. Preliminary results highlight the significant economic potential of decision aid algorithms to optimize the microgrid layout and resources distributed over the nanogrids. A part of this work has resulted in a conference paper [START_REF] Richard | Planning Methods for DC Lateral Electrification in Rural Africa[END_REF].

Overall, this thesis participates at answering some of the technical and scientific questions raised by the Lateral Electrification model. In particular, the successful deployment of a village-wide microgrid has lifted the main uncertainties considering the feasibility of DC microgrids with decentralized production and storage.

However, this exploratory thesis has many outlooks for future works, mainly with the objectives of facilitating the rapid diffusion and the replicability of the Lateral Electrification model. Firstly, in the short-term, it is crucial to industrialize the interconnection module and more globally the proposed microgrid concept. This interconnection module industrialization must be carried out by enhancing the method proposed in Chapter III and by carefully and thoroughly analyzing the impact of each part of the converter on the operation and performances of the microgrid. The impact of the output grid filter and the switching frequency on stability, cost and microgrid performances (losses, EMC, etc.) must be studied more deeply. A thorough study of the reliability of the interconnection module (e.g. versus short-circuits, lightning, tropical weather conditions, etc.) should also be carried out. A mature and cost-effective industrial realization of the interconnection module must then be performed.

Similarly, building on the field test feedback, microgrid installation and operation processes must be defined to ease the microgrid operator work. To facilitate the diffusion of the proposed solution in other developing countries, a training course must be developed to gather all the necessary knowledge and tools to install and operate efficiently decentralized DC microgrids.

In the meantime, a complete stability analysis of the proposed microgrid must be conducted. This analysis necessitates a great amount of work to include the impact of the majority of the microgrid and interconnection module features (number and distance between nanogrids, output DC bus capacitor values, switching frequency, closed loop control, droop coefficients, AC loads, etc.) on the overall stability. Such a stability analysis is crucial to better identify the most critical poles and the stability margins of the microgrids installed in the field and to be able to optimize the interconnection module hardware and control.

On a system level, to enhance the microgrid efficiency, connection/disconnection strategies should be investigated so that the nanogrids do not always stay connected to the microgrid even when they are not absorbing nor injecting current into the DC bus. Indeed, maintaining the DC bus at a certain level even when there are no power flows incurs noload losses that drastically reduce the global efficiency of the microgrid. However, such a strategy might impede the proper operation of nanogrids without battery which always necessitate the presence of other nanogrids on the microgrid. Moreover, there might be more power flows on the microgrids in the future after the optimization of their solar panel and battery park, reducing the amount of time the interconnection modules maintain a DC bus voltage without exchanging energy, hence fewer situations in which disconnection strategies would be relevant.

In addition, the planning tools introduced in Chapter V definitely need further research. Following the objectives of developing decision aid tools for the microgrid operators, the relevance and accuracy of the proposed algorithms with respect to real field applications must be assessed. One the one hand, for the microgrid layout problem, the inclusion of geographical constraints and the optimization of electrical pole locations seem essential to output layouts really feasible on the field. On the other hand, performing the microgrid resource problem over a multi-year horizon is crucial to account for battery degradation and load growth to avoid the initial undersizing of the microgrid resources at the expense of higher costs or poorer performances in the long-term. Overall, the influence of one problem on the other must also be investigated to determine whether these problems are correlated or not.

Finally, as a natural extension of this thesis, the third step of the Lateral Electrification model, whether it is the interconnection of microgrids or their connection to a national or local AC grid, needs to be studied both economically and technically. From an economic point of view, the relevance of microgrid interconnection (or connection to the AC grid) must be clarified with respect to new energy services delivered to end-users (mainly industrial and thermal services such as air conditioners, electric ovens, small production plants, etc.) before any field tests due to much higher investment costs than on the microgrid phase. In particular, the impact of the distance between two successive microgrids or between a microgrid and the AC grid on the economic feasibility of the third step of the Lateral Electrification model must be assessed. Technically, the structure and the control algorithm associated to such an interconnection must be designed, validated through software simulation and lab test bench and then tested on the field, following the same process as the microgrid development presented in this thesis. However, due to the higher voltage levels needed, most likely above the extra low voltage threshold of 120 V DC or 50 V AC, higher attention must be paid to the proof of concept prototype for safety reasons, confirming that the Lateral Electrification is also based on the progressive increase of the electrical operator skills, similarly to the progressive building of electrical infrastructures. To conclude, future works will definitely focus on the third step of the Lateral Electrification model to be able to propose a complete progressive path to extend electrical services from Tier 2 (nanogrids) to Tier 3/4 (microgrids) to Tier 4/5 access. Using equation A.7 still valid for the two arm configuration, the following equation can be obtained:

∆I T = V bat (1 -α) • LF • (1 -2α) • α = V S LF • (1 -2α) • α (A.
∆I T = V bat LF • (2α -1) = V S LF • (1 -α) • (2α -1) (A.17)
Therefore, combining A.15 and A.17 and considering that, in average, the input battery current is equal to the sum of the power inductor currents (as the input capacitor current is equal to 0 in steady state):

∆I bat = V bat (1-α)•LF • (1 -2α) • α for α ≤ 1 2 V bat LF • (2α -1) for α ≥ 1 2 = V S LF • (1 -2α) • α for α ≤ 1 2 V S LF • (1 -α) • (2α -1) for α ≥ 1 2 (A.18)
Similarly, the same method can be applied to determine the output voltage ripple expression.

∆V S = I bat C S F • ( 1 2 -α) • α for α ≤ 1 2 I bat C S F • (1 -α) • (α -1 2 ) for α ≥ 1 2 (A.19)

Abstract

Nowadays, more than 770 million people lack access to electricity worldwide despite the clear harmful consequences on socio-economic development. The vast majority of these unelectrified communities reside in rural Sub-Saharan Africa, far from any national grid infrastructures and with little hope to be connected in a near future.

This thesis focuses on the inherent research problems of the Lateral Electrification model, based on the progressive and collaborative building of smart power infrastructures in a bottom-up manner through renewable energies, digital technologies and local entrepreneurship. This research work combines the fields of power electronics and power systems to develop from the lab to the field DC solar microgrids with decentralized production and storage for the electrification of rural Africa.

The proposed microgrid interconnects multiple basic smart power units called nanogrids, gathering solar power production, storage and distribution within an autonomous and collective DC power system, delivering power to four to six households. The microgrid topology, the power electronic converters and the associated control algorithm needed to operate the microgrid have been designed to offer modularity and scalability while achieving a high level of reliability. A village-wide microgrid has been installed in a typical village of the North of Madagascar, interconnecting 24 nanogrids and offering productive use of energy services. This successful deployment is an important milestone for the Lateral Electrification model as it proves its technical feasibility. Planning research questions have also been raised and investigated to optimize the installation and operation of such microgrids.

Résumé

Actuellement, plus de 770 millions de personnes n'ont pas accès à l'électricité dans le monde malgré des conséquences néfastes évidentes sur le développement socio-économique des zones concernées. Ces communautés non-électrifiées se situent majoritairement dans les zones rurales de l'Afrique subsaharienne, avec très peu d'espoir d'être connectées au réseau national dans un futur proche du fait de leur éloignement.

Cette thèse s'attaque aux problématiques de recherche inhérentes au modèle d'Électrification Latérale, qui repose sur la construction progressive et collaborative d'infrastructures électriques du bas vers le haut grâce aux énergies renouvelables, aux technologies de l'information et à l'entrepreneuriat local. Ces travaux de recherche regroupent les domaines de l'électronique de puissance et des réseaux électriques afin de développer, du laboratoire au terrain, des micro-réseaux solaires à courant continu avec production et stockage décentralisés pour l'électrification de l'Afrique rurale.

Le micro-réseau proposé interconnecte de multiples systèmes électriques solaires autonomes et collectifs, appelés nano-réseaux, regroupant de la production, du stockage et de la distribution d'électricité pour quatre à six foyers distincts. La structure du microréseau ainsi que les convertisseurs d'électronique de puissance et leur contrôle nécessaire au bon fonctionnement du micro-réseau ont été développés afin de garantir modularité et fiabilité. Un micro-réseau interconnectant 24 nano-réseaux et offrant de nouveaux services électriques productifs a ensuite été déployé à l'échelle d'un village typique du nord de Madagascar. Ce déploiement terrain est une étape importante pour le modèle d'Électrification Latérale puisqu'il prouve sa faisabilité technique. Des problématiques de planification ont aussi été étudiées afin d'optimiser l'installation et le fonctionnement de tels micro-réseaux.

II. 9

 9 Droop control I-V characteristic. . . . . . . . . . . . . . . . . . . . . . . . II.10 Configuration of the simulated microgrid. . . . . . . . . . . . . . . . . . . II.11 Evolution of the DC bus voltage and microgrid average SoC -microgrid connection mode. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II.12 Evolution of the currents exchanged on a 12 V basis between the nanogrids -microgrid connection mode. . . . . . . . . . . . . . . . . . . . . . . . . II.13 Evolution of the SoC of the nanogrids -microgrid connection mode. . . . II.14 Evolution of the SoC of the nanogrids in autonomous operation. . . . . . . II.15 Evolution of the DC bus voltage with a 1 500 Wh communal load. . . . . II.16 Evolution of the currents exchanged on a 12 V basis between the nanogrids with a 1 500 Wh communal load. . . . . . . . . . . . . . . . . . . . . . . . II.17 Evolution of the SoC of the nanogrids with a 1 500 Wh communal load. . II.18 Evolution of the SoC of the nanogrids without the 1 500 Wh communal load. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . II.19 Schematic of the laboratory test bench interconnecting three nanogrids. . II.20 Set-up of the DC microgrid test bench. . . . . . . . . . . . . . . . . . . . . II.21 Evolution of the SoC, the DC bus voltage and the currents exchanged between the converters at different operating points. . . . . . . . . . . . . II.22 Impact of a communal load on the microgrid power flows. . . . . . . . . . III.1 Role of power electronics for grid operation. . . . . . . . . . . . . . . . . . III.2 Boost (left) and buck-boost (right) architectures. . . . . . . . . . . . . . . III.3 Expected inrush current at start-up with the boost (left) and buck-boost (right) architectures. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . III.4 Interleaved two arm buck-boost converter. . . . . . . . . . . . . . . . . . . III.5 Current and voltage ripple reduction depending on the number of arms. . III.6 Flowchart of the exhaustive search algorithm. . . . . . . . . . . . . . . . . III.7 Thermal resistance versus copper area on PCB for DPAK packages [127]. . III.8 Inductor and capacitor values depending on V S and q. . . . . . . . . . . . III.9 Cost breakdown for two (V S , q) configurations. . . . . . . . . . . . . . . . III.10 Schematic view of the proposed interconnection module. . . . . . . . . . . III.11 Top layer of the control card designed for the interconnection module. . . III.12 Top layer of the power card designed for the interconnection module. . . . III.13 3D-printed packaging of the interconnection module. . . . . . . . . . . . . III.14 State machine diagram of the interconnection module operation. . . . . . . III.15 Interconnection module control structure. . . . . . . . . . . . . . . . . . . III.16 Thermal performance and efficiency of the interconnection module. . . . . III.17 Impact of the start-up procedure on the battery inrush current (with the start-up procedure on the right, without on the left). . . . . . . . . . . . . III.18 Interconnection module reaction to a short-circuit on the microgrid DC bus (pink/green: battery/output current, blue/yellow: high-side/low-side boost mosfets V DS ). . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IV.1 Ambohimena location in Madagascar and Nanoé impact. . . . . . . . . . . IV.2 Evolution of Nanoé presence in Ambohimena. . . . . . . . . . . . . . . . .

I. 1

 1 Different kit sizes installed by Nanoé. . . . . . . . . . . . . . . . . . . . . . II.1 Comparison of centralized and decentralized architectures for DC microgrids. II.2 Comparison of four different control structures. . . . . . . . . . . . . . . . II.3 Parameters of the control algorithm. . . . . . . . . . . . . . . . . . . . . . II.4 Parameters of the developed test bench. . . . . . . . . . . . . . . . . . . . III.1 Interconnection module specifications. . . . . . . . . . . . . . . . . . . . . III.2 Different possible mosfet choices. . . . . . . . . . . . . . . . . . . . . . . . III.3 Different possible heatsink choices. . . . . . . . . . . . . . . . . . . . . . . III.4 Total cost (in e) of the switching cells for different (V S , q) combinations (battery input voltage: 12 V in red, 24 V in black). . . . . . . . . . . . . . III.5 Cost and advantages depending on the number of buck arms. . . . . . . . III.6 Harmonic content and oscillations of the DC bus voltage before and after the grid filter. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IV.1 Comparison of the Simulink model and the microgrid installed in Ambohimena. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

1 8 I. 2 16 I. 3 18 I. 3 .a Pillar 1 : 19 I. 3 .b Pillar 2 : 21 I. 3 .c Pillar 3 : 23 I. 4

 182163183119322133234 The energy situation in developing countries . . . . . . . . . . . . . 6 I.1.a The short-term challenge . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 I.1.b The long-term challenge . . . . . . . . . . . . . . . . . . . . . . . . . . . . Overview of current solutions for rural electrification . . . . 10 I.2.a Conventional methods and their limits . . . . . . . . . . . . . . . . . . . . 10 I.2.b An emerging trend: Swarm electrification . . . . . . . . . . . . . . . . . . The Lateral Electrification model . . . . . . . . . . . . . . . . . . . . Progressive technologies . . . . . . . . . . . . . . . . . . . . . . . Exhaustive service offer . . . . . . . . . . . . . . . . . . . . . . . Horizontal organization powered by local entrepreneurship . . . . 22 I.3.d Application of the Lateral Electrification model in Madagascar . . . . . . Objectives of the thesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25

Figure I. 1 :

 1 Figure I.1: Population without access to electricity by country in Africa, 2018 [9].

Figure I. 2 :

 2 Figure I.2: Evolution of the number of people without access to electricity, 2012-2022 [2].

Figure I. 3 :

 3 Figure I.3: Youth employment overview in Africa, 2015 [11].

Figure I. 4 :

 4 Figure I.4: Jobs creation to provide universal energy access in Africa by 2030 [10] (ICS: Improved cookstoves; LPG: Liquefied petroleum gas).

Figure I. 5 :

 5 Figure I.5: CAPEX per end-user for PV minigrids [20].

Figure I. 6 :

 6 Figure I.6: Comparison of electricity costs with cash collected in US $ per kWh billed [24].

  Fig. I.8, as most of the unelectrified communities cannot easily afford off-grid solutions, limiting their potential to ensure universal access. Note that affordability has decreased between 2019 and 2021, mainly due to an increase in costs and the deterioration of the purchasing power of unelectrified communities.

Figure I. 7 :

 7 Figure I.7: Number of people with electricity access through solar energy kits [26].

Figure I. 8 :

 8 Figure I.8: Affordability of off-grid solar technologies [26].

  Fig. I.9.

Figure I. 9 :

 9 Figure I.9: Progressive building of power infrastructures.

Figure I. 10 :

 10 Figure I.10: Schematic of a nanogrid installation.

Figure I. 11 :

 11 Figure I.11: Exhaustive service offer (PL: Public Lighting).

  Fig. I.12.

Figure I. 12 :

 12 Figure I.12: Organization of the different actors of the Lateral Electrification model.

Figure I. 13 :

 13 Figure I.13: Nanoé's achievement in the North of Madagascar.

  Fig. II.1:

Figure II. 1 :

 1 Figure II.1: Main control structures: (a) Centralized, (b) Decentralized, (c) Distributed, (d) Hierarchical [94].

  Fig. II.2.

Figure II. 2 :

 2 Figure II.2: Spatial dissemination of the Ambohimena nanogrids.

  Fig. II.3 can be found in the majority of other nanogrids.

Figure II. 3 :

 3 Figure II.3: Example of a 12 V nanogrid consumption and production over one week.

  Fig. II.4. The maximal DoD indicated for each nanogrid in Fig. II.4 represents their worst day over the study period.

Figure II. 4 :

 4 Figure II.4: Average and maximal DoD of the NGs in Ambohimena over three months.

Figure II. 5 :

 5 Figure II.5: Size reduction of the battery park of Ambohimena with increased DoD.

  Fig. I.10 in Chapter I) through 2x16 mm² or 2x25 mm² DC cables. Its configuration is shown in Fig. II.6

Figure II. 6 :

 6 Figure II.6: Configuration of the proposed DC microgrid.

  Fig. II.7 and described below.

Figure II. 7 :

 7 Figure II.7: Decentralized and communication-free control algorithm.

Figure II. 8 :

 8 Figure II.8: 3D map of the decentralized and communication-free control algorithm.

10 II. 3

 103 .c-iii Communal load control The SoC-based control algorithm presented above applies to interconnection modules connecting a nanogrid to the microgrid (in red in Fig. II.6). However, for interconnection modules connecting a communal load (or similarly a nanogrid without battery and solar panel) with the microgrid (in blue in Fig. II.6), a different control algorithm must be implemented. On the low-voltage side, i.e. on the side of the communal load or nanogrid without battery, the voltage V LS must be regulated around a reference value V setpoint , either 12, 24 or 48 V DC. A pure droop control is then implemented to determine the current reference I ref , following equation II.7, with k d the droop coefficient. k d is tuned with respect to the maximum current needed on the low-voltage side I max and the maximum voltage deviation allowed on the low voltage side ∆V max , with the formula II.8. This droop control is illustrated in Fig. II.9.

Figure II. 10 :

 10 Figure II.10: Configuration of the simulated microgrid.

3 .

 3 Fig. II.11, II.12 and II.13: 1. The SoCs are initialized at low levels for 3:40 pm and all the NGs are in the medium zone. During the first night, all the NGs reach a SoC below 60%, even if NGs 1, 54 and 211 try to support NGs 29 and 168. Hence, the DC bus voltage stabilizes at 54 V, indicating a weak microgrid, with all the NGs at the boundary between Voltage-regulated Injection and Pure Absorption modes. 2. Then, during the first day, as soon as NGs 1, 54 and 211 reach a SoC above 60% thanks to their own solar panels, they switch to Voltage-controlled Injection and start to support NG 29 and NG 168, now in Pure Absorption mode, to help them reach back the medium SoC zone. Due to the selfish behavior feature, NGs 1, 54 and 211 wait until their SoC reaches 95% before supporting medium zone NGs. Over the next few days, as shown in Fig. II.12, NGs 1, 54 and 211 (whether in Pure Injection or Voltage-controlled Injection mode depending on the value of SoC max ) frequently support NGs 29 and 168 (in Voltage-controlled Absorption) and bring them back within the strong SoC zone in two days, as confirmed in Fig. II.13. When all nanogrids are in the strong SoC zone, the DC bus voltage stabilizes at 66 V, indicating an overall strong microgrid, with all the NGs at the boundary between Voltage-regulated Absorption and Pure Injection modes.

Figure II. 11 :

 11 Figure II.11: Evolution of the DC bus voltage and microgrid average SoC -microgrid connection mode.

Figure II. 12 :

 12 Figure II.12: Evolution of the currents exchanged on a 12 V basis between the nanogrids -microgrid connection mode.

Figure II. 13 :

 13 Figure II.13: Evolution of the SoC of the nanogrids -microgrid connection mode.

Figure II. 14 :

 14 Figure II.14: Evolution of the SoC of the nanogrids in autonomous operation.

  Fig. II.10 is shown in Fig. II.15, II.

Figure II. 15 :

 15 Figure II.15: Evolution of the DC bus voltage with a 1 500 Wh communal load.

Figure II. 16 :

 16 Figure II.16: Evolution of the currents exchanged on a 12 V basis between the nanogrids with a 1 500 Wh communal load.

Figure II. 17 :

 17 Figure II.17: Evolution of the SoC of the nanogrids with a 1 500 Wh communal load.

Figure II. 18 :

 18 Figure II.18: Evolution of the SoC of the nanogrids without the 1 500 Wh communal load.

Figure II. 19 :

 19 Figure II.19: Schematic of the laboratory test bench interconnecting three nanogrids.

Figure II. 20 :

 20 Figure II.20: Set-up of the DC microgrid test bench.

Figure II. 21 :

 21 Figure II.21: Evolution of the SoC, the DC bus voltage and the currents exchanged between the converters at different operating points.

4 .

 4 At t = 110 s and t = 130 s, the SoCs of the emulated battery of NG 1 and NG 3 are manually changed to emphasize the current sharing feature. 5. The communal load is then disconnected at t = 200 s and reconnected with a greater power consumption (i.e. 180 W) at t = 310 s. 6. At t = 350 s, the power resistor is disconnected and the three NGs return at the boundary between Voltage-controlled Absorption and Voltage-controlled Injection modes.

Figure II. 22 :

 22 Figure II.22: Impact of a communal load on the microgrid power flows.

III. 6

 6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92

  Fig. III.1.

Figure III. 1 :

 1 Figure III.1: Role of power electronics for grid operation.

  Fig. III.2.

Figure III. 2 :

 2 Figure III.2: Boost (left) and buck-boost (right) architectures.

1 .

 1 Check the presence of a microgrid: if the output voltage is already higher than the input voltage, the microgrid is already launched and the converter must start at a duty cycle close to the ratio of the input voltage over the output voltage to prevent large inrush currents. If the microgrid has not yet started, the converter should follow the next two steps. 2. Pre-charge of the DC bus voltage: the converter, in buck mode (i.e. with mosfets Q1 and Q2 switching, Q3 and Q4 respectively always open and closed), slowly charges the DC bus capacitors to a value close to its input voltage. 3. Charge to the nominal voltage: once the DC bus voltage has reached a value close to the converter input voltage V bat , the converter can switch to boost mode (i.e. mosfets Q1 and Q2 respectively always closed and open, and Q3 and Q4 switching) to charge the DC bus voltage to its operating value V nom bus . The comparison of the expected inrush currents with a boost and a buck-boost architecture is illustrated in Fig. III.3. Note that the figures are not to scale. With a boost only architecture, the high inrush current I peak may overstress the mosfets of the interconnection module, reducing its lifetime and increasing the risk of failures.

Figure III. 3 :

 3 Figure III.3: Expected inrush current at start-up with the boost (left) and buck-boost (right) architectures.

  Fig. III.2 or Fig. III.4) are set a 0.5 V and 1 A to obtain stable and precise measurements needed for the decentralized and communication-free control algorithm. Note that an additional grid filter (indicated by L f and C f in Fig. III.4

  Fig. III.4 with two arms represented.To design such a converter, the output voltage and input current ripple formulas must be determined with respect to input and output voltages, the input current, the passive elements (L and C S ), the switching frequency F and the duty cycle α.

Figure III. 4 :

 4 Figure III.4: Interleaved two arm buck-boost converter.

  current and voltage ripple reductions are shown in Fig. III.5, after normalizing equations III.1 and III.2 by dividing them by their maximal value. The range of possible duty cycle values for an interconnection module interconnecting a 12 V nanogrid to a 72 V DC bus is indicated by a gray area in Fig. III.5. It has been computed by taking into account the voltage variations occurring on both side of the interconnection module, either due to the battery characteristics or due to the DC bus voltage varying because of the decentralized and communication-free control algorithm.

Figure III. 5 :

 5 Figure III.5: Current and voltage ripple reduction depending on the number of arms.

  . The flowchart of the exhaustive search algorithm is illustrated in Fig. III.6.

Figure III. 6 :

 6 Figure III.6: Flowchart of the exhaustive search algorithm.

Figure III. 7 :

 7 Figure III.7: Thermal resistance versus copper area on PCB for DPAK packages [127].

  Fig. III.8 showing the range of inductor and capacitor values for all possible duty cycle values. In addition, the inductor and capacitor values both decrease with the number of arms and the inductor value tends to increase with the DC bus voltage, whereas the output capacitor is quite stable with respect to V S . The inductor and capacitor values are sometimes equal to 0, as the duty cycle α might take special values for which equations III.1 and III.2 are equal to 0, as shown in Fig. III.5. However, in most cases, as the input and output voltage of the switching cell both vary, the duty cycle range of operation unfortunately spans most of the curve in Fig. III.5, as illustrated by the gray zone showing the duty cycle range for a 12 V battery input and a 72 V microgrid.

Figure III. 8 :

 8 Figure III.8: Inductor and capacitor values depending on V S and q.

III. 5 .

 5 b Hardware realization A schematic of the interconnection module architecture is shown in Fig. III.10. A 30 A bidirectional buck-boost converter, composed of two 15 A power cards, each with two 7.5

Figure III. 10 :

 10 Figure III.10: Schematic view of the proposed interconnection module.

Figure III. 11 :

 11 Figure III.11: Top layer of the control card designed for the interconnection module.

  Fig. III.12. All SMD components are located on the bottom layer (not shown in Fig. III.12) whereas through-hole components (i.e. the mosfets and the power inductors) are located on the top layer.

Figure III. 12 :

 12 Figure III.12: Top layer of the power card designed for the interconnection module.

Figure III. 13 :

 13 Figure III.13: 3D-printed packaging of the interconnection module.

Figure III. 14 :

 14 Figure III.14: State machine diagram of the interconnection module operation.

Figure III. 15 :

 15 Figure III.15: Interconnection module control structure.

Figure III. 16 :

 16 Figure III.16: Thermal performance and efficiency of the interconnection module.

Figure III. 17 :

 17 Figure III.17: Impact of the start-up procedure on the battery inrush current (with the start-up procedure on the right, without on the left).

Figure III. 18 :

 18 Figure III.18: Interconnection module reaction to a short-circuit on the microgrid DC bus (pink/green: battery/output current, blue/yellow: high-side/low-side boost mosfets V DS ).

IV. 6

 6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Figure IV. 1 :

 1 Figure IV.1: Ambohimena location in Madagascar and Nanoé impact.

  Ambohimena contains in total 148 end-users of Nanoé services, including 125 private households, the mosque, the church and the town hall and 20 public lighting spots, as summarized in Fig. IV.1. These end-users are powered by 32 nanogrids, therefore with an average of 4.6 end-users per nanogrid. The evolution of the number of nanogrids and end-users in Ambohimena is shown in Fig. IV.2. The penetration rate (i.e. the ratio of households connected to a nanogrid over all households) is superior to 80% in Ambohimena, although the lack of an official population census makes it difficult to obtain an exact figure. 22 nanogrids were already installed at the end of 2019, proving the ability of the nanogrid service and technology to last in time, with more than five years in service for the oldest nanogrids. The impact of COVID and rainy seasons (usually between December and March) can definitely be seen on the rates of nanogrid installation in Fig. IV.2.

Figure IV. 2 :

 2 Figure IV.2: Evolution of Nanoé presence in Ambohimena.

Figure IV. 3 :

 3 Figure IV.3: Nanogrid kit distribution in Ambohimena .

  cables are already passing above them. The microgrid layout can be seen in Fig. IV.4, with the blue and black lines showing respectively the microgrid installed at the end of 2021 and its extension in 2022. In addition, the precise layout of the microgrid installed during the first mission is shown in Fig. IV.5, where each color indicates a different cable.

Figure IV. 4 :

 4 Figure IV.4: Layout of the microgrid installed in Ambohimena.

Figure IV. 5 :

 5 Figure IV.5: Precise installation of the first Ambohimena microgrid.

Figure IV. 6 :

 6 Figure IV.6: Construction work in Ambohimena.

Figure IV. 7 :

 7 Figure IV.7: Interconnection module mounting and installation on the field.

Figure IV. 8 :

 8 Figure IV.8: Electrical diagram of the nanogrid installation.

Figure IV. 9 :

 9 Figure IV.9: Evolution of the currents exchanged between the nanogrids, their SoC and the DC bus voltage in radial and meshed layout.

4 .

 4 The following days, all the nanogrids support NG 917 similarly to Fig. IV.9.

Figure IV. 10 :

 10 Figure IV.10: Evolution of the currents exchanged between the nanogrids, their SoC and the DC bus voltage during and after a stormy period.

  Figure IV.11: Village-wide microgrid operation during 12 days.

Figure IV. 12 :

 12 Figure IV.12: Injection and absorption factors for each nanogrid.

Figure IV. 13 :

 13 Figure IV.13: DC bus voltage monotone.

Figure IV. 14 :

 14 Figure IV.14: NG 541 power exchanged monotone.

IV. 4

 4 .a-iv Comparison with the Simulink model Table IV.1 shows the comparison between the results of the Simulink model presented in Chapter II and the microgrid installed on the field at the end of 2021, at three different time steps selected in Fig. IV.9 and IV.10. The Simulink model has been modified to account for the precise layout of the microgrid in Fig. IV.5, with the line between NG 54 and NG 917 deleted for Case 1 (radial layout) and included for Cases 2 and 3 (meshed layout). Within the Simulink model, the nanogrid SoCs have been set equal to the ones collected on the field (see Fig. IV.9 and IV.10

Figure IV. 15 :

 15 Figure IV.15: Rice milling with a communal load on the microgrid.

Figure IV. 16 :

 16 Figure IV.16: Rice cooking using an AC inverter on the microgrid.

  Firstly, NG 449 was switched to a nanogrid without battery nor solar panel during the second field mission. Therefore, all the energy consumed by NG 449 comes necessarily from the other nanogrids. The interconnection module regulates the nanogrid voltage around 13 V with a droop coefficient of 0.2 Ω. For a maximum current absorbed on NG 449 estimated at 10 A (even if it has never been reached in the last eight months), the nanogrid voltage would drop at a minimum of 11 V. The nanogrid voltage and absorbed current during two weeks are shown in Fig. IV.17. NG 449 has been operating satisfactorily for the past eight months, although it contains neither a battery nor a solar panel. In addition, with the proposed droop control, the nanogrid voltage is representative of the energy demand on the nanogrid.

Figure IV. 17 :

 17 Figure IV.17: Voltage and absorbed current on NG 449, operating without battery nor solar panel.

Figure IV. 18 :

 18 Figure IV.18: SoC evolution of three nanogrids whose solar panels have been disconnected for three days.

  Fig. III.16. However, the power exchanged monotone in Fig. IV.14 might not yet be representative of the interconnection module operating points after the optimization of the microgrid resources, as studied in Chapter V.

  Fig. IV.10.

  IV.15), a 750 W 48 V DC electric mill, and AC loads through a 1 500 W AC inverter (see Fig. IV.16

  5 3 ) points are obtained, as shown in Fig. V.1.

Figure V. 1 :

 1 Figure V.1: Voltage and current comparison between the load flow and the Simulink model.

  V.2.

Figure V. 2 :

 2 Figure V.2: Flowchart of the detailed electrical method algorithm.

  Fig. V.3.

Figure V. 3 :

 3 Figure V.3: Resource reduction and kit distribution achieved with the detailed electrical method.

Finally, the

  inclusion of the minimization of the number of kit changes within the objective function enables to extract the Pareto front between the two objectives (cost and kit changes minimization) obtained by modifying the value of α within the objective function V.8. The Pareto front in Fig. V.4 shows that after a certain number of kit changes (around 10 to 12), the microgrid resource total cost does not decrease much anymore. The Pareto front is a good indicator to help the microgrid operator to do a trade-off between cost reduction and required field work.

Figure V. 4 :

 4 Figure V.4: Pareto front for the resource optimization problem -detailed electrical method.

Figure V. 5 :

 5 Figure V.5: Flowchart of the aggregated energy method algorithm.

  Bat (d) ≥ SoC max Bat (V.15) with N Day the number of days of the study, i.e. 56.

Figure V. 6 :

 6 Figure V.6: Comparison of the Pareto fronts of the detailed electrical and aggregated energy methods for the resource optimization problem.

Figure V. 7 :

 7 Figure V.7: Example of a geographical repartition of the nanogrids of a village.

Figure V. 8 :

 8 Figure V.8: Flowchart of the method based on Kruskal's algorithm.

Figure V. 9 :

 9 Figure V.9: Layout obtained with the Kruskal algorithm without geographical constraints.

  For instance, the line to interconnect NGs 33 and 135 was originally running over the village school and was only 85 meters long whereas when the geographical constraints are included, the line increases to 109 meters long and necessitates two electrical poles. Similar analysis can be conducted for the line between NGs 74 and 541 which increases from 79 meters to 101 meters and from one to two poles with the inclusion of geographical constraints. These examples are illustrated through a zoom on the impact of geographical constraints on the microgrid layout in Fig. V.11. In addition, NG 228 was originally connected to NG 29 but the line was running over trees and houses. Therefore, the Kruskal algorithm connects NG 228 to NG 59 through a slightly longer line respecting geographical constraints.

Figure V. 10 :

 10 Figure V.10: Layout obtained when including geographical constraints.

Figure V. 11 :

 11 Figure V.11: Zoom on the impact of geographical constraints on the microgrid layout.

  Based on the objective function value and the constraints, all individuals are given a fitness score, used to create the next generation. Similar solar production and consumption data as for the microgrid resource problem are taken with a study window of one week and a 10 minute time step. The flowchart of the proposed GA is shown in Fig. V.12.

Figure V. 12 :

 12 Figure V.12: Flowchart of the detailed electrical method for the microgrid layout optimization problem.

  Fig. V.13. Overall, the microgrid layout cost and cable length are close to the MST. An example of a microgrid layout obtained is shown in Fig. V.14. All proposed layouts have 17 additional poles, except two with 18 additional poles.

Figure V. 13 :

 13 Figure V.13: Results of the microgrid layout optimization problem using the detailed electrical method.

Figure V. 14 :

 14 Figure V.14: Example of a microgrid layout (from iteration 13 in Fig. V.13) obtained with the detailed electrical method.

Figure V. 15 :

 15 Figure V.15: Lines selected in more than 75% of the layouts.

  V.16) operating three hours per day close to NG 29 definitely necessitates the reinforcement of the microgrid layout near the communal load for a total cost of 3 628 e and 1 511 meters of electrical cables for 17 additional poles. Additional lines linking NG 29 close to the communal load to other nanogrids enable these other nanogrids to help more NG 29 to support the communal load. Three lines are interconnecting NG 29 to the other nanogrids in Fig. V.16 whereas on the 20 iterations in Fig. V.13 there are 12 times only one line and eight times two lines interconnecting NG 29to other nanogrids. However, the total cost is not significantly greater than without the communal load (i.e. the total cost is only 2.1% greater than the Kruskal layout without communal load). It is mainly the connections around NG 29 which change with very little impact on the total cost.

Figure V. 16 :

 16 Figure V.16: Impact of the 1.8 kWh/day communal load placed near NG 29 on the microgrid layout.

Figure A. 2 :

 2 Figure A.2: Equivalent circuits depending on Q3 and Q4 states.

Figure A. 3 :

 3 Figure A.3: Inductor and capacitor voltage and current waveforms over a switching period.

Figure A. 4 :

 4 Figure A.4: Interleaved two arm buck-boost converter.

Figure A. 5 :

 5 Figure A.5: Evolution of the power inductor currents and their sum.

A. 1 . 2 I

 12 Input current and output voltage ripple calculation for interleaved boost converters 183 Then, as described in Fig. A.5, two different cases can be considered depending on the value of α.1. αT ≤ T T (t) = I L 1 (t) + I L 2 (t) = 2V bat -V S L • t + I T min for t ∈ [0; αT ] 2V bat -2V S L • (t -αT ) + I Tmax for t ∈ [αT ; T] (A.13) With I T min = 2 • I L min + V S -V bat L • T 2 and I Tmax = 2 • I Lmax -V S -V bat L • T 2 .Then, with I T (αT ) = I Tmax :∆I T = I Tmax -I T min = 2V bat -V S L • αT (A.14)

15 ) 2 . αT ≥ T 2 I 2 ]T 2 ](A. 16 )

 15222216 T (t) = I L 1 (t) + I L 2 (t) = 2V bat L • t + I T min for t ∈ [0; αT -T 2V bat -V S L • (t -αT + T 2 ) + I Tmax for t ∈ [αT -T 2 ;WithI T min = 2 • I L min + V bat L • T 2 and I Tmax = 2 • I Lmax -V bat L • T 2 .Then, with I T (αT -T2 ) = I Tmax and using equation A.7:

Table I .1: Different kit sizes installed by Nanoé.

 I

	Kit number	1	2	3	4	5
	Solar panel rating (Wp) 100 150 200 300 400
	Battery capacity (Ah)	90	130 180 260 260

  Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 II.2 State of the art . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 II.2.a Microgrid topology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 II.2.b Microgrid control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 II.3 DC microgrids for Lateral Electrification . . . . . . . . . . . . . . 35 High-level long-term simulations . . . . . . . . . . . . . . . . . . . . . . 44 II.4.a Simulink model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 II.4.b Simulation results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

	Chapter II
	Low-voltage DC Microgrids with Decentralized
	Production and Storage
	Contents
	II.1 II.3.a Rationales for nanogrid interconnection . . . . . . . . . . . . . . . . . . .	35
	II.3.b Decentralized DC microgrids . . . . . . . . . . . . . . . . . . . . . . . . .	38
	II.3.c Decentralized and communication-free control algorithm . . . . . . . . . .	39
	II.4

Table II .

 II 2: Comparison of four different control structures.

	Control structure	Centralized Decentralized Distributed Hierarchical
	Need for communication	Yes	No	Yes	Yes
	Single point of failure	Yes	No	No	Yes
	Plug & play	No	Yes	Yes	No
	Cost	High	Low	Medium	High
	Ease of implementation	Medium	Medium	Medium	High
	Ease of expandability	Low	High	Medium	Low
	Inclusion of enhanced features High	Low	Medium	High
	II.2.b-ii Focus on decentralized control methods
	Decentralized control structures are only based on local information (e.g. the State-of-
	Charge (SoC) of the local storage resource and the voltage of the DC bus of the microgrid)
	and usually rely on droop control

Table II . 4 :

 II4 Parameters of the developed test bench. At t = 220 s, NG 2 reaches 80% of SoC, and thus switches to Pure Injection mode and supports NG 1 and NG 3, now in Voltage-controlled Absorption mode as the DC bus voltage is above 60 V. 5. At t = 450 s, the SoCs of the three NGs are above 80% and therefore the DC bus voltage is maintained at 66 V by the NGs at the boundary between Pure Injection mode and Voltage-regulated Absorption modes. The DC bus voltage level then reflects a high level of SoC for all the NGs in the microgrid.

	Parameters	Value
	Number of converters	3
	Power rating of the converters	500 W
	DC bus capacitance at each converter	3 mF
	Permissible input voltage	10-29 V
	Permissible output voltage	45-80 V
	Linear resistance of the electrical cable	1.456 Ω/km
	Linear inductance of the electrical cable	337 µH/km
	Emulated cable length between converters 20 to 80 m
	PI integration step	200 µs

exchanged between the three converters are shown in Fig. II.21. A positive current means that the converter injects on the microgrid and vice versa. The SoCs evolve according to user-defined patterns implemented in the LabVIEW GUI to replicate a potential real SoC evolution within a short time frame and to test different operating points. The three emulated batteries and converters are named, respectively, NG 1, NG 2 and NG 3. The results of Fig. II.21 illustrate the following steps: 1. The three NGs start with a SoC below 60%, hence they are all in Voltage-regulated Injection (mode 5 as detailed in Section II.3). 2. At t = 60 s, NG 2 reaches 60% of SoC whereas NG 1 and NG 3 are still in the weak zone. Therefore, NG 2 switches to Voltage-controlled Injection mode and starts to inject current (with respect to its SoC) on the microgrid to support NG 1 and NG 3, now in Pure Absorption mode. 3. Once NG 1 and NG 3 reach 60% of SoC at t = 185 s, the DC bus voltage stabilizes at 60 V, showing that the global level of energy of the microgrid is medium. The three NGs are then at the boundary between Voltage-controlled Absorption and Voltagecontrolled Injection modes. 4.

Table III .

 III 1: Interconnection module specifications.

	Category	Symbol Details
	Modularity of usage	-	Nanogrid to DC bus Communal load to DC bus
			12 V (10.5 to 14.5 V)
	Input voltage (min/max)	V bat	24 V (21 to 29 V)
			48 V (45 to 51 V)
	Output voltage	V bus /V S 60 V, 72 V, 84 V, 96 V
	Current rating (on the low voltage side) I conv	30 A
	Maximal temperature elevation	∆T max	50	°C
	Maximal output voltage ripple	∆V S	0.5 V
	Maximal input current ripple	∆I bat	1 A
	Switching frequency	F	50 kHz
	Power modularity	N P	2 to 4 levels
	Number of boost arms	q	2 to 6
	Number of buck arms	N B	1 to 6

Table III .

 III 2: Different possible mosfet choices.

	V S	V DS Cost (e) q
	60	100	1.5 1	3 4, 6
	72	120	1.5 1	3 4, 6
	84, 96 150	2.2	3, 4, 6

Table III .

 III 3: Different possible heatsink choices.

	R th (K/W)	Cost (e) Method
	≥ 37	0	PCB as heatsink
	37 > R th ≥ 35 0.23	External heatsink
	35 > R th ≥ 26 0.34	External heatsink
	26 > R th ≥ 19 0.83	External heatsink
	19 > R th	0.96	External heatsink

Table III .

 III 5: Cost and advantages depending on the number of buck arms.

	Number of buck arms 1	2	4
	Current rating (A)	30	15	7.5
	Cost (e)	24.4 22.2 33.4
	Need of a heatsink	Yes No	No
	Modularity	No	Yes	Yes
	Availability of mosfets Low High High

Table III .

 III 6: Harmonic content and oscillations of the DC bus voltage before and after the grid filter.

	Input power Position	50 kHz	100 kHz
	P bat = 93 W	Before grid filter -55 dBV 2 mV After grid filter -82 dBV 0.08 mV -82 dBV 0.08 mV -30 dBV 31.6 mV
	P

bat = 139 W Before grid filter -53 dBV 2.2 mV -28 dBV 39.8 mV After grid filter -81 dBV 0.09 mV -79 dBV 0.11 mV P bat = 182 W Before grid filter -48 dBV 4 mV -20 dBV 100 mV After grid filter -71 dBV 0.28 mV -58 dBV 1.3 mV

Table IV . 1 :

 IV1 Comparison of the Simulink model and the microgrid installed in Ambohimena.

	F: Field results	Case 1		Case 2		Case 3
	S: Simulink results	Fig. IV.9		Fig. IV.9		Fig. IV.10
	C: Comparison	17/12/2021 4:40 am 22/12/2021 6:00 am 29/01/2022 3:00 am
		F	S	C	F	S	C	F	S	C
	NG 1 current (A)	3.9	3.9	0%	1.15 1.15 0%	-1.3	-1.3	0%
	NG 29 current (A)	2.2	2.05 +6.8%	2.4	2.35 +2.1%	3.8	3.7	+2.6%
	NG 54 current (A)	1.75 1.9	-8.6%	2.95 3.15 -6.8%	5.25 5.15 +1.9%
	NG 168 current (A) 1.7	1.4	+17.6% 2.2	1.8	+18.2% -1.65 -1.85 +12.1%
	NG 917 current (A) -7.7 -8	+3.9%	-7.1 -7.3 +2.8%	-4	-4.3	+7.5%

Table V .

 V 1: Different optimization options for the nanogrid kits.

	Kit number	0 1	2	3	4	5
	Solar panel size (Wp) 0 100 150 200 300 400
	Battery capacity (Ah) 0 90	130 180 260 260
	Total cost (e)	0 232 303 422 563 664

Table V . 2 :

 V2 Impact of the selected solar irradiance data on the microgrid operation.

	Solar irradiance week	Basecase Q 1	W 10
	Averaged irradiance (Wh/m²/day) 6 519	5 549 4 756
	Losses (kWh)	2.25	2.23	1.77
	T 70 (%)	0.9	30.4	22
	T 50 (%)	0	1.5	10.6
	T 30 (%)	0	0	3.7
	V moy Bus (pu)	1.06	0.977 0.996

Table V .

 V 3: Impact of communal loads on the microgrid resource sizing and its operation with the detailed electrical method.

	Number of communal load 0	1	2	3
	Total cost (e)	6 118 7 240 8 059 8 852
	Cost reduction (%)	37.4	26	17.6	9.5
	Losses (kWh)	2.25	7.8	11.1	14.4
	T 85 (%)	29.7	34.3	28.2	27.4
	T 80 (%)	20.2	20.7	14.8	15.2
	T 75 (%)	6	5.6	1.4	0.7
	V moy Bus (pu)	1.06	1.063 1.071 1.071

Table V .

 V 4: Optimization results of the aggregated energy method.

		Before Exhaustive search	Exhaustive search and a posteriori repartition
	Total cost (e)	9 780	6 355	6 355
	Total solar panel size (Wp)	4 900	3 350	3 350
	Total battery size (Ah)	4 210	2 910	2 910
	Total microgrid current (kA) 13.4	336.5	202.1
	Losses (kWh)	0.35	43.4	13.8
	V moy Bus (pu)	1.099	1.074	1.083
	T 75 (%)	0	1	0.5

Table V .

 V 5: Impact of communal loads on the microgrid resource sizing and its operation with the aggregated energy method.

	Number of communal loads 0	1	2	3
	Total cost (e)	6 355 6 698 7 261 7 867
	Cost reduction (%)	35	31.5	25.8	19.6
	Losses (kWh)	13.8	43.2	112.8 138.7
	T 85 (%)	19	24.8	29.5	26.5
	T 80 (%)	9.1	16.3	20.7	18
	T 75 (%)	0.5	2.9	5.9	4.9
	V moy Bus (pu)	1.083 1.067 1.053 1.056
	Finally, Fig. V.

Table V . 6 :

 V6 Comparison of the detailed electrical and the aggregated energy methods.

	Method	Detailed electrical Aggregated energy
	Precision of the modeling	High	Low
	Computational burden	High	Low
	Study window	Short	Long
	Inclusion of battery degradation and load evolution over a multi-yer period	Impossible	Possible
	Influence of the time period under study High	Medium
	Replicability to a larger case study	Low	High
	Ease of tuning	High	Medium
	Evaluation of communal load impact	Possible	Complicated
	Losses	Medium	Low

Table V . 7 :

 V7 Comparison between the performances of the field and the Kruskal layouts.

		Field layout Kruskal layout
	Distance (meters)	2 002	1 462
	Additional electrical poles 25	17
	Cost (e)	5 003	3 553
	Losses (kWh)	13.8	14.9
	T 80 (%)	9.1	9.2
	T 85 (%)	19	18.9
	V moy Bus (pu)	1.083	1.083

Table V .

 V 8: Comparison of the graph theory and the detailed electrical methods.

	Method	Graph theory Detailed electrical
	Precision of the microgrid modeling	None	High
	Computational burden	Low	High
	Replicability to a larger case study	High	Low
	Evaluation of communal load impact	Impossible	Possible
	Inclusion of geographical constraints	Possible	Complicated
	Inclusion of electrical pole optimal locations Possible	Impossible
	Ease of tuning	High	Medium

The Lateral Electrification model, proposed by Nanoé, is described in detail and is illustrated through an example of application in Madagascar. This Lateral Electrification model leads to the settings of the objectives of this thesis, whose particularity is to be highly field-oriented.

Acknowledgments

Abbreviations

enables relevant power flows on the microgrid while maintaining the DC bus voltage within predefined limits, a feature of utmost importance for microgrid operation.

After the design and experimental validation of the DC microgrids with decentralized production and storage, the logical next step is to develop a field-ready interconnection module, whose functionalities are adapted to such DC microgrids. This second step often requires long engineering time and it is therefore crucial to perform it after software and experimental validation of the proposed microgrid concept to reduce uncertainties. These research and development issues are addressed in the next Chapter.

International Stakeholder Forum

Lucas Richard, participant in the LEAP-RE Stakeholder Forum, 3-7 October 2022, Pretoria, South Africa [START_REF]Long-Term Joint European Union & African Union Research and Innovation Partnership on Renewable Energy[END_REF].

Hence, integrating between 0 and αT and considering V bat as a constant voltage:

Similarly, for the output capacitor, and considering I S as a constant current:

Hence, integrating between αT and T and considering V bat and V S as constant voltages:

Then, combining equations A.2 and A.6, one can obtain:

Therefore, neglecting losses within the converter:

Finally, considering that the input battery current is in average equal to the power inductor current (as the input capacitor current is equal to 0 in steady state), the input current ripple and output voltage ripple can be expressed as follows:

A.1.b Two arm configuration

The same calculation can be made for an interleaved boost DC-DC converter with two arms as shown in Fig. A.4. Similarly to the one arm case, mosfets Q1 and Q5 are always turned on and Q2 and Q6 always turned off, to study only the switching boost arms. In addition, the switching control signals for (Q3, Q4) and (Q7, Q8) are phase-shifted by half a period, i.e. T/2.

The currents within the two power inductors L 1 and L 2 as well as their sum are shown in The following equations can then be obtained for I L 1 and I L 2 :

• (t -αT ) + I Lmax for t ∈ [αT ; T] (A.11) V bat -V S L

• (t -αT -T 2 ) + I Lmax for t ∈ [αT +T/2; 3T/2] (A.12)