Jérémy Albouys-Perrois

Nicolas Sabouret

Yvon Haradji

Mathieu Schumann

Benoit Charrier

Quentin Reynaud

François Sempé

Christian Inard

Multi-agent simulation of collective self-consumption: Impacts of storage systems and large-scale energy exchanges

Keywords: Multi-agent simulation, human activity, collective self-consumption, storage systems

de niveau recherche, publiés ou non, émanant des établissements d'enseignement et de recherche français ou étrangers, des laboratoires publics ou privés.

Introduction

The residential sector is the largest consumer of electricity in the world (23 000 TWh in 20171 ). This consumption is mostly based on fossil resources, which are characterized by their limited availability and their negative consequences on the environment and their role in climate change. To reduce the carbon footprint, the development of renewable energies (RE) is widely supported in this sector. Generating one's own energy using a local source (e.g., photovoltaic panels, windmills) and consuming all or a part of this energy is called individual self-consumption (ISC) [START_REF] Luthander | Photovoltaic self-consumption in buildings: A review[END_REF][START_REF] Matallanas | Analysis of the Self-Consumption Possibilities in Small Grid-Connected Photovoltaic Systems in Spain[END_REF]. This way of producing and consuming energy is being developed around the globe, especially the use of photovoltaic panels in the residential sector2 . However, only 25% to 40% of this energy is consumed by the producers and the surplus is generally sold to an electricity supplier [START_REF] Luthander | Photovoltaic self-consumption in buildings: A review[END_REF]. This impacts the electricity transport and distribution operators, who have to perform load balancing, which in turn leads to additional costs and is less and less sustainable at a large scale [START_REF] Tarroja | Solar power variability and spatial diversification: Implications from an electric grid load balancing perspective: Solar power variability: characterization and implications[END_REF] and is therefore an obstacle to the development of ISC.

Several solutions exist today to accelerate the development of self-consumed energy. [START_REF] Luthander | Photovoltaic self-consumption in buildings: A review[END_REF] proposed the use of storage systems in order to stagger the use of the electricity produced, or to apply demand-side management (DSM) to stagger the use of some appliances during the periods of energy production. The use of individual storage systems, like batteries, to store the excess electricity and use it when the local energy production is low is well developed alongside ISC. In addition to these individual strategies, both [START_REF] Tushar | Transforming energy networks via peer-to-peer energy trading: The potential of game-theoretic approaches[END_REF] and [START_REF] Yaagoubi | Energy trading in the smart grid: A distributed game-theoretic approach[END_REF] suggested sharing or exchanging the locally generated energy between households. This is called collective self-consumption (CSC), and enables households to absorb the excess energy produced by other households. CSC consists in regrouping households so that the excess production is exchanged between the households of a neighborhood. Even if, from a physical point of view, the energy distribution is continuous and accomplished by the electricity distribution network, the energy exchange operations and the resulting financial flows in CSC are performed on a contractual basis, at regular time steps. CSC operations can be set up in various ways by varying the available means of production or storage, the contractual organization of energy exchange and the characteristics of the 3 households (such as the type and composition of families, the characteristics of the built environment, the electrical appliances available, etc.). Until now, however, only a limited variety of CSC configurations have been analyzed in real settings, hence the need for a simulation to study the diversity of possible cases.

In order to develop new CSC operations, CSC stakeholders such as building owners, property developers, urban communities, energy providers and network operators need to be informed about the various ways RE can be consumed and exchanged between households. Our approach, based on the SMACH project (Simulation of Activity and Consumption in Households) [START_REF] Reynaud | Using Time-Use Surveys in Multi Agent Based Simulations of Human Activity[END_REF], consists in using multi-agent simulation (MAS) to study the energy consumption in households and the way energy can be exchanged in a CSC operation. The originality of this work lies in the fact that it considers human activities and their interactions as the principal spur for energy needs, and the driver of energy consumption and energy exchange. The energy needs and excess consumption of each household are strongly dependent on the characteristics of their inhabitants, such as household composition, and daily activities. This makes the SMACH approach a suitable tool to study CSC while taking into consideration the diversity of residential energy consumption.

In the next section, we will present related work on the simulation of human activity and energy exchange. In the third section, we present the SMACH platform that we used to simulate the human activity and the electrical consumption of the households. In the fourth section, we will describe a multi-agent multi-level model for the simulation of CSC that addresses the limitations identified in the literature. Various cases studies and their results are described in Section 5 to illustrate the genericity and the possibilities offered by our model.

The first focuses on the different impacts of individual and collective energy storage within a CSC association.

The second case study examines how energy is exchanged in a new, sustainable neighborhood with a collective solar farm. The last case study illustrates the capacity of our model to simulate energy exchange not only between households but also between different groups of households. Finally, future work will be discussed in Section 6.

Background

Simulation of human activity

Planning and sizing CSC operations in the residential sector requires a precise knowledge of electricity consumption in each household. However a realistic simulation of electricity consumption needs to take into account the activity of its inhabitants [START_REF] Amouroux | SMACH: Agent-Based Simulation Investigation on Human Activities and Household Electrical Consumption[END_REF]Happle et al., 2018). An insufficient level of detail in the modeling of human activity can lead to serious discrepancies between simulated and measured electricity consumption [START_REF] Clevenger | The impact of the occupant on building energy simulations[END_REF]de Menezes et al., 2012;[START_REF] Norford | Two-to-one discrepancy between measured and predicted performance of a 'low-energy'office building: Insights from a reconciliation based on the DOE-2 model[END_REF][START_REF] Soebarto | Multi-criteria assessment of building performance: Theory and implementation[END_REF].

Human activity is complex, with four principal features that must be taken into consideration in order to simulate it precisely and derive a precise evaluation of energy consumption in households. First, human activity is characterized by a strong variability (Kang & Scott, 2010) from one individual to another (interpersonal variability) but also for a same individual (intrapersonal variability) (Bakaloglou & Charlier, 2019;Feldman & Pentland, 2003). Human activity is characterized by repetitive phenomena, called routines, through which individuals organize their activity at a low cognitive cost [START_REF] Salembier | A descriptive model of contextual activities for the design of domestic situations[END_REF]. Finally, human activity is characterized by its collective dimension, characterized by cooperation between individuals who live together (Haradji et al., 2012). This cooperation is achieved through information exchange and communication between individuals.

Several approaches that simulate human activity have been described in the literature, most of them combined with building energy models in order to calculate the energy needs of a building associated with heating, air conditioning, Domestic Hot Water (DHW), artificial lighting and ventilation (Fang et al., 2014;[START_REF] Kim | Impact of Insulation on Building Energy Consumption[END_REF][START_REF] Yuan | Effects of thermal insulation characteristics on energy consumption of buildings with intermittently operated air-conditioning systems under real time varying climate conditions[END_REF]. The deterministic model which simulates human activity through fixed schedules and deterministic rules [START_REF] Abushakra | Overview of existing literature on diversity factors and schedules for energy and cooling load calculations[END_REF]Happle et al., 2017) or the stochastic models use a probabilistic approach to simulate dynamic decision-making (Happle et al., 2018). But these kinds of models do not take into account all the characteristics of the human activity like the variability or the collective dimension or human activity (Gaetani et al., 2016).

The Multi-agent models represent inhabitants of households by autonomous entities, the agents, which interact in a given environment. [START_REF] Reynaud | Using Time-Use Surveys in Multi Agent Based Simulations of Human Activity[END_REF] highlighted the capacity of multi-agent simulation (MAS) to simulate reactive and adaptive individuals who are able to collaborate to perform various tasks. MAS is therefore considered as a more relevant approach that increases the realism of simulated human activity compared to deterministic and stochastic models [START_REF] Amouroux | Simulating human activities to investigate household energy consumption[END_REF][START_REF] Chapman | On the multi-agent stochastic simulation of occupants in buildings[END_REF]Ferreri et al., 2015;Kashif et al., 2013). SMACH platform, described in Section 3, is based on three components namely (1) a population generator based on national census data, (2) a MAS to simulate human activity [START_REF] Amouroux | Simulating human activities to investigate household energy consumption[END_REF], and (3) a co-simulation with a building energy model. SMACH applies a holistic approach that takes into account the four principal aspects of human activity we presented, in a comprehensive manner and simulates human activity and decision-making as the determining factors in energy consumption. However, local production, energy storage, energy exchange and CSC have not yet been implemented in these models.

