Merzoug Soltane
email: merzoug-soltane@univ-eloued.dz

Yudith Cardinale
email: ycardinale@usb.ve

Rafael Angarita
email: rafael.angarita@isep.fr

Philippe Rosse
email: philippe.roose@univ-pau.fr

Marta Rukoz
email: mrukoz@dauphine.fr

Derdour Makhlouf

Kazar Okba
email: kazarokba@gmail.com

A Self-adaptive Agent-based System for Cloud Platforms

Cloud computing is a model for enabling on-demand network access to a shared pool of computing resources, that can be dynamically allocated and released with minimal effort. However, this task can be complex in highly dynamic environments with various resources to allocate for an increasing number of different users requirements. In this work, we propose a Cloud architecture based on a multi-agent system exhibiting a self-adaptive behavior to address the dynamic resource allocation. This self-adaptive system follows a MAPE-K approach to reason and act, according to QoS, Cloud service information, and propagated run-time information, to detect QoS degradation and make better resource allocation decisions. We validate our proposed Cloud architecture by simulation. Results show that it can properly allocate resources to reduce energy consumption, while satisfying the users demanded QoS.

I. INTRODUCTION

Cloud computing is the most flexible computing model to provide on-demand platforms for accessing custom resources and applications in the form of several types of services. Most common services in the Cloud are Platform as a Service (PaaS), Infrastructure as a Service (IaaS), Software as a Service (SaaS), Data as a Service (DaaS). The constantly increasing number of such services on the Cloud arises new challenges for ensuring their correct use, while guarantying self-adaptivity property, especially to manage user requirements (e.g., ensure QoS) [START_REF] Gutierrez-Garcia | Agentbased cloud service composition[END_REF] and optimize the use of resources (e.g., by minimizing energy consumption [START_REF] Srikantaiah | Energy aware consolidation for cloud computing[END_REF]). Taking into account these aspects, resource allocation becomes a complex task in highly dynamic environments, because of the increasing number of managed resources, as well as the increasing number of users with different requirements.

Existing resource allocation strategies lead to two unwanted situations: (i) the waste of resources when the demand is more than the capacity and demands cannot be attended, and (ii) the waste of resources when the demand is less than the capacity. In the first case, there are users not satisfied; in both cases, there are idle resources that are misused. A self-adaptive approach can direct the system to an ideal situation in which capacity is dynamically adapted to the demand of resources.

The main aim of this work is to address the resource allocation in Cloud platforms, towards a better utilization of resources and satisfaction of users requirements, by offering a self-adaptive approach. We propose a Cloud computing architecture that benefits from the combination of the Cloud and multi-agent technologies. The self-adaptive multiagent system integrated into the proposed Cloud architecture is inspired on our previous work presented in [START_REF] Angarita | Modeling dynamic recovery strategy for composite web services execution[END_REF], [START_REF] Angarita | A knowledge-based approach for selfhealing service-oriented applications[END_REF]. This self-adaptive system is a MAPE-K-based (monitoring, analyzing, planning, executing, and knowledge) approach [START_REF] Didac | Mape-k formal templates to rigorously design behaviors for self-adaptive systems[END_REF] to reason and act, according to QoS (e.g., time, price), Cloud service information, and propagated run-time information, to detect QoS degradation, failures, or unavailability and make better resource allocation decisions for all users requests. The agents application knowledge for decision making comprises offline precomputed global and local information, user QoS preferences, and propagated actual resource state information. We validate our proposed multiagent based Cloud architecture by prototyping and simulation. Results show that it can properly allocate resources to reduce energy consumption, while satisfying the QoS demanded by users.

II. RELATED WORK

Self-adaptive and autonomous management of computing resources have been topics of research interest and development for many years. In this section, we present recent literature concerning self-adaptive systems and agent-based approaches for cloud computing.

A. Self-adaptive system in Cloud computing

In [START_REF] Kertesz | An interoperable and self-adaptive approach for sla-based service virtualization in heterogeneous cloud environments[END_REF], a self-adaptive approach for Service-Level Agreement (SLA) based service virtualization in Cloud environments is proposed. The pro-posed architecture allows the interoperability of service executions in heterogeneous, distributed, and virtualized environments. Inter Cloud is a selfmanagement and SLA handling approach proposed in [START_REF] Buyya | Intercloud: Utility-oriented federation of cloud computing environments for scaling of application services[END_REF]. It is a Cloud federation oriented provisioning environment, that offers just in-time, opportunistic, and scalable application services. The idea of Inter Cloud is to envision utility-oriented federated IaaS systems that are able to predict application service behavior for intelligent down-and up-scaling infrastructures. Though it addresses self-management and SLA handling, the unified utilization of other services like PaaS and SaaS are not studied. These SLA-based works demonstrate that the combination of negotiation, brokering, and deployment using SLA-aware extensions and autonomic computing principles are suitable for achieving reliable and efficient service operation in distributed environments. However, its application in resource allocation has not been proved.

An approach for self-adaptive and selfconfigurable CPU resource provisioning for virtualized servers using Kalman filter 1 is presented in [START_REF] Kalyvianaki | Self-adaptive and selfconfigured CPU resource provisioning for virtualized servers using kalman filters[END_REF]. That work deals with the integration of a Kalman filter into feedback controllers to dynamically allocate CPU resources to virtual machines hosting server applications, creating a new resource management scheme. The novelty of this approach is the use of the Kalman filter to track the CPU usage and update the allocations accordingly. Another approach based on monitored data is described in [START_REF] Wang | Self-adaptive cloud monitoring with online anomaly detection[END_REF], which consists on a self-adaptive Cloud monitoring approach with on-line anomaly detection. The main contribution of this work is the design of a self-adaptive monitoring framework, that can efficiently collect monitoring data from various distributed systems deployed in a Cloud computing environment. The authors focused on a correlation-based method to select key metrics representing other metrics. The problem with these works relies on the limitation of their applications. They are not generic and applicable for all kind of resource allocation.

Other works focus on QoS compliant [START_REF] Evans | Dynamically reconfigurable workflows for time-critical applications[END_REF], [START_REF] Spezzano | Using service clustering and self-adaptive mopso-cd for qos-aware cloud service selection[END_REF]. In [START_REF] Evans | Dynamically reconfigurable workflows for time-critical applications[END_REF], it is proposed a distributed self-adaptive architecture based on the Edge Computing concept with container-based technologies, such as Docker and Kubernetes, to ensure QoS for time-critical applications. For each container, features of resources required for the host can be allocated upon monitoring data and operational strategies defined by end-users, application developer, and administrator. In [START_REF] Spezzano | Using service clustering and self-adaptive mopso-cd for qos-aware cloud service selection[END_REF], it is proposed a QoS-aware Cloud Service Selection approach using service clustering 1 Kalman filtering is an algorithm that uses a series of measurements observed over time and produces estimates of unknown variables that tend to be more accurate than those based on a single measurement alone. and self-adaptation to efficiently support service selection in which runtime changes in the services QoS are taken into account to adapt to changes. As our work, these studies focus on QoS satisfaction; however, they do not consider local and remote information for more accurate decisions.

Based on the MAPE model, concepts of autonomic computing for adaptive management of Grid Computing are leveraged in [START_REF] Lee | Adaptive workflow processing and execution in pegasus[END_REF]. However, this approach does not consider the deployment and virtualization mechanism in Cloud datacenters.

B. Agent-based Clouds

Agents are networked software entities that can do specific tasks on behalf of a user and have a degree of intelligence that allows them to perform parts of their tasks autonomously and to interact with their environment in a successfully way. Agents are characterized by important features such as autonomy, sociality, rationality, responsiveness, proactiveness, and mobility [START_REF] Rodriguez-Aguilar | A survey on sensor networks from a multiagent perspective[END_REF]. Some studies have been proposed to design Cloud platforms based on multi-agent systems [START_REF] Al-Ayyoub | Multi-agent based dynamic resource provisioning and monitoring for cloud computing Figure 9[END_REF], [START_REF] Fortino | Integration of agent-based and cloud computing for the smart objects-oriented iot[END_REF], [START_REF] Singh | Autonomous agent based load balancing algorithm in cloud computing[END_REF]. In [START_REF] Fortino | Integration of agent-based and cloud computing for the smart objects-oriented iot[END_REF], it is proposed the integration of agent-based system and Cloud computing for smart objects. This approach is suitable to effectively model Cooperative Smart Objects (CSO). In particular, a CSO is a smart object able to sense, store, and interpret information. In [START_REF] Singh | Autonomous agent based load balancing algorithm in cloud computing[END_REF], it is presented a mechanism to provide dynamic load balancing for Clouds based on autonomous agents. The proposed mechanism is based on Ant mobile agents and whenever the load of a Virtual Machine (VM) reaches a threshold value, it initiates a search for a candidate VM from other datacenters, reducing in this way the allocation time. This work only considers the workload of VMs and does not consider the physical machines. In [START_REF] Al-Ayyoub | Multi-agent based dynamic resource provisioning and monitoring for cloud computing Figure 9[END_REF], a multi-agent system is proposed to manage the Cloud resources, while taking into account the customers QoS requirements. In this work a VM migration occurs when its hosting physical machine is facing an overloading or under loading problem. This approach is the most similar to ours, however, our approach is autonomic self-adaptive, allowing controlling the user requirements depending on the system and agents states.

To overcome the limitation of existing works in the field of self-adaptive model for Cloud computing, we propose a novel approach for the management of resources in Cloud platforms. Our approach is based on a multi-agent system implementing the MAPE-K model to enable self-adaptation. Particularly, we enhance the Cloud computing architecture with agent technologies to tackle the energy of consumption problem.

III. AGENTS FOR THE CLOUD

One of the foundations of autonomic computing is the MAPE-K model for building autonomous self-adaptive agents [START_REF] Didac | Mape-k formal templates to rigorously design behaviors for self-adaptive systems[END_REF]. MAPE-K-based agents can sense diverse properties of the environment and make rational decisions based on them. Such an agent can monitor changes on the environment where it exists, analyze the situation based on the sensed information, plan what it is going to do next based on this situation and its own capabilities and options, and execute the plan. All of these steps are supported by the knowledge the agent has about the environment and itself. This model is usually implemented as a loop to permanently sense the environment and adapt to changes.

