Walid Mabrouk
email: w.mabroukcerte@gmail.com

Ridha Lafi

| Jean

François Fauvarque

| Amor Hafiane

Cyrille Sollogoub

Walid Orcid

Mabrouk

New ion exchange membrane derived from sulfochlorated polyether sulfone for electrodialysis desalination of brackish water

The purpose of this work is to study the desalination of brackish water using a new ion exchange membrane, made from sulfochlorated polyethersulfone (Cl-PES), and crosslinked using aminated polyethersulfone (NH2-PES) as a crosslinking reagent. This membrane, named ClNH2 membrane, has been obtained by reaction between Cl-PES with 1.3 SO 2 Cl groups per monomer unit and 0.2 equivalent amount of NH2-PES. ClNH2 membrane has been characterized in terms of contact angle, transport number, intrinsic conductivity, and water uptake (as a function of temperature).

Electrodialysis performances of the newly synthetized membranes have been measured using an electrodialysis cell at a laboratory scale and compared to commercial membranes. All the experiments have been performed using synthetic brackish water solutions prepared from sodium chloride salts with different concentrations (varying from 0.5 to 5.0 g/L). The concentration of different water samples obtained has been found to be below the amount recommended by the World Health Organization (WHO) for drinking water.

K E Y W O R D S

ClNH2 membrane, conductivity, demineralization rate, desalination, electrodialysis, ion exchange membrane, ionic flux transport

| INTRODUCTION

Water is a vital and indispensable resource in various sectors. [START_REF] Van Beek | Global monthly water stress: 1. Water balance and water availability[END_REF] Nevertheless, shortage of drinking water is a serious issue throughout the world, especially because of an increase in water demand, combined with population growth and economic development. [START_REF] Dickson | Water security assessment indicators: the rural context[END_REF][START_REF] Mekonnen | Four billion people facing severe water scarcity[END_REF][START_REF] Nazemi | Urban water security: emerging discussion and remaining challenges[END_REF] Several membrane processes, like ultrafiltration (UF), nanofiltration (NF), microfiltration (MF), reverse osmosis (RO), and electrodialysis (ED) can greatly alleviate water shortage issues by producing potable water from seawater, wastewater, and brackish water. [START_REF] Turek | Cost effective electrodialytic seawater desalination[END_REF][START_REF] Streit | Electrodialysis in an integrated NF/ED process for water recovery in the leather industry[END_REF][START_REF] Strathmann | Electrodialysis, a mature technology with a multitude of new applications[END_REF] Among these processes, we can provide both fresh, pleasant water and table salt from saltwater with the help of ion exchange membranes (IEM). These membranes are in the form of thin and uniform sheets, containing fixed electrical charges, that reject the ions with the same charge. [START_REF] Khan | Preparation of anion exchange membranes from BPPO and dimethylethanolamine for electrodialysis[END_REF][START_REF] Vogel | Preparation of ion-exchange materials and membranes[END_REF] According to the need, the membrane should have a relatively high water uptake, an excellent ion exchange capacity, and good thermal and mechanical stabilities. The long-term stability of the membrane and the thermal stability are of prime importance in ED that may operate at temperatures up to 80 C. [START_REF] Burn | Desalination techniques -A review of the opportunities for desalination in agriculture[END_REF][START_REF] Cheng | Cation separations in electrodialysis through membranes coated with polyelectrolyte multilayers[END_REF][START_REF] Ergun | Electrodialytic removal of fluoride from water: effect of process parameters and accompanying anions[END_REF][START_REF] Zhang | Separation of divalent ions from seawater concentrate to enhance the purity of coarse salt by electrodialysis with monovalent selective membranes[END_REF] To date, many polymers have been used in the preparation of IEMs, for example, polystyrene, [START_REF] Vinodh | A novel anion exchange membrane from polystyrene (ethylene butylene) polystyrene: synthesis and characterization[END_REF] polyetherimide, [START_REF] Zhang | Synthesis and characterization of poly(vinylidene fluoride)-g-sulfonated polystyrene graft copolymers for proton exchange membrane[END_REF] polyetherther ketone, [START_REF] Nagarale | Recent developments on ionexchange membranes and electro-membrane processes[END_REF] polyetherbenzimidazole, [START_REF] Zheng | Proton exchange membranes based on poly(2,5-benzimidazole) and sulfonated poly(ether ether ketone) for fuel cells[END_REF] and polyarylene ether. [START_REF] Mabrouk | Preparation of new proton exchange membranes using sulfonated poly(ether sulfone) modified by octylamine (S-PESOS)[END_REF][START_REF] Mabrouk | Ion exchange membranes based upon crosslinked sulfonated polyethersulfone for electrochemical applications[END_REF] These membranes have been used for distinct applications, for example, in biomedical, [START_REF] Adiga | Nanoporous membranes for medical and biological applications[END_REF] pervaporation, [START_REF] Lue | Pervaporation of benzene/cyclohexane mixtures using ion-exchange membrane containing copper ions[END_REF] fuel cell, [START_REF] Mabrouk | Synthesis and characterization of polymer blends of sulfonated polyether sulfone and sulfonated polyether sulfone octylsulfonamide for PEMFC applications[END_REF][START_REF] Merle | Anion exchange membrane for alkaline fuel cells: a review[END_REF][START_REF] Hickner | Ion containing polymers: new energy and clean water[END_REF] desalination, [START_REF] Padaki | Preparation and characterization of sulfonated polysulfone and N-phthloyl chitosan blend composite cation exchange membrane for desalination[END_REF] electrodialysis, [START_REF] Tanaka | Ion exchange membrane electrodialysis for saline water desalination and its application to seawater concentration[END_REF] electrolysis, [START_REF] Carmo | A comprehensive review on PEM water electrolysis[END_REF] nanofiltration, [START_REF] Zhai | Advanced nanofiltration membrane fabricated on the porous organic cage tailored support for water purification application[END_REF] etc.

Preparing homogeneous exchange membranes with convenient properties for electrodialysis application was the major target of our current research. In this study, we used a membrane based on polyethersulfone, which can be easily sulfonated to obtain sulfonated polyethersulfone (S-PES) or Chloro-sulfonated. [START_REF] Mabrouk | Preparation of new proton exchange membranes using sulfonated poly(ether sulfone) modified by octylamine (S-PESOS)[END_REF][START_REF] Mabrouk | Ion exchange membranes based upon crosslinked sulfonated polyethersulfone for electrochemical applications[END_REF] The functionalization, by (chloro)sulfonation of these polymers, led to improved membrane properties in terms of perm-selectivity, and ion conductivity. In order to prevent solubilization and to increase the mechanical stability of the membranes, crosslinking has been found to be very efficient. In particular, membranes crosslinked with NH2-PES as crosslinking agent (named ClNH2) displayed excellent thermal, electrochemical properties, and good performances in proton exchange membrane fuel cell (PEMFC). [START_REF] Mabrouk | Ion exchange membranes based upon crosslinked sulfonated polyethersulfone for electrochemical applications[END_REF] In this paper, we have investigated the performances of these membranes in electrodialysis. Some new characterizations of the ClNH2 membrane with 1.1 protons per monomer unit have been performed: contact angle, ionic exchange capacity, water uptake, etc. Furthermore, the electrodialysis performances using ClNH2 membrane have been investigated and compared with those obtained with the commercial membrane (PC-SK).

| EXPERIMENTAL METHODS

| Materials

Sulfochlorated polyether sulfone and aminated polyether sulfone were synthesized at Eras Labo. N,N 0 -dimethylacetamide (DMAc) was purchased from Acros. Sulfuric acid was purchased from Scharlau. Sodium hydroxide and sodium chloride were purchased from Laurylab. PC-SA and PC-SK membranes were purchased from PC Cell GmbH German enterprise. The thickness of PC-SA and PC-SK commercial membranes in acidic and anionic form was about 120 μm in the dry state and about 150 μm in the wet state.

| Membrane preparation

ClNH2 membrane was prepared by solvent casting evaporation, by a reaction between sulfochlorated polyethersulfone and aminated polyethersulfone (NH2-PES), following the procedure described in our previous work. [START_REF] Mabrouk | Ion exchange membranes based upon crosslinked sulfonated polyethersulfone for electrochemical applications[END_REF] Different rates of NH2-PES (0.1, 0.2, 0.3, 0.4, and 0.6 equivalent mol) have been tested to react with (SO 2 Cl) groups of sulfochlorated PES. Reducing the rate led to loose mechanical stability, as the results obtained with low rates of NH2-PES (0.1 equivalent in mol) show that the membrane always loses this mechanical stability at high temperature, but with high levels of crosslinking agent (eg, 0.4 and 0.6 equivalent mol of NH2-PES), the resulting membrane gains stability in the water at high temperature but loses in terms of ionic conductivity.

The best compromise has been obtained using 0.2 mol equivalents of NH2-PES reacted with sulfochlorated PES because, with this rate, the fragility and water swelling of the membrane are greatly reduced and the ionic conductivity was close to that of the commercial Nafion membrane. The crosslinking was confirmed by the insolubility of the membrane in the reaction solvent, dimethylacetamide.

| Characterization

| Contact angle

Contact angle measurements (CA) were performed for ClNH2 membrane sample. The sample was at least 1.5 cm × 1.5 cm to avoid changes in the sample surface caused by swelling effect. The CA of ClNH2 membrane was determined using a Theta optical tensiometer (Attention). Five microliter deionized water droplet was immobilized using a syringe on the sample membrane surface under ambient temperature. The wetting process was recorded until no significant change in the surface was observed anymore. A light source was placed behind the sample and CA was calculated with the help of a computer software. [START_REF] Khayet | Membrane surface and characterization by X-ray photoelectron spectroscopy, atomic force microscopy and contact angle measurements[END_REF]

| Water uptake

Membrane sample was first dried in a vacuum oven at 80 C for 2 days and then was accurately weighed to confirm its exact dry weight. The membrane was then immersed in deionized water for 2 days at room temperature. Measurements of water uptake at high temperature were realized after putting membrane in deionized water for 6 hours and wet weight of that membrane was recorded. Droplets of adsorbed water on the membrane surface were absorbed by hydrophilic tissue paper. From the difference in mass, before and after complete drying of the membrane, WR values were measured, [START_REF] Zheng | Water uptake study and anion exchange membranes[END_REF][START_REF] Duan | Water uptake, ion conductivity and swelling properties of anion exchange membrane[END_REF][START_REF] Mabrouk | Synthesis and characterization of new membranes deriving from sulfonated polyethersulfone for PEMFC applications[END_REF] as the relative weight gain per gram of dry sample using the following Equation (1):