Simulation of energy exchange

Energy exchange in CSC can take different forms, and two categories of exchange are generally distinguished in CSC modeling: distributed energy exchange and centralized energy exchange.

In distributed energy exchange, trading operations take place directly between producers and consumers without going through a third party, households directly transmit the necessary information to each other to exchange energy. For example [START_REF] Lee | Direct Electricity Trading in Smart Grid: A Coalitional Game Analysis[END_REF] and [START_REF] Yaagoubi | Energy trading in the smart grid: A distributed game-theoretic approach[END_REF] use game theory to represent these kind of energy exchange. On the contrary in centralized energy exchange, some of the decisions concerning energy exchange are taken by a third party. The goal of this third party is to distribute energy between the households according to precise rules. For example, [START_REF] Vytelingum | Trading agents for the smart electricity grid[END_REF] proposed the creation of an energy market based on a continuous double auction in which buyers and sellers simultaneously make offers to buy and sell. The market distributes energy in order to satisfy the offers as much as possible.

In CSC, an important distinction must be made between the physical layer (responsible for the distribution of energy, i.e., the physical energy that actually transits on the electricity network), and the contractual layer (responsible for the contractual and financial organization of energy exchange between households).

Experiments on CSC in the field rely on this distinction, as illustrated by [START_REF] Mengelkamp | Designing microgrid energy markets: A case study: The Brooklyn Microgrid[END_REF], who described these two layers in the implementation of a CSC in Brooklyn. In their experiment, the centralized contractual layer takes the form of an energy market, similar to the one described by [START_REF] Vytelingum | Trading agents for the smart electricity grid[END_REF].

Given this distinction, the model we propose focuses on the simulation of the contractual layer, which can be applied to any organization of the physical layer. We call a collective organization of energy exchange a situation where a central entity (e.g., a marketplace) is responsible for contractual energy exchanges. We call an individualized organization of energy exchange a situation where households exchange energy directly, without the intermediary of a central entity. Current CSC experiments usually use a collective organization of energy exchange [START_REF] Mengelkamp | Designing microgrid energy markets: A case study: The Brooklyn Microgrid[END_REF].

Our contribution, presented in this article, is a multi-agent multi-level model that can be used to study different ways to organize the contractual layer of exchange in a group of CSC households. This model is built upon the SMACH multi-agent platform of human activity and therefore consider human activity to compute the energy consumption of the households which is a key data to perform energy exchanges. Such a consideration is not taken into account in the existing CSC model. Moreover, as we will show, our model is able to simulate and study numerous CSC configurations in terms of population, storage and production equipment, or in the way energy is exchanged between households, which is not the case for models presented in the literature. The model presented in this paper focuses on the collective organization of energy exchange, with the presence of a central entity responsible for managing the contractual layer, as this organization is the one commonly used today in field experiments.

SMACH and single-building consumption simulation

We used the SMACH platform to simulate human activity and the electricity consumption of households that formed a CSC. The SMACH platform combines three components in order to simulate a realistic electricity consumption.

The first component of the SMACH platform is the Population Generator. By using national census and energyrelated data, it creates synthetic populations that are statistically representative of the studied area (e.g., a city, a region, a whole country). Each generated household is characterized by a family profile, the age, gender and socio-professional category of each individual, their electricity tariffs, the type of heating and DHW energy available (electrical or non-electrical), a set of electrical appliances, as well as a building with a given surface and energy performance. Moreover, for each inhabitant of each household, the generator provides a provisional daily and weekly schedule containing a list of tasks that an individual tries to perform. For this purpose, SMACH uses data from the Time Uses Surveys (TUS), carried out in France between 2009 and 2010 [START_REF] Reynaud | Using Time-Use Surveys in Multi Agent Based Simulations of Human Activity[END_REF]. These surveys consist in 27000 notebooks, on which the 18500 participants wrote their current activity every 10 minutes over a complete week and weekend day. From these TUS notebooks, SMACH builds a provisional schedule consistent with the profile of each inhabitant of the household. All these elements form a static description of the daily life of a household. However, the provisional schedule alone is not enough to forecast the activities of each simulated individual: these will be decided by the individuals themselves during the multi-agent simulation.

The second component of SMACH is the MAS of each household. The model transforms the static description of the household into a dynamic simulation of human activity. Each inhabitant is represented by an agent, and the MAS simulates their activity at a 1-minute time step. The result of this simulation is an activity diagram describing, at each moment of the simulation, the activity performed by an inhabitant, and in which location.

The 1-minute time step was chosen by the developers of the platform in order to account for realistic human activity and interactions between individuals. A time-step greater than 1 min could lead to a lack of precision in the simulation of human activity, while an inferior time step does not significantly improve the realism of the activity but leads to longer simulation times. During a SMACH simulation, the agents select a task to perform in their provisional schedule at each time step. The selection is based on a level of dynamic priority. The priority of a task changes depending on associated parameters like duration, preferred time step or rhythm. Other factors like energy price, the availability of an electrical appliance or the actions of the other inhabitants also influence a task's priority level. Each activity performed by an occupant of the household is linked to the use, programming or control of one or more electrical devices, thus resulting in an energy consumption metered at each time step. The load curve of the household is therefore a consequence of the activities performed.

The last component of the SMACH platform is a co-simulation between a multi-zone thermal energy model and the MAS. This co-simulation provides a precise computation of the indoor temperature for each zone of the building, impacted by parameters and variables such as the exterior air temperature, how well the building is insulated, the presence of the occupant in each room and the nominal power of electrical heaters. The buildings are modeled with the BuildSysPro Modelica library 3 developed by EDF (Plessis et al., 2014). The cosimulation between the multi-agent system of human activity and the thermal building model is achieved using the FMI (Functional Mock-up Interface) standard (Plessis et al., 2014). The building energy model was validated using laboratory and field data, and compared to the IEA BESTEST benchmarks (Judkoff & Neymark, 1995).

Figure 1 presents the interaction between the three components of the SMACH platform.

3 https://github.com/EDF-TREE/BuildSysPro accessed 21/01/2020

Figure 1 : Schematic representation of SMACH platform and its components

A specific approach was devised to validate the human-centered approach of SMACH for the simulation of both activity and energy consumption, at both the individual and aggregated level. First, the capacity of the model to faithfully reproduce realistically human activity was verified in a cognitive ergonomics field study using participatory simulations with real households who were able to manipulate a dedicated SMACH humancomputer interface [START_REF] Amouroux | SMACH: Agent-Based Simulation Investigation on Human Activities and Household Electrical Consumption[END_REF]. The SMACH load curves were also compared to the metered load curves of the same households and shown to be within acceptable confidence intervals. Secondly, a macroscopic study was performed with 100 simulated households to verify that the simulations reproduced relevant indicators at the aggregated level when compared to TUS data (e.g., average duration of the activities per day, the number of repetitions for each activity and of a sequence of activities). Finally, aggregated load curves of 1000 simulated households representative of Metropolitan France were compared to the annual and weekly profiles used for the assessment of injection and withdrawal flows on the public distribution network (DSO open data). This work validated the values and dynamics of the simulated load curves, which were representative of the energy consumption in the residential sector (Reynaud et al., 2020, in French).

The SMACH platform is therefore a useful basis for studying CSC as it already incorporates a robust simulation of human activity and the ability to represent statistically representative households. We therefore propose to consider CSC as a multi-level construction, based on inhabitants in households who themselves participate in an energy exchange organization between households. SMACH is used to simulate the first two levels of the CSC (individual human activity and household-level activities). We extended it to 1) incorporate individual selfconsumption (ISC) into the SMACH platform, and 2) model the energy exchange between households, as well as the energy exchange between groups of households.

Model of collective self-consumption