Figure 1 shows our proposed general multi-agent Cloud Architecture, based on three layers: user interface, Cloud instances, and datacenter infrastructure. The user layer provides an interface to access the Cloud services and through which users specify their resource allocation needs. Analyzer Agents identify the resources and services demanded by users and build specific queries. Cloud instances layer represents an inter-layer between upper layer (i.e., users) and lower layer (i.e., datacenters). Scheduler Agents work at this layer. Datacenter layer provides resources as a service. It consists of a physical layer (e.g., servers, host, physical manage) and a virtual layer (i.e., instances of VMs). There exists a Controller Agent per each physical machine in datacenters. Additionally, the Coordinator Agent supervises the whole process. Figure 2 shows our proposed agent architecture blueprint. Internal agent components rely on a modular architecture, favoring the understanding and reuse of the main components of each agent. Each component focuses on a specific function required for accomplishing the purpose of the agent. Each agent can communicate with other agents through its communication interfaces. In this section we detail the analyzer agent, the scheduling agent, and the controller agent. The coordinator agent supervises the whole process.

A. The Analyzer Agent

The analyzer agent is the first agent launched by the system. We illustrate its detailed architecture in -Individual knowledge: it reflects the agent selfknowledge, including the following:

• name: Agent analyzer (AA);

• address: the location where it is deployed; e.g., web Cloud service interface; • individual objectives: its objective is analyze the resources requested by a user; • state: it can have the following execution states: receiving user request, sending resource allocation request, and getting resource allocation response to/from the Scheduling Agent. -Analytical knowledge: it concerns rules stored in its knowledge base dictating its behavior and actions.

Its detailed behavior is illustrated in the algorithm presented in Alg. 1. It receives the user requirement, which is analyzed by the Request Analyser component (lines 2 to 4 in Alg. 1), by identifying the required resources (line 5 in Alg. 1). This information is received by the Resources Requester module (line 9 in Alg. 1), which in turn build a request with the required resources to send it to the Scheduling Agent (lines 10 and 11 in Alg. 1).

B. The Scheduling Agent

The Scheduling Agent is the central agent in the system. Its goal is to allocate resources needed by users. We illustrate its architecture in Figure 4. The Resource Allocator module receives requests from the Analyzer Agent and makes allocation decisions respecting the requested resources and QoS, and according the available resources. The Resource Availability Monitor is in charge of updating the resources state.

The knowledge base of the scheduling agent is composed by two parts: -Individual knowledge: reflects the agent selfknowledge, including:

• name: Agent Scheduling (SA);

• address: the location where it is deployed; e.g., the resource management system in the data center; • individual objectives: its objective is the resource allocation; • state: this agent can have the following execution states: receiving request from the Analyzer Agent, sending a request of available resources, and waiting for a response to that request. -Allocation knowledge:

• Available resources: the available resources on all physical machines; • Self-adaptive options: for example, retry, resource replacement or reallocation. • Inference engine and rules: the inference engine applies rules to the knowledge base to deduce new information. Rules can specify the actions to take given certain conditions. Its detailed behavior is illustrated in Figure 5 and in the Alg. 2. If it receives a resource request, it checks the availability of those resources and sends an allocation request to the Controller Agent (lines 3 to 5 in Alg. 2). When it receives from the Controller Agent the availability of resources, it updates the information in its knowledge base and does the reserves the resources (allocation process) for the corresponding query (lines 8 to 16 in Alg. 2). For the allocation process, the Scheduling Agent verifies the system state and the SLA (see Alg. 3). If the system state is normal and the SLA = acceptable, it allocates the resources (lines 1 to 7 in Alg. 3); if the system state is degraded, but the SLA = acceptable, it allocates the resources (lines 8 to 12 in Alg. 3); otherwise it applies its rules and acts according the available options ( lines 13 to 17 Alg. 3).

C. The Controller Agent

The goal of the controller agent is to manage datacenter resources, by tracking their status; through the Resource Status Updater component. Figure 6 illustrates its detailed architecture. The knowledge base of this agent contains the following information:

-Individual knowledge: reflects the agent selfknowledge, including:

• name: Controller Agent (CA); • address: the location where it is deployed; e.g., physical servers in the data center; • individual objectives: the objective of this agent is to track resource status; • state: this agent can have the following execution states: receiving the request from the Scheduling Agent and sending the available resources to Scheduling Agent. -Controller knowledge: it refers to the information this agent has about the status of the different resources in the datacenter.

Finally, its detailed behavior is illustrated in the algorithm presented in Alg. 4. It permanently monitors the resources' states and updates this information in its knowledge base (lines 7 to 15 in Alg. 4) . When a request from the Scheduling Agent arrives, it responds with the resources' statuses (line 18 in Alg. 4).

D. Resource allocation and inter-agent Interaction

The interaction among agents is illustrated in Figure 7. The interaction process starts when the Analyzer Agent receives a user request, which is analyzed, interpreted, sent it to the Scheduling Agent. The Scheduling Agent verifies the system state (state == normal) and sends a request to the Controller Agent asking for information about the free resources. As a reminder, the Con- troller Agent tracks the status of resources in the datacenter. When the Scheduling Agent gets the response from the Controller Agent, it verifies if the proposed QoS and available resources match the user requirements before making a final decision about resource allocation. Finally, the Scheduling Agent sends a detailed report about the process and decisions made to the Coordinator Agent that supervises the whole process. The possible agent states are normal, degraded, and broken. An agent is in the normal state if the execution goes as expected concerning QoS allocation and system failures. An agent is in the degraded state if there is a degraded QoS allocation or failures in the system, but the QoS allocation still falls within the allowed range. Finally, an agent is in the broken state if the QoS allocation is not acceptable or there are irreparable failures in the system.

IV. ILLUSTRATIVE EXAMPLE

To illustrate our approach, we propose a scenario of resource allocation, shown in Figure 8. The steps of the allocation process are the following:

1) In the first step, a user requests the desired services and resources through a web interface, by expressing the services/resources needed and the expected QoS (e.g., desired resource capacity, acceptable range of capacity, acceptable time and price). The Analyzer Agent gets this request and studies the existing services/resources to extract the requirements concerning the needed resources and the expected QoS. Some examples of resources are CPU, RAM, and disk space.

At the end of this step, the Analyzer Agent builds a query, called Q, specifying the needed resources and expected QoS, and forwards it to the Scheduling Agent. 2) In the second step, the Scheduling Agent extracts the resource requirements forwarded by the Analyzer Agent. Its goal is to prepare We represent the combination of resources and their corresponding requested capacities and QoS to build the suitable V M R as:

V M R =      r 1 c 1 qos 1 r 2 c 2 qos 2 . . . . . . r n c n qos n     
3) After the identification of requested resources, the Scheduling Agent sends a request to the Controller Agent to demand the corresponding free resources. 4) The Controller Agent receives the request from the Scheduling Agent and responds with the current state of the physical machines.

There exists one Controller Agent, CA i , for each physical machine, P M i , in the Cloud. CA i manages the resources and information of its corresponding P M i , including:

• The set of virtual machines that run in P M i , denoted as

V i = (V M 1 , V M 2 , ..., V M m );
• The set of capacities corresponding to each virtual machine, denoted as C i = (c.V M 1 , c.V M 2 , ..., c.V M m ); • The set of available resources on in P M i , denoted as RA i = (ra 1 , ra 2 , ..., ra p ); • The set of capacities corresponding to each available resource, denotes as CA i = (ca 1 , ca 2 , ..., ca p ). Then, the Controller Agent sends this information to the Scheduling Agent. We model the response of a Controller Agent CA i as two matrices:

T.P Mi =<      V M1 c.V M1 V M2 c.V M2 . . . . . . V Mn c.V Mn      ,      ra1 ca1 ra2 ca2 . . . . . . rap cap      > 5)
In the next step, the Scheduling Agent stores the information received from the Controller Agent in its knowledge base; then, it builds a global matrix of available resources at time t, denoted as A(t):

A(t) =      P M 1 RA 1 CA 1 P M 2 RA 2 CA 2 . . . P M n RA n CA n     
where P M i are physical machines and RA i and CA i are the set of available resources with their corresponding capacities. 6) Finally, after building the global resource matrix, the Scheduling Agent applies its selfadaptive allocation algorithm to build from A(t) a V M that satisfies V M Q .

V. EXPERIMENTS

We measured the performance of our multi-agent system in terms of energy consumption, by simulation. To do so, we used OMNeT [START_REF] Varga | An overview of the omnet++ simulation environment[END_REF] and ICan Cloud [START_REF] Núñez | icancloud: A flexible and scalable cloud infrastructure simulator[END_REF] to simulate its functionalities. OMNeT is an extensible, modular, component-based C++ simulation library and framework, primarily for building network simulators. ICan Cloud is a simulation platform aimed to model and simulate Cloud computing systems. This simulation framework has been developed on the top of OMNeT++ and INET frameworks. The multi-agents system and the scheduling algorithm have been developed in C++, by using sockets to simulate their communication.

We simulated a scenario for allocating resources as mentioned in Section IV. Subsequently, we implemented a Cloud computing service provider to offers Cloud services to users. The data center implemented for this Cloud runs five heterogeneous servers. We randomly generated queries (Q = (R, C, QoS)) to submit to the Cloud in randomly time intervals (in seconds) and measured the aggregated energy consumption of the five servers.

Figure 9 shows an extract of the simulation running. Note that queries are submitted at different time intervals: the first one at time 0, the second one at 500ms, the third one at 5sec, and so on until the end of the simulation at 102min. All queries were satisfied in terms of needed resources and required QoS. Figures 10 and11 show the energy consumption rates in Server 1 and Server 2, respectively. When we apply our self-adaptive strategy for resource allocation, we observe a remarkable change in the level of energy consumption, showing the efficiency of the scheduling algorithm. For Server 1 (Figure 10), the decrease of energy consumption was from 2500 megawatts to 480 megawatts, while for Server 2 (Figure 11), it was from 3500 megawatts to 600 megawatts. These decreases of energy consumption happen at times ranging from 0 minutes to 102 minutes.