WR = W wet -W dry W dry à 100, ð1Þ
where W wet and W dry are the weights of the wet and dry membranes, respectively.

| Proton transport number

| Ionic conductivity

The ionic conductivities of ClNH2 and pristine membranes were measured as a function of temperature at 0% and 100% relative humidity by electrochemical impedance spectroscopy, using a Biologic Science Instruments VSP potentiostat. ClNH2 and S-PES disk form samples were placed between two platinized blocking electrodes. Relative humidity (RH) was controlled by using a stainless steel sealed-off cell consisting of two cylindrical compartments (hot and cold) connected by a tube and held at different temperatures. RH value was calculated from the ratio between the pressures of saturated water vapor at each temperature. Nyquist plots were recorded with a frequency response analysis (FRA) in interval frequency between 1000 kHz and 10 Hz with oscillating voltage amplitude of 10 mV. Electrical resistance (R) was measured from the intercept of Nyquist plot at high frequency with the real horizontal axis. [START_REF] Olsson | Poly(acrylene piperidinium) hydroxide ion exchange membranes: synthesis, alkaline stability and conductivity[END_REF] Ionic conductivity (σ, S/cm) was calculated using the following equation:

σ mS cm = e R x S , ð2Þ
where e denotes the thickness, S denotes the surface of the membrane placed between the two electrodes, and R denotes the electrical resistance.

| Electrodialysis equipment

Electrodialysis operation was carried out on a laboratory stack In this work, two stacks were used. The first one was equipped with two cation exchange membranes (ClNH2) and two anion exchange membranes (PC-SA). The second was equipped with 10 cation and anion membranes (ClNH2 and PC-SA membranes, respectively). Information from a manufacturer of membranes is collected in Table 1. The active surface for each membrane, anionic and cationic, was 64 cm 2 and each tank (dilute, concentrate and rinsing) was equipped with 1 L of solution.

Stack with two cation and anion membranes

Stack with 10 cation and anion membranes

The flow rate of all solutions was fixed at 80 L/h for all experiments.

Before starting the electrodialysis test, aqueous solutions of NaCl were pumped in dilute and concentrate compartments (with 3 and 5 g/L NaCl solutions). Ionic conductivity in the dilute reservoir was measured according to the constant applied voltage (10 V) until it reaches about 0.5 mS/cm. During ED tests, in batch recirculation mode, the conductivity was measured using a Consort D292 conductivity meter equipped with a D292 conductivity cell. Prior experiments, the conductivity cell was calibrated at room temperature.

In electrodialysis measurement, a stack with 10 cationic and anionic membrane systems are generally considered as the best option, as the interfacial resistance is reduced and polarization are not measured. The drawback of the assemblies with 10 anion PC-SA and cation ClNH2 membranes is that the cost of commercialized and synthesized membranes. However, this system can be used when applying a potential to the system, although a current can be imposed over this assembly (as in the choice of the assemblies system in this work).

When dilute and concentrate conductivities signals are measured, the current can be recorded.

ED configuration consists of a DC generator, a concentrate tank, a dilute tank, a rinsing electrode tank, and three pumps, each equipped with a flow-meter (PC Cell GmbH). Electrodes were placed in two polypropylene blocks. The membranes and spacers are stacked between electrodes forming 10 repeating sections from the ED stack.