In this section we present a multi-agent four-level model to simulate CSC. In the first level, we simulate the individual activity of the inhabitants using the SMACH platform. The second level is a MAS which simulates the interaction between the inhabitants and the electrical appliances in the household to calculate the load curve of the household. In order to simulate ISC, we adapted this level by attributing a means of local energy generation and storage to households, and including a calculation of the amount of energy that is produced locally, and then charged or discharged at each simulation time step. We will present this ISC model in section 4.1. The third level of our model, which is also a MAS, simulates the contractual energy exchange between households. In this level, a third-party entity carries out the contractual energy exchanges and the computes financial flows by following the rules for a given CSC configuration. It is presented in section 4.2. The fourth level of our model simulates energy exchange between different groups of households already using CSC. This level is also a MAS which works like the third level of our model.

Simulation of individual self-consumption

To simulate ISC, we first adapted the SMACH platform so that each household could produce, charge and discharge energy. The households were equipped with means of local energy production. In the current model, this production was obtained using a model of photovoltaic (PV) panels. The PV panels were modeled with the BuildSysPro Modelica library. Like the building, the PV panels were co-simulated with the MAS of human activity using the FMI standard. The model simulates crystalline silicon type PV panels and computes the PV panel temperature, electrical power generated and the cumulative PV production based on the work of [START_REF] Martin | Calculation of the PV modules angular losses under field conditions by means of an analytical model[END_REF] and Luque & Hegedus (2003). The PV panels are characterized by their surface, their tilt and their orientation. The model calculates the power produced by the PV panels at each simulation time step using the meteorological data associated with the location studied: outdoor temperature, wind direction and speed as well as solar radiation.

10

The energy storage systems were simulated by a battery model with a linear charge and discharge curve. Such models have already been used to study the impact of storage systems with ISC [START_REF] Munkhammar | Quantifying self-consumption of on-site photovoltaic power generation in households with electric vehicle home charging[END_REF][START_REF] Weniger | Sizing of Residential PV Battery Systems[END_REF]. The batteries are characterized by their maximum capacity and the amount of energy they can charge or discharge at each simulation time step. Charging or discharging energy impacts the battery's State of Charge (SoC). At each time step, the SoC, noted ( ), is computed according to the quantity of energy that is charged or discharged.

To manage the produced, consumed, charged and discharged energy, we developed a new entity in the household called the Self-Consumption Manager (SCM). The purpose of this manager is to compute the result of all energy-related operations within a household at each simulation time step. Thus, using the household's consumption, production and the SoC, the SCM calculates the household's energy needs and any excess, and the amount of energy that is charged or discharged from the battery. The SCM can carry out various ISC strategies on the energy produced by the household or its individual battery. For example, a household can decide to use all of its energy production for itself and only exchange the excess energy it can't consume or store. But it can also decide to exchange all its energy production, regardless of its own consumption. An

Simulation of collective self-consumption

We named the third level of the model an association of households, where the CSC operations are carried out.

An association can also produce, charge or discharge energy using the collective means of production and the collective means of storage. An association is therefore composed of households, one or several collective means of production, one or several means of storage and a third-party entity which will perform the contractual energy exchanges between the households.

We denote for "Households", the set of households in an association. For each simulation time step , we can evaluate (ℎ, ) and (ℎ, ), which are the needs and the energy surplus of a household ℎ calculated by its SCM.

The collective means of energy production and storage use the same model as their individual counterparts presented in the previous section. For an association and a simulation time step , ! " ( ) is the amount of energy produced by all the collective PV panels, ! # " ( ) the amount of energy charged and ! $ " ( ) the amount of energy discharged from the collective battery.

In an association, the Local Exchange Place (LEP) is the third-party entity responsible for the energy exchanges between households. To perform these energy exchanges, the LEP inputs are:

• The quantity of energy produced by the collective means of production;

• The surplus energy produced but not consumed by every household;

• The energy needs for every household;

• The amount of energy discharged from the collective means of storage.

With these values, the LEP first exchanges the energy produced by the collective means of production and the energy surplus of the households, according to the exchange policies defined below. Then, the LEP distributes the energy discharged from the collective means of production between the households. As CSC is modeled as • A proportional exchange policy in which the LEP allocates a quantity of energy that is proportional to the energy needs of each household;

• A fixed rate exchange policy where households receive a fixed share of the total available energy;

• A competitive exchange policy where households make offers to buy and sell (quantity of energy and price). In order to manage these offers, we implemented a first price sealed-bid auction model [START_REF] Mcafee | Auctions and Bidding[END_REF] in which the LEP plays the role of an auctioneer.

In order to divide and share the energy discharged from the collective batteries, the LEP follows a set of rules called a collective storage policy. In a similar way, any type of collective storage policy can be implemented.

We defined a single collective storage policy, namely a proportional collective storage policy. With this policy, the LEP divides the energy discharged from the collective batteries in proportion to the energy needs of each household.

With these sets of rules, the LEP computes the following value for each household ℎ in the association, at each counting time step :

• (ℎ, ): the amount of energy produced locally and received by a household. This value is computed using the exchange policy of the LEP;

• $& '
(ℎ, ): the amount of energy received by a household from the collective means of storage. This value is computed using the collective storage policy of the LEP;

• ( (ℎ, ): the amount of energy consumed by a household that comes from a source that is external to the association. In the model this energy is provided by the electricity providers of the households.

Moreover, the association computes its own energy surplus and needs for each simulation time step.

Energy exchange between multiple associations

At the level of a CSC association, the excess energy that cannot be exchanged or stored is usually sold to a relevant third party such as an electricity provider. This is the case in our three-level model. However, associations of households will be limited in size, and a city or region might be composed of several associations. Energy exchange between associations could therefore be a way to maximize the consumption of locally produced energy without selling it back to the grid. We decided to add a fourth level to our model in order to simulate inter-association energy exchange. Similar to energy exchange within an association, energy exchange between associations is managed by a third-party entity that we call the Central Exchange Place

(CEP).

The goal of the CEP is to evaluate the needs and excess energy of several associations at each counting time step , and to exchange the excess energy between associations. To perform these exchange operations, the CEP follows its own specific exchange policy. When an association receives energy through an inter-association exchange, the energy is exchanged between the households of the association by its LEP according to the exchange policy defined by the association. Figure 5 illustrates a configuration in which three associations exchange energy. For each association ) , the CEP computes ( *( " () , ), the amount of energy received by an association at the end of a counting time step .

Finally, the addition of levels to this CSC model can be repeated indefinitely and used to create large structures in which energy is exchanged at several levels, i.e. from the home to the city.

Results

In this section, we will present three different case studies to illustrate the capacity of the model to simulate and study various CSC configurations. Currently, the study and understanding of the different mechanisms of CSC are major challenges for the main players in the energy world. Indeed, the transition to CSC will raise new questions about the ways in which energy is consumed, exchanged or the impact of storage systems on the consumption or activity of inhabitants... The main objective of the model developed here is to simulate CSC configurations to address these major questions. The CSC model in this paper therefore allows experts in the field to characterize and simulate numerous configurations with the aim of proposing and validating hypotheses or answering scientific, technical or economic questions related to CSC. To highlight the possibilities offered by this model, we present in the following the results of 3 different case studies based on the same reference situation in terms of population but with changes in the means on energy production or storage inside the association. In the first study, we assessed the impact of individual and collective storage systems on the electricity consumption of an association of CSC households. In the second study, we analyzed the impact of CSC on the electricity consumption of a recent, sustainable neighborhood with high-performance buildings. In the third case study, we demonstrate the capacity of our model to simulate energy exchange between several associations.

Simulation parameters

The parameters of the model were sorted into three categories.

The Population category comprises the parameters that describe the household, the inhabitants, the building, and the electrical appliances. This category also defines the ISC equipment in each household, i.e. the presence of a PV panel or an individual battery and their parameters.

The Collective Equipment category includes the parameters of the collective means of production and the collective means of storage within an association.

The Energy Exchange category contains the energy exchange policy that the LEP will follow to exchange energy within an association. It defines the policy for the exchange of locally produced energy as well as how to manage the collective means of storage.

Reference situation and performance indicators

The results presented in the first two case studies are based on the same reference situation, i.e., an association composed of 100 households. The population and buildings of the association were generated with the SMACH platform with the following characteristics:

• Building type: apartment;

• Building insulation: statistical distribution based on French thermal regulations, chosen from 1982 to 2012;

• Electrical heating: statistical distribution between electrical and non-electrical heating in France;

• DHW production: distribution between electrical and non-electrical DHW production based on heating type and electricity tariffs;

• Population: statistically representative of French households based on census data;

• Location: city of La Rochelle, France.

This reference situation represents a typical French population living in an apartment. We located the reference situation in the meteorological area of La Rochelle, situated in the South-West of France, a region in which many PV panels have been installed. 4 The simulation was performed over a year. This allowed us to observe the impact of seasonal weather on human activity and decision-making, electricity consumption, as well as local energy production. The three energy exchange policies defined in Section 4.2 were simulated.

To analyze the results, we used two indicators in their instantaneous and integrated forms:

1. Self-sufficiency rate gives the proportion of energy consumed by a household that derives from local production, energy exchange, and individual and collective storage:

+) ,' ,,$ -= /01 2 /01 2 (1)
where /01 2 is the quantity of energy consumed that was produced by PV panels, or derived from an individual or collective means of storage, and energy exchange; and /01 2 the total energy consumed by a household;

2. Self-consumption rate gives the proportion of energy produced locally and directly consumed by the association or by the household:

+) , $ = /01 2 1+ / 2 (2)
where 1+ / 2 is the quantity of energy produced by one association or household.