These results put in evidence the performance of our algorithm of QoS allocation, confirming the choice of using a multi-agent system implementing a self-adaptive mechanism for the smart management of resources in Cloud data centers.

VI. CONCLUSIONS

In this work, we tackled the problem of resource allocation in Cloud platforms. To that end, we have proposed a multi-agent architecture based on the MAPE-K model. For our future work, we plan to present a formal model of our approach defining the query for resource allocation, user preferences, agent rules, and state transitions. We also plan to describe in detail the scheduling algorithm and present additional experiments to evaluate other performance aspects, besides energy consumption.

Figure 1 .

 1 Figure 1. Agent-based Cloud Architecture.

Figure 2 .

 2 Figure 2. Agent Architecture Blueprint.

Figure 3 .

 3 Figure 3. Analyzer Agent Architecture.

Figure 3 .

 3 Figure 3. Its goal is to study a user requirement (done by the Request Analyzer Component) and to build a request specifying the resources needed to satisfy it (through the Resources Requester component). This agent relies on a knowledge base containing individual knowledge and analytical knowledge, as follows:-Individual knowledge: it reflects the agent selfknowledge, including the following:

Input: 2 case input interface do 3 if service description then 4 analyzerProcess 1 :

 2341 (i), service description; (ii), SAL; (iii), id. user Output : (i), needed resources 1 switch communication interface do (service description); 5 return resources = { CPU, RAM, disk,... }; Analyzer Agent (AA)

Figure 4 .

 4 Figure 4. Scheduling Agent Architecture.

Figure 5 .

 5 Figure 5. Scheduling Agent Behavior (General Description).

2 case input interface do 3 if resources request then 4 check available resources; 5 send 8 case input interface do 9 if 15 //allocation process 16 if available resources ≡ needed resources then 17 Alg 2 :

 2345891516172 Input : (i), resources request; (ii), available resources Output : (i), allocated resources 1 switch communication interface do request to the Controller Agent; analyzerProcess returns resources then 10 TAB.resources = [null]; 11 while receiving response from the controller agent do 12 TAB.resources = [CA1.resources, CA2.resources,...]; 13 return TAB.resources; 14 store resources' data in the knowledge base; Scheduling Agent (SA)

3 :Figure 6 .

 36 Figure 6. Controller Agent Architecture.

2 case input interface do 3 if 15 store 4 :

 23154 Input: (i), Scheduling Agent's request Output : (i), available resources response 1 switch communication interface do Scheduling resources.stat's data in the knowledge base; Controller Agent (CA)

Figure 7 .

 7 Figure 7. Inter-agent Interaction.

Figure 8 .

 8 Figure 8. Allocation Scenario.


Bernard Teissier To

Antonio Campillo

Birthday

Two points of the boundary of toric geometry

published or not. The documents may come

Two points of the boundary of toric geometry

Using toric degeneration to avoid wild ramification

In his book [START_REF] Campillo | Algebroid Curves in Positive Characteristic[END_REF], Campillo introduces and studies a notion of characteristic exponents for plane branches over an algebraically closed field of positive characteristic. One of the definitions he gives is that the characteristic exponents are those of a plane branch in characteristic zero having the same process of embedded resolution of singularities. His basic definition is given in terms of Hamburger-Noether expansion1 but we shall not go into this here. He then gives an example to show that even if you do have a Puiseux-type parametrization for a branch in positive characteristic, which is not always the case, the exponents you see in the parametrization are not in general the characteristic exponents. His example (see [1, Chap. III, §5, Example 3.5.4]) is this: Let p be a prime number. Let us choose a field k of characteristic p and consider the plane branch defined parametrically by x = t p 3 , y = t p 3 +p 2 + t p 3 +p 2 +p+1 , and im-Institut mathématique de Jussieu-Paris Rive Gauche, e-mail: bernard.teissier@imj-prg.fr plicitly by a unitary polynomial of degree p 3 in y with coefficients in k [[x]]. Campillo computes by a Hamburger-Noether expansion the characteristic exponents and finds β 0 = p 3 , β 1 = p 3 + p 2 , β 2 = p 3 + 2p 2 + p, β 3 = p 3 + 2p 2 + 2p + 1. Note that there are four characteristic exponents while the parametrization exhibits three exponents in all. In [START_REF] Teissier | Valuations, deformations, and toric geometry[END_REF]Remark 7.19], the author had computed directly from the parametrization the generators of the semigroup of values of the t-adic valuation of k [[t]] on the subring k[[t p 3 ,t p 3 +p 2 + t p 3 +p 2 +p+1 ]] and found the numerical semigroup with minimal system of generators: Γ = p 3 , p 3 + p 2 , p 4 + p 3 + p 2 + p, p 5 + p 4 + p 3 + p 2 + p + 1 .

We can verify that Campillo's characteristic exponents and the generators of the semigroup satisfy the classical relations of Zariski, in accordance with [START_REF] Campillo | Algebroid Curves in Positive Characteristic[END_REF]Proposition 4.3.5].

This example is very interesting because it shows that in positive characteristic, even if a Puiseux-type expansion exists, its exponents do not determine the resolution process. In thinking about resolution in positive characteristic, one should keep away from ideas inspired by Puiseux exponents. The semigroup, however, does determine the resolution process in all characteristics. It is shown in [START_REF] Teissier | Valuations, deformations, and toric geometry[END_REF] and [START_REF] Teissier | Overweight deformations of affine toric varieties and local uniformization[END_REF] that in the case of analytically irreducible curves one can obtain embedded resolution by studying the embedded resolution of the monomial curve corresponding to the minimal system of generators of the numerical semigroup Γ of the values taken on the algebra of the curve by its unique valuation. Another, more classical, reason is that the semigroup determines the Puiseux exponents of the curve in characteristic zero having the same resolution process, and therefore this resolution process (see [1, Chap. IV, §3]).

The polynomial f (x, y) ∈ k [[x]][y] defining our plane branch can be obtained by eliminating u 2 , u 3 between three equations which are:

y p -x p+1 -u 2 = 0, u p 2 -x p(p+1) y -u 3 = 0, u p 3 -x p 2 (p+1) u 2 = 0.
This makes it apparent that our plane branch is a flat deformation of the curve defined by y px p+1 , u p 2x p(p+1) y = 0, u p 3x p 2 (p+1) u 2 = 0, which is the monomial curve C Γ in A 4 (k) given parametrically by x = t p 3 , y = t p 3 +p 2 , u 2 = t p 4 +p 3 +p 2 +p , u 3 = t p 5 +p 4 +p 3 +p 2 +p+1 . That is, the monomial curve whose affine algebra is the semigroup algebra k[t Γ ]. The binomial equations correspond to a system of generators of the arithmetical relations between the generators of the semigroup. Compare with [START_REF] Teissier | Overweight deformations of affine toric varieties and local uniformization[END_REF]Remark 7.19]; we have chosen here the canonical system of relations between the generators of the semigroup, where all the exponents in the second monomial of the equations except the exponent of x are < p. Moreover, if we give to each of the variables x, y, u 2 , u 3 a weight equal to the exponent of t for this variable in the parametrization of C Γ , we see that to each binomial is added a term of higher weight. This is an overweight deformation of a prime binomial ideal in the sense of [15, §3].

Eliminating u 2 and u 3 between the three equations gives the equation of our plane curve with semigroup Γ :

(y p -x p+1 ) p 2 -2x p 2 (p+1) y p + x (p 2 +1)(p+1) = 0.
If p = 2 this reduces to (y 2x 3 ) 4x 15 = 0, which looks like it should be the overweight deformation y 2x 3u 2 = 0, u 4 2x 15 = 0 of the monomial curve with equations y 2x 3 = 0, u 4 2x 15 = 0. However, such is not the case because the two binomials y 2x 3 , u 4 2x 15 do not generate a prime ideal in k[[x, y, u 2 ]]. One verifies that u 2 2x 6 y is not in the ideal but its square is. The binomials do not define an integral monomial curve, but in fact the non reduced curve given parametrically by x = t 8 , y = t 12 , u 2 = t 30 with non coprime exponents, while we know that the semigroup of our curve is Γ = 8, 12, 30, 63 . The equation of our plane curve is indeed irreducible, but it is not an overweight deformation of a integral monomial curve in A 3 (k). One has to embed our plane curve in A 4 (k) to view it as an overweight deformation of a monomial curve. The reader can verify that the same phenomenon occurs in any positive characteristic. For p = 2 our curve looks like an overweight deformation of the curve in A 3 (k) defined by the binomials y px p+1 , u p 2 2 -2x p 2 (p+1) y p but these binomials do not generate a prime ideal: the binomial u p 2 -2x p(p+1) y is not in the ideal, but its p-th power is by Fermat's little theorem. So appearances can be deceptive also from the equational viewpoint.

We expect the same result in characteristic zero, and this is true as soon as the field k contains the p-th roots of 2. In this case, by (the proof of) [4, Theorem 2.1] the ideal I generated by y px p+1 , u p 2 2 -2x p 2 (p+1) y p is not prime because the lattice L in Z 3 generated by (-(p + 1), p, 0) and (-p 2 (p + 1), -p, p 2 ) is not saturated; the vector w = (-p(p + 1), -1, p) is not in L , but pw is. Here the argument is that if I was a prime ideal, at least one of the factors of the product ∏ ζ p =2 (u p 2 -ζ x p(p+1) y) = u p 2 2 -2x p 2 (p+1) y p should be in I, which is clearly impossible. This raises the following question: Given an algebraically closed field k, assuming that we have a Puiseux expansion x = t n , y = ∑ j a j t j , a j ∈ k, can one predict, from the set { j/a j = 0}, useful information about the semigroup of the corresponding plane curve, even only a bound on the number of generators? More generally, denoting by k[[t Q ≥0 ]] the Hahn ring of series whose exponents are non negative rational numbers forming a well-ordered set, and given a series