A cell pair consists of the following: (cation exchange membrane (ClNH2, S = 64 cm 2 ), dilute flow spacer (0.5 mm), anion exchange membrane (PC-SA, S = 64 cm 2 ), concentrate flow spacer. Plastic spacers and ion membranes are placed in the stack repeatedly in sandwich form to form the flow paths of the dilute and concentrate streams, which circulates separately.

| Data analysis

The experiments aimed to study the effects of voltage, current, and concentration of solutions on batch circulation mode in ED cell Secondly, we present the results as a function of time using a stack with 10 ClNH2 and PC-SA membranes.

T A B L E

| Determination of the limiting current

The limiting current density (LCD) is a paramount parameter for the characterization of transport rates in electrochemical systems as electrodialysis process, which is the area of interest in this work. When an electrochemical system functions under limiting current, the reactions operate at the maximum rate, facilitating comparison with other electrochemical systems. It is known that an electrodialysis process indicates higher electrical resistance when used above LCD, which causes difficulties such as water dissociation or salt precipitation. It is, therefore, necessary to determine the LCD to avoid problems and to operate successfully, the electrodialyzer. [START_REF] Cerva | Determination of limiting current density and current efficiency in electrodialysis units[END_REF][START_REF] Geraldes | Limiting current density in the electrodialysis of multi-ionic solutions[END_REF] Limiting current can be experimentally determined by reporting the electrical resistance value in the membrane stack (E/I) related to the reciprocal electric current

(1/I). This is called a Cowan Brown plot. [START_REF] Doyen | Mathematical sigmoid-model approach for the determination of limiting and overlimiting current density values[END_REF] Usually, limiting current depends on solutions, membranes properties, stack construction, and flow velocity (flow rate).

| Demineralization rate

Determination of demineralization rate (DR) in this study can be determined as follows [START_REF] Ali | Denitrification of brackish water by electrodialysis: effect of process parameters and water characteristics[END_REF] :

DR % ð Þ= 100 Ã 1- C D t C 0 ! , ð3Þ
where the demineralization rate expressed in percentage, C D t and C 0 are, respectively, the initial and end conductivity of the dilute expressed in S/cm.

| Ionic transport flux

The ionic transport flux was evaluated to compare it with the ions transport from the feed phase to the receiver phase. The flux (J) was determined by using the following equation:

J mol:cm -2 :s -1 À Á = V A ΔC Δt , ð4Þ
where V is the volume of receive phase (L), A is the effective membrane area (cm 2 ), ΔC is the transported amount of ions at a time (mol/L), and Δt is the period time (s).

| Specific power consumption

Specific power consumption (SPC) is the required energy to treat a one unit volume of solution. SPC is calculated using the following equation:

SPC W:h:L -1 À Á = E: Ð t 0 I t ð Þdt V , ð5Þ
where E is the applied potential, I is the current, V is the dilute stream volume, and t is the time.

| RESULTS AND DISCUSSION

| Water uptake

The variations in the water uptake of the organically modified membrane by chemical crosslinking compared with that of the sulfonated polyethersulfone (1.3 H + pmu) have been shown in Figure 1 F I G U R E 1 Water uptake according to the temperature of ClNH2 and pristine membranes

Figure 1 shows that the water uptake of ClNH2 membrane remains stable between room temperature and 60 C, the temperature at which pristine S-PES membrane dissolves completely. This dissolution might be due to high water affinity of the S-PES (1.3 H + pmu) membrane with a high sulfonation rate. Then, the water uptake for ClNH2 membrane increases depending on the temperature, and reaches 80% at 100 C. In boiling distilled water, the membrane keeps its dimensional mechanical stability. The chemical crosslinking of the S-PES membrane increases, thus its mechanical stability in water, and reduces its water uptake.

| Contact angle

Contact angle measurements allow investigating one of the most important measurable characteristics to describe the IEM performances and fouling phenomena, such as surface hydrophobicity that plays a critical role in ions transfer. The contact angle of ClNH2 and virgin membranes was measured as shown in Figure 2, and its value is about 67 and 51 , respectively. These high angles indicate that flat sheet ClNH2 and S-PES membranes present a good hydrophilic character. The virgin membrane has a higher contact angle than that of the crosslinked membrane, which is due to the high sulfonation rate of the non-crosslinked membrane. This result is in agreement with the water uptake measurement. We notice that the temperature at which the ClNH2 conductivity increases exponentially corresponds to the temperature at which the conductivity at 0% RH decreases (around 70 C).

| Ionic intrinsic conductivity

A possible explanation of the difference of conductivities between ClNH2 and S-PES is that crosslinking increases the proton conductivity and the stability in the water at high temperature of the polymer electrolyte (Figure 1). Moreover, these results (at 100% RH)

clearly indicate that the presence of water enhances proton conductivity. These results are rather encouraging because they seem to indicate that the ionic conductivity process promotes molecular water absorption and favors the proton conduction pathways.

| Proton transport number

Proton transport numbers, reported in possesses a higher transport number (0.99) than the pristine membrane, which is unexpected, considering the higher hydrophilicity of the pristine membrane. This can be explained by the presence of a favorable rearrangement of the chemical structure skeleton of ClNH2 membrane after chemical crosslinking, which is confirmed by the water uptake and ionic conductivity results. Consequently, these results indicate that the synthesized membrane has higher capacity toward the cation ion compared to pristine membrane. All the values of transport numbers measured for S-PES and ClNH2 membranes were between 0.9 and 1. The membranes are selectively protonconducting whether crosslinked or non-crosslinked. resulting in a decrease of ions concentration in the dilute tank. This is associated with ion exchange in the membrane. [START_REF] Aguado | Relating ions concentration variations to conductivity variations in a sequencing batch reactor operated for enhanced biological phosphorus removal[END_REF] The membrane, ClNH2 (1.1 H+ pmu), used in electrodialysis removal of NaCl from aqueous solution shows better desalination performance than the commercial membrane PC-SK. ClNH2 (1.1 H+ pmu), as found by Mourad ben Ski Ali and All. [START_REF] Ali | Denitrification of brackish water by electrodialysis: effect of process parameters and water characteristics[END_REF] It can be explained by cations migrating more rapidly from dilute cell to concentrated one, due to higher IEC and lower area resistance in synthetized ClNH2 membrane.

| Ionic exchange capacity

Generally, below limiting current, increasing the amount of applied voltage increases the removal of ions. This effect is distinctly shown for ions in Figure 5. In order to show this effect, experiments were conducted. The demineralization rate (DR) was calculated using Equation (3). Then, the DR was plotted vs the applied voltage to the stack.

Demineralization rates are dependent on the concentration of feed solution (Figure 5). Effectively, when increasing the concentration, DR decreases. As it is already known, DR calculation depends on We notice in Figure 5 that DR increases as the applied voltage is increased for all curves with different concentrations. There are two distinguished parts in these curves. In the first part, the curve displays an almost linear increase of DR vs voltage between 0 and 10 V. In the same region, Figure 7 shows that SPC is almost quasi-constant. In the second part, DR increases continuously but not significantly.

F I G U R E
All the curves of ionic flux (J) and energy consumption (SPC) have a similar increasing appearance over the entire range of applied voltage. As depicted in Figures 6 and7 We noticed that DR is superior to 90% in all cases and the ionic transport decreases with experiment time. This is due to the salt exhaustion of the feed solution. We have notified also that the SPC amount increased linearly for all stacks by increasing the experiment time.

In continuous mode, the results obtained from DR do not exceed 50, while in batch recirculation mode we obtain better DR. However, more specific power was consumed.

It is clear from Figure 8 that ClNH2 membranes show a decrease in conductivity with time compared to the commercial membrane, which may be due to the high ion exchange content in the membrane matrix and the rapid ions migration. Moreover, the recorded current over the stack presents two parts for the commercial and elaborated membrane. In the first part, the current for the synthesis membrane is higher than the commercial membrane. In the second part, the current for the ClNH2 membrane is lower than the other PC-SK membrane investigated, as shown in Figure 9. This current alternation can be explained by several phenomena such as activation polarization, membrane resistance, concentration polarization, etc. Therefore, it could be preferably used for salt removal from water.

Figure 11 shows the demineralization rate evolution of the global system according to the time for different assemblies. With increasing time, the demineralization rate initially increased rapidly between 0 and 12 minutes, and the increase was less important when the time was higher than the 12 minutes for feed solutions of 3 and 5 g/L, respectively. The ED system used with commercial membranes showed the lowest demineralization rate. A higher demineralization rate could be achieved by increasing the time almost 100%, although the ionic flux decreased accordingly.

The dependence of the ionic flux (J) on the demineralization rate (DR) for the two stack ED system, using two different feed solutions, is shown in Figure 12. The ionic flux was relatively low and decreased highly with the demineralization rate when it was lower at 40% between 0 and 5 minutes for ED systems with feed solution 3 and quality in Tunisia and Europe. [START_REF] Lumb | A review of Genesis and Evolution of Water Quality Index (WQI) and some future directions[END_REF][START_REF] Lazarova | Role of water reuse for enhancing integrated water management in Europe and Mediterranean countries[END_REF] Therefore, the conductivity of the dilute stream using the selected ClNH2 membrane could reach 0.3 mS/cm after 15 minutes, and demineralization rates were approximately 100% for feed solutions of 3 and 5 g/L.

During demineralization, the energy consumption of the dilute solutions increased linearly according to the desalination time with 10 ionic membranes assembly. The results obtained for the SPCs with the synthesized and commercial membranes were similar. In Figure 13, no difference is observed and the curves superimposed, whereas a significant difference in SPC has appeared with two ionic membranes assembly (Figure 7).

Therefore, taking into account all these results, ClNH2 membrane can be successfully applied for salt removal from water. The ClNH2/ PC-SA assembly showed better desalination performance over the commercial assembly.

(

  PC Cell ED 64 002) supplied by PCA-Polymer Chemie Altmeier GmbH and PC Cell GmbH, Heusweiler, Germany. ED cell was composed of cation and anion exchange membranes, spacers, and two electrodes (anode and cathode) made of an alloy of Pt/Ir-coated titanium. Membranes and spacers were stacked between the two electrodes ends. Plastic separators were placed between cationic and anionic membranes to ensure the separation of flow paths of dilute and concentrated streams.

During all experiments, 1 L

 1 of NaCl solution was used for dilute and concentrate tanks. Two liters of sodium sulfate (Na 2 SO 4 , 0.1 M) was used as electrode rinse solution, which circulate in electrode compartments in order to prevent chlorine or hypochlorite generation. The flow rate of the electrode rinse for all experiments was 80 L/h. The same solution of NaCl for concentrate and dilute was used. Prior to the experiments, pH of all solutions was adjusted by addition of HCl and/or NaOH (1 M). However, the flow rate of dilute and concentrate tanks was fixed for all experiments to 10 L/h. Conductivity measurements of dilute and concentrate compartments were made by imposing a potential ranging from 0 to 24 V. A conductometer (712 Conductometer, Metrohm AG) was used to measure the conductivities of dilute and concentrate compartments. Water conductivity directly depends on its salt content. At the end of each experiment, a cleaning cycle of ED cell was performed by circulation of cleaning solutions, containing HCl (0.1 M), NaOH (0.1 M), and distilled water, for 30 mn to remove any deposits.

  as a function of temperature. It is observed that ClNH2 membrane has the tendency to absorb less water than pristine S-PES (1.3 H + pmu) membrane sample over the entire temperature range between room temperature and 100 C. These results prove that the chemical crosslinking agent (NH2-PES) plays a dominant role in decreasing the water uptake rate of ClNH2 membrane. For example, the percentages of water uptake at room temperature, presented in Figure 1, for S-PES (1.3 H + pmu) (without NH2-PES) and ClNH2 (1.1 H + pmu) (with NH2-PES) membranes are 83 and 23 (wt. % water/wt. membrane), respectively.The decrease in water uptake rate can be attributed to the creation of the crosslinking bridges created by covalent bond occurring between SO 2 Cl and NH 2 groups in the organic ClNH2 membrane.

Figure 3

 3 Figure 3 compares the intrinsic conductivity values of protons as a function of temperature of S-PES and ClNH2 membranes, at 0% and 100% relative humidity. As revealed by the curves, the conductivity of the ClNH2 (1.1 H + pmu) membrane is higher than the unmodified membrane over the whole temperature range (between ambient temperature ant 120 C) with and without relative humidity.

T A B L E 3

 3 Figures 4-7 represent the effect of the initial feed solution concentration on ED performances as a function of the applied voltage, using two elaborated ClNH2 membranes and two commercial PC-SA membranes. The change in NaCl conductivity in dilute and concentrated tanks for both membranes (fabricated and commercial) are shown in Figure 4 as a function of the applied voltage. The conductivity in the dilute tank is found to decrease, whereas it increases in the concentrated tank according to the desalination for both assemblies. The conductivity of the dilute solution tank results from the permeation of anion and cation in the AEM and CEM under the applied electric field,

4

 4 The conductivity change of NaCl curves with different assemblies containing two ionic membranes F I G U R E 5 Demineralization rate curves of ClNH2/PC-SA assembly F I G U R E 6 Ionic flux curves of ClNH2/PC-SA assembly F I G U R E 7 Specific power consumption curves of ClNH2/PC-SA assembly the concentration and the amount of transported ions. Therefore, DR evolves in inverse proportion to concentration.

  , J and SPC through the membranes assembly are low for the lowest initial feed concentration according to the applied voltage. At these conditions, it is noted that SPC presents low values between 0 and 5 V. Then, SPC increases due to the activation polarization.It was not possible to increase the initial feed concentration more than 3 g/L because of the overheating of the cell. It is, therefore, suitable to use this ED process with a stack containing more exchange membranes, which is the scope of the second part of this work.

4. 2 |

 2 Figures 8-13 show the results obtained for the experiment on batch recirculation mode for 3 and 5 g/L initial feed concentrations.

Figure 10

 10 Figure 10 shows the variation of NaCl concentration in the diluting compartment as a function of time. The concentration of NaCl

  5 g/L, respectively. When the DR approaches high values (almost 100%), the ionic flux decreases horizontally and approaches zero values. Because the objective of this study is to obtain drinking water from brackish water, the conductivity of the dilute stream should be F I G U R E 1 0 Concentration profiles of sodium chloride ions in different dilutes as a function of time F I G U R E 1 1 The required demineralization rate in the electrodialysis unit as a function of time by the synthetized and commercial membranes F I G U R E 1 2 Ionic flux as a function of time using ClNH2 and commercial membranes F I G U R E 1 3 Desalination energy requirement as a function of time in the dilute compartments of 3 and 5 g/L NaCl solution at 298 K lower than 0.5 mS/cm according to the standard for drinking water

5 |

 5 CONCLUSIONCation exchange membrane, newly synthesized by an easy chemical crosslinking method of sulfonated polyether sulfone (1.3 H + pmu) with aminated polyether sulfone NH2-PES, has been used for desalination via electrodialysis. The hydrophilic character of the ClNH2 membrane is confirmed by contact angle measurement. The prepared membrane has higher stability at elevated temperatures in water. In addition, the water uptake in water aqueous solution was gradually decreased compared to the pristine membrane as the temperature was increased. The mechanical stability properties of ClNH2 membrane were improved and the hydrophilic character was reduced. In particular, chemical crosslinking prevented the dissolution of ClNH2 membrane in water at 60 C. ClNH2 membrane has ion exchange capacity of 2.2 meq/g (1.1 H+ pmu) and cation transport number close to unity. It was found that the membrane fixed ion concentration and water uptake were decreased after chemical crosslinked.The fabricated ClNH2 membrane showed excellent performance in the removal of NaCl from water in ED desalination applications. ED results revealed that the demineralization rate was increased using the new membrane and can reach 100%. The obtained results are valuable in electromembrane processes, especially in the electrodialysis process related to water recovery and treatment. This showed that the ClNH2 membranes could be successfully employed for desalination by electrodialysis in laboratory cell. The ClNH2 (1.1 H + pmu) membrane showed higher desalination performance than commercial membrane PC-SK. Overall, the developed ClNH2 membranes are suitable for water desalination and other separation processes.T A B L E 4 The membrane electrodialysis (ED) performance compared to the commercial membrane PC-SK

1

  Ion exchange capacity of all membranes performance using the newly synthesized ClNH2 membrane. All figures and tables refer to changes in concentration in the dilute solution. Firstly, we present the ED performances according to the potential using the stack with two ClNH2 and two PC-SA membranes.

	Membrane	Surface	Thickness (μm)	IEC
	S-PES	9 cm 2	120 ± 5	2.60 ± 0.05 meq/g
	ClNH2	9 cm 2	120 ± 5	2.20 ± 0.05 meq/g
	PC-SA	9 cm 2	130 ± 5	1.25 ± 0.05 meq/g
	PC-SK	9 cm 2	130 ± 5	1.30 ± 0.05 meq/g

Table 2

 2

, were measured for two membranes (S-PES and ClNH2) as a function of current density and H 2 SO 4 solution concentration. ClNH2 membrane (1.1 H + pmu)

  Ionic exchange capacity values of different membranes are reported in Table1. For ClNH2 membrane (1.1 H + pmu), 0.2 equivalent in mol of aminated polyethersulfone has been reacted with pristine sulfochlorated polyether sulfone (Cl-PES), leaving 1.1 SO 2 Cl pmu unreacted and further hydrolyzed to 1.1 SO 3 H group pmu as titrated.The results, given in Table1, show that the non-crosslinked membrane gives the maximal ion exchange capacity (2.6 meq/g), and that the creation of crosslinking bridge in ClNH2 membrane leads to a Comparison between transport numbers of ClNH2 and pristine membrane

				decrease of the ionic exchange capacity. Despite the decrease of IEC
				and water uptake for ClNH2 membrane, the ionic conductivity and
				transport number are improved.
				4 | DESALINATION PERFORMANCE
				OF THE FABRICATED MEMBRANES
				4.1 | Effect of applied voltage on NaCl removal
				with two membrane assembly
				Current
				intensity	Time	t +	t +
	Membrane	Surface	[H 2 SO 4 ]	(mA)	(min)	cathodic	anodic
	ClNH2 (1.1 H + pmu)	4.15 cm 2	1 M	100	188	0.99	0.99
	ClNH2 (1.1 H + pmu)	4.15 cm 2	1 M	70	243	0.99	0.99
	ClNH2 (1.1 H + pmu)	4.15 cm 2	1 M	40	430	0.99	0.99
	S-PES (1.3 H + pmu)	4.15 cm 2	1 M	100	188	0.98	0.99
	S-PES (1.3 H + pmu)	4.15 cm 2	1 M	70	243	0.99	0.98
	S-PES (1.3 H + pmu)	4.15 cm 2	1 M	40	430	0.98	0.97

After its complete characterization, ClNH2 membrane was employed in electrodialytic removal of NaCl from aqueous solution to evaluate its performance during electrodialysis at room temperature. The desalination results were compared with those obtained with a commercial membrane PC-SK (German PC Cell GmbH society).

The results of limiting current and debiting current of the ClNH2/ PC-SA assembly and PC-SK/PC-SA commercial assembly are presented in Table

3

. We observe that the limiting current increases with

T A B L E 2


Cesar Vargas

Nadège Varsier

Jean Schwoerer

Xavier Lagrange

Distance-aware relay selection in an energy-efficient discovery protocol for 5G D2D communication

Keywords: mMTC, energy-efficient, relay selection, stochastic geometry

Massive machine-type communications (mMTC) is one of the main services delivered by the fifth Generation (5G) mobile network. The traditional cellular architecture where all devices connect to the base station is not energy efficient. For this reason, the use of device-to-device (D2D) communications is considered to reduce the energy consumption of mMTC devices. The main idea is to use nearby user equipment (UE) as a relay and establish with it D2D communication. However, the relay selection process also consumes energy, and this consumption can be significant compared to the energy consumed during the data transmission phase.

In this paper, we propose a distributed energy-efficient D2D relaying mechanism for mMTC applications. This mechanism favors the selection of the UEs with low path loss with the mMTC device. Through mathematical analysis and simulations, we show that our mechanism allows a reduction of the total energy consumption of mMTC devices (up to 75% compared to direct transmission) when they have an unfavorable link budget. Moreover, our mechanism achieves almost constant energy consumption for a large range of UE densities and distances between the mMTC device and the base station.

Index Terms-D2D relaying,

I. INTRODUCTION

M ASSIVE machine-type communications (mMTC) is one of the main services supported by the fifth Generation (5G) mobile network [START_REF] Series | IMT Vision-Framework and overall objectives of the future development of IMT for 2020 and beyond[END_REF]. These services are characterized by a massive number of energy-constrained and low complexity devices that sporadically transmit small data packets. mMTC devices, also known as machine-type devices (MTDs), are usually located in poor coverage areas, like deep indoors or basements. Some MTDs receive downlink signals but cannot successfully transmit uplink signals. This imbalance between downlink and uplink is due to the difference between the transmission power of the base station (BS) and the transmission power of the MTD. The main challenge in mMTC applications is, therefore, to achieve energy-efficient uplink connectivity for MTDs, taking into account specific mMTC constraints [START_REF] Parkvall | Nr: The new 5g radio access technology[END_REF].

Device-to-device (D2D) communication is a promising technology to improve the performance of cellular networks. It is defined as direct communication between two nearby devices without routing data through a BS [START_REF] Wong | Key technologies for 5G wireless systems[END_REF]. This technology has been proposed for applications such as public safety services [START_REF] Gpp | Feasibility study for Proximity Services (ProSe)[END_REF], extending network coverage [START_REF] Vanganuru | System capacity and coverage of a cellular network with d2d mobile relays[END_REF], offloading network [START_REF] Zhao | Mobile-traffic-aware offloading for energy-and spectral-efficient large-scale d2d-enabled cellular networks[END_REF], [START_REF] Zhang | Load balancing for 5g ultra-dense networks using device-to-device communications[END_REF], D2D relaying [START_REF] Tefek | Relaying and radio resource partitioning for machine-type communications in cellular networks[END_REF]- [START_REF] Al-Hourani | Relay-assisted deviceto-device communication: A stochastic analysis of energy saving[END_REF], etc.

C. Vargas Anamuro, N. Varsier, and J. Schwoerer are with Orange Labs, 28 Chemin du Vieux Chêne, 38240 Meylan, France (e-mail: cesaraugusto.vargasanamuro@orange.com; nadege.varsier@orange.com; jean.schwoerer@orange.com).

X. Lagrange is with the ADOPNET Team, IMT Atlantique/IRISA, 35576 Cesson-Sevigne, France (e-mail: xavier.lagrange@imt-atlantique.fr).

D2D relaying is a technique that consists of using a device as a relay to help a source to communicate with its destination. In [START_REF] Nishiyama | Relay-by-smartphone: realizing multihop device-to-device communications[END_REF], the authors suggest the use of smartphones as relays for communication between users in case of natural disasters. The authors of [START_REF] Rigazzi | Aggregation and trunking of m2m traffic via d2d connections[END_REF], [START_REF] Zhang | Iot-u: Cellular internet-of-things networks over unlicensed spectrum[END_REF] propose the use of user equipments (UEs) to aggregate and relay the data from nearby MTDs. The advantage of this approach is that UEs form a virtual cellular infrastructure allowing spatial diversity to be exploited since the MTD can choose when establishing a link between the BS or a nearby UE as a relay [START_REF] Tehrani | Device-to-device communication in 5g cellular networks: challenges, solutions, and future directions[END_REF]. D2D relaying can be implemented in half-duplex (HD) or fullduplex (FD). In HD the relay receives and transmits signals using orthogonal resources, while in FD the relay transmits and receives simultaneously using the same resources. FD is efficient when the data is divided in a set of packets because the relay can transmit a previously received packet to the BS while receiving a new one from the MTD. However, one of the main challenges of FD is the self-interference mitigation, which limits the practical implementation to communications with fixed infrastructure-based relays, low transmission power, and short communication ranges [START_REF] Liu | In-band full-duplex relaying: A survey, research issues and challenges[END_REF].

The D2D relaying mechanism consists of two phases [START_REF] Shah | The relay selection and transmission trade-off in cooperative communication systems[END_REF]: the discovery phase and the data transmission phase. While in the discovery phase the MTD searches for and selects a UE that will be used as a relay, in the data transmission phase the MTD transmits its data to the relay. The relay selection can be performed in a centralized manner [START_REF] Li | Energy-efficient optimal relay selection in cooperative cellular networks based on double auction[END_REF], [START_REF] Seyfi | Effect of feedback delay on the performance of cooperative networks with relay selection[END_REF], [START_REF] Michalopoulos | Amplify-and-forward relay selection with outdated channel estimates[END_REF] or distributed manner [START_REF] Zhou | Energy-efficient cooperative communication based on power control and selective single-relay in wireless sensor networks[END_REF], [START_REF] Bletsas | Cooperative communications with outage-optimal opportunistic relaying[END_REF]. With the centralized approach, the BS selects the relay; whereas, with the distributed approach, it is the MTD itself that selects the relay that it will use.

There are multiple criteria to select a relay depending on the metrics to improve: the transmission rate [START_REF] Ouyang | Collision resolving relay selection in large-scale blind relay networks[END_REF], energy consumption [START_REF] Alsharoa | An energy-efficient relaying scheme for internet of things communications[END_REF], and the network lifetime [START_REF] Alsharoa | An energy-efficient relaying scheme for internet of things communications[END_REF], [START_REF] Awang | Toward an analysis of energy consumption in multihop wireless sensor networks[END_REF]. Reducing energy consumption is fundamental to address the requirements of mMTC applications. In the literature, the majority of authors do not consider energy consumption in the discovery phase since they assume that the energy consumed in the discovery phase is insignificant compared to the energy consumed in the data transmission phase [START_REF] Li | Energy-efficient optimal relay selection in cooperative cellular networks based on double auction[END_REF], [START_REF] Al-Hourani | Relay-assisted deviceto-device communication: A stochastic analysis of energy saving[END_REF], [START_REF] Zhou | Energy-efficient cooperative communication based on power control and selective single-relay in wireless sensor networks[END_REF]. This hypothesis can be valid when the association between the MTD and the relay is stable and when a large amount of data is transmitted. However, in mMTC applications, the MTDs transmit small data packets consuming a small amount of energy in the data transmission process. Therefore, the energy consumption in the discovery phase becomes no longer negligible [START_REF] Shah | The relay selection and transmission trade-off in cooperative communication systems[END_REF]: it might even be equivalent to the energy consumption in the data transmission phase. Therefore, for mMTC applications the discovery phase is critical since it In the literature, there is no proposal of a relay-selection distributed protocol with moderate signalling together with an analytical and therefore reproducible study.

B. Objective

Our objective is to reduce the energy consumption of MTDs with an unfavorable uplink budget. We thus propose the use of a relaying mechanism with the following design guidelines.

• The mechanism should be simple to implement.

• It should work when the MTD and/or the potential relays are mobile. Thus, it should not use the knowledge of the environment (e.g. the number of potential relays) except what can be directly measured by the MTD or the UEs. • The mechanism should be efficient for short packets (up to 1000 bytes). The objective is not to minimize the energy consumption during the data transmission phase but to minimize the total consumption of the MTD during both the discovery and the data transmission phases. • The target is not to systematically select the relay that has the lowest path loss with the device but only to favor relays with low path loss from a statistical point of view. In this paper, we propose a relaying mechanism that allows a reduction of the total MTD energy consumption. To reduce MTD energy consumption in the discovery phase, the MTD sends only one discovery message and waits for the response from a relay candidate (UE located close to the MTD). Once the UEs receive the discovery message, they randomly choose a time-slot from a fixed-size contention window to respond to the MTD. We already explored this approach in [START_REF] Anamuro | Energyefficient discovery process for mmtc applications[END_REF]. The novelty of this paper lies in the time-slot selection, based on a truncated geometric distribution, which has the MTD-UE path loss as one of its parameters. This allows our protocol to prioritize the selection of the UE with the lowest MTD-UE path loss without wasting energy looking exactly for the best UE. It is well established that the lower the MTD-relay path loss, the lower the MTD energy consumption during the data transmission phase. In other words, our protocol provides an acceptable compromise between energy consumption in the discovery phase and selecting the best relay for the data transmission phase.

Another benefit of selecting the UE with the lowest MTD-UE path loss is that the D2D communication is short and the same resources can therefore be reused for other D2D links, reducing radio resource consumption within the cell. On the other hand, the drawback of this configuration is that the UE cannot work in full-duplex mode as it is far from the BS, and thus requires a high transmission power. Therefore, in this paper, we consider that MTDs and relaying UEs work in half-duplex mode.

C. Key Contributions

The main contributions of this work can be summarized as follows:

1) We propose a distributed access and relay selection mechanism, which gives priority to nearby UEs to be selected as relays. This mechanism is suitable for mMTC applications since it is efficient in terms of MTD energy consumption and can easily be implemented. Our mechanism achieves almost constant energy consumption for a large range of UE densities and MTD-BS distances. 2) Using stochastic geometry, we provide an analytical framework to analyze the performance of our mechanism in terms of relay discovery probability, the average number of time slots used in the contention process, probability density function (PDF) of the MTD-relay distance, and the average MTD energy consumption in the D2D mode. This analytical framework is based both on homogeneous and inhomogeneous Poisson point processes. The rest of the paper is organized as follows. Section II presents the system model considered in this paper. In Section III, we present our D2D relaying mechanism and the random choice of time slot. In Section IV a detailed analysis of our mechanism is conducted. The numerical results and discussion are presented in Section V. Finally, conclusions and future work are given in Section VI.