These two indicators have already been used in order to analyze ISC at the scale of households [START_REF] Castillo-Cagigal | Self-consumption enhancement with storage system and demand-side management: GeDELOS-PV system[END_REF][START_REF] Luthander | Photovoltaic self-consumption in buildings: A review[END_REF] but also to study CSC at the scale of the neighborhood [START_REF] Vinyals | A multi-agent system for energy trading between prosumers[END_REF].

Other metrics exists to analyze self-consumption [START_REF] Salom | Understanding net zero energy buildings: Evaluation of load matching and grid interaction indicators[END_REF], but self-production and self-sufficiency rates are widely used to analyze ISC and CSC, that is why only these two indicators are considered in this paper.

Impact of individual and collective storage systems on electricity consumption

With this first case study, we compared the impact of individual and collective storage on electricity consumption within an association. Based on the reference situation, we defined and simulated three different CSC configurations. In all of them, 50 households within the association were equipped with individual 3.5kilowatt peak (kWp) PV panels. We chose to equip only 50 households as, according to [START_REF] Luthander | Photovoltaic self-consumption in buildings: A review[END_REF], a household, equipped with PV panels, consumes between 30% and 40% of its energy production, suggesting that an energy surplus would be available for exchange between households. In the second case study, households owning PV panels were also equipped with individual batteries. Each battery could store 14 kWh of energy. The maximal electrical charge or discharge power was 5 kW. We used the following battery management rule: if the energy produced by the PV panels of the household was lower than its energy consumption, then the battery discharged energy to meet the needs of the household. Otherwise, the battery was charged from the excess energy produced by the PV panels. In the third case study, the association was equipped with a collective battery. The collective storage capacity was 700 kWh i.e., equal to the entire storage capacity of individual storage. The maximal charge or discharge power of the collective battery was 250 kW.

Self-consumption Self-sufficiency ISC 21% 10%

CSC without battery 48% 23%

CSC with individual batteries 70% 34%

CSC with collective battery 90% 43%

Table 1 : Annual values of self-sufficiency and self-consumption of the association for ISC and CSC without energy storage, with individual batteries and with a collective battery with a proportional exchange policy Table 1 gives the values of self-production and self-consumption for the association without energy exchange (ISC) and for the three case studies (CSC without and with storage systems). Using individual or collective storage systems resulted in an improvement in both self-consumption and self-production in the association, i.e., more of the energy produced locally was consumed directly by the association. The self-consumption and self-sufficiency values were the same for the 3 exchange policies we modeled because all three allocated all the energy that could be consumed within the association. It is worth noting that, for an equivalent capacity and charge/discharge power, collective storage produced higher self-consumption and self-production. This is because all the households in the association could benefit from collective energy storage, in contrast to individual storage, where only 50 households had access to collective storage. Over a year, only 21 MWh of energy were not consumed or stored in the association with a collective battery, which is an improvement compared to the CSC without a battery (107 MWh) and the CSC with individual batteries (61 MWh).

Figure 2 shows the origin of the energy consumed by the households in their association. The use of individual storage negatively impacted energy exchange by lowering the quantity of energy exchanged between the households. Indeed, without individual batteries, 13% of the energy consumed came from exchanges compared with only 7% after the installation of individual batteries. On the other hand, a collective battery did not impact the quantity of energy exchanged and more energy was consumed from the collective battery than from the individual batteries. To study the impact of the individual and collective batteries on energy consumption at the household level, we first analyzed the self-sufficiency of the 50 households that did not possess PV panels. Figure 7 presents the distribution of this indicator for these households for each exchange policy. This box-plot representation displays the minimum and maximum self-sufficiency, the upper and lower quartile, the median value, and the mean. Figure 4 on the other hand, presents the self-sufficiency for the household owning PV panels for each exchange policy. For the three exchange policies, it is clear that the use of individual batteries led to lower self-production for households without PV panels than with a collective battery. For example, with a proportional exchange policy, the average self-production went from 16% with individual storage to 50% with collective storage. On the other hand, the self-sufficiency of a household with PV panels was higher with individual storage than with collective storage. For example, with individual batteries, for some households, annual self-sufficiency was close to 100%. However, these are households with neither heating nor electrical DHW production and therefore with a relatively low electricity consumption. Moreover, the use of individual batteries resulted in large differences between the self-sufficiency levels within the association. For instance, for a proportional exchange policy, the mean self-sufficiency of the households owning individual PV panels and owning individual battery was 77% (Figure 8) compared with 16% (Figure 7) for a household without individual PV panels and owning individual batteries. However, there was no such difference between the households of the association.

Figure 9 : Distribution of self-consumption levels for households with PV panels

Figure 9 shows the self-consumption in the association for the households equipped with a PV panel. It is clear that using individual batteries significantly improved the quantity of energy produced which is self-consumed by these households. Mean self-consumption varied from 20% without storage to 60% with individual batteries.