y(t) ∈ k[[t Q ≥0 ]] which is integral over k[[t]
], can one deduce from the knowledge about the exponents and coefficients of y(t) provided by the work of Kedlaya in [START_REF] Kedlaya | On the algebraicity of generalized power series[END_REF] useful information about the semigroup of the plane branch whose equation is the integral dependence relation? This example has another interesting feature. We note that no linear projection of our plane curve to a line in the plane can be tamely ramified. However, our curve is a deformation of the monomial curve, for which the projection to the u 3 -axis is tamely ramified. More precisely, the inclusion of k-algebras k[u 3 ] ⊂ k[t Γ ] corresponding to u 3 → t p 5 +p 4 +p 3 +p 2 +p+1 gives rise to an extension Z ⊂ Z of value groups, for the u 3 -adic and t-adic valuations respectively, whose index is p 5 + p 4 + p 3 + p 2 + p + 1 and hence prime to p, while there is no residue field extension. This is related to what we saw in the first part of this section; it is precisely the coordinate u 3 missing in A 3 (k) which provides the tame projection. It is a general fact that if Γ ⊂ Z r is a finitely generated semigroup generating Z r as a group, given a system of generators Γ = γ 1 , . . . , γ N and an algebraically closed field k, there always exist r of the generators, say γ i 1 , . . . , γ i r such that the inclusion of k-algebras k[u i 1 , . . . , u i r ] ⊂ k[t Γ ] defined by u i ℓ → t γ i ℓ defines a tame extension of the fraction fields. In fact, the corresponding map π:

Speck[t Γ ] → A r (k) is étale on the torus of Speck[t Γ ].
Note that the subset {i 1 , . . . , i r } ⊂ {1, . . . , N} depends in general on the characteristic of the field k. This is immediately visible in the case of a monomial curve, where the result follows directly from the fact that the generators of the semigroup are coprime since the semigroup generates Z as a group. In the general case, as explained in [15, Proof of Proposition 3.20 and Proof of Proposition 7.4], modulo a Gale-type duality this fact is an avatar of the fact that the relative torus SpecZ[t Z r ] of SpecZ[t Γ ] is smooth over SpecZ while of course the whole toric variety is not. This implies, for each prime number p, the non-vanishing on the torus of certain jacobian determinants which are exactly those whose non vanishing is needed to ensure the étaleness of the map π. We note that the map π is not finite in general; it is finite if and only if the vectors γ i 1 , . . . , γ i r generate the cone of R r generated by Γ . More precisely, recall the description found in [START_REF] Teissier | Valuations, deformations, and toric geometry[END_REF], before Prop. 6.2, of the jacobian ideal of an r-dimensional affine toric variety defined by a prime binomial ideal

P ⊂ k[U 1 , . . . ,U N ]. The jacobian determinant J G,L ′ of rank c = N -r of the generators (U m ℓ -λ ℓ U n ℓ ) ℓ∈{1,.
..,L} of P, associated to a sequence G = (k 1 , . . . , k c ) of distinct elements of {1, . . . , N} and a subset L ′ ⊆ {1, . . ., L} of cardinality c, satisfies the congruence

U k 1 . . .U k c .J G,L ′ ≡ ∏ ℓ∈L ′ U m ℓ Det G,L ′ ( m -n ) mod.P,
where mn is the matrix of the vectors (m ℓn ℓ ) ℓ∈{1,...,L} , and Det G,L ′ indicates the minor in question. If the field k is of characteristic p, choosing a minor which is not divisible by p amounts to choosing r of the coordinates such that the corresponding projection to A r (k) of a certain binomial variety containing the toric variety as one of its irreducible components (see [START_REF] Eisenbud | Binomial ideals[END_REF]Corollary 2.3]) is étale outside of the coordinate hyperplanes. It is shown in [15, Proof of Proposition 3.20] that for any prime p there exist minors Det G,L ′ ( mn ) which are not divisible by p. As mentioned above, this is the equational aspect of the smoothness over SpecZ of the torus SpecZ[t Z r ] of the affine toric variety over Z corresponding to the subsemigroup Γ of Z r . The next step is to realize that an overweight deformation preserves the non vanishing. Let us illustrate this on our example: The jacobian matrix of our three binomial equations over a field of characteristic p is

  -x p 0 0 0 0 -x p(p+1) 0 0 0 0 -x p 2 (p+1) 0  
We see that there is only one minor which is non zero on the torus, where x = 0, corresponding to the inclusion

k[u 3 ] ⊂ k[t Γ ].
After the overweight deformation which produces our plane branch, the jacobian matrix becomes

  -x p 0 -1 0 0 -x p(p+1) 0 -1 0 0 -x p 2 (p+1) 0  
and we see that the same minor is = 0. The facts we have just mentioned imply that for each characteristic p, some of these minors are non zero modulo p. But the duality implies that if u i 1 , . . . , u i r are the variables not involved in the derivations producing one such minor, then the absolute value of this minor, which is not divisible by p, is the index of the extension of groups

Zγ i 1 ⊕ • • • ⊕ Zγ i r ⊂ Z r .
This explains the tameness result we have just seen, and also why it is preserved by overweight deformation. In our example the matrix mn after reduction modulo p is

  -1 0 0 0 0 -1 0 0 0 0 -1 0  
In conclusion the method which we can apply to our curve, which is that if we embed it in the affine space spanned by the monomial curve associated to its semigroup, in any characteristic we are certain to find a tame projection to a coordinate axis, will work for any finitely generated semigroup Γ in Z r generating Z r as a group and provide tame projections to A r (k) of the affine toric variety Speck[t Γ ], which will remain tame after an overweight deformation. In order to obtain tame projections for the space whose valuation we want to uniformize, we have to first re-embed it in the space where the associated toric variety lives so that it can appear as an overweight deformation. This is an important element in the proof of local uniformization for rational Abhyankar valuations (those with value group Z dimR ) on equicharacteristic excellent local domains R with an algebraically closed residue field given in [START_REF] Teissier | Overweight deformations of affine toric varieties and local uniformization[END_REF]. The reason is that the local uniformization of Abhyankar valuations on an equicharacteristic excellent local domain with algebraically closed residue field can be reduced to that of rational valuations of complete local domains whose semigroup is a finitely generated subsemigroup of Z r and then the complete local domain is an overweight deformation of an affine toric variety by [15, Proposition 5.1].

2 Additive preorders and orders on Z r and projective limits of toric varieties

In this section the space of additive preorders on Z r with a topology defined by Kuroda and Sikora (see [START_REF] Kuroda | The infiniteness of the SAGBI bases for certain invariant rings[END_REF], [START_REF] Sikora | Topology on the spaces of orderings of groups[END_REF]) is presented as homeomorphic to the projective limit of finite topological spaces which are spaces of orbits on toric varieties with the topology induced by the Zariski topology, and the space of additive orders as the closed subspace corresponding to the projective limit of the subsets of closed points of the preceding finite topological spaces. We use this to give a toric proof of a theorem of Sikora in [START_REF] Sikora | Topology on the spaces of orderings of groups[END_REF] showing that the space of additive orders on Z r with r ≥ 2 is homeomorphic to the Cantor set. The relation between toric geometry and preorders on Z r is due to Ewald-Ishida in [START_REF] Ewald | Completion of real fans and Zariski-Riemann spaces[END_REF] where they build the analogue in toric geometry of the Zariski-Riemann space of an algebraic variety. This relation was later developed by Pedro González Pérez and the author in [START_REF] Pérez | Toric Geometry and the Semple-Nash modification[END_REF], which contains in particular the results used here. In that text we quoted Sikora's result without realizing that we could give a direct proof in our framework. We begin with the: Proposition 1. Let I be a directed partially ordered set and (b ι ′ ,ι : X ι ′ → X ι for ι ′ > ι) a projective system indexed by I of surjective continuous maps between finite topological spaces. Then: a) The projective limit X of the projective system, endowed with the projective limit topology, is a quasi-compact space. b) In each X ι consider the subset D ι of closed points, on which the induced topology is discrete. If we assume that:

1. The maps b ι ′ ,ι map each D ι ′ onto D ι in such a way that the inverse image in the projective limit D of the D ι by the canonical map b ∞,ι : D → D ι of any element of a D ι is infinite.

There exists a map h: I

→ N \ {0} such that h(ι ′ ) ≥ h(ι) if ι ′ > ι and h -1 ([1, m])
is finite for all m ∈ N \ {0}, where [1, m] = {1, . . . , m}.

Then D is closed in X and homeomorphic to the Cantor set.