II. SYSTEM MODEL A. Network Model

We consider a single cell in which the UEs and the MTDs form two independent homogeneous Poisson point process (H-PPP) with densities λ u and λ m , respectively. As shown in Fig. 1, we assume that all the UEs and MTDs are in coverage and thus they can transmit their data directly to the BS (cellular mode). However, an MTD that is in poor coverage may use a nearby UE as a relay (D2D mode) to reduce its energy consumption. We assume overlay inband D2D where the BS allocates dedicated resources for D2D links in order to mitigate interference between D2D and cellular communications.

B. Propagation Model

We model the signal propagation considering a log-normal shadowing propagation model [START_REF] Awang | Rssi-based forwarding for multihop wireless sensor networks[END_REF]. We assume a fixed transmission power P tx . Thus, the received power P rx is obtained as

P rx = P tx Kr -α g exp(χ), (1)
where r g is the Euclidean distance between transmitter and receiver, K and α are the path-loss factor and the path-loss exponent, respectively, and χ is a zero-mean Gaussian random variable with variance σ 2 . Log-normal shadowing is also characterized in terms of its dB-spread σ dB = 10σ/ ln [START_REF] Anamuro | Energyefficient discovery process for mmtc applications[END_REF]. We assume that χ is constant during the discovery phase. We also consider that each communication mode (cellular and D2D) has specific K and α values. To simplify the analysis, we use the displacement theorem [29, lemma 1]. Thus, the initial homogeneous PPP Φ u with shadowing is transformed into a homogeneous PPP Φ u with density λ u = λ u e 2σ 2 /α 2 without shadowing but with modified distance r = exp(-χ/α)r g [START_REF] Song | Analysis of macro diversity based on maximum ratio combining in long range aloha networks[END_REF]. We can rewrite [START_REF] Series | IMT Vision-Framework and overall objectives of the future development of IMT for 2020 and beyond[END_REF] as