These results are in accordance with those in the literature dealing with the use of individual storage systems for ISC or CSC (Braun et al., 2009;[START_REF] Munkhammar | Quantifying self-consumption of on-site photovoltaic power generation in households with electric vehicle home charging[END_REF]. However, the use of collective batteries in the association did not impact the self-consumption of the household owning PV panels. Indeed, this indicator only takes into account the energy that comes from the individual systems (batteries and PV panels) of the households. The self-consumption values were therefore identical to a configuration without collective storage.

This study shows how individual and collective storage can impact CSC operations and indicators. Individual batteries can greatly increase the self-consumption and self-sufficiency of households that own them to the detriment of households without production and storage equipment, which then receive a lower share of locally produced energy. In contrast, the use of collective batteries makes it possible to distribute excess energy among all the households in the association, and so a greater share of the local energy can be consumed within the association. With collective storage the differences between the self-production of the households in the association were smaller compared to an association with individual batteries.

Impact of CSC and collective energy production on the electricity consumption of a sustainable neighborhood

In this case study, we analyzed how CSC with a collective means of production impacted the electricity consumption of a sustainable neighborhood. This type of neighborhood is characterized by the use of one or more sources of renewable energy, low energy consumption and a low carbon footprint. To simulate this sustainable neighborhood, several parameters from the reference situation were changed:

1. The buildings were energy efficient, in conformity with the French building thermal regulation standards of 2012 (Le [START_REF] Muet | Impact of the new French thermal regulation on office indoor environment: Combine innovative cooling technology and high acoustic demand[END_REF], which improved the properties of a building (e.g., better thermal insulation).

2. Heating systems and DHW tanks that were previously modeled with resistive heating did not consume electricity from the grid, but used another energy source (wood or gas, for example) which is not included in the electricity consumption simulated by our model. Heat-pump based heating and DHW systems have not yet been modeled.

3. The association was equipped with 100 kWc collective PV panels.

Moreover, for this case study we only simulated proportional and fixed-rate exchange organizations. Indeed, although a competitive exchange policy is not incompatible with a collective PV panel, this case study was inspired by a real CSC experiment in France5 which did not look at competitive exchange policies.

First, the simulation results highlighted the positive impact of the neighborhood's performance on the electricity consumption of the association. Indeed, the annual electricity consumption of the entire neighborhood decreased from 438 MWh (from the case studies of section 5.3) to 164 MWh.

Self-consumption Self-sufficiency Proportional exchange policy 43% 46%

Fixed rate exchange policy 43% 45% The values given in Table 2 show that self-sufficiency and self-consumption in the association were almost identical for the two exchange policies we implemented. By comparing the second row of Table 1 (an association with individual PV panels without storage systems) with the results from Table 2, the selfsufficiency varied from 45% to 46% compared to 23% in Table 1. However, it is also clear that self-consumption did not really change from Table 1 to Table 2. This means that the households consumed less energy from the energy provider, but they did not consume more local energy compared to an association with individual PV panels without storage. Indeed, by creating a sustainable neighborhood we only reduced the total electricity consumption of the households without changing their consumer habits, which is why self-consumption at the scale of the association was similar between this case study and the reference association with individual PV panels and without energy storage (section 5.2).

Figure 10 : Distribution of self-sufficiency of sustainable neighborhood households

Looking at the distribution of self-sufficiency between the households shown in Figure 10, the exchange policy did not impact the quantity of energy received by the households of the association. The main reason is that the annual electricity consumption of the households in the association (164 MWh) was close to the quantity of energy produced by the collective PV panels during the same year (120 MWh). Thus, the distribution of selfsufficiency values was similar for the two exchange policies. In this case, during the day the collective PV panels produced enough electricity to power the households of the association most of the time and the energy exchange policy did not fundamentally impact the quantity of energy received by each household.

However, even if the production and the consumption in the association were similar, there was still 52 MWh of energy produced by the collective PV panels which was not consumed by the households of the association and which had to be sold to the electricity provider. Nevertheless, the use of individual or collective batteries could allow the association to consume all or part of this surplus energy.

Inter-association exchange

For this case study, we focused on the impact of inter-association exchange on the electricity consumption of several associations. We simulated 5 CSC associations of 20 households each. Each association was characterized by specific parameters to represent different ways of consuming, producing and storing energy.

For association A 10 households were equipped with 3.5 kWp PV panels. For association B, 10 households were equipped with 3.5 kWp PV panels and an individual battery with a capacity of 14 kWh, and an electrical power of 5 kW. For association C, 10 households were equipped with a 3.5 kWp PV panel. This association was also equipped with a collective battery with a capacity of 140 kWh and an electrical power of 50 kW. For association D, the buildings were high performance and built according to the French thermal regulation standards of 2012; these households did not use resistive heaters or DHW production. The goal of this modification was to reduce the electricity consumption. This association was also equipped with collective 20 kWp PV panels. Association E did not have any energy production or storage equipment. These 5 associations used a proportional exchange policy to exchange energy. This is also the exchange policy used by the CEP for inter-association energy exchange. Figure 11 shows the origin of the energy consumed by the different associations.

Figure 11 : Origin of energy consumed by the five associations

Associations A, B, C and D received only a small share of energy from inter-association exchange. Indeed, these associations already produced energy at the same time and therefore wanted to exchange their excess energy concurrently. However, of these 4 associations, association B received more energy from inter-association exchange than the others. This is due to the presence of individual batteries, which reduced the amount of energy potentially exchangeable between the households of the group.

Association E was the largest consumer of energy from inter-association exchange because it had no means of producing energy. Inter-association exchange therefore allowed it to reduce its consumption of energy from the network. In all, 11% of the energy it consumed came from the production of other associations.

It will be of great interest to set up studies at different scales, from the neighborhood to the city, for example.

With inter-association exchange, it will be possible to study the impact of the social, economic and technological differences between associations on energy exchange.

Conclusion

In this paper, we presented a multi-agent and multi-level model to simulate CSC in the residential sector while taking into account the activity of the inhabitants. Specifically, we modeled the contractual layer of the CSC, responsible for energy exchange in the form of a metering operation. The first two levels of our model simulate human activity and electricity consumption of the households through the SMACH platform, to which we added ISC mechanisms. This allowed us to obtain a realistic energy consumption profile by co-simulating a MAS of human activity and a building thermal model. The third level, the association of households, is also a MAS that was used to simulate energy exchange between households. The fourth level of the model allowed a simulation of energy exchange between associations. One originality of this CSC model for the residential sector is that it relies on a realistic simulation of human activity and household electricity consumption. To our knowledge, the incorporation of human activity in a CSC simulation has not yet been included in the various studies dealing with the simulation of CSC.

The case studies in this paper highlighted the capacity of the model to simulate various CSC configurations and energy exchange policies. The first case study presented in this paper focused on the different impacts of collective and individual storage systems on the electricity consumption of CSC households. The results showed that, at the scale of the association, the use of collective batteries increased the quantity of energy produced locally that is consumed by the households when compared to the use of individual batteries. It also reduced the consumption of energy from the electricity provider. These results also showed the importance of taking into account the objectives of households when setting up a CSC in an association. For an association where the objective is only to increase self-consumption, the use of individual storage systems is, according to our results, a solution to consider. On the other hand, within an association seeking a form of equity in terms of self-sufficiency between households, the use of a collective storage system is a more appropriate solution. The second case study focused on a sustainable neighborhood characterized by low electricity consumption. The results showed that the exchange policy did not impact the self-sufficiency of the households when their electricity consumption was similar to the electricity production within the association. Nevertheless, the excess energy, i.e. not consumed by the association, was still high, even for a sustainable neighborhood. The third case study highlighted the capacity of the model to simulate energy exchange between associations with different characteristics. With such simulations it becomes possible to simulate associations with different social, economic or technical characteristics. Thus, the model can be used to simulate CSC at different scales such as a group of districts, a city or several nearby towns.

These first contributions to CSC simulation leave several questions unanswered for the development of a general framework for studying CSC configurations. The next step is to consider the impact of CSC on the energy policy within households, i.e. their preferences and decision-making related to the use of electrical appliances. In fact, residents could choose to adapt their activities to skew the use of certain electrical devices such as the washing machine to be in line with the availability of renewable energy. We started to work on this question by developing a skewing strategy in SMACH, but we still need to validate these simulated decisionmaking processes with field data in real CSC campaigns. Likewise, we are starting to set up policies for the use of storage systems in SMACH, for example with strategies for charging or discharging energy depending on the price of electricity in the group. The impact of energy exchange between households and associations on the energy policy of the association itself must also be considered. An association is a legal entity that will take decisions, for example on the way the collective means of production or storage are used within the association. The cost of storage systems, whether individual or collective, will also be a factor to be considered in this perspective and may therefore impact decision-making at the household or group level. Indeed, for the current version of the model, we consider the energy coming from individual battery free of charge for the household owning them. However, it's important to consider the relatively high-cost of battery storage system (Hafiz et al., 2018) in terms of installation but also the operation of such system. In case of individual storage systems, storage cost must be considered by the inhabitants or by an algorithm which can automatically manage the charge or discharge operations of the battery (Arora & Chanana, 2014). For collective batteries, the storage costs could be charged to the residents in accordance with the energy they consume from shared storage systems through various pricing strategies. The model of the present study should allow to implement and test various alternative costs for individual and collective storage systems. Furthermore, the implementation and operation of the local exchange place has a cost that must be taken over by the households. Two kinds of cost for such systems were identified. First, the operating costs of the local exchange place itself and the gain wanted by the operators of the local exchange place. Some authors already consider such cost while calculating a price paid by each household for the energy exchanged [START_REF] Wu | Optimal management of local energy trading in future smart microgrid via pricing[END_REF]. The second cost is linked to the physical energy network not currently taken into account by the model.

Nevertheless, some authors consider an energy transmission cost for each exchange operation realized in a group of household practicing CSC [START_REF] Wu | Optimal management of local energy trading in future smart microgrid via pricing[END_REF][START_REF] Yaagoubi | Energy trading in the smart grid: A distributed game-theoretic approach[END_REF]). An extensive simulation of the costs paid by each household in an association considering storage costs is an important step that we must consider in the future versions of the model.

Other longer-term perspectives can be considered, namely the incorporation of CSC in an environment with dynamic price offers, or the use of electric vehicles as a source of energy consumption but also of energy storage. The modeling of an association in which households and buildings of the tertiary sector (e.g. a supermarket, offices, hotels) using CSC could also be a way to enrich our model. Indeed, the geographical proximity of buildings in the residential and tertiary sectors, particularly in cities, makes them good candidates for energy exchange. The aim is to build a comprehensive approach articulating these different interactions at different scales, and to validate these simulations by evaluating not only energy consumption but also the behavior associated with energy exchange. As with SMACH, this work will be part of a research program on the multi-agent simulation of energy use in households, which requires a strong multidisciplinary approach combining computer science, cognitive ergonomics, statistics, economics and building energy modeling.

IEEE

  intermediate strategy could be to set the ratio of energy available for external exchanged based on a given ISC rate. Formally, for a simulation time step , (ℎ, ) is the amount of energy consumed by a household ℎ and (ℎ, ) the amount of energy produced by the PV panels. With this information, and knowing the battery SoC, the SCM computes (ℎ, ), the quantity of energy charged or discharged from the individual battery of the household accord to the battery usage policy. Then, with these values, the SCM computes (ℎ, ) and (ℎ, ), the energy needs and surplus, respectively, for a household ℎ calculated for the simulation time step . These values are used to perform the energy exchange operations in the third level of the model. The precise functioning of the SCM and the various associated equations are detailed by (Albouys-Perrois, 2021) .The Figure 2 shows the different models that compose the complete model of a household practicing ISC with the different input and output data.

Figure 2 :

 2 Figure 2 : Model of a self-consuming energy household

a

  contractual operation, CSC simulation consists in the computation of the energy allocation after the energy has been used by the different households and electrical devices at the physical level. The simulation platform therefore uses two-time steps. Simulation time step triggers the calculation of the quantities of energy consumed, produced, charged or discharged depending on human activity, local energy production and storage. This corresponds to the physical aspects of the simulation performed by the SMACH platform at a 1-minute time step. The Figure 3 present the different energy flow chart of a self-consuming household performed at this time-step but also the information exchange between the thermal building model and the household (the human activity model).

Figure 3 :

 3 Figure 3 : Energy flow chart of the self-consuming household The counting time-step c triggers the computation of the contractual energy allocation according to the aggregated results of the previous accounting period the LEP is responsible to aggregate these values. This second time step is a parameter whose value was set to 15 minutes, a common value in Europe for smart meters.

  are the energy needs and excess production of the association ) for the time step . These values make it possible to establish invoicing at the level of the association, and in some cases to study the energy exchanges in detail, and the impact of CSC policies on the consumption of the households and the association. The Figure4presents the different elements that compose the complete 14 model of an association with the different input and output data. In this figure we also show at which time step, the different values related to the CSC operations are calculated.