Proof. Statement a) is classical, see [START_REF] Hocking | Topology[END_REF][START_REF] Ewald | Combinatorial convexity and algebraic geometry[END_REF][START_REF] Ewald | Completion of real fans and Zariski-Riemann spaces[END_REF][START_REF] Eisenbud | Binomial ideals[END_REF][START_REF] Pérez | Toric Geometry and the Semple-Nash modification[END_REF][START_REF] Hocking | Topology[END_REF][START_REF] Kedlaya | On the algebraicity of generalized power series[END_REF][START_REF] Kuroda | The infiniteness of the SAGBI bases for certain invariant rings[END_REF][START_REF] Kempf | Toroidal embeddings I[END_REF][START_REF] Robbiano | On the theory of graded structures[END_REF][START_REF] Sikora | Topology on the spaces of orderings of groups[END_REF][START_REF] Schmidt | Chapter I: Siegel's Lemma and Heights[END_REF][START_REF] Teissier | Valuations, deformations, and toric geometry[END_REF][START_REF] Teissier | A viewpoint on local resolution of singularities[END_REF] and [START_REF] Sikora | Topology on the spaces of orderings of groups[END_REF]. The compactness comes from Tychonoff's theorem and the definition of the projective limit topology. To prove b) we begin by showing that D can be endowed with a metric compatible with the projective limit topology. Given w, w ′ ∈ D with w = w ′ , define r(w, w ′ ) to be the smallest integer n such that b ∞,ι (w) = b ∞,ι (w ′ ) for some ι ∈ h -1 ([1, n]). This is the smallest element in a non-empty set of integers since if w = w ′ , by definition of the projective limit there is an index ι 0 such that b ∞,ι 0 (w) = b ∞,ι 0 (w ′ ). Thus, our set con- tains h(ι 0 ). It follows from the definition that given three different w, w ′ , w" we have that r(w, w") ≥ min(r(w, w ′ ), r(w ′ , w")), and that r(w, w ′ ) = r(w ′ , w). We can define a distance on D by setting d(w, w) = 0 and d(w, w ′ ) = r(w, w ′ ) -1 for w ′ = w. By the definition of the projective limit topology on D we see that it is totally discontinuous because the D ι are and that every ball

B(w, η) = {w ′ /d(w ′ , w) ≤ η} is the intersection ι∈h -1 ([1,⌊η -1 ⌋]) b -1 ∞,ι (w)
of finitely many open sets . The first assumption implies that every ball of positive radius centered in a point of D is infinite, so that D is perfect. Finally, our space D is a perfect compact and totally disconnected metric space and thus homeomorphic to the Cantor set by [START_REF] Hocking | Topology[END_REF]. The fact that D is closed in X follows from the fact that each D ι is closed in X ι . Remark 1. In [START_REF] Hocking | Topology[END_REF] it is shown that a compact totally disconnected metric space is homeomorphic to the projective limit of a projective system of finite discrete spaces. The authors then show that if two such spaces are perfect, the projective systems can be chosen so that their projective limits are homeomorphic.

We recall some definitions and facts of toric geometry that are needed for our purpose, referring to [START_REF] Ewald | Combinatorial convexity and algebraic geometry[END_REF] for proofs. Let M = Z r be the lattice of integral points in R r and N = Hom Z (M, Z) its dual, a lattice in N R = Řr . We assume that r ≥ 2.

A (finite) fan is a finite collection Σ = (σ α ) α∈A of rational polyhedral strictly convex cones in N R such that if τ is a face of a σ α ∈ Σ , then τ is a cone of the fan, and the intersection σ α ∩ σ β of two cones of the fan is a face of each. A rational polyhedral convex cone is by definition the cone positively generated by finitely many vectors of the lattice N, called integral vectors. It is strictly convex if it does not contain any non zero vector space. Given a rational polyhedral cone σ , its convex dual σ = {u ∈ R r / < u, v >≥ 0 ∀v ∈ σ }, where < u, v >= v(u) ∈ R, is again a rational polyhedral convex cone, which is strictly convex if and only if the dimension of σ , that is, the dimension of the smallest vector subspace of Řr containing σ is r. A refinement Σ ′ of a fan Σ is a fan such that every cone of Σ ′ is contained in a cone of Σ and the union of the cones of Σ ′ is the same as that of Σ . We denote this relation by Σ ′ ≺ Σ .

By a theorem of Gordan (see [2, Chap. V, §3, Lemma 3.4]), for every rational strictly convex cone in N R the semigroup σ ∩ M is a finitely generated semigroup generating M as a group. If we fix a field k the semigroup algebra k[t σ ∩M ] is finitely generated and corresponds to an affine algebraic variety T σ over k, which may be singular but is normal because the semigroup σ ∩ M is saturated in the sense that if for some k ∈ N >0 and m ∈ M we have km ∈ σ ∩ M, then m ∈ σ ∩ M. To each fan Σ is associated a normal algebraic variety T Σ obtained by glueing up the affine toric varieties Speck[t σ ∩M ], σ ∈ Σ , along the affine varieties corresponding to faces that are the intersections of two cones of the fan. A refinement Σ ′ of a fan Σ gives rise to a proper birational map T Σ ′ → T Σ . Each toric variety admits a natural action of the torus T {0} = (k * ) r = (kpoints of) Speck[t M ] which has a dense orbit corresponding to the cone σ = {0} of the fan. There is an inclusion reversing bijection between the cones of the fan and the orbits of the action of the torus on T Σ . In an affine chart T σ , the traces of the orbits of the torus action correspond to faces F τ of the semigroup σ ∩ M: they are the intersections of the semigroup with the linear duals τ ⊥ of the faces τ ⊂ σ . The monomial ideal of k[t σ∩M ] generated by the monomials t δ ; δ / ∈ F τ is prime and defines the closure of the orbit corresponding to τ. When it is of maximal dimension the cone σ itself corresponds to the zero dimensional orbit in T σ and all zero dimensional orbits are obtained in this way. A prime monomial ideal of k[t σ ∩M ] defines the intersection with T σ of an irreducible subvariety invariant by the torus action.

A preorder on M is a binary relation with the properties that for any m, n, o ∈ M either m n or n m and m n o implies m o. An additive preorder on M is a preorder such that if m m ′ then m + n m ′ + n for all n ∈ M. It is a fact (see [START_REF] Robbiano | On the theory of graded structures[END_REF], [START_REF] Kuroda | The infiniteness of the SAGBI bases for certain invariant rings[END_REF], [START_REF] Ewald | Completion of real fans and Zariski-Riemann spaces[END_REF]) that given any additive preorder on M there exist an integer s, 1 ≤ s ≤ r and s vectors v 1 , . . . , v s in N R such that

m n if and only if (< m, v 1 >, . . . , < m, v s >) ≤ lex (< n, v 1 >, . . . , < n, v s >),
where lex means the lexicographic order. An additive order is an additive preorder which is an order. This means that the vector subspace of N R generated by ν 1 , . . . , ν s is not contained in any rational hyperplane. In accordance with the notations of [START_REF] Pérez | Toric Geometry and the Semple-Nash modification[END_REF] we denote by w a typical element of ZR(Σ ) and by m w n the corresponding binary relation on Z r . Following Ewald-Ishida in [START_REF] Ewald | Completion of real fans and Zariski-Riemann spaces[END_REF] we define a topology on the set of additive preorders as follows : Definition 1. Let σ be a rational polyhedral cone in N R . Define U σ to be the set of additive preorders w of M such that 0 w σ ∩ M. The U σ are a basis of open sets for a topology on the set ZR(M) of additive preorders on M. Given a fan Σ the union ZR(Σ ) = σ ∈Σ U σ ⊂ ZR(M) endowed with the induced topology is defined by Ewald-Ishida as the Zariski-Riemann manifold of the fan Σ . By [3, Proposition 2.10], it depends only on the support |Σ | = σ ∈Σ σ and if we assume

|Σ | = N R , it is equal to ZR(M).
This topology is the same as the topology defined in [START_REF] Kuroda | The infiniteness of the SAGBI bases for certain invariant rings[END_REF] and [START_REF] Sikora | Topology on the spaces of orderings of groups[END_REF], where a prebasis of open sets is as follows: given two elements a, b ∈ M a set of the pre-basis is the set U a,b of preorders w for which a w b. Indeed, to say that a preorder w is in the intersection i U a i ,b i of finitely many such sets is the same as saying that σ ∩ M ⊂ {m ∈ M/0 w m} where σ ⊂ N R is the rational polyhedral cone dual to the cone σ in M R generated by the vectors b ia i . If σ = R r , the intersection is the trivial preorder, where all elements are equivalent.

Theorem 1. (Ewald-Ishida in [START_REF] Ewald | Completion of real fans and Zariski-Riemann spaces[END_REF]Theorem 2.4]) The space ZR(M) is quasi-compact, and for any finite fan Σ the space ZR(Σ ) is quasi-compact.

It is shown in [START_REF] Ewald | Completion of real fans and Zariski-Riemann spaces[END_REF]Proposition 2.6] that to any fan Σ and any preorder w ∈ ZR(Σ ) we can associate a cone σ ∈ Σ . It is the unique cone with the properties 0 w σ ∩ M and σ ⊥ ∩ M = {m ∈ σ ∩ M/m w 0 and m w 0}. Following Ewald-Ishida, we say that w dominates σ . If w is an order, σ is of maximal dimension r.

It is not difficult to verify that if Σ ′ is a refinement of Σ we have ZR(Σ ′ ) = ZR(Σ ) and moreover, given w ∈ ZR(Σ ) the corresponding cones σ ′ , σ verify σ ′ ⊂ σ , so that we have a torus-equivariant map T σ ′ → T σ of the corresponding toric affine varieties.

Given a fan Σ its finite refinements, typically denoted by Σ ′ , form a directed partially ordered set. It is partially ordered by the refinement relation Σ ′ ≺ Σ . It is a directed set because any two finite fans with the same support have a common finite refinement (see [START_REF] Kempf | Toroidal embeddings I[END_REF]Chap. III] or [2, Chap. VI]). We are going to study three projective systems of sets indexed by it. The set {T Σ ′ } of torus-invariant irreducible subvarieties of T Σ ′ , with the topology induced by the Zariski topology, the set O Σ ′ of the torus orbits of T Σ ′ , again endowed with the Zariski topology, and finally the set of 0-dimensional orbits, which is the set of closed points of O Σ ′ . The first two sets are in fact equal because a torus invariant irreducible subvariety of T Σ is the closure of an orbit. This is the meaning of [5, Lemma 3.3]: a prime monomial ideal of k[t σ∩M ] is generated by the monomials that are not in a face of the semigroup, and the Lemma states that faces are the τ ⊥ ∩ σ ∩ M, where τ is a face of σ and so corresponds to an orbit.

The sets {T Σ ′ } = O Σ ′ are finite since our collection of cones in each Σ ′ is finite. The topology induced by the Zariski topology of T Σ ′ on {T Σ ′ } is such that the closure of an element of {T Σ ′ } is the set of orbits contained in the closure of the corresponding orbit of the torus action. Thus, the closed points of {T Σ ′ } are the zero dimensional orbits of the torus action on T Σ ′ and are in bijective correspondence with the cones of maximal dimension of Σ ′ . Given a refinement Σ ′ ≺ Σ , the corresponding proper birational equivariant map T Σ ′ → T Σ maps surjectively {T Σ ′ } to {T Σ } and zero dimensional orbits to zero dimensional orbits. The map induced on zero dimensional orbits is surjective because every orbit contains zero dimensional orbits in its closure.

Given an additive preorder w ∈ ZR(Σ ) it dominates a unique cone σ ′ in each refinement Σ ′ of Σ and defines a unique torus-invariant irreducible subvariety of T Σ ′ corresponding to the prime ideal of k[t σ ′ ∩M ] generated by the monomials whose exponents are w 0. This defines a map