P rx = P tx Kr -α .
(2)

Now, we have a distance-based path loss model in [START_REF] Parkvall | Nr: The new 5g radio access technology[END_REF]. In the rest of this paper, the performance analysis of D2D communications (MTD-UE links) will be based on the modified distances, which combine the path loss due to the distance and the shadowing effects. We can also derive the path loss as a function of the modified distance:

L = r α /K. (3)

C. Energy Consumption Model

In order to compute the total MTD energy consumption, we consider a model based on energy states. In this model, an MTD can operate in one of the following states: Active (Tx or Rx), or Idle. The MTD transmission power is fixed, thus each state has a specific and constant power consumption [START_REF] Gpp | Cellular system support for ultra low complexity and low throughput internet of things," 3rd Generation Partnership Project (3GPP)[END_REF]. The total energy consumed by the MTD is computed as:

E m,total = P m,T t m,T + P m,R t m,R + P m,I t m,I , (4)

III. D2D RELAYING PROTOCOL DESCRIPTION

A. Assumptions

Before introducing our relaying mechanism, the following assumptions are made:

• The channel is reciprocal, i.e., the channel from MTD to UE is the same as the channel from UE to MTD [START_REF] Awang | Rssi-based forwarding for multihop wireless sensor networks[END_REF]. • The MTD estimates the downlink path loss from the measurement of Reference Signal Received Power (RSRP) and the transmission power of the downlink reference signals, which is broadcast by the BS [START_REF] Ahmadi | LTE-Advanced: a practical systems approach to understanding 3GPP LTE releases 10 and 11 radio access technologies[END_REF]. • The set of relay candidates groups all UEs that satisfy the condition L m,u < L th , where L m,u is the MTD-UE path loss and L th is the D2D path loss threshold.

The value of L th can be preconfigured in advance by the cellular operator. In the transformed PPP Φ u , the condition L m,u < L th is equivalent to considering that a UE is a relay candidate if and only if it is located inside a circular area of radius R d centered around the MTD. This area is called discovery area. From (3),

R d = (K d L th ) 1/α d
, where K d and α d are respectively the path loss factor and path loss exponent for D2D links. • We assume half-duplex operations. A destructive collision occurs when multiple devices transmit in the same time slot [START_REF] Rigazzi | Aggregation and trunking of m2m traffic via d2d connections[END_REF].

B. D2D Relaying Mechanism

We represent the D2D relaying procedures for MTDs and UEs in Fig. 2. These procedures consist of the following steps:

1) Synchronization and network configuration: The MTD synchronizes with the BS and reads the network configuration messages. The MTD measures the data size D and the MTD-BS path loss L m,b , and starts the discovery phase if and only if L m,b > L th,cell and D > D th,cell ; otherwise, it transmits its data directly to the BS. L th,cell and D th,cell are two parameters that determine the transmission mode and are set by the cellular operator to avoid unnecessarily using a relay mechanism, e.g., in case the MTD-BS link has very low path loss.

2) RR packet transmission: The MTD broadcasts a

Request-for-Relay (RR) packet that carries its ID. Then, it switches from Tx state to Rx state and waits for a response from a UE. 3) Contention process: A UE that receives an RR packet measures the MTD-UE path loss L m,u . Only the UEs having L m,u < L th participate in the contention process (relay candidates). Let W be the contention window size, which can be previously defined by the cellular operator. Each relay candidate chooses randomly a timeslot s ∈ [1, W ] with a probability ρ and responds with a Relay-Candidate (RC) packet in that time-slot. The RC packet carries the ID of the relay candidate. 4) Feedback transmission: The first relay candidate that transmits an RC packet without collision wins the contention process and will be the selected relay. The MTD broadcasts a feedback packet as soon as it successfully receives an RC packet. In this packet, the MTD announces the selected relay ID and the modulation and coding schemes (MCS) to be used during the data transmission phase. After reading the feedback packet, only the selected relay remains active (i.e., in Rx state). 5) Data transmission: If the MTD finds a relay, it establishes a D2D link with the selected relay to transmit its data. Otherwise, the MTD transmits directly to the BS. To avoid collisions between the packets transmitted by the MTD and those transmitted by the relay candidates, the MTD is the only one that can transmit from the beginning of the time slot. The relay candidates first listen to the beginning of the time slot and remain in the Rx state if the MTD is transmitting.

Fig. 3 (a) shows the packet exchange sequence when the MTD selects a relay during the discovery phase. In this network, W = 6 and there are five relay candidates. UE-1 and UE-3 respectively choose time slot 4 and 6, while UE-2 and UE-4 randomly select time slot 2. In time slot 1 no relay candidate responds, thus the MTD waits for the next time slot. In time slot 2 a collision occurs, so the MTD has to wait for the next time slot. In time slot 3, only UE-5 transmits an RC packet (i.e., single slot) and thus wins the contention process. In the next time slot, the MTD broadcasts the feedback packet indicating the ID of the selected relay (in this example UE-5) and forcing the other UEs to stop the contention process. Note that in time slot 4, UE-1 does not transmit since it hears that the MTD is transmitting something. Fig. 3 (b) shows the packet exchange sequence when the MTD does not select a relay. UE-1 and UE-2 select the same time slot and thus a collision occurs in time slot 2. The MTD waits for an RC packet until the maximum number of time slots W = 6 is reached. Since the MTD does not successfully receive any RC packet, it transmits directly to the BS.

In [START_REF] Anamuro | Energyefficient discovery process for mmtc applications[END_REF], we have proposed a similar D2D relaying mechanism, in which the contention process was based on a uniform distribution. Unlike [START_REF] Anamuro | Energyefficient discovery process for mmtc applications[END_REF], in this paper, we propose a contention process based on a truncated geometric distribution. This improvement allows to select the nearby UEs as relays without increasing the energy consumption in the discovery phase.

C. Random Choice of Time-slot

According to the D2D relaying mechanism, the relay candidate that chooses the first time-slots has a higher probability of being selected as a relay. In other words, to prioritize the choice of the nearest UEs as relays, they must respond in the first time-slots. To perform this task, we consider a random choice of time-slot based on a truncated geometric distribution [28], where a parameter of this distribution depends on the modified MTD-UE distance.

1) Truncated geometric random choice case: The relay candidates randomly choose one time-slot s ∈ [1, W ], where W is the contention window size. The probability of transmitting in time slot s depends on the modified MTD-UE distance r as [START_REF] Awang | Rssi-based forwarding for multihop wireless sensor networks[END_REF]:

ρ(s, r) = g(r) s-1 (1 -g(r)) 1 -g(r) W , s ∈ [1, W ] (5)
where

g(r) = b + 1 -b 2 b r R d , (6)
where the parameter 0 < b < 1 is constant and tunable to allow a UE closer to the MTD to have a higher probability of sending an RC packet. As a result, each relay candidate has a particular probability mass function (PMF) of the time slot choice. Fig. 4 shows the PMFs of the time slot choice in a scenario where an MTD is located at the origin, and there are four UEs in the discovery area. UE-1, UE-2, UE-3, and UE-4 are located 30, 120, 210, and 300 meters from the MTD, respectively. In this example, we assume R d = 300 meters, b = 0.6, W = 8 time-slots, and shadowing σ dB = 8 dB.

2) Uniform random choice case: We can show that the uniform random choice of time slot employed in [START_REF] Anamuro | Energyefficient discovery process for mmtc applications[END_REF] is a particular case of the truncated geometric random choice. When b → 1, from (6) we get g(r) → 1 and thus in [START_REF] Vanganuru | System capacity and coverage of a cellular network with d2d mobile relays[END_REF] we have The probability of choosing time slot s ∈ [1, W ] is thus independent of the MTD-UE distance.