Figure 4 :

 4 Figure 4 : Model of the Association to perform CSC

Figure 5 :

 5 Figure 5 : Example of an organization for inter-association energy exchange Formally, a CEP takes in input:

Figure 6 :

 6 Figure 6 : Origin of energy consumed in the association without storage systems, with individual batteries and with a collective battery

Figure 7 :

 7 Figure 7 : Distribution of annual self-sufficiency levels for a household without PV panels (a) in an association with individual batteries (b) in an association with collective batteries

Table 2 :

 2 self-consumption and self-sufficiency values of a sustainable neighborhood equipped with collective PV panels

  ://doi.org/10.1109/IICPE.2014.7115731 Bakaloglou, S., & Charlier, D. (2019). Energy Consumption in the French Residential Sector: How Much do ://doi.org/10.5547/01956574.40.3.sbak Bonnardot, Z., Haradji, Y., Salembier, P., Prieur, E., & Vial, S. (2020). Anticiper des interactions humaines par le design et l'ergonomie: Le partage d'énergies renouvelables entre voisins. Actes Du 55ème Congrès de La SELF, L'activité et Ses Frontières. Penser et Agir Sur Les Transformations de Nos Sociétés.Braun, M., Büdenbender, K.,Magnor, D., & Jossen, A. (2009). Photovoltaic self consumption in Germany using

	6th	India	International	Conference	on	Power	Electronics	(IICPE),	1-6.
	Individual	Preferences	Matter?	The	Energy	Journal,	40(3).
	Li-ion	storage	to	increase	self-consumed	PV		energy.	34.

httpshttps

https://www.iea.org/

https://www.solarpowereurope.org/

https://resources.solarbusinesshub.com/solar-industry-reports/item/global-market-outlook-forphotovoltaics-2014-2018

https://www.energetica-india.net/news/edf-installs-frances-largest-collective-self-consumption-pv-project

Acknowledgements

This work was funded by the European Regional Development Fund (ERDF)

de Menezes, A. C. K., Cripps, A., Bouchlaghem, D., & Buswell, R. (2012)


Tarek Aounallah

Najib Essounbouli
email: najib.essounbouli@univ-reims.fr

Abdelaziz Hamzaoui

Fractional-order Adaptive Fuzzy Backstepping Algorithm for Automated Control of Blood Glucose in Diabetes Mellitus Type 1 Patients

Keywords: Fractional-order calculus, Backstepping, Adaptive Takagi-Sugeno fuzzy logic system, Lyapunov, Diabetes mellitus type 1

This study proposes a fractional-order control for the automatic stabilization of the blood glucose level in Diabetes Mellitus Type-1 patients. The control scheme under study, which is applied to a fractional Extended Bergman's minimal model (EBMM), combines the feedback form of backstepping technique with three fractional Takagi-Sugeno fuzzy systems. This allows getting rid of the requirements of the patient parameters knowledge and aims to attenuate the effect of disturbances to the blood glucose level during meal intake. A mathematical analysis has been done to prove the asymptotic stability using a fractional Lyapunov function. To demonstrate the effectiveness of the fractional proposed approach, a comparative study with other methods is presented.

INTRODUCTION