Z : ZR(Σ ) -→ lim ←- Σ ′ ≺Σ {T Σ ′ }.
We now quote two results from [START_REF] Pérez | Toric Geometry and the Semple-Nash modification[END_REF]: {T Σ ′ } and induces a homeomorphism between the space of additive orders on M and the projective limit of the discrete sets {T Σ ′ } 0 of 0-dimensional orbits. Definition 2. The height h(Σ ) of a finite fan Σ in N R is the maximum absolute value of the coordinates of the primitive vectors in N generating the one-dimensional cones of Σ . There are only finitely many fans of height bounded by a given integer.

We note that the fan consisting of the 2 r quadrants of N R and their faces has height one.

Let us show that we can apply Proposition 1 to obtain the conjunction of Sikora's result in [START_REF] Sikora | Topology on the spaces of orderings of groups[END_REF]Proposition 1.7] and Ewald-Ishida's in [3, Proposition 2.3]: Proposition 2. For r ≥ 2 the space of additive preorders on Z r is quasi-compact. It contains as a closed subset the space of additive orders, which is homeomorphic to the Cantor set. Proof. To apply Proposition 1, our partially ordered directed set is the set of finite fans in N R with support N R . The set of additive preorders is quasi-compact by Proposition 1. Concerning the set of orders, we apply the second part of the proposition. Our discrete sets are the sets {T Σ ′ } 0 of zero dimensional torus orbits of the toric varieties T Σ ′ . Each refinement of a cone of maximal dimension contains cones of maximal dimension and since r ≥ 2 each cone σ ′ ∈ Σ ′ can be refined into infinitely many fans with support σ ′ which produce as many refinements of Σ ′ . To see this, one may use the fact that each cone of maximal dimension, given any integral vector in its interior, can be refined into a fan whose cones are all regular and which contains the cone generated by the given integral vector (see [START_REF] Kempf | Toroidal embeddings I[END_REF]Chap. III] or [2, Chap. VI]). Our function h(Σ ′ ) is the height of definition 2 above, which has the required properties since h(Σ ′ ) ≥ h(Σ ) if Σ ′ ≺ Σ because the one dimensional cones of Σ are among those of Σ ′ .

Remark 2. There are of course many metrics compatible with the topology of the space of orders induced by that of ZR(M) and another one is provided following [8, §1] and [11, Definition 1.2]: Let B(0, D) be the ball centered at 0 and with radius D in R r . Define the distance d(w, w ′ ) to be 0 if w = w ′ and otherwise 1 D , where D is the largest integer such that w and w ′ induce the same order on Z r ∩ B(0, D). It would be interesting to verify directly, perhaps using Siegel's Lemma (see [START_REF] Schmidt | Chapter I: Siegel's Lemma and Heights[END_REF]), that the distances d(w, w ′ ) and d(w, w ′ ) define the same topology.

Remark 3. The homeomorphism Z of Theorem 2 is the toric avatar of Zariski's homeomorphism between the space of valuations of a field of algebraic functions and the projective limit of the proper birational models of this field. As explained in [5, §13] the space of orders is the analogue for the theory of preorders of zero dimensional valuations in the theory of valuations.

Theorem 2 .

 2 (González Pérez-Teissier in[START_REF] Pérez | Toric Geometry and the Semple-Nash modification[END_REF] Proposition 14.8]) For any finite fan Σ , the map Z is a homeomorphism between ZR(Σ ) with its Ewald-Ishida topology and lim ←-Σ ′ ≺Σ {T Σ ′ } with the projective limit of the topologies induced by the Zariski topology. Corollary 1. (González Pérez-Teissier in [5, Section 13]) If |Σ | = N R the map Z is a homeomorphism between the space ZR(M) of additive preorders on Z r and lim ←-Σ ′ ≺Σ

The Hamburger-Noether expansion is an algorithm extracting in any characteristic a description of the resolution process by point blowing-ups from a parametric representation x(t), y(t).

Acknowledgements I am grateful to Hussein Mourtada for interesting discussions of the first topic of this note and for calling my attention to the phenomenon described in the case p = 2.


Qasim Lone

Etienne Dublé

Franck Rousseau

Ingrid Moerman

Spilios Giannoulis

Andrzej Duda

WiSH-WalT: A Framework for Controllable and Reproducible LoRa Testbeds

In this paper, we describe the design and implementation of WiSH-WalT, a framework for controllable and reproducible LoRa testbeds. The implementation of the WiSHFUL unified interface provides the means for controlling and adapting the LoRa parameters to given conditions and low energy consumption by configuring transmission power, spreading factor, bandwidth, and error coding rate. WalT provides support for running reproducible experiments based on the deployment of docker images on a distributed set of nodes. Put together, the functionalities of WiSHFUL and WalT open new possibilities for deploying reproducible LoRa testbeds. We have used WiSH-WalT to experiment with adaptive configuration of the LoRa parameters and evaluated the communication performance of LoRa motes in a setup with several gateways.

I. INTRODUCTION

This paper describes the design and implementation of a framework for controllable and reproducible LoRa testbeds. Reproducibility of experiments is an important part of the research methodology in networking. Specialized testbeds such as ORBIT [START_REF] Raychaudhuri | ORBIT Radio Grid Tested for Evaluation of Next-Generation Wireless Network Protocols[END_REF] or IoT-LAB [START_REF] Adjih | FIT IoT-LAB: A Large Scale Open Experimental IoT Testbed[END_REF] make the experimentation task easier and offer good support for experiment repeatability. However, they only offer operating conditions that are far away from realworld deployments: motes are usually distributed on a regular grid in one large room, so reproducibility in varying environmental conditions is limited. The long range of LoRa networks pushes wireless lab testbeds to the limits-you cannot set up a meaningful experiment in a lab.

For reproducible network experiments, we developed WalT [START_REF] Brunisholz | WalT: A Reproducible Testbed for Reproducible Network Experiments[END_REF]. WalT nodes are single-board computers (Raspberry Pi, RPI) on which users can deploy their OS (filesystem, kernel) packaged as a docker image for easy customization and sharing. WalT nodes powered by PoE Ethernet switches interconnect the wireless nodes under test and can gather traces of operation to understand the complex behavior of all interacting entities and measure their performance. With low-cost small-sized standard components and free software, researchers can easily reproduce their own WalT platform to validate results in real-world conditions. With WalT, a researcher can: i) easily setup a platform to develop, debug, and validate protocols and applications and (ii) deploy and control experiments on a larger scale at a target location. Reproducibility of a WalT testbed means that other researchers can deploy and repeat exactly the same experiment in a different environment.

The WiSHFUL project [START_REF]Wishful: Wireless software and hardware platforms for flexible and unified radio and network control[END_REF] also addresses the issue of network experiments with complementary objectives: i) abstract hardware platforms with a unified interface to easily control radio and network settings, ii) provide a global control framework for dynamic configuration, and an intelligence framework to enable autonomous control strategies based on machine learning, and iii) support real-life environments with compact portable testbeds.

WiSHFUL offers several software platforms for various wireless networks with data plane and control plane functionalities for advanced and intelligent radio and network control. The proposed unified radio control (UPI or Unified Programming Interface) provides an abstraction of hardware specific instructions to enable flexible radio configuration, while the unified network control allows rapid prototyping and adaptation of network protocol stacks in a heterogeneous, multi-vendor environment.

In this paper, we report on WiSH-WalT1 offering an integrated framework for LoRa experiments based on the implementation of the WiSHFUL unified interface on LoRa STMicroelectronics boards and its integration within WalT, which results in a framework offering the best functionalities of both systems. The UPI interface provides a flexible way for configuring the main parameters of the LoRa transceiver and for getting statistics gathered on the board. It allows controlling and adapting the LoRa parameters to given conditions and required energy consumption. WalT brings easy deployment of LoRa motes and monitoring of their operation. Put together, the functionalities of WiSHFUL and WalT open new possibilities for deploying reproducible LoRa testbeds.

The rest of the paper discusses related work (Section II), describes the properties of LoRa networks (Section III), presents the implementation of the WiSH-WalT functionalities (Section IV), and reports on experiments with adaptive configuration of LoRa parameters in a network with several gateways (Section V).

II. RELATED WORK

To study the influence of LoRa parameters on performance, we can either rely on analytical modeling [START_REF] Mikhaylov | Analysis of Capacity and Scalability of the LoRa Low Power Wide Area Network Technology[END_REF], [START_REF] Georgiou | Low Power Wide Area Network Analysis: Can LoRa Scale?[END_REF], simulation [START_REF] Reynders | Range and Coexistence Analysis of Long Range Unlicensed Communication[END_REF], [START_REF] Bor | LoRa for the Internet of Things[END_REF], [START_REF] Augustin | A Study of LoRa: Long Range & Low Power Networks for the Internet of Things[END_REF], [START_REF] Adelantado | Understanding the Limits of LoRaWAN[END_REF], [START_REF] Haxhibeqiri | LoRa Scalability: A Simulation Model Based on Interference Measurements[END_REF], [START_REF] To | Simulation of LoRa in NS-3: Improving LoRa Performance with CSMA[END_REF], or measurements [START_REF] Augustin | A Study of LoRa: Long Range & Low Power Networks for the Internet of Things[END_REF], [START_REF] Petrić | Measurements, Performance and Analysis of LoRa FABIAN, a Real-World Implementation of LPWAN[END_REF], [START_REF] Haxhibeqiri | LoRa Scalability: A Simulation Model Based on Interference Measurements[END_REF], [START_REF] Bor | LoRa Transmission Parameter Selection[END_REF].

Augustin et al. used simulation to evaluate the collision ratio for an increasing number of contending devices [START_REF] Augustin | A Study of LoRa: Long Range & Low Power Networks for the Internet of Things[END_REF]. The results confirm the behavior of ALOHA with the maximum channel capacity of 18% for a link load of 0.48. At this load, there are around 60% of packets dropped. The problem with this evaluation is the fact that it does not take into account the capture effect.