lim g(r)→1 ρ(s, r) = lim g(r)→1 g(r) s-1 W k=1 g(r) k-1 = 1 W . (7)
IV. ANALYTICAL MODEL In this section, we derive analytical expressions to evaluate our relaying mechanism. First, we focus on the analysis of the relay discovery probability, which refers to the probability that the MTD selects a relay during the contention process. Another indicator that we analyze is the number of time slots used in the contention process. This indicator is directly related to energy consumption and radio resource consumption during the discovery phase. The mechanism has a better performance when this indicator is small. Once the MTD has selected a relay, it can estimate the MTD-relay distance and accordingly adapts the MCS that it will use during the data transmission phase. We thus derive the PDF of the MTD-relay distance. Finally, we provide analytical expressions for the total energy consumed by the MTD in cellular mode and D2D mode. We evaluate our mechanism based on the energy model defined by 3GPP in [START_REF] Gpp | Cellular system support for ultra low complexity and low throughput internet of things," 3rd Generation Partnership Project (3GPP)[END_REF]. The baseline scenario consists of an MTD that sends its data to the BS through cellular communication.

A. Relay Discovery Probability

At a given time slot s, all the relay candidates located at distance r from the MTD have the same probability ρ(s, r) of transmitting an RC packet (i.e., isotropic intensity function), but this probability changes depending on r. Thus, the relay candidates form an inhomogeneous PPP (I-PPP) centered around the MTD and with density function λ(r) = ρ(s, r)λ u , where r is the radius in polar coordinates, and ρ(s, r) is given in [START_REF] Vanganuru | System capacity and coverage of a cellular network with d2d mobile relays[END_REF]. Using the definition of an I-PPP [START_REF] Streit | Poisson point processes: imaging, tracking, and sensing[END_REF], we can deduce the probability of receiving n RC responses in time slot s:

P(N = n) = (Λ s ) n n! exp(-Λ s ), (8)
where Λ s is the intensity measure, which is given by

Λ s = 2π R d 0 λ(r)rdr = 2πλ u R d 0 ρ(s, r)rdr. (9)
The MTD successfully receives an RC packet in time slot s if only one relay candidate answers in that time slot (single time-slot). From [START_REF] Tefek | Relaying and radio resource partitioning for machine-type communications in cellular networks[END_REF] we can find the probability that time slot s is a single time slot:

P 1 (s) = P(N = 1) = Λ s exp(-Λ s ). ( 10
)
Since in each time slot s the relay candidates form an independent thinning PPP, thus the relay discovery probability can be obtained as

P disc = 1 - W s=1 (1 -P 1 (s)). (11)
In case of a uniform random choice of time slot: let P 1,uni and P disc,uni respectively be the probability of single time slot and relay discovery probability. With the substitution of ( 7) into (10), we have

P 1,uni = πR 2 d λ u W exp - πR 2 d λ u W . (12)
Note that P 1,uni is independent of s. Thus, the relay discovery probability defined in [START_REF] Li | Energy-efficient optimal relay selection in cooperative cellular networks based on double auction[END_REF] can be simplified as follows:

P disc,uni = 1 -(1 -A exp(-A)) W , (13)
where A = πR 2 d λ u /W .

B. Number of Slots Used in the Contention Process

Let S be a discrete random variable that represents the number of time slots used in the contention process. The contention process ends as soon as an RC packet is successfully received by the MTD or when the maximum number of time slots W is reached.

For S = 1, 2, ..., W -1, the probability that the contention process ends in time slot s is equivalent to the probability of a reception failure in the 1st, 2nd, ..., (s -1)th time slots and a successful reception at the sth time slot. Thus, we have

P(S = s) = P 1 (s) s-1 j=1 (1 -P 1 (j)), s ∈ [1, W -1]. ( 14
)
The number of time slots used in the contention process is W when an RC packet is successfully received in time slot W (the first W -1 time slots fail) or when all receptions fail. Thus, the probability P(S = W ) is equivalent to the probability of a reception failure in the 1st, 2nd,...,(W -1)th time slots:

P(S = W ) = W -1 j=1 (1 -P 1 (j)). (15)
The average number of time slots used in the contention process can be determined as

S = W s=1 sP(S = s). (16)
Substituting ( 14) and ( 15) into ( 16), we have

S = W -1 s=1 sP 1 (s) s-1 j=1 (1 -P 1 (j)) + W W -1 j=1 (1 -P 1 (j)). (17)

C. PDF of the MTD-Relay Distance

We derive the PDF of the MTD-relay distance in case of a successful relay discovery. Let R be the distance between the MTD and the relay. The cumulative distribution function (CDF) of R can be calculated as

F R (r) = P(R ≤ r) = W s=1 P(R ≤ r|s)P(S = s), (18)
where 0 ≤ r ≤ R d , P(S = s) is the probability that an RC packet is successfully received in time slot s, which is defined in [START_REF] Zhang | Iot-u: Cellular internet-of-things networks over unlicensed spectrum[END_REF]. P(R < r|s) is the probability that the selected relay is located inside a disk of radius r given that an RC packet is successfully received in time slot s. This probability can be derived as follows:

P(R ≤ r|s) = r 0 2πλ u ρ(s, x)xdx R d 0 2πλ u ρ(s, x)xdx = r 0 ρ(s, x)xdx I s , (19)
where 14) and ( 19) into (18), we have

I s = R d 0 ρ(s, x)xdx. Substituting (
F R (r) = W s=1 r 0 ρ(s, x)xdx I s P 1 (s) s-1 j=1 (1 -P 1 (j)). (20)
By differentiation, we obtain the PDF of the MTD-relay distance

f R (r) = dF R (r) dr = r W s=1 ρ(s, r) I s P 1 (s) s-1 j=1 (1 -P 1 (j)), (21)
where

0 ≤ r ≤ R d .
If we consider a uniform random choice of time slot in the contention process, the PDF of the MTD-relay distance becomes

f R,uni (r) = 2r R 2 d (1 -(1 -P 1,uni (s)) W ), 0 ≤ r ≤ R d , (22)
where P 1,uni (s) is defined in [START_REF] Nishiyama | Relay-by-smartphone: realizing multihop device-to-device communications[END_REF]. This result has also been derived in [START_REF] Anamuro | Energyefficient discovery process for mmtc applications[END_REF].

D. Analysis of the Total MTD Energy Consumption 1) Total MTD Energy Consumption in Cellular Mode: In cellular mode, the MTD transmits its data directly to the BS as in the traditional cellular uplink. The MTD energy consumption E cell in cellular mode can be computed as

E cell = P m,T D/C m,b , (23)
where P m,T is the MTD power consumption in Tx state, D is the data packet size, and C m,b is the data rate (bits per second) in the MTD-BS link. Let θ m,b be the signal-to-noise ratio (SNR) in the MTD-BS link. The received power is derived in (1), thus the SNR is given by

θ m,b = P m K c exp(χ) N 0 B w (d m,b ) αc , (24)
where P m is the MTD transmit power, K c and α c are respectively the path loss factor and path loss exponent for cellular links, B w is the bandwidth, N 0 is the noise power spectral density, and d m,b is the Euclidean MTD-BS distance.

Recall that χ is a zero-mean Gaussian random variable.

The MTD transmits its data only if the SNR is greater than a predefined threshold θ min (transmission constraint), for example θ min = -10 dB [START_REF] Gpp | Evolved Universal Terrestrial Radio Access (E-UTRA); Radio Frequency (RF) system scenarios[END_REF]. For a given MTD-BS distance d m,b , the SNR θ m,b depends on χ. We can obtain therefore the minimum value χ min that satisfies the transmission constraint θ m,b ≥ θ min . From [START_REF] Alsharoa | An energy-efficient relaying scheme for internet of things communications[END_REF] we have

P m K c exp(χ) N 0 B w (d m,b ) αc ≥ θ min . (25)
So the minimum value of χ as a function of d m,b is:

χ min = ln θ min N 0 B w P m K c + α c ln(d m,b ). (26)
The MTD does not transmit its data to the BS if θ m,b < θ min . Otherwise, it transmits its data and we assume that it can dynamically adapt its data rate according to SNR. Thus, we use a modified Shannon capacity formula proposed in [START_REF] Mogensen | Lte capacity compared to the shannon bound[END_REF] for computing the data rate:

C m,b = 0, θ m,b < θ min , B eff B w log 2 (1 + θ m,b /θ eff ), θ m,b ≥ θ min , (27)
where B eff adjusts for the system bandwidth efficiency of LTE, θ eff adjusts for the SNR implementation efficiency of LTE.

Observe that the transmission constraint (θ m,b ≥ θ min ) is equivalent to the constraint χ ≥ χ min for a given d m,b . Combining ( 23) and ( 27) we obtain the MTD energy consumption in cellular mode:

E cell (χ) =      0, χ < χ min , P m,T D B eff B w log 2 1 + PmKc exp(χ) N0Bwθeff(d m,b ) αc , χ ≥ χ min .
(28) It is clear that if χ < χ min , the MTD does not transmit anything and therefore it does not consume energy. Thus, the average MTD energy consumption for a given d m,b is

E cell (d m,b ) = P(χ ≥ χ min ) +∞ χmin E cell (x)f χ (x)dx, ( 29
)
where

f χ (x) = 1 √ 2πσ 2 exp( -x 2 2σ 2 )
is the PDF of a zero-mean Gaussian random variable with variance σ 2 ; P(χ ≥ χ min ) is the transmission probability, which can be easily derived from the complementary cumulative distribution function (CCDF) of a zero-mean Gaussian distribution. Thus we have

P(χ ≥ χ min ) = 1 2 - 1 2 erf χ min σ √ 2 , (30)
where erf(x) = 2 √ π

x 2 0 exp(-t 2 )dt refers to the error function.

2) Total MTD Energy Consumption in D2D Mode: The average of the total MTD energy consumption in D2D mode can be calculated as follows:

E D2D,total = E D2D,disc + E dataTx , (31)
where E D2D,disc and E dataTx are the average energy consumption in the discovery phase and data transmission phase, respectively. We consider a fixed data rate during the discovery phase and a dynamic data rate adaptation during the data transmission phase. The MTD is in Tx state when it transmits the RR and feedback packets, while it is in Rx state during the contention process. Thus, the average energy consumption during the discovery phase is

E D2D,disc = T s (2P m,T + SP m,R ), (32)
where T s is the time slot duration, and S is the average number of slots used in the contention process, which is given by [START_REF] Liu | In-band full-duplex relaying: A survey, research issues and challenges[END_REF].