Diabetes is a serious threat to global health which increasing at a very high rate. This metabolic disease, which is characterized by hyperglycemia resulting from defects in insulin secretion, insulin action or both, can lead to frequent hospital admissions and premature death [START_REF] Vettoretti | Type-1 diabetes patient decision simulator for in silico testing safety and effectiveness of insulin treatments[END_REF], [START_REF] Dimeglio | Type 1 diabetes[END_REF], [START_REF] Association | Diagnosis and classification of diabetes mellitus[END_REF]). According to the current classification there are two major types: type 1 and type 2 diabetes. The distinction between the two types is mainly based, among other symptoms, on degree of loss of β cell function and the degree of insulin resistance [START_REF] Vettoretti | Type-1 diabetes patient decision simulator for in silico testing safety and effectiveness of insulin treatments[END_REF], [START_REF] Dimeglio | Type 1 diabetes[END_REF], [START_REF] Association | Diagnosis and classification of diabetes mellitus[END_REF]). Treatment for the first type is focused on infusing insulin to stabilize the blood-glucose level, while the second type is treated via an appropriate medications. Regarding the insulin, it needs to be taken by injection or another delivery means such as by infusion via an insulin pump for which a controller is designed using the measurements from continuous glucose monitoring (CGM). Thus, several methods including the proportional-integral Derivative (PID) controllers [START_REF] Farman | Stability analysis and control of the glucose insulin glucagon system in humans[END_REF], [START_REF] Patra | An automatic insulin infusion system based on lqg control technique[END_REF]), Linear Quadratic Gaussian (LQG) control algorithm [START_REF] Patra | An automatic insulin infusion system based on lqg control technique[END_REF]) and combined PI -Fuzzy techniques [START_REF] Beneyto | Postprandial fuzzy adaptive strategy for a hybrid proportional derivative controller for the artificial pancreas[END_REF], [START_REF] Soylu | In silico testing of optimized fuzzy p+ d controller for artificial pancreas[END_REF]) are adopted into the control process. In terms of convergence time and steady state errors in steady, these linear methods uses some simplifying assumptions with partial model approximation supposed to reflect a non-linear glucose-insulin dynamics. Reason why nonlinear approach is more appropriate to deal with complex practical scenarios and reach the needed level of performance. Among them the Sliding Mode Control (SMC) [START_REF] Abu-Rmileh | Internal model sliding mode control approach for glucose regulation in type 1 diabetes[END_REF], [START_REF] Menani | Positive sliding mode control for blood glucose regulation[END_REF]) , super twisting SMC [START_REF] Ahmad | Super twisting sliding mode control algorithm for developing artificial pancreas in type 1 diabetes patients[END_REF], [START_REF] Djouima | Higher order sliding mode control for blood glucose regulation of type 1 diabetic patients[END_REF]) , Terminal fuzzy-SMC [START_REF] Jajarm | Blood glucose regulation using fuzzy recursive fast terminal sliding mode control[END_REF]), H∞ Controller [START_REF] Duangpim | Fuzzy control design for blood glucose and free fatty acid regulation in diabetes patients[END_REF]), and the backstepping approach [START_REF] Babar | Integral backstepping based automated control of blood glucose in diabetes mellitus type 1 patients[END_REF], [START_REF] Ahmad | An adaptive backstepping based non-linear controller for artificial pancreas in type 1 diabetes patients[END_REF]). This latest is a recursive method for designing stabilizing control laws in its strict feedback form. In addition, the fractional calculus deals with differentiation and integration operators in an appropriate order not necessarily integer. Its application in the design of the controllers provides a more accurate description of complex dynamic systems and improves the control performances from different aspects [START_REF] Krishnan | Controllability of fractional dynamical systems with prescribed controls[END_REF], [START_REF] Ortigueira | Fractional calculusfor scientists and engineers[END_REF][START_REF] Delavari | Adaptive fractional-order blood glucose regulator based on high-order sliding mode observer[END_REF]). Thus, the fuzzy logic based backstepping techniques are proved to be successful in controlling various processes: such as wind energy conversion systems. In [START_REF] Aounallah | Algorithm on fuzzy adaptive backstepping control of fractional order for doubly-fed induction generators[END_REF]) , the combination of fractional robust algorithm with the universal approximator for wind generators improves the control performance and overcome the constraint of model parameters knowledge. These facts motivated us to extend and adapt such approach to the medical field requirements and specificities. In this work, we propose a fractional adaptive Takagi-Sugeno fuzzy logic backstepping algorithm for automated control of blood glucose in Type 1 Diabetic Patients. The control scheme is designed for an Extended Bergman's minimal model (EBMM) [START_REF] Bergman | Physiologic evaluation of factors controlling glucose tolerance in man: measurement of insulin sensitivity and beta-cell glucose sensitivity from the response to intravenous glucose[END_REF]). Fuzzy systems can overcome the constraint of the model parameters knowledge and the adaptive approach allows to attenuate the effect of both fuzzy logic approximation errors and the external disturbances (Essounbouli et al. (2002a)). Adaptive fuzzy systems allow to overcome the constraint of the model parameters knowledge [START_REF] Aounallah | Algorithm on fuzzy adaptive backstepping control of fractional order for doubly-fed induction generators[END_REF], [START_REF] Mendel | Uncertain Rule-Based Fuzzy Logic Systems[END_REF]). The global stability is obtained by a fractional Lyapunov function ( [START_REF] Chen | Fractional order lyapunov stability theorem and its applica-tions in synchronization of complex dynamical networks[END_REF]). Our main objective is to exploit the performance of the fractional-order theory to obtain good stabilization of blood glucose level in presence of external disturbances (meal intake). Simulation results, via matlab /Simulink environment, demonstrate the efficiency of the fractional proposed method. The paper is organised as follows: Section 2 describes the fractional Extended Bergman's minimal model. Section 3 is dedicated to the conventional backstepping control. Section 4 concerns the proposed controller design. Section 5 shows the simulation results and the comparative study. Finally, the conclusion is given in section 6.

FRACTIONAL EXTENDED BERGMAN'S MINIMAL MODEL (FEBMM)

Fractional method

The mathematical expression of the fractional-order differential integral operator is given as follows:

t0 D m t =                d m dt m (m) > 0 1 (m) = 0 t t0 (dt) -m (m) < 0 (1)
Whith:

• m C :is a fractional order.

• R(m) : is the real part of m.

• t 0 and t : is the fractional operator domain limits.

The mathematical Riemann-liouville definitions of fractional derivatives and integrals are given by the following equations:

a) Fractional-order integral:

RL t0 I m t f (t) = 1 Γ(m) t t0 (t -τ ) m-1 f (τ )dτ (2)
With Γ(.) : is the Euler's gamma function.

Γ(x) = ∞ 0 y X-1 e -y dy , x > 0 (3) b) Fractional-order derivative: RL t0 D m t f (t) = 1 Γ(n -m) d n dt n t t0 (t -τ ) n-m-1 f (τ )dτ (4)
Where n is an the integer number such that : (n -1) < m < n.

FEBMM description

The non-linear extended model for type 1 diabetic patients has been proposed in [START_REF] Bergman | Physiologic evaluation of factors controlling glucose tolerance in man: measurement of insulin sensitivity and beta-cell glucose sensitivity from the response to intravenous glucose[END_REF]). Meal disturbance to the blood glucose level which was considered as fixed value in BMM are defined as a fourth state of the system given as:

     D m x 1 = -p 1 (x 1 -G b ) -x 1 .x 2 + x 4 D m x 2 = -p 2 x 2 + p 3 (x 3 -I b ) D m x 3 = -p 4 (x 3 -I b ) + U (t) D m x 4 = -p 5 x 4
(5)

where:

-x1, x2 , x3 and x4 : are glucose concentration, remote insulin concentration , plasma insulin concentration and Fisher's Meal disturbance respectively.

-G b : is the basal plasma glucose .

-I b : is the basal plasma insulin .

-p 1 : is the glucose effectiveness factor .

-p 2 : is the delay in insulin action .

-p 3 : is the patient parametter .

-p 4 : is the insulin degradation rate .

-p 5 : is the meal disturbance .

FRACTIONAL BACKSTEPPING CONTROL METHOD FOR EBMM

This section aims to find the appropriate external insulin infusion rate U(t), which can guarantee the asymptotic tracking of the desired blood glucose level. The proposed approach is based on a fractional order mathematical model where the control laws are deduced from the fractional Lyapunov stability analysis. The mathematical demonstration of the proposed control method is given according to the following steps.

First virtual control law

The synthesis of the first virtual control law is obtained via the expression of the following error:

e 1 = x 1 -Y ref (6)
The Lyapunov function used for stability analysis is given by:

V 1 = 1 2 e T 1 e 1 (7)
Its fractional time derivative is :

D m V 1 = e T 1 D m e 1 (8)
The virtual control law based on the desired state values is written as follows:

x 2d = x -1 1 (-p 1 (x 1 -G b ) -D m Y ref +c 1 e 1 + k 1 sign(e 1 )) (9)
A second tracking error, resulting from the expression of the first virtual control law, is added to the control process:

x 2 = x 2d + e 2 (10)
Thus, the new fractional time derivative of the Lyapunov function is taken as:

D m V 1 = -c 1 e T 1 e 1 -e T 1 x 1 e 2 -e T 1 (k 1 sign (e 1 ) -x 4 ) (11)
The stability condition D m V 1 < 0 is ensured as long as c 1 > 0 and |x 4 | < k 1 , with the residual term e T 1 x 1 e 2 , must be compensated in the second step.

Second virtual control law

The first intermediate control law introduces a second error e 2 whose the fractional derivative is given as follows:

D m e 2 = D m x 2 -D m x 2d (12)
The fractional derivative of the new Lyapunov function is defined by:

D m V 2 = e T 1 D m e 1 + e T 2 D m e 2 (13)
The second virtual control law is taken as:

x 3d = p -1 3 (p 2 x 2 + p 3 I b + D m x 2d +x 1 .e 1 -c 2 .e 2 -k 2 sign (e 2 )) (14)
Therefore, a third error term is introduced:

x 3 = x 3d + e 3 (15)
based on the third error term and using ( 14), the time derivative of D m V 2 can be written as:

D m V 2 = -c 1 e T 1 .e 1 -e T 1 (k 1 sign(e 1 ) -x 4 ) -c 2 e T 2 .e 2 -e T 2 (k 2 .sign (e 2 )) + e T 2 p 3 .e 3 (16)
Thus, the expression D m V 2 is negative as long as |x 4 | < k 1 , k 1 > 0, k 2 > 0 , c 1 > 0 and c 2 > 0, the residual term must be compensated in the third step.

Global control law

The design of the fractional feedback control U(t) results from ( 15)

D m e 3 = D m x 3 -D m 3d (17)
The time derivative of the Lyapunov candidate function, which check the convergence of three errors e 1 , e 2 and e 3 to zero, is :

D m V 3 = e T 1 D m e 1 + e T 2 D m e 2 + e T 3 D m e 3 (18)
The control law which can ensure the asymptotic stability of the system, can be taken as:

U (t) = p 4 (x 3 -I b ) + D m x 3d -p 3 .e 2 -c 3 .e 3 -k 3 .sign(e 3 ) (19)
Thus, the final expression of the Lyapunov candidate function is given as:

D m V 3 = -c 1 e T 1 e 1 -e T 1 (k 1 sign(e 1 ) -x 4 ) -c 2 e T 2 e 2 -e T 2 .k 2 .
sign(e 2 )c 3 .e T 3 .e 3 -e T 3 .k 3 .sign(e 3 ) (20)

Finally, the control laws ensure the asymptotic stability of the system via a judicious choice of the parameters k 1 , k 2 , k 3 ,c 1 , c 2 and c 3 .

FRACTIONAL ADAPTIVE FUZZY BACKSTEPPING CONTROL METHOD FOR FEBMM

To overcome the problem of patient parameter knowledge, we propose to use adaptive fuzzy systems in the form ξ T 1 θ to calculate the control signal [START_REF] Essounbouli | A supervisory robust adaptive fuzzy controller[END_REF]). To design the new control laws, we will follow the same previous steps.

First virtual control law

The control law (9) becomes can be rewritten as:

x 2d = x 2eq + x -1 1 (c 1 .e 1 + k 1 .sign(e 1 )) (21)
where:

x 2eq = x -1 1 (-p 1 (x 1 -G b ) -D m Y ref )
, which will be approximated by the fuzzy system: x2eq = ξ T 1 θ 1 .

ξ T 1 represents the regressive vector and θ 1 the adjustable parameter vector.

The new mathematical expression of the Lyapunov function is as follows:

V 1 = 1 2 e T 1 .e 1 + 1 2γ 1 θT 1 θ1 (22)
Where γ 1 is the learning rate, θ1 = θ 1 -θ * 1 is the estimation error and θ * 1 is the optimal value of θ 1 . Applying the fractional derivative to (22), we get the following expression:

D m V 1 = e T 1 -c 1 e 1 -f e1 + x 1 e 2 + w 1 -ξ T 1 θ1 + 1 γ1 θT 1 D m θ1 ( 23
)
Where f e1 = k 1 sign(e 1 ) + ∆ 1 and w 1 = x * 2d -x 2d is the minimum approximation error.. Taking the following adaptation law:

D m θ 1 = γ 1 ξ 1 e 1 (24)
Thus, an appropriate choice of c 1 allows to rearrange the equation ( 23) as follows:

D m V 1 ≤ -c 1 e T 1 e 1 + e T 1 x 1 e 2 (25)
This mathematical equation includes a residual term e T 1 x 1 e 2 , which will be compensated in the next step.

Second virtual control law

As indicated previously, a second adaptive fuzzy system is introduced:

x 3d = p -1 3 (p 2 x 2 + p 3 I b + D m x 2d + x 1 e 1 -c 2 e 2 -k 2 sign(e 2 ))
x 3d = x 3eq + p 1 3 (c 2 e 2 + k 2 sign(e 2 ))

x3eq eq = ξ T 2 θ 2 (26)
By performing a mathematical transformation similar to that of the previous step, the fractional derivative of the global Lyapunov function is given by:

D m V 2 = D m V 1 + e T 2 D m e 2 + 1 γ 2 θT 2 D m θ2 ( 27
)
In order to guarantee the asymptotic stability condition D m V 2 < 0, we have:

D m θ 2 = γ 2 ξ 2 e 2 (28)
and choosing an appropriate scalar value c 2 , equation ( 27) becomes:

D m V 2 < -c 1 e T 1 e 1 -c 2 e T 2 e 2 -p 3 e 2 (29)
Thus, the subsystem stability depends on the parameter p 3 e 2 , which will be in next step.

Global control law

In accordance with the stability conditions of the feedback system and the approximation of the unknown parameters, the expression of the final control law is:

U (t) = p 4 (x 3 -I b ) + D m x 3d +p 3 e 2 -c 3 e 3 -k 3 sign(e 3 ) = U eq -c 3 e 3 -k 3 sign(e 3 ) Ûeq = ξ T 2 θ 3 (30)
Proceeding as before , the fractional derivative of the global Lyapunov function is:

D m V 3 = D m V 1 + D m 2 + e T 3 D m e 3 + 1 γ3 θT 3 D m θ3 (31)
where w 3 = Û * eq -U eq .

To guarantee the stability that involves D m V 3 < 0, we us the following adaptive law:

D m θ 3 = γ 3 ξ 3 e 3 (32)
After some mathematical transformations and with an adequate selection of the parameters c 1 , c 2 and c 3 , we get this inequality:

D m V 3 < -c 1 e T 1 e 1 -c 2 e T 2 e 2 -c 3 e T 3 e 3 (33)
This mathematical approach of adaptation laws, deduced in the sense of Lyapunov, provides a demonstration of the global stability system.

SIMULATION AND RESULTS

In this section, we propose to evaluate the proposed approach via MATLAB/Simulink environment. These stimulation tests are based on a complete comparison between integer and fractional-order control schemes. Noted that the selected reference level for blood glucose is (80 mg/dl), reflecting an optimal value of blood glucose level. The model parameters are the same those given by [START_REF] Ahmad | An adaptive backstepping based non-linear controller for artificial pancreas in type 1 diabetes patients[END_REF], [START_REF] Nath | Observer based nonlinear control design for glucose regulation in type 1 diabetic patients: An lmi approach[END_REF]). Analysis of system response is obtained during meal intake assuming that the patient is initially in the state of hyperglycemia. The results highlighted the improvements in the considered control system (see Fig. 2). These enhancements concern the convergence time (from 0 to 50%), oscillatory response and steady state error (Table 1). The generated control signals are shown in Figure 3. The algorithm calculates the quantity of insulin required to avoid oscillations in the system response and reaches a maximum value that causes an instant decrease in glucose level. The improvement of the proposed control performance are also validated via a comparison with SMC which is another nonlinear method (see Figs. 4 and5). Finally, the proposed control method presents better performances not only in terms of blood glucose regulation and insulin infusion rate, but also concerning the computation times online (see Fig. 6) which decreases by 68 %in this approach compared to its integer analog approach. This paper proposes a non-linear control approach based on a fractional order adaptive fuzzy-backstepping controller using FEBMM for an automatic blood glucose regulation in Diabetes Type 1 patients. Adaptive Takagi-Sugeno fuzzy logic systems aim to get rid of the constraint related to the requirement of patients parameters knowledge. The fractional calculus leads to more accurateness in the control law. Lyapunov's theorem has been used to prove the asymptotic stability of the system. Simulation results have been performed, via MATLAB/Simulink, to illustrate the efficiency of fractional method during meal intake (faster convergence time, reduced steady state error and overshoots/undershoots) compared to integer

Fig. 1 .

 1 Fig. 1. Overall scheme of Automated Blood Glucose Control.

  Fig. 2. Blood glucose response analysis with backstepping based approaches

Table 1 .

 1 Performance criteria values for the proposed controllers

	Blood Glucose