Haxhibeqiri et al. [START_REF] Haxhibeqiri | LoRa Scalability: A Simulation Model Based on Interference Measurements[END_REF] used a simulation model based on the measurements of the interference behavior between two motes with a duty cycle of 1% to show that when their number increases to 1000 per gateway, the packet loss rate increases to 32%. However, this level of the loss rate should be considered as low compared to 90% in pure ALOHA for the same load and it results from taking into account the capture effect, which apparently plays an important role in the LoRa performance.

The same study by Augustin et al. [START_REF] Augustin | A Study of LoRa: Long Range & Low Power Networks for the Internet of Things[END_REF] presented throughput measurements on a LoRa testbed in addition to the simulation of the ALOHA behavior showing: i) less than 10% of loss rate over a distance of 2 km for SF (Spreading Factor) 9-12 and ii) more than 60% of loss rate over 3.4 km for SF 12.

Petrić et al. [START_REF] Petrić | Measurements, Performance and Analysis of LoRa FABIAN, a Real-World Implementation of LPWAN[END_REF] measured the performance of LoRa in an urban setup. They showed a highly variable packet error rate (between 3 and 90%) for the range of 3 km from a gateway under the following conditions: bandwidth of 125 kHz, coding rate of 4/5, transmission power of 14 dBm, and spreading factor SF 7, 9, and 10. They also note that the correlation between RSSI (Received Signal Strength Indicator), SNR (Signal to Noise Ratio), and packet error ratio is not straightforward.

Bor and Roedig presented an analysis of the impact of LoRa transmission parameter selection on communication performance and energy consumption based on measurements of a 50 m LoRa link in an indoor setting [START_REF] Bor | LoRa Transmission Parameter Selection[END_REF]. They also developed a link probing scheme to determine transmission settings that satisfy performance requirements.

With respect to the testbed platforms such as WiSH-WalT, OpenChirp is an architecture that comes close to our work [START_REF] Dongare | OpenChirp: A Low-Power Wide-Area Networking Architecture[END_REF]. The framework provides tools to reconfigure the LoRa gateway, it supports user registration of LoRa devices, and obtaining parameters through gateways. Compared to OpenChirp, we propose more advanced functions that allow for better deployment, control, and supervision of LoRa experiments.

III. OVERVIEW OF LORA

LoRa has become an interesting technology for lightweight smart sensing in the Internet of Things (IoT) [START_REF] Lora | A Technical Overview of LoRa and LoRaWAN[END_REF]. It defines a specific radio layer based on the Chirp Spread Spectrum (CSS) modulation and a simple MAC channel access method called LoRaWAN [START_REF] Sornin | LoRaWAN Specification v1.0.2[END_REF]. We can control the physical layer of LoRa through the following parameters [START_REF] Semtech | SX1272/73 -860 MHz to 1020 MHz Low Power Long Range Transceiver[END_REF]:

• Bandwidth (BW) -it is the range of transmission frequencies. We can configure the bandwidth between 7.8 kHz and 500 kHz. A larger bandwidth allows for a higher data rate, but results in lower sensitivity.

• Spreading Factor (SF) -it represents the ratio between the symbol rate and the spreading spectrum chip rate: there are 2 SF chips per symbol for a given value of SF. SF varies between 6 and 12 with SF 12 resulting in the highest sensitivity and range, but achieving the lowest data rate and increased energy consumption. The decrease of 1 in SF doubles the transmission rate and divides by 2 the transmission duration as well as energy consumption.

• Coding Rate (CR) -it corresponds to the rate of Forward Error Correction (FEC) applied to improve packet error rate in presence of noise and interference. A higher coding rate results in better robustness, but increases the transmission time. The possible values are: 4/5, 4/6, 4/7, and 4/8.

• Transmitted Power (TP) -LoRaWAN [START_REF] Sornin | LoRaWAN Specification v1.0.2[END_REF], the MAC layer for LoRa, defines the following values of TP for the EU 863-870 MHz band: 2 dBm, 5 dBm, 8 dBm, 11 dBm, and 14 dBm. A given combination of the parameters results in a specific data rate and sensitivity that determines the transmission range.

The achievable data rates depend on the chosen bandwidth, spreading factor, and coding rate: a higher bit rate results from lower SF, higher BW, and CR of 4/5, at the cost of lower sensitivity and range. The bit rates range from 250 b/s to 11 kb/s: 250 b/s corresponds to SF 12 for BW of 125 kHz, whereas 11 kb/s results from SF 7 over BW of 250 kHz. Motes can also use the FSK modulation to reach a higher data rate of 50 kb/s. Table I presents SF, the data rate, SNR limit, and the airtime for a 10 byte packet.

Sensitivity ranges from -136 dBm for SF 12 (long range) and BW of 125 kHz to -111 dBm for SF 6 and BW of 500 kHz (shorter range). Depending on the transmitted power and sensitivity, the theoretical transmission range (assuming the Okumura Hata propagation model for an open rural environment) may vary from 6.5 km for SF 12 and TP of 14 dBm to 1.3 km for SF6 and TP of 2 dBm [START_REF] Adelantado | Understanding the Limits of LoRaWAN[END_REF]. We proposed optimal strategies for adapting the parameters from the point of view of energy efficiency [START_REF] Ochoa | Evaluating LoRa Energy Efficiency for Adaptive Networks: From Star to Mesh Topologies[END_REF]. For instance, we showed that the best SF and TP configuration to achieve minimal energy consumption (for BW of 125 kHz and CR of 4/5) consists of 1) increase TP from 2 dBm until reaching TP of 14 dBm with SF 6 and then 2) adapt SF until reaching SF 12 with TP of 14 dBm.

For class A devices (those that may achieve long lifetimes through the use of low duty cycles), Lo-RaWAN [START_REF] Sornin | LoRaWAN Specification v1.0.2[END_REF] defines an access method to the radio channel similar to ALOHA: a device wakes up and sends a packet to a Gateway right away. The difference with pure ALOHA is the variable packet length in LoRa. This choice of the access method highly impacts the capacity of LoRa and its scalability to a large number of devices. The scalability of LoRaWAN is first related to the ERC limitation of the duty cycle to 1% in the 868 MHz band for motes operating as ALOHA. For instance, with SF 12 and 100 motes, each of them may send 546 packets per day, or if there are 1000 motes, they can send 54 packets per day. The gateway can only send 9 ACK packets per mote to 100 motes under this assumption. These constraints have led to the Fair Access Policy in The Things Network (TTN) [START_REF] Giezeman | The Things Network[END_REF]: a mote has the limit of 30 s of airtime (19 packets per day for SF 12) and 10 downlink packets per day (ACKs).

We proposed a simple enhancement to LoRaWAN that does not impact energy consumption-the CSMA principle consisting of testing the channel if it is used by another transmission before attempting to send a packet [START_REF] To | Simulation of LoRa in NS-3: Improving LoRa Performance with CSMA[END_REF].

LoRaWAN defines the Adaptive Data Rate (ADR) algorithm run on the gateway to control the data rate of motes. The gateway estimates the SNR level of the last 20 packets of a mote. It then chooses the data rate and TP suitable for the given level of SNR, and sends the parameters in the LinkADRReq frame to the mote. Motes can either enable or disable ADR based on their constraints.

IV. WISH-WALT IMPLEMENTATION

WiSH-WalT uses the WalT platform to manage the deployment of LoRa motes, while WiSHFUL takes care of the local control of LoRa motes for configuring their communication parameters. Figure 1 • Raspberry Pi (RPI) acting as WalT nodes. Once they are installed with the WalT network bootloader, they are detected by the WalT server and registered as WalT nodes.

• Seamless and instant deployment of WalT images on WalT nodes that control LoRa nodes. What we call deployment is actually a customized network boot procedure: the server exposes the content of a WalT image (kernel, device-tree, and filesystem) as an NFS share, and it lets the selected nodes boot this image over the network. The configured WalT images can be shared by publishing them on the docker hub. For instance, it allows us to share the images pre-configured with the WiSHFUL controller. Finally, WalT users can control the whole process remotely. A command line utility provides all options needed to control WalT nodes (deployment of a WalT image, remote shell, file transfer, etc.). Since we have added scripts to the deployed WalT image with the WiSHFUL controller, we can also fully control a LoRa mote connected to the USB port of a WalT node (flash, reboot, shutdown, and log of its output).

B. WiSHFUL for Controlling LoRa Motes

WalT

C. WalT Adaptation for Remote Nodes

As LoRa motes can span long distances, we have looked for the ability to control WalT deployments over wide areas through a VPN. However, WalT nodes heavily rely on LAN operation because of their network boot procedure (see Figure 2). Actually, booting a node over a VPN would mean that its network bootloader should itself connect to the VPN, then download and run the Linux kernel over this VPN connection, which is well beyond the abilities of current network bootloaders. We have introduced a level of virtualization in the node boot procedure (see Figure 3). Instead of just a network bootloader, remote WalT nodes have a complete operating system. Considering RPI nodes, this operating system is installed on their SD card (whereas classical WalT nodes just have the network bootloader). The operating system first sets up the local network connection (depending on the network where the node is installed), then connects to the VPN. At this time, a kvm virtual machine is started with its virtual network interface connected to the VPN. Any USB device connected to the physical node (such as a LoRa node) is also attached to this virtual machine. Then, the virtual machine acts exactly as a classical WalT node: it uses the classical WalT network bootloader to interact with the server and boot the selected WalT image. We wanted to test WiSH-WalT in real-world conditions and explore the problem of choosing the right gateway for a mote operating in a given place in function of different parameters. To get packet statistics from the TTN gateways, we have prototyped a script running on a virtual WalT node that queries the TTN API for getting the results of experiments and uses the WalT logging support to store them.

In the experiment, the LoRa mote was sending 50 packets per parameter (SF and TP). LoRa gateways are usually multi-channel so they can simultaneously demodulate on multiple channels. We have used the frame counter value to differentiate between the frames and have retained the maximal SNR value for the same frame demodulated using different channels. We have computed PDR from the number of packets received per gateway for every series of 50 packets sent. A round of measurements cycled over different parameters so that the transmission of two consecutive packets had different configuration parameters. As we only use WiSH-WalT to configure the transmission parameters on the LoRa mote and not for sending packets, WiSH-WalT does not have any impact on the transmission performance.