The MTD transmits its data to the selected relay (D2D communication). However, in case no relay has been found, the MTD transmits directly to the BS as in traditional cellular communications. Thus, the average energy consumption during the data transmission phase can be derived as

E dataTx = P disc E D2D,comm + (1 -P disc )E cell , (33)
where P disc is the relay discovery probability, which is obtained from ( 11), E D2D,comm is the average energy consumption in the D2D communication, and E cell is the average energy consumption in cellular mode, which is defined in [START_REF] Dhillon | Downlink rate distribution in heterogeneous cellular networks under generalized cell selection[END_REF]. We consider that during the D2D communication the MTD transmits at fixed power. Thus, to obtain the energy consumption, we follow the same procedure used to derive ( 23):

E D2D,comm = P m,T D B eff B w log 2 1 + PmK d r -α d N0Bwθeff , ( 34
)
where r is the modified MTD-relay distance, K d and α d are respectively the path loss factor and path loss exponent for D2D links. The parameter r is a random variable with PDF f R (r) given by [START_REF] Zhou | Energy-efficient cooperative communication based on power control and selective single-relay in wireless sensor networks[END_REF]. Thus, the average energy consumption in the D2D communication is:

E D2D,comm = Rd 0 P m,T D B eff B w log 2 1 + PmK d r -α d N0Bwθeff f R (r)dr. ( 35
)

V. NUMERICAL RESULTS AND DISCUSSION

In this section, we first provide simulation results to validate our analytical results obtained in the previous section. Simulations are performed using MATLAB, where each point corresponds to the average value of 5000 iterations. In each iteration, the UEs are distributed independently according to H-PPP in a circular area of radius 1.5 km centered around the MTD. Table I summarizes the simulation parameters. We consider the values of the power consumption in each state according to the 3GPP specifications [START_REF] Gpp | Cellular system support for ultra low complexity and low throughput internet of things," 3rd Generation Partnership Project (3GPP)[END_REF]. The bandwidth efficiency and SNR efficiency values are according to the SISO channel parameters from [START_REF] Mogensen | Lte capacity compared to the shannon bound[END_REF].

A. Determining the Radius of the Discovery Area

In order to avoid an empty discovery area, we determine the minimum value of R d so that the probability of finding at least one UE in the discovery area is greater than 98%, which is equivalent to P(N = 0) ≤ 0.02. In the transformed PPP Φ u , the number of UEs N inside the discovery area has a Poisson distribution with mean λ u πR 2 d , i.e.,

P(N = n) = (λ u πR 2 d ) n n! exp(-λ u πR 2 d ), (36)
where λ u = λ u e 2σ 2 /α 2 . Thus, we have

P(N = 0) = exp(-λ u e 2σ 2 /α 2 πR 2 d ) ≤ 0.02. ( 37
)
Considering a low UE density scenario (i.e., when λ u = 0.1 × 10 -4 UEs/m 2 ), shadowing σ dB = 8 dB, and α = 4, we obtain R d ≥ 286 meters. Hence, in this work we consider R d = 300 meters.

B. Analytical Model Validation

Fig. 5 (a) and Fig. 5 (b) show respectively the relay discovery probability and the average number of time slots used in the contention process as a function of the UE density for W = {8, 16, 32}. In both figures the analytical and simulation results match well, this confirms the correctness of ( 11) and [START_REF] Liu | In-band full-duplex relaying: A survey, research issues and challenges[END_REF]. Fig. 5 (a) shows that as the UE density increases, the relay discovery probability increases until it reaches a maximum and then decreases due to the number of collisions. When the UE density increases, the number of collisions increases due to the limited number of time slots (W ). Fig. 5 (b) shows that, when the UE density is low, the MTD wastes time slots waiting for the response of a relay candidate. On the other hand, when the UE density increases the number of time slots decreases reaching a minimum value, then it increases due to the increase of the number of collisions.

Fig. 6 shows the PDF of the MTD-relay distance for λ u = 1 × 10 -4 UEs/m 2 , and W = {8, 16, 32}. From this figure, we confirm the correctness of [START_REF] Zhou | Energy-efficient cooperative communication based on power control and selective single-relay in wireless sensor networks[END_REF]. We observe that, the smaller the size of the contention window, the more probability of selecting a relay close to the MTD.

The average energy consumed by the MTD in the discovery and data transmission phases is shown in Fig. 7. The derived analytical model agrees with the simulation results well. In this figure, we consider a scenario where the MTD is located 1000 meters from the BS and it transmits 200 bytes of data. The figure shows that when λ u ∈ [0.1×10 -4 , 2×10 -4 ] UEs/m 2 , as much energy is consumed in the discovery phase, as in the data transmission phase. Note that the energy consumption in the data transmission phase is very high for λ u = 0. The reason is that the MTD does not find a relay and thus, it transmits directly to the BS.

Since the analytical and simulation results match well, henceforth, we will only use the analytical expressions to analyze the performance of our D2D relaying mechanism.

C. Impact of Parameter b

In Fig. 8 (a), Fig. 8 (b), and Fig. 9, we analyze how the parameter b affects the relay discovery probability, the average number of time slots used in the contention process, and the PDF of the MTD-relay distance, respectively. The radius of the discovery area R d and the contention window size W are fixed to 300 meters and 16 time slots, respectively. In [START_REF] Zhang | Load balancing for 5g ultra-dense networks using device-to-device communications[END_REF], we have shown that the uniform random choice of time-slot proposed in [START_REF] Anamuro | Energyefficient discovery process for mmtc applications[END_REF] is a particular case of our protocol when b equal to 1. Thus, we use the term Uniform when we refer to the performance of the protocol proposed in [START_REF] Anamuro | Energyefficient discovery process for mmtc applications[END_REF]. Fig. 8 (a) shows that for low UE densities (λ u < 0.5×10 -4 UEs/m 2 ) it is better to use the uniform distribution (i.e., b ≈ 1), while for high UE densities (λ u > 0.5 × 10 -4 UEs/m 2 ) it is better the use of b = 0.4 or b = 0.6 to obtain a high relay discovery probability. We also observe that the relay discovery probability is less affected by the UE density in the range [0.2 × 10 -4 , 2 × 10 In Fig. 9, we observe that the probability that the selected relay is close to the MTD is higher when the parameter b is a small value than when it is a large value. Recall that the In order to determine the optimal value of the parameter b minimizing the total MTD energy consumption we evaluate the energy consumption for b = {0.1, 0.2, ..., 1}. In Fig. 11, we show the optimal value of b as a function of the UE density. As we can see, when the UE density is low, it is better to use the highest values (e.g., b ≈ 1), while when the UE density is high, it is better to use the lowest values (in this case b = 0.3). For each UE density, there is a value of b that minimizes energy consumption; however, determining the exact value of the UE density is impossible in real scenarios. A simple solution would be to use the value of b that covers the largest range of densities. From the figure, we observe that the optimal value of b that covers the widest range of UE densities is between 0.3 and 0.5. Thus, we choose b = 0.4 as the parameter of our relaying mechanism.

E. Comparison of the MTD Energy Consumption in Cellular Mode and D2D Mode

In Fig. 12, we compare the energy consumed by the MTD when it uses cellular communication (cellular mode) and when it uses our relaying mechanism (D2D mode with b = 0.4, R d = 300, and W = 16). Fig. 12 (a) shows the average MTD energy consumption versus the MTD-BS distance (d m,b ) and the UE density (λ u ). We consider a scenario with D = 200 bytes. It can be seen from the figure that for λ u ∈ [0.2 × 10 -4 , 2 × 10 -4 ] UEs/m 2 and d m,b > 500 meters, the MTD energy consumption using our proposed mechanism is less than the energy consumption in cellular communication. We can also observe that in the same range of values, the MTD-BS distance has little influence on the energy consumption in D2D mode. Besides, the MTD energy consumption is almost constant and does not depend on λ u for a large range of UE densities. This energy consumption is directly related to the relay discovery probability and the number of time slots used in the contention process. To analyze the behavior of relay discovery, we first define the average number of UEs per time slot U s . To discover a relay only one time-slot with U s < 1 is required. When U s > 1, there is a high probability of collision. In the uniform case, all time-slots have the same U s value, which only depends on the UE density. When the density of UEs increases, all time-slots will have U s > 1 at a certain UE density. In the geometric case, U s depends on the UE density and the time-slot s. In the first time slots, U s is small and it increases as a function of s. When the UE density increases, the number of time slots with U s < 1 decreases. Nevertheless, for a large range of UE densities, there will be at least one time-slot with U s < 1 and thus a low probability of collision. In Fig. 12 (b), we compare the average MTD energy consumption versus the MTD-BS distance (d m,b ) and the data packet size (D). We consider a scenario with λ u = 1 × 10 -4 UEs/m 2 . In the figure, we show that our proposed relaying mechanism allows reducing the energy consumption significantly when the data packet size is 200 bytes and the MTD is far from the BS. We can also observe that in cellular and D2D modes, the energy consumption is linearly increasing with increasing data size. In cellular mode, E cell is directly proportional to D, while in D2D mode E D2D,total is the sum of two terms E D2D,disc and E dataTx . While in the discovery phase E D2D,disc does not depends on D, in the data transmission phase E dataTx is directly proportional to D.

We define the energy reduction factor as the ratio between the MTD energy consumption in D2D mode and the energy consumption in cellular mode. Table II presents III, we present the energy reduction factor for data packets of different sizes and for two MTD-BS distances. We observe that in D2D mode for d m,b = 1000 meters, the MTD consumes 32% and 60% less energy than in cellular mode for D = 50 and D = 100 bytes, respectively.

F. Comparison of Energy Consumption with Other Distributed Mechanisms

We compare the performance of our relaying mechanism with the mechanism based on a uniform random choice of time-slot (Uniform) proposed in [START_REF] Anamuro | Energyefficient discovery process for mmtc applications[END_REF], and a baseline nonadaptive system (N-AS) proposed in [START_REF] Shah | The relay selection and transmission trade-off in cooperative communication systems[END_REF]. In the Uniform and N-AS mechanisms, the MTD sends an RR packet and the UEs respond in a time-slot that is chosen randomly based on a uniform distribution. However, while in the Uniform mechanism the contention process ends as soon as the MTD correctly receives a response, in the N-AS mechanism the MTD listens for the entire contention window and then selects the best relay (i.e., the UE with the lowest path loss) among all UEs that successfully responded to the MTD (i.e., without collisions). UEs/m 2 . The figure shows that in all cases, both our mechanism and the Uniform mechanism consume less energy than N-AS during the discovery phase. This is because the contention process is stopped as soon as an RC packet is successfully received, while the N-AS mechanism monitors the channel during all the contention window. As shown in Fig. 13 (a), the N-AS mechanism consumes less energy than our mechanism for a low UE density and long packets (e.g., 2000 bytes) because the collision probability is low and N-AS really selects the best relay among all UEs. The energy saving in the transmission phase due to a higher bit rate is larger than the extra-energy spent by a longer discovery process. Fig. 13 (b) shows that for high UE densities our mechanism consumes less energy than both the Uniform mechanism and N-AS during the data transmission phase. This is because our mechanism is less affected by high UE densities. In the case of Uniform mechanism and N-AS, there is a very low probability that the UE with the lowest path loss successfully responds to the MTD due to a high number of collisions. Furthermore, when the number of collisions is high, there is a greater probability with N-AS that the MTD correctly receives responses from distant UEs rather than from close UEs since the former are more numerous.

G. UE Energy Consumption Cost

In the discovery phase, the relay candidates can be divided into two groups: (i) UEs that send an RC packet and (ii) UEs that wait their turn to respond. In our mechanism, the MTD sends a feedback packet as soon as it finds a relay. The feedback packet carries the ID of the selected relay so that the non-selected UEs stop monitoring the channel. Therefore, in the first group the average energy consumption is T s (P m,T + (S + 2)P m,R ) while in the second group the average energy consumption is T s (S +2)P m,R , where S is the average number of time slots used in the contention process. The selected relay is part of the first group.

Table IV shows the UE energy consumption during the discovery phase for R d = 300, b = 0.6, W = 16, and λ u = {0.2 × 10 -4 , 2 × 10 -4 } UEs/m 2 . A UE that sends an RC packet consumes on average less than 0.6 mJ for a large range of UE densities. This energy consumption is negligible compared to the energy consumed by a UE, for example, when it is used to watch a video streaming [START_REF] Trestian | Energy consumption analysis of video streaming to android mobile devices[END_REF]. During the data transmission phase, only the selected relay remains active. The energy consumed by the relay in this phase depends on the UE-BS parameters such as the MTD data, the transmission power, and the data rate. Nevertheless, this increase in energy consumption could be small if the approach proposed in [START_REF] Rigazzi | Aggregation and trunking of m2m traffic via d2d connections[END_REF] is adopted. In this approach, a UE aggregates the MTD data and supplement it with their own data, and transmits it to the BS.

Compared to traditional cellular communication, the D2D relaying mechanism allows a reduction of the MTD energy consumption. The cost of this reduction is an increase in the energy consumption of the UEs participating in the process. To reduce the UE energy consumption, we consider that the UEs will not be continuously monitoring the channel but only in a specified period known by the MTDs. On the other hand, when the direct link (MTD-BS) is under unfavorable propagation conditions, the MTD transmits its data for a long period if it uses the repetition technique [START_REF] Bockelmann | Towards massive connectivity support for scalable mmtc communications in 5g networks[END_REF], increasing the energy consumption, the delay, and the number of radio resources. Therefore, our mechanism not only allows to reduce energy consumption but also the delay and the consumption of radio resources. Nevertheless, it is worth mentioning that mMTC applications are delay tolerant.

VI. CONCLUSION AND FUTURE WORK

In this paper, we propose a distributed D2D relaying mechanism, which is suitable for mMTC applications since it allows a reduction of the energy consumed by the MTD using a D2D relay mechanism. The key idea of our protocol is to use a contention process based on a truncated geometric distribution, which gives priority to UEs close to the MTD to be selected as relays. We show that using this mechanism, the MTD energy consumption is significantly reduced (up to 75% compared to direct cellular transmission). Moreover, our mechanism provides almost constant energy consumption for a large range of UE densities. Using stochastic geometry, we derive analytical expressions for the discovery probability, the average number of time slots used in the contention process, the PDF of the MTD-relay distance, and the total energy consumed by the MTD. These analytical expressions agree well with the simulation results.

An extension of this work is to optimize some parameters such as the discovery area and the contention window size. Further, this work can be extended to the scenario where the MTD is out-of-coverage. In this scenario, the relay would have to act as a synchronization source.

Fig. 1 .

 1 Fig. 1. Network model: UEs establish direct communication with the BS, whereas an MTD can choose between transmitting directly to the BS (cellular mode) and using a nearby UE as a relay (D2D mode).

Fig. 2 .

 2 Fig. 2. D2D relaying procedure for the MTD and the relay candidates (UEs).

Fig. 3 .

 3 Fig. 3. Packet exchange sequence in our D2D relaying mechanism for W = 6 with five (a) and two (b) relay candidates.

Fig. 4 .

 4 Fig. 4. PMFs of the time slot choice in a network with four relay candidates, R d = 300 meters, b = 0.6, shadowing σ dB = 8 dB, and W = 8 time-slots. UE-1, UE-2, UE-3, and UE-4 are located 30, 120, 210, and 300 meters from the MTD, respectively.

Fig. 5 .

 5 Fig. 5. Comparison of (a) the relay discovery probability and (b) the average number of time slots used in the contention process, for different W values, R d = 300, b = 0.6, and shadowing σ dB = 8 dB.

Fig. 6 .

 6 Fig. 6. Comparison of the PDF of the MTD-relay distance for different W values, R d = 300, b = 0.6, shadowing σ dB = 8 dB, and λu = 1 × 10 -4 UEs/m 2 .

Fig. 7 .

 7 Fig. 7. Comparison between energy consumption in the discovery phase and in the data transmission phase, for R d = 300, b = 0.6, W = 16, shadowing σ = 8 dB, D = 200 bytes, and d m,b = 1000 meters.

- 4 ]

 4 if values such as b = 0.4 and b = 0.6 are used. Fig. 8 (b) shows that for low UE densities (λ u < 0.5 × 10 -4 UEs/m 2 ), fewer time slots are used when b ≈ 1 (uniform distribution). On the other hand, when the UE density is high (λ u > 0.5 × 10 -4 UEs/m 2 ), fewer time slots are used when b = 0.4 and b = 0.6.

Fig. 8 .

 8 Fig. 8. Comparison of (a) the relay discovery probability and (b) the average number of time slots used during contention process, for different b values, R d = 300, W = 16, and shadowing σ dB = 8 dB.

Fig. 9 .

 9 Fig. 9. Comparison of the PDF of the MTD-relay distance for different b values, R d = 300, W = 16, shadowing σ dB = 8 dB, and λu = 1 × 10 -4 UEs/m 2 .

Fig. 10 .

 10 Fig. 10. Comparison of the total MTD energy consumption for different b values, R d = 300, W = 16, shadowing σ dB = 8 dB, D = 200 bytes, and d m,b = 1000 meters.

Fig. 11 .

 11 Fig. 11. Comparison of the optimal b value for different UE densities and MTD-BS distances, R d = 300, W = 16, shadowing σ dB = 8 dB, and D = 200 bytes.

  the energy reduction factor for different values of λ u and d m,b . We observe that in D2D mode for λ u = 1 × 10 -4 UEs/m 2 , and D = 200 bytes, the MTD consumes 23% and 75% less energy than in cellular mode for d m,b = 500 meters and d m,b = 1000 meters, respectively. In Table

Fig. 12 .

 12 Fig. 12. Comparison of the total MTD energy consumption between cellular mode and D2D mode (R d = 300, b = 0.4, and W = 16), shadowing σ dB = 8 dB. Average MTD energy consumption versus (a) MTD-BS distance and UE density for D = 200 bytes and (b) MTD-BS distance and the data packet size for λu = 1 × 10 -4 UEs/m 2 .

Fig. 13 .

 13 Fig. 13. Comparison of energy consumption between our proposed mechanism with b = 0.6, Uniform [10], and N-AS [18], for R d = 300, W = 16, shadowing σ dB = 8 dB, and d m,b = 1000 meters.

Fig. 13

 13 Fig. 13 compares numerical results for two different UE densities (a) λ u = 0.2 × 10 -4 UEs/m 2 and (b) λ u = 1 × 10 -4UEs/m 2 . The figure shows that in all cases, both our mechanism and the Uniform mechanism consume less energy than N-AS during the discovery phase. This is because the contention process is stopped as soon as an RC packet is successfully received, while the N-AS mechanism monitors the channel during all the contention window. As shown in Fig.13 (a), the N-AS mechanism consumes less energy than our mechanism for a low UE density and long packets (e.g., 2000 bytes) because the collision probability is low and N-AS really selects the best relay among all UEs. The energy saving in the transmission phase due to a higher bit rate is larger than the extra-energy spent by a longer discovery process. Fig.13 (b)shows that for high UE densities our mechanism consumes less energy than both the Uniform mechanism and N-AS during the data transmission phase. This is because our mechanism is less affected by high UE densities. In the case of Uniform mechanism and N-AS, there is a very low probability that the UE with the lowest path loss successfully responds to the MTD due to a high number of collisions. Furthermore, when the number of collisions is high, there is a greater probability with N-AS that the MTD correctly receives responses from distant UEs rather than from close UEs since the former are more numerous.

TABLE II COMPARISON

 II OF THE ENERGY REDUCTION FACTOR FOR DIFFERENT λu AND d m,b VALUES

	UE density (UEs/m 2 )	0.5 × 10 -4	1 × 10 -4
	MTD-BS distance (m)	500	1000	500	1000
	Energy consumption D2D (mJ)	1.30	1.36	1.20	1.22
	Energy consumption Cellular (mJ) 1.55	4.80	1.55	4.80
	Energy Reduction Factor	0.84	0.28	0.77	0.25

TABLE III COMPARISON

 III OF THE ENERGY REDUCTION FACTOR FOR DIFFERENT D AND d m,b VALUES

	Data size (bytes)	50			100
	MTD-BS distance (m)	500	1000	500	1000
	Energy consumption D2D (mJ)	0.81	0.82	0.94	0.95
	Energy consumption Cellular (mJ) 0.39	1.20	0.77	2.40
	Energy reduction factor	2.08	0.68	1.22	0.40

TABLE IV UE

 IV ENERGY CONSUMPTION IN THE DISCOVERY PHASE, FOR R d = 300, b = 0.6, W = 16.

		RC is sent	RC is not sent
	UE density (UEs/m 2 )×10 -4	0.2	2	0.2	2
	Energy consumption (mJ)	0.60	0.55	0.33	0.28

ACKNOWLEDGMENT

This paper is part of and thereby supported by the Horizon 2020 project ONE5G (ICT-760809) receiving funds from the European Union. The authors would like to acknowledge the contributions of their colleagues in the project, although the views expressed in this contribution are those of the authors and do not necessarily represent the project.