We present the statistics on the main performance indicators: SNR and PDR for CR of 4/5 and BW of 125 Transmission Power (dBm) kHz. We have also gathered RSSI, but it does not provide more insight into the observed LoRa performance.

For SNR in function of SF, we have observed that SF does not impact much SNR (and yet increasing SF by one adds 2.5 dB to the link budget [START_REF] Semtech | SX1272/73 -860 MHz to 1020 MHz Low Power Long Range Transceiver[END_REF]) and the level of SNR follows the ranking of distances except for Gateway 9 (figure not included for space reasons).

Figure 4 presents SNR in function of TP. For low values of SNR, decreasing SF results in lost connectivity with some gateways (e.g., Gateways 5,[START_REF] Georgiou | Low Power Wide Area Network Analysis: Can LoRa Scale?[END_REF][START_REF] Reynders | Range and Coexistence Analysis of Long Range Unlicensed Communication[END_REF][START_REF] Bor | LoRa for the Internet of Things[END_REF] well in line with Table I. Increasing TP results in better SNR except for the closest Gateway 1 that already benefits from a stable high value of SNR. Gateway 9 benefits from higher SNR than some other closer gateways because of its high point position and a clear line of sight.

Figures 5678show PDR in function of SF and TP while Figure 9 presents temporal variation of PDR during a day. We can draw up the following remarks:

• Gateway 1 benefits from a high quality of reception with almost no impact of SF and TP.

• We observe an anomaly for Gateways 1, 2, and 3 with PDR going down for increasing SF, which probably comes from contention: the collision probability is higher for longer transmission times.

• For other Gateways, the impact of SF and TP is as we could expect-we obtain better PDR with larger SF and TP. However, a good level of PDR (greater or equal to 80%) is only achieved for Gateway 1 as well as Gateways 2 and 3 for some parameter values (SF = 10-12, TP = 2 dBm). They are relatively close to the mote (< 1.2 km).

• A very good level of SNR does translate into a very good level of PDR. However, for some gateways, good levels of SNR result in average PDR, e.g., Gateway 4 only obtains between 0 and 50% PDR, which may come from obstacles in the line of sight or from increased contention. Other studies reported similar conclusions [START_REF] Petrić | Measurements, Performance and Analysis of LoRa FABIAN, a Real-World Implementation of LPWAN[END_REF]. The measurements also show that ADR, the current bit rate adaptation algorithm based on SNR is probably not the best way to cope with changing conditions.

• A high position of a gateway is important because it brings a clear line of sight: Gateway 9 in the range of 13 km obtains good PDR even for this relatively long distance.

• Nevertheless, variations in PDR are important: Figure 9 shows the average differences of around 40 % and even more for Gateway 9-it changes between 95 % and 10 % (data gathered on April 15, 2018 with some cloudy and windy weather in the afternoon). Finally, we wanted to experiment with an adaptation strategy that takes into account energy consumption. We have considered two cases with the following combination of parameters: 1) SF7-TP14 and 2) SF8-TP8 because they consume similar energy as given in Table III [START_REF] Semtech | SX1272/73 -860 MHz to 1020 MHz Low Power Long Range Transceiver[END_REF]. Increasing TP from 8 dBm to 14 dBm roughly doubles the supply current and changing SF from 7 to 8 doubles the airtime. We expected that SF7-TP14 results in better performance because according to the SX1276 datasheet, passing from SF7 to SF8 increases the link budget by 2.5 dB while the difference in transmission power is 6 dB. Table IV shows measured PDR for both cases. We can observe an interesting phenomenon: SF7-TP14 obtains better PDR only for longer distances, while SF8-TP8 performs better for closer gateways. There is a need for more experiments to understand the reason of this effect.

VI. CONCLUSIONS AND FUTURE WORK

This paper reports on the design and development of WiSH-WalT, a framework for controllable and reproducible LoRa testbeds. It takes advantage of two systems: WiSHFUL for the UPI interface that provides a flexible way for configuring the parameters of LoRa motes and WalT for easy deployment and monitoring of their operation. WiSH-WalT enables researchers and network architects to test their setup under real world conditions before final deployment and optimize the operation of LoRa motes with suitable parameters.

We present some experiments done on WiSH-WalT for evaluating the communication performance of a LoRa mote with several gateways. The measurements confirm that the performance behavior of LoRa motes follows a complex pattern based on multiple parameters. The presented results also shows that we need to perform more experiments to understand better all performance aspects. WiSH-WalT provides a suitable platform for doing this kind of research.

The current algorithm for bit rate adaptation requires a history of 20 packets to compute the adapted values of TP and SF. However, motes operate under low duty cycles and send packets infrequently, which may result in long adaptation times. Moreover, the algorithm only depends on SNR and our measurements show more complex dependency of PDR on communication conditions. Measurements with WiSH-WalT can provide an insight on whether it is beneficial to use ADR or disable it, which can reduce downlink traffic from gateways as well as save energy of motes.

In the future work, we plan to explore different approaches to bit rate adaptation and study the behavior of dense deployments in which contention may become important.

Figure 1 :

 1 Figure 1: Architecture of WiSH-WalT the identifiers and keys, WiSH-WalT provides a script to configure a LoRa device to work in the TTN network with one command. We have developed the connector to the WiSHFUL unified interface on LoRa motes (STM32L03RZ Nucleo Cortex M0+ development board with Semtech SX1276) and integrated it with the WiSHFUL Local and Global Control Programs for managing LoRa experiments. The connector parses parameters sent by the Local Control Program and executes the required functions to change parameters or obtain their values. For communication between RPI and the LoRa motes, we have modified the iCube application to send and receive data on the serial port. As mentioned previously, the ERC recommendations impose the duty cycle of 1% in the European 863-870 MHz ISM band. To save battery lifetime, the iCube LoRaWan application goes to sleep for a backoff period until a new time slot is available to send data. The WiSH-FUL Local Control Program continues to send data to the LoRa mote until it receives an acknowledgment back for the successful change (or reception) of a parameter.

Figure 2 :

 2 Figure 2: Boot procedure of a local physical WalT node

Figure 3 :

 3 Figure 3: Boot procedure of a remote virtual WalT nodeV. EXPERIMENTSWe have set up a series of experiments with a LoRa mote sending packets to several public TTN gateways (see TableIIfor the information on the place of nine involved gateways).

Figure 4 :Figure 5 :

 45 Figure 4: SNR in function of TP (SF 7)

Figure 6 :Figure 7 :Figure 8 :

 678 Figure 6: PDR in function of SF (TP 14 dBm)

Figure 9 :

 9 Figure 9: PDR during a day (SF 12, TP 2 dBm)

Table I :

 I LoRa parameters for BW of 125kHz.

	SF Chirps/symbol SNR limit	Airtime	Bit rate
	7	128	-7.5 dB	56 ms 5469 b/s
	8	256	-10 dB	103 ms 3125 b/s
	9	512	-12.5 dB	205 ms 1758 b/s
	10	1024	-15 dB	371 ms	977 b/s
	11	2048	-17.5 dB	741 ms	537 b/s
	12	4096	-20 dB 1483 ms	293 b/s

  provides a general view of the WiSH-WalT architecture. The WalT platform includes the WalT server and WalT nodes that can directly run on Raspberry Pi (RPI) (physical WalT nodes) or on a virtual machine (virtual WalT nodes running on the WalT server). RPI under WalT connects to LoRa motes or to a LoRa gateway via a serial interface. Lightweight and portable tool for exploring the topology, interacting with nodes, deploying a given operating system image on them, customizing such an image, and exploring logs. The user executes commands on the WalT server, the controller for WalT nodes. • Easy OS customization for WalT nodes. Each operating system is packaged as a docker image (called WalT image), which allows modification of images in a docker container. For instance, we have modified some existing images to include the WiSHFUL controllers (Global and Local Control Programs).

	A. WalT for Deployment and Initial Configuration
	WalT provides:

•

  images include the WiSHFUL Local Control Program so we can deploy them on RPIs connected to motes. We can install the WiSHFUL Global Control Program either on a physical machine (RPI) or run it on a virtual WalT node. The Local Control Program implements the WiSHFUL UPI for LoRa mote configuration (DevAddr, AppKey) and setting/getting the transmission parameters (transmission power, coding rate, and data rate) of LoRa motes. Based on the functions related to

	Wishful entities	WalT entities
			Wishful UPI Interface
		Local Control Program
	Global Control Program	Walt image	Connector
	Walt image	physical Walt node	LoRa gateway
	virtual Walt node
		Network of
		PoE switches
		Local Control Program
	Walt images	Walt image	Connector
	Walt Server	physical Walt node	LoRa mote

Table II :

 II Table II for the information on the place of nine involved gateways). Public TTN gateways used in the experiments

	# Gateway Altitude (m) Distance (km)
	1	236	0.136
	2	249	1.062
	3	241	1.127
	4	248	1.867
	5	253	2.029
	6	246	2.634
	7	246	3.260
	8	248	4.019
	9	2253	13.192

Table III :

 III Energy consumption for different parameters

	Energy SF8-TP8 SF7-TP14	t TX [ms] 103 56	P TX [mA] E = t TX P TX [mJ] 59 6.077 92 5.152

Table IV :

 IV PDR for two cases with similar energy consumption

	GW ID Distance [km] SF8-TP8 [%] SF7-TP14 [%]	1 0.13 1.06 1.12 1.86 2.02 13.19 2 3 4 5 9 95 94 84 21 30 41 91 80 80 44 42 63

available at https://gricad-gitlab.univ-grenoble-alpes.fr/Drakkar-LIG/WalT/wikis/home.

ACKNOWLEDGMENTS

This work has been partially supported by the WiSH-FUL European project No. 645274, the Use IoT project funded by Fonds Européens de Développement Régional (FEDER) No. N00011459 of the Auvergne-Rhône-Alpes region, and the French Ministry of Research project LabEx PERSYVAL-Lab (ANR-11-LABX-0025-01).