Anas Makdesi
email: anas.makdesi@l2s.centralesupelec.fr

Antoine Girard

Data-Driven Abstraction of Monotone Systems *

Keywords: Monotone transition systems, data-driven control, symbolic control, abstraction

In this paper, we introduce an approach for the data-driven abstraction of monotone dynamical systems. First, we introduce a set-valued simulating map, which over-approximates the dynamics of an unknown monotone system, using only a set of transitions generated by it. We establish the minimality of the introduced simulating map. Then, we show that the system, with this map as its transition relation, is equivalent (in the sense of alternating bisimulation) to a finite-state system. This equivalence enables the use of well-established symbolic control techniques to synthesize controllers. We show the effectiveness of the approach on a safety controller synthesis problem.

Introduction

Abstraction-based synthesis techniques have been gaining momentum in recent years (see e.g. Tabuada (2009), [START_REF] Belta | Formal methods for discrete-time dynamical systems[END_REF] and the references therein). Using those techniques, we can build a finite-state approximation of a dynamical system, called "symbolic abstraction". Then, controllers for the finite-state approximation are synthesized using algorithmic approaches adopted from the fields of supervisory control [START_REF] Peter | Supervisory control of a class of discrete event processes[END_REF]), or formal methods [START_REF] Bloem | ar. Synthesis of reactive (1) designs[END_REF]). The synthesized controllers can address broad types of specifications such as safety and reachability [START_REF] Girard | Controller synthesis for safety and reachability via approximate bisimulation[END_REF]), behaviors described by linear temporal logic [START_REF] Baier | Principles of Model Checking[END_REF], [START_REF] Belta | Formal methods for discrete-time dynamical systems[END_REF]) or finite automata [START_REF] Pola | Control of cyber-physical-systems with logic specifications: a formal methods approach[END_REF], Sinyakov and Girard (2019)). Those specifications go beyond the traditional properties, such as stability, to describe a desired behavior of the controlled system over time. The synthesized controllers can then be refined to controllers for the original system if some behavioral relationship relates the symbolic abstraction with the original system. In such cases, the refined controllers are "correct by construction". An example of such a relation is the alternating (bi)-simulation relation (Tabuada (2009)), or the feedback refinement relation [START_REF] Reissig | Feedback refinement relations for the synthesis of symbolic controllers[END_REF]).

Although symbolic control is essentially a model-driven technique, we present in this paper a data-driven approach to calculate the symbolic abstraction. Starting from a set of transitions generated from an unknown monotone system, we find a simulating map over-approximating the dynamics of any system capable of producing these transitions. This simulating map is minimal in the sense that it is included in any other map doing the same work. We then calculate a symbolic abstraction of the system represented by this simulating map, and we prove the existence of alternating bisimulation relation between them.

Similar work to compute symbolic abstractions from data has been done in [START_REF] Sadraddini | Formal guarantees in data-driven model identification and control synthesis[END_REF]Belta (2018), Hashimoto et al. (2020)), but while they require bounds on the system continuity in a Lipschitz sense, our method does not have this requirement. We rather study the class of monotone systems and build our data-driven abstraction based only on the monotonicity property of the system.

Monotone systems can be found in many applications such as power networks (Zonetti et al. ( 2019)), traffic networks [START_REF] Kim | Symbolic control design for monotone systems with directed specifications[END_REF]), and biomedical systems [START_REF] Angeli | Monotone control systems[END_REF]). [START_REF] Meyer | Safety control with performance guarantees of cooperative systems using compositional abstractions[END_REF] applied symbolic control methods on a monotone temperature regulation system by only sampling the system dynamics on a given grid of states and inputs. [START_REF] Saoud | Efficient synthesis for monotone transition systems and directed safety specifications[END_REF] presented an efficient symbolic control synthesis technique for monotone systems, which was applied on a vehicle platooning problem.

The paper is organized as follows. In Section 2, some required preliminaries are provided. In Section 3, we describe an approach to compute a set-valued map that over-approximates the true system dynamics. In Section 4, we show that the dynamical system induced by this map is alternatingly bisimilar to a finite-state abstraction. Finally, In Section 5, we show the effectiveness of our approach by studying a cruise control problem.

Preliminaries

In this section, we define some notations and introduce the class of monotone dynamical systems under consideration in this paper.

Notation

R, R + 0 , and N denote the sets of real, non-negative real, and natural numbers, respectively. The empty set is denoted by ∅. Given a set X, we denote 2 X to the set of subsets of X. We define the partial order on R n as follows. Let x = (x 1 , . . . , x n ), x = (x 1 , . . . , x n ) in R n , we say that:

x x ⇐⇒ (x i ≤ x i , ∀i = 1, . . . , n). If x x then x x. A relation R ⊆ X × Y is identified with the set-valued map R : X → 2 Y where R(x) = {y ∈ Y |(x, y) ∈ R}. The domain of R is dom(R) = {x ∈ X | R(x) = ∅}. The Cartesian product of the indexed sets (X i ) i∈I is denoted by i∈I X i .

Monotone systems

First, let us consider a discrete-time dynamical system of the form:

x + ∈ F (x, u), x ∈ X, u ∈ U (1)
where

F : X × U → 2 X is a nonempty set-valued map, X ⊆ R n , U ⊆ R m .
We say that F is deterministic if for all x ∈ X, u ∈ U , F (x, u) is a singleton (in this case we identify the set-valued map F with the classical map F : X × U → X), otherwise it is said to be non-deterministic. We consider a partial order on the set of states R n and the set of inputs R m .

Definition 1 F is monotone if for all x, x ∈ X, u, u ∈ U with x x , u u , ∀y ∈ F (x, u), ∃y ∈ F (x , u ), y y , and ∀y ∈ F (x , u ), ∃y ∈ F (x, u), y y .

x

1 x 2 x 1 x 2 x x u u F (x , u ) F (x, u)
Figure 1: The set-valued image of two points, one is larger than the other and the map is monotone

Figure 1 shows a set-valued image of two points. Under the previous monotonicity definition, we do not require all the points in the image of x to be larger than the points in the image of x. In the case where F is deterministic, Definition 1 becomes:

x, x ∈ X, u, u ∈ U, x x , u u =⇒ F (x, u) F (x , u ) which resembles the ordinary definition of monotone functions.

Learning monotone systems from data

In this section, we present a data-driven approach to compute an optimal and guaranteed overapproximation of an unknown monotone map, using only a given set of transitions generated by it.

Formulation

We are given a set of transitions

D = {(x k , u k , x k )| k = 1, . . . , N },
this data has been generated by an unknown deterministic and monotone map F :

X × U → X. Definition 2 A deterministic map F : X × U → X is consistent with data D if: • F is monotone; • F (x k , u k ) = x k , k = 1, . . . , N .
Let us remark that the true unknown map F is consistent with the data. However, there are generally an infinity of maps consistent with the data D. We denote the set of consistent maps by C(D). We aim at computing a set-valued map that captures all of them.

x 1 x 2 x 1 x 2 x G(x, u) 1 2 3 4 5 6 7 1' 2' 3' 4' 5' 6' 7' u Figure 2: Data points (left)
and their successors (right). On the left, the point x is smaller than the points K + = {4, 5, 7} and bigger than the points K -= {1, 2}. On the right, the set-valued map G(x, u) is represented by the purple area.

Definition 3 A set-valued map G : X × U → 2 X simulates D if: • It is monotone; • For all F ∈ C(D), for all x ∈ X, u ∈ U , F (x, u) ∈ G(x, u).
A map G, simulating D, captures the true unknown map F : for all x ∈ X, u ∈ U , F (x, u) ∈ G(x, u). There are generally an infinity of maps that simulates D. We denote the set of simulating maps by S(D).

Definition 4 G : X × U → 2 X is the minimal simulating map of D if:

• It simulates D; • For all G ∈ S(D), for all x ∈ X, u ∈ U , G(x, u) ⊆ G(x, u).
The following proposition provides the expression of the minimal simulating map. Figure 2 illustrate the proposed map.

Proposition 5 There exists a unique minimal simulating map of D given by

G(x, u) =   k∈K -(x,u) {y ∈ X| x k y}   ∩   k∈K + (x,u) {y ∈ X| y x k }   where K -(x, u) = {k | x k x, u k u}, K + (x, u) = {k | x x k , u u k }.
Proof Let us start with existence. Let x, x ∈ X, u, u ∈ U with x x , u u . We define y = ( max

k∈K -(x,u) x k,1 , . . . , max k∈K -(x,u) x k,n ),
where x k,i is the i th component of the k th data point's successor. The point y represent the smallest point in the image G(x, u) because it is the smallest point in the intersection k∈K -(x,u) {y ∈ X| x k y}. For example, in the case of Figure 2 the point y is (x 2,1 , x 1,2 ). y belongs to G(x, u) and because the partial order relation is transitive, we can say that x k x x and u k u u for all k ∈ K -(x, u), which mean that the set k∈K -(x ,u ) {y ∈ X| x k y} is included in the set k∈K -(x,u) {y ∈ X| x k y}. Therefore, we now have:

∀y ∈ G(x , u ), y y ∈ G(x, u). (2)
Let us also define the point y = ( min

k∈K + (x ,u )
x k,1 , . . . , min

k∈K + (x ,u ) x k,n ).
y is largest point in G(x , u ) and we know that x x

x k and u u u k for all k ∈ K + (x , u ). In the same way as above we can say:

∀y ∈ G(x, u), y y ∈ G(x , u ).
(3)

From ( 3) and ( 2)

G is monotone. For all F ∈ C(D), for all x ∈ X, u ∈ U , F is monotone which implies that F (x, u) x k for all k such that k ∈ K -(x, u) and F (x, u) x k for all k such that k ∈ K + (x, u). Therefore, F (x, u) ⊆ G(x, u). Added to the fact that G is monotone, we now have that G simulates D.
Then, we want to prove that for all G ∈ S(D), for all x ∈ X, u ∈ U , G(x, u) ⊆ G(x, u), so let us assume that it is wrong and that there exists x ∈ X, u ∈ U such that there is y ∈ G(x , u ) but y / ∈ G(x , u ). Let us consider the deterministic and monotone map F satisfying F (x k , u k ) = x k for all k = 1, . . . , N and F (x , u ) = y. Then, F ∈ C(D) but F (x , u ) G(x , u ), which means that G does not simulate D, and we reach a contradiction.

We now prove uniqueness. If G0 and G1 both are minimal simulating map, then G0 (x, u) ⊆ G1 (x, u) and G1 (x, u) ⊆ G0 (x, u) which mean G1 (x, u) = G0 (x, u) for all x ∈ X, u ∈ U .

It is worth noting that because G(x, u) is the intersection of areas bounded from above and from below by the successors of the data points, adding new data points will make G(x, u) more resembling to the true map F . This can be expressed in following property:

D ⊆ D ⇒ GD ⊆ GD
where GD and GD denote the minimal simulating map of D and D respectively.

Partitioning of the sets of states and inputs

Let us assume that sets of states and inputs are rectangular:

X = [a 1 , b 1 ] × • • • × [a n , b n ] and U = [c 1 , d 1 ] × • • • × [c m , d m ].
We can state the following result:

Proposition 6 There exist finite rectangular partitions (X q ) q∈Q , (U p ) p∈P of X and U , a finite collection (Y q,p ) q∈Q,p∈P of rectangular subsets of X such that for all x ∈ X q , u ∈ U p , G(x, u) = Y q,p .

Proof First, let us introduce the following grid: on each axis of the state space, e.g., axis i, i ∈ {1, . . . , n}, we sort the corresponding components of all the data points (i.e., sort x k,i , k = 1, . . . , N ), meaning that on each axis, we have

x k 1 i ,i ≤ • • • ≤ x k N i ,i .
The sorted values on the axes of the state space define a grid. Inputs from the data set define a similar grid on the input space. Those grids will enclose hyperrectangle cells. Later, we will see that the value of the map G will stay the same for all the points inside a hyperrectangle in the state space, under any input inside a particular hyperrectangle in the input state. To establish the finite rectangular partitions, we should also address the points of the grids (boundaries between the cells). That is what we are doing next. To describe the partition we will use two sets of symbols

Q = Q ∪ Q , where Q = {1, . . . , N } and Q = {1, . . . , N -1} n .
The first set of symbols Q is dedicated to the data points, meaning:

∀q ∈ Q , X q = {x q }.
A symbol q ∈ Q from the second set is a tuple q = (q 1 , . . . , q n ); It determines the hyperrectangle position on each axis (i.e., q i is an index that refers to one of the values in the list of sorted data points' i th components). q allows us to define (the lower and upper values of the hyperrectangle)

x q = (x k q 1 1 ,1 , . . . , x k qn n ,n ) and x q = (x k q 1 +1 1 ,1 , . . . , x k qn+1 n ,n
). Now we have all the parts to define the partition:

∀q ∈ Q , X q = N i=1 X i q \ X D where X D = N k=1
{x k }, and X i q is defined as follows:

X i q =              [x k q i i ,i , x k q i +1 i ,i ] if x k q i i x q and x q x k q i +1 i [x k q i i ,i , x k q i +1 i ,i ) if x k q i i x q and x q x k q i +1 i (x k q i i ,i , x k q i +1 i ,i ] if x k q i i x q and x q x k q i +1 i (x k q i i ,i , x k q i +1 i ,i ) if x k q i i
x q and x q x k q i +1 i

An example to illustrate the partition cand be found shortly after the proof. After we define U p in the same way, we have under our definition for the partial order, for all x in X q and for all u in U p , K -(x, u) and K + (x, u) remain constant. Therefore, G(x, u) will have the same value G(x, u) = Y q,p for all x in X q and for all u in U p . Y q,p will either be a single point Y q,p = {x k } in the case where X q = {x k } and U p = {u k } such that (x k , u k , x k ) ∈ D or it will be define by the box Y q,p = [y, y] where y = ( max

k∈K -(x,u) x k,1 , . . . , max k∈K -(x,u)
x k,n ) and y = ( min

k∈K + (x,u)
x k,1 , . . . , min

k∈K + (x,u)
x k,n )

elsewhere.

Figure 3 offers an illustrative example of a finite rectangular partition (in the state space) based on four data points. We examine the cell which has the symbol q ∈ Q with q = (2, 1). We have

X q = (x 1,1 , x 4,1 ] × [x 2,2 , x 3,2 ].
x 1,1 is excluded because x 1 x q , whereas x 4,1 , x 2,2 , and x 3,2 are included because x 2 x q , x q x 3 , and x q x 4 .

Remark 7 In the following sections and in our numerical tests we will actually make the output G(x, u) = Y q,p for all the points x, u in the sets

X q = [x k q 1 1 ,1 , x k q 1 +1 1 ,1 ) × • • • × [x k qn n ,n , x k qn+1 n ,n ) and U p = [u k p 1 1 ,1 , u k p 1 +1 1 ,1 ) × • • • × [u k pm m ,m , u k pm+1 m ,m ), q ∈ Q = {1, . . . , N -1} n , p ∈ P = {1, . . . , N -1} m .
With this new definition of G(x, u), G is not strictly speaking the minimal simulating map, but this new simulating map is easier to deal with, and it differs from the minimal simulation map only on a set of measure 0. In order to compute the sets (X q ) q∈Q , (U p ) p∈P and (Y q,p ) q∈Q,p∈P from the data set D we should follow those steps:

x 2 x 1,1 2 3 4 1 x 4,1 x 2,2 x 3,2 q x q x q
1. We sort the first component of our data points, then the second component, and so on till we reach the n th component.

2. We do the same for input data till we reach the m th component.

3. We partition the sets of states and inputs according to the sorted components.

4. We calculate G(x, u) for every set.

Bisimilar finite abstraction

In this section, we show the equivalence (in the sense of alternating bisimulation) between the system defined by the calculated minimal simulating map and a finite state transition system.

Definition 8 A transition system Σ is a tuple Σ = (X, U, F, Y, H), where X is a set of states, U is a set of inputs, F : X × U → 2 X is a transition relation, Y is a set of outputs, and H : X → Y is an output map.
Σ is finite if X and U are finite. Now let us consider two transition systems

Σ i = (X i , U i , F i , Y i , H i ), i = 1, 2.
We assume that the systems are observed over the same set of outputs

Y = Y 1 = Y 2 . Definition 9 R ⊆ X 1 × X 2 is an alternating bisimulation relation between Σ 1 and Σ 2 if for all (x 1 , x 2 ) ∈ R, 1. H 1 (x 1 ) = H 2 (x 2 ) 2. ∀u 1 ∈ U 1 , ∃u 2 ∈ U 2 , ∀x 2 ∈ F 2 (x 2 , u 2 ), ∃x 1 ∈ F 1 (x 1 , u 1 ) such that (x 1 , x 2 ) ∈ R 3. ∀u 2 ∈ U 2 , ∃u 1 ∈ U 1 , ∀x 1 ∈ F 1 (x 1 , u 1 ), ∃x 2 ∈ F 2 (x 2 , u 2 ) such that (x 1 , x 2 ) ∈ R Σ 1 and Σ 2 are alternatingly bisimilar if 1. ∀x 1 ∈ X 1 , ∃x 2 ∈ X 2 , such that (x 1 , x 2 ) ∈ R 2. ∀x 2 ∈ X 2 , ∃x 1 ∈ X 1 , such that (x 1 , x 2 ) ∈ R
In the following, let us consider that X 1 = X, U 1 = U , F 1 = G as defined in Remark 7. Let X 2 = Q, U 2 = P as in Remark 7, and let us consider the transition map

F 2 : Q × P → 2 Q defined by F 2 (q, p) = {q ∈ Q| X q ∩ Y q,p = ∅}.
We consider the output set Y = Q and output maps given by H 1 (x) = q if x ∈ X q and H 2 (q) = q.

Let us remark that Σ 2 is a symbolic dynamical system (i.e. with finite set of states and inputs). In addition, let us assume that X = q∈Q X q and U = p∈P U p .

Theorem 10 Σ 1 and Σ 2 are alternatingly bisimilar and the alternating bisimulation relation is given by

R = {(x, q) ∈ X × Q| x ∈ X q }.
Proof We will prove the statement for all x 1 ∈ X 1 , there exists x 2 ∈ X 2 , such that (x 1 , x 2 ) ∈ R.

The proof of the second statement is similar, and is therefore omitted. For all x 1 ∈ X 1 , x 1 should belong to one of the cells in the partition x 1 ∈ X q , so (x 1 , x 2 ) ∈ R if we take x 2 = q. Moreover, we will have:

1. From the definition of Σ 1 and Σ 2 , we have H 1 (x 1 ) = H 2 (x 2 );

2. For all u 1 ∈ U 1 , there exists p ∈ P such that u 1 ∈ U p . So let us take u 2 = p. For all x 2 ∈ F 2 (x 2 , u 2 ), we are sure that there exists x 1 ∈ F 1 (x 1 , u 1 ) = G(x 1 , u 1 ) = Y q,p such that x 1 ∈ X x 2 because we know, from the definition of F 2 , that for any x 2 ∈ F 2 (x 2 , u 2 ) we have X x 2 ∩ Y q,p = ∅, which means (x 1 , x 2 ) ∈ R;

3. For all u 2 = p ∈ P , there exists u 1 ∈ U p , and for all x 1 ∈ F 1 (x 1 , u 1 ), we know that F 1 (x 1 , u 1 ) = Y q,p , and Y q,p ⊆ X which means that there exists x 2 such that X x 2 ∩ Y q,p = ∅.

In another way, there exists x 2 ∈ F 2 (x 2 , u 2 ) such that x 1 ∈ X x 2 . In the end we have

(x 1 , x 2 ) ∈ R.
As a consequence of the previous Theorem, it is optimal to use the abstraction provided by the finite-state transition system Σ 2 to synthesize a controller. This controller will work for all the systems consistent with the data; the finite-state transition system is alternatingly bisimilar to a system whose dynamics is simulating all of them. Not finding a controller using Σ 2 means that there is an uncontrollable system consistent with the data; any other map simulating the data will contain this uncontrollable system. Therefore, this is the best result we can find under the monotonicity condition.

Controller synthesis for safety specifications

To test the validity of the learnt abstraction, we want to use it to synthesize a controller for a safety problem, a commonly addressed problem in the field of symbolic control. Given a system Σ = (X, U, F, Y, H) where F = G, and a safety specification X s ⊆ X, we want to find a controller to keep the trajectories of this system inside the set X s . This can be done by computing a safe controlled invariant defined as follows:

Definition 11 A set I ⊆ X is a safe controlled invariant for the system Σ and the safe set X s if it satisfies:

• I ⊆ X s • ∀x ∈ I and ∃u ∈ U, F (x, u) ⊆ I
We can use the symbolic abstraction presented in the previous section and the iterative algorithm described in Tabuada ( 2009) to find the maximal safe controlled invariant.

Numerical implementation (cruise control problem)

Let us consider a model with two vehicles moving in one lane on an infinite straight road. The leader has a fixed velocity v c while the follower is controllable. A discrete-time approximation of this model is given by equations:

d k+1 = d k + (v k -v c )T 0 v k+1 = v k + α(u k , v k )T 0 , (4)
Here u k is the control input which is the torque applied to the wheels. d k is the signed distance between the vehicles.

α(u, v) = u -M -1 (f 0 + f 1 v + f 2 v 2 );
The vector of parameters f = (f 0 , f 1 , f 2 ) ∈ R 3 + describes the road friction and vehicle aerodynamics whose numerical values are taken from [START_REF] Nilsson | Correct-by-construction adaptive cruise control: Two approaches[END_REF]: f 0 = 52 N, f 1 = 1.2567 N s/m, f 2 = 0.4342N s 2 /m 2 . For the rest parameters we chose:v c = 20 m/s, M = 1370 kg, T 0 = 0.1 s. This model is only used to generate the data. We wanted the follower car to stay in a distance between 10 m and 30 m from the leader, while maintaining a speed between 19 m/s and 21 m/s. Let us remark that over these ranges of values the system (4) is monotone. We sampled randomly 300 points inside this safe set. We sampled also 300 random input values. We calculated the successors from the model given by (4). Data points, successors, and inputs are shown in Figure 4.

Calculating the abstraction took 923 s to be finished (CPU: 2.9 GHz Intel Core i7, RAM: 8 Go 2133 MHz DDR34, Matlab R2020b). It took 341 s to calculate the invariant set. The red area in Figure 5 represents the invariant set that we found. It should be noted that the size of the abstraction grows polynomially with the number of data points. In the example there are two states n x = 2 and one input n u = 1. The number of sets in the partitioning is N nx+nu = N 3 where N is the number of data points. This makes using a big number of data points computationally difficult.

Conclusion

An algorithm for data-driven abstraction was introduced. To find the abstraction, we first calculated a map that minimally over-approximates the system dynamics. We showed that this abstraction contains all the information we can acquire from the data and the monotonicity condition. We demonstrated the effectiveness of our approach on a safety controller synthesis problem. The approach suffers from a scalability problem as the abstraction size grows polynomially with the number of data points. As for the future, a way to deal with uncertainties and noises in the data points should be studied. Also, The scalability problem should be addressed maybe with the help of data aggregation techniques. The authors also want to investigate the use of data collected on-line to improve the calculated controller.

Figure 3 :

 3 Figure 3: The partitioning of the state space based on the data points. Arrows indicate to which set, the boundaries between adjacent sets, belong.

  (a) Data points in blue and their successors in red. (b) Inputs generated for data points.

FigureFigure 5 :

 5 Figure 4: Generated Transitions

* This project has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement No 725144).


Carine Zaraket
email: carine.zaraket@univ-lorraine.fr

Panagiotis Papageorgas

Michel Aillerie
email: baillerie5@univ-lorraine.fr

Kyriakos Agavanakis

LoRaWAN IoT Technology for Energy Smart Metering Case Study Lebanon

Keywords: LPWAN, LoRaWAN, Internet of Things, Energy Smart Metering

Internet of things (IoT) technology is based on connecting each real object to the internet. Every single object is uniquely recognized and reachable over the network. IoT last mile connectivity is based on different communication technologies and protocols, where the majority is categorized as short-range networks that operate in ISM bands like Zigbee, Wi-Fi, and Bluetooth. Short-range technologies were successfully tested and deployed in different industrial sectors. However, in the energy sectors, the deployment is challenging in certain hard to reach areas where reliable last-mile connectivity is required between the home area network (HAN) smart meters and the meter data management system (MDMS). Therefore recently, Low Power Wide Area Network (LPWAN) technology implementations, which offer long-range connectivity, has emerged as a promising alternative for IoT in Energy applications. Within LPWAN, a variety of technology implementations exist and operate in licensed and unlicensed spectrum respectively like NB-IoT, LoRaWAN, and Sigfox. In this article, we discuss both the performance of LoRaWAN in a real-world environment and its deployment as a low-cost, long-range, and reliable last-mile solution for energy smart metering in urban area scenario where a short-range solution may not be the optimum one. Furthermore, a prototype that is adapted to the existing Lebanese traditional energy sector was developed to test LoRaWAN's usefulness in Lebanon.

Introduction

With the growing energy demand, the energy generation distribution, the integration of renewables, and the enhancements achieved in IoT networks which target the Building Management systems (BMS) energy sector including outage management, the direction was to migrate the traditional grid to be smarter and more efficient. The smart grid is the integration of IoT networking technologies in the conventional electrical grid [1]. IoT networks introduce smart meters that permit real-time managing and monitoring of different parameters including the user's energy consumption. Building a smart grid is based on introducing and integrating a variety of smart technologies including smart meters, smart sensors, and different communication protocols. As a consequence, the global smart grid technology consists of groups of individual technologies that cover the whole grid from the generation to the transmission and distribution [START_REF] Specification | The authors reserve the right to change specifications without notice[END_REF]. In developed countries, Smart grids have an essential role in the deployment of the electrical system by enabling low-cost solution deployment and more powerful performance [START_REF] Vitiello | Cost-benefit analyses & state of play of smart metering deployment in the EU-27[END_REF][START_REF] Ghosh | Technology deployment status of U.S. smart Grid projects -Electric distribution systems[END_REF]. With a smart grid the small electrical systems, that are not connected to the central system and deployed as a cost-effective solution for the electrification of rural area, can be later connected to the national central electricity system simply and easily.

In Lebanon, the first hands-on experience with IoT technology on a pilot basis has been demonstrated in the agriculture sector by some private companies, where LoRa sensors have been used for sensing the soil moisture [5]. Concerning the energy sector, the Lebanese power system "Electricté du Liban" (EDL) is using traditional energy meters based on electromechanical sensors, and energy consumption measurements are being captured monthly by the EDL employees. So far in the Utility sector, deploying IoT smart metering technologies depends on different requirements, like the country's geographical nature, the consumer's attitude for accessing their consumption data, the cost of a new smart meter ant the replacement cost of the existing system, and the lack of adoption of suitable standards and technologies that must be used to achieve an end to end connectivity [START_REF] Division | Technical assistance to Lebanon on improving energy statistics for sustainable development : Assessment mission report[END_REF].

In this article, our purpose is to integrate the new IoT technology to the existing traditional energy meter's set up in developing countries like Lebanon, to accelerate the communication between the meter and the utility in near real-time this is by including the Automated Meter Reading (AMR) infrastructure and to provide the consumer with a feedback of its real-time energy consumption. So we expect that our proposed solution will illustrate the smart meter functionalities by operating independently and transmitting data to the utility using LoRa technology as last-mile connectivity on a near real-time basis. The challenge that exists in such a setup with the present energy infrastructure in Lebanon is the variety of energy providers. The Lebanese energy market relies on both diesel generators and utility [START_REF] Division | Technical assistance to Lebanon on improving energy statistics for sustainable development : Assessment mission report[END_REF] so the setup should be able to take both energy measurements and to transmit it to two different providers, in addition to the integration of such system with the existing traditional meters. Hence we have tried to develop a low power, long-range connectivity and low-cost solution therefore, the direction was to the use of LPWAN technology [START_REF] Linklabs | Low Power, Wide Area Networks networks[END_REF] that is lately very well used for smart metering solutions while keeping untouched the present metering protocols. LPWAN technologies provide the utility with the possibility to read the metering data over a longer range than conventional solutions in an urban area as we have proved in our prototype for energy smart metering setup. Furthermore, in this article, we present an open-source and lowcost technology enablement of energy smart metering architecture based on LoRa with the use of a Microcontroller (MCU) PLATFORM (Arduino MeGa 25600). LoRa is the Physical layer of the LPWAN technology and it works in Unlicensed ISM bands (868 MHz in Europe, 915 MHz in North America, and 433 MHz in Asia). It is a low-cost technology that can be used for the interconnection of energy meters and sending the energy consumption data to the cloud via a Gateway. It provides a bidirectional wireless communication that is essential for implementing the metering infrastructure (AMR) in a Smart Grid. The structure of the presented study is as follows: Section II gives an overview of the metering protocols and the LoRa wireless technology, in section III the subsystems of the suggested prototype are presented, in section IV the prototype setup deployment procedure and experimental results are analyzed while in section V an overall summary of the presented work is given.

Background

With the latest improvements in IoT networks, globally utilities are installing smarts meters with different communication technologies. Lately, LPWAN technologies are considerably used and deployed in today's scenarios as a long-range solution for smart metering. Usually, with a smart module that is integrated into the energy meter, the majority of smart meter functionalities are achieved. The transmission of data utilizes low power, long-range, and narrowband transmission which will lead to a better stable and reliable network in addition to a low cost of implementation. This smart module could be programmed in a way to provide the utility and the consumer with notifications at predefined intervals of time. This section presents a detailed background of LoRa technology and the relevant metering technologies.

LPWAN technologies take place when other technologies (like Zigbee, WiFi, and Bluetooth) aren't good enough to fill all gaps in some case studies and even fail to achieve long-range coverage and performance [8]. For cellular M2M networks, they are too expensive in terms of hardware and services and it consumes too much energy. Hence LPWAN technologies are perfect to be deployed for nodes that need to transmit a small amount of data over a long-range while saving the battery life [START_REF] Sinha | A survey on LPWA technology: LoRa and NB-IoT[END_REF]. The best two areas for deploying LPWAN technologies are:

 LPWAN technologies are a perfect replacement for cellular M2M technology in smart cities and buildings and other applications like smart grid, smart lighting.

 In an application where long battery life is required like smart agriculture and water metering.

Sigfox [10] and LoRa [11] are competitors in the LPWAN space, and both of them belong to the Unlicensed ISM bands. While they differ in the business model and the technology itself but they are too similar in terms of functionalities and both are used and implemented for IoT applications that require long-range and low power communication protocol. Sigfox, an implementation of the narrowband technology, can be deployed for long-range applications. It uses the BPSK (binary phase-shift keying) modulation in the uplink and Gaussian Frequency-Shift Keying (GFSK) in the downlink, it offers a data rate up to 100bps and transmits data up to 10kms in an urban area and up to 40kms in the rural region [12]. Sigfox endpoints are inexpensive but the base station that controls and manages the network is more complicated than the corresponding element in LoRaWAN. While LoRaWAN operates at a wider band. On the other hand, Narrowband-Internet of Things (NB-IoT) is a standard developed by the third-generation partnership project (3GPP), that uses cellular telecommunication bands to connect a vast range of nodes [START_REF] Mekki | Overview of Cellular LPWAN Technologies for IoT Deployment[END_REF]. It is used for massive M2M and IoT applications that required an extended range of transmission with a low cost and low power for long battery life. It coexists in long term evolution (LTE) or Global System for Mobile (GSM) under licensed frequency.

LoRa is a strong modulation technique for long-range, low data rate, and long battery life (up to 10 years) wireless communication technology. It is patented from Semtech, and uses a chirped spread spectrum modulation for layer one or the physical layer for LoRaWAN. The chirped spread spectrum modulation decreases the interference impact on data transmission providing increased reliability. LoRa MAC layer was developed by the LoRa Alliance and forms the data link and network layer. The adaptive rate is one of LoRa features, and it can be modified accordingly with the chosen bandwidth. The transmission energy is defined with the selection of the optimum spreading factor. The LoRa transceivers that must be integrated with the smart meter are not expensive compared to other technologies. LoRaWAN uses the ISM frequency bands with a data rate that varies from 0.3kbps to 50kbps and transmits data within a 5 km range in the urban region and 20 km in a rural area with a payload size of 243 bytes. In Europe, the adopted frequency band is between 863MHz and 870MHz, however, in the US the adopted frequency is 915Hz. LoRaWAN end devices operate in three different operation modes, namely A, B, and C, with each mode providing different uplink and downlink capabilities and energy needs accordingly [START_REF] Germani | An IoT architecture for continuous livestock monitoring using lora LPWAN[END_REF].

Class A nodes listen to incoming messages directly after the upload of some data and then they go back to sleep mode (batteries saving mode). The access mode in use is the ALOHA mode for uplink transmission, after the transmission the class A node listens for a reply within two downlink windows, therefore the node can be inactive for a time duration (low duty cycle) which will save the battery life. Once the uplink transmission is deciphered successfully by the gateway then the downlink traffic can be transmitted. Hence, class, A nodes are the lowest power consumption nodes with high latency in the transmission and the reception of packets.

Class B nodes: the gateway sends beacon messages to the end device that is used to synchronize time windows for listening. This beacon is used for additional downlink traffic without previous successful uplink transmission. Class B devices are nodes with average power consumption and low latency in transmitting and receiving unicast and multicast packets.

Class C devices are always in listening mode, therefore they are connected to a power supply. Class C nodes are nodes with high power consumption, with low latency in the transmission and the reception of unicast and multicast packets [START_REF]LoRa Documentation[END_REF].

LoRa networks are typically following a star topology where the gateway is just a relay between the end node and the central server. The end node communicates with the gateway via LoRaWAN and the gateway communicates with the backend via the IP standard.

In the actual scenario, the existing Home area network (HAN) technologies that are well standardized and in use like Wifi, Zigbee, Bluetooth, and Z-Wave, have some challenges in terms of power consumption and connectivity coverage. They belong to the short-range wireless communication technologies.

To expand their coverage limitation due to their physical short-range (less than 100m), they use mesh network topology. Hence, their major drawback is the high deployment cost to link the big number of nodes that are geographically scattered in a large area. Furthermore, since data is communicated via multi hops to the gateway, a big number of nodes are more loaded and congested than others which will impact their batteries' life (i.e. excessive use of energy), and therefore the network lifetime will be affected. Similar, the 2G, 3G, 4G, LTE cellular networks are developed to have a better traffic throughput, but they are not the best solution to be used for IoT applications due to battery consumption and they are proprietary to mobile operators. On the other hand, the next-generation cellular proposal NB-IoT for IoT application is not yet welldeployed worldwide and specifically in Lebanon, therefore this gap is filled by LoRa technology.

LoRa is developed to operate with IoT nodes which required a long battery life and low data transmission over a long distance.

Both short-range and cellular technologies are expensive solutions to be deployed in a vast area while LoRa is much simpler and presents a low-cost solution that is based on open standards. LoRaWAN platforms are built according to the requirements and they are low-cost platforms.

LoRaWAN fulfills the essential IoT requirements such as secure bi-directional communication, tracking services, and mobility. Furthermore, LoRaWAN specs afford transparent interoperability between smart things without a sophisticated implementation and provide the end-user, the developer, and the business with the right to enable the new rollout and solution with IoT.

Proposed System Design and Architecture

Design constraints

When designing a module to convert the traditional energy meter to be smart, there are many constraints and challenges to be taken into consideration and should be predefined. The most important challenge is to design an interoperable module that can be easily integrated with the existing infrastructure. This design has to read two different sources of energy (the Diesel and the Utility energy consumption). The following sections show the key points to be considered when designing such a system.

Design modularity and open-source

In General, modular conception and open-source energy metering reading systems are for realizing traditional meters' migration with flexible functionality. This will assure the reliability, scalability, and modularity of the system to fit any additional new features. Some challenges and needs should be defined before defining the hardware and software design of the system. The designed module in this paper is developed to add one of the smart features to the existing conventional meters. This system is user friendly and can be used by researchers to test LoRa in energy metering in traditional gird.

Communication Protocol

For the communication network usually, a smart meter has two network interfaces: The one connected to the Home area network (HAN) where the commonly used technologies are Zigbee and Z-wave. The second network interface, the Neighbor Area Network (NAN) for communicating with the Network Operator where power line communication PLC and LPWAN technologies are used. In this article, we focus on the NAN area, where the designed module is developed to provide to the Network Operator, the diesel generator provider, and the consumer/end-user the ability to read the energy consumption remotely in real-time and use them in a multitude of novel ways. Establishing a NAN communication link permits the meter to communicate with other meters and the utility by using different types of existing communication protocols in our case it is LoRa. Moreover, this module aims to transmit the energy consumption data via LoRa to an open-source cloud server where it can be accessible and can be operated on-premises by the different parties for energy trading applications.

Materials characteristics

Before selecting the components that will be used in our module, a commercial comparison in terms of cost and performance of the existing similar components is required. The most significant technical specs of electronic components for the performance evaluation contains accuracy, response time, and sensitivity. In particular, this applies to the MH-sensor-series and the Micro-Controller Unit (MCU) platform. The MCU platform should be open-source, programmed with a simple programming language based on an open-source integrated development environment, and fulfill the requirements in terms of processing capabilities, having enough storage, and finally equipped with enough interfaces to connect to the LoRa shield and the MH-sensor. The MH sensor is an Infrared sensor for detecting the pulses emitted from almost any old or new smart meter and which are used for the energy measurement readings.

Prototype design

Hardware Design

The MH-sensor is selected as a method to count the utility energy consumption. This is because it is a line detector, therefore it is capable to count the number of disc rotations of the electromagnetic energy meter that is still used by the Lebanese Utility. It is a fast response sensor and it is compatible with our design. On the other hand, the relay is used to differentiate between the electricity of Lebanon EDL and the diesel generator. The Arduino Mega is used as a microcontroller unit (MCU) platform for the metering. The Arduino platform was adopted because it is open-source, friendly to use, and easy to be programmed with large support from the scientific community. For data transmission LoRa shield module, which is a low-cost platform that can be easily deployed with the Arduino platform and it is used for data transmission on 868 MHz frequency between the MC and the IoT server (Fig 1 .). LoRa Prototype Components In our developed system, in order to read the energy consumption of both resources, the Diesel energy meter and the electricity of Lebanon (EDL) energy meter, we have integrated a loRa module which is composed of two main components: a microcontroller connected to a LoRa shield to retrieve the energy consumption measure from the meters and transfer this data trough loRa gateway to the network server as per the above architecture (Fig. 3). The microcontroller is the intelligent part of our whole module as it is configured to control all the components to perform and operate accordingly. In this prototype, the end device that is connected to the energy meter is composed of an MeGa microcontroller platform which integrates a LoRa shield for data transmission over a LoRaWAN network. This implementation is depicted in Fig. 4 where the LoRa shield is interfaced with the Arduino MeGa microcontroller's GPIO pins [16].

Fig. 4. Smart meter LoRa End Node

The LoRa Gateway is composed of an iC880A-SPI concentrator board [17]. This platform integrates WiFi and Ethernet connectivity as well as adequate memory resources for the microprocessor that runs a Linux distribution with 16MB Flash and 64MB of RAM and is integrated with a Raspberry Pi, an Antenna (Fig. 5).

Fig. 5. The LoRa Gateway

LoRaWAN architecture is based on star-of-stars topology where the gateway plays only the role of a relay to transmit the data between the end device and the network server. The gateway is connected to the network server via the internet while the end-node is connected to the gateway via LoRa. Generally, end nodes communication is bi-directional, and all also support multicast communication for firmware upgrades over the air. The communication between LoRa node and the gateway can be performed using different frequencies and bandwidth.

Connecting nodes to a LoRaWAN Network and Data Encryption

After a LoRa node is connected to a network, packets are encrypted using a user-supplied key [18] . The LoRaWAN uses AES128 for encryption and adds a frame counter to the packets, while the application payload is encrypted by the AppSKey and the whole packet, including the frame counter and the DevAddr, is signed by the NwkSKey. As the NwkSkey is only known to the node and the network server, the integrity of a packet can only be verified within the network where the device is registered.

Design Implementation

Hardware Implementation The schematic and the implemented hardware designs are represented in Fig. 1. and Fig. 2. respectively. As shown in Fig. 1. the diesel generator and the MH-sensor are connected to the MC. The Arduino platform is programmed using a simple code snippet. As presented in Fig. 2 the LoRa shield is connected to the Arduino platform. Both the LoRa shield and MH-sensor are powered by the Arduino board, while the Arduino board is supplied through a Universal Serial Bus (USB) port.

In our experiment, the test is done using the commonly used energy meters deployed in the Lebanese market, the Gomelong energy meter which is deployed by the Diesel generator providers, and a line detector MH-sensor-series to read the utility's electromechanical energy meter. Both are interfaced with the microcontroller module that will transmit the data to the sever network (control center) via LoRa through the gateway. The module is connected to the energy meter through an interfacing module and serial port connections. The Arduino MeGa 2560 is connected directly to the diesel generator energy counter and is responsible for the pulse detection and counting (1600 pulses equals to 1kW). However, on the other hand, the Arduino is connected to an Infrared detector that is responsible for counting the number of disc rotation of the electromechanical EDL energy consumption (300 pulses equals to 1kW ). These data are then transmitted via the gateway through the internet to the TTN cloud sever (open-source server) where it will be treated and used either by the generator's owner, the utility, or the consumer. The initial setup of the MC requires a baud rate of 115200 bps to be configured and Rx, Tx pins for the communications. The data is received by the MCU chip on the RX pin and is transmitted to the LoRa gateway via the LoRa shield communication interface as is depicted in the architecture proposed below in Fig. 6.

Fig. 6. LoRa module connected to energy Meters

Software Implementation

The developed code allows the MCU to count the number of pulses of each different source of energy and it sends a packet every 20ms to the TTN server. This packet consists of 2 values the EDL and the diesel generator pulse number Fig. 7.

Results and Discussion

LoRa Performance Evaluation

The proposed prototype is tested with the following variables:

In the beginning, LoRaWAN performance is tested over a real environment in Beirut, Lebanon to explore the limits of communication ranges in an outdoor environment. Our experiments are based on LoRa end node and LoRa gateway and the TTN server.

The test was done under the following experimental conditions:

• Urban: Beirut City High density of users, buildings more than 4 floors • GW Gateway, Effective Height =25m

• Antenna Height (20cm)

• The implemented code sends one packet that contains the power consumption • The transmission was tested at different distances away from the gateway.

The experimental results are illustrated below:

Time on air: Time on air is the time to transmit a packet of data. A Spreading Factor (SF) is specified for each transmitted packet of data, the SF is equal to SF = log2 (Rc/Rs), where the chip rate is Rc and the symbol rate is Rs. Therefore, there is a compromise between the communication range and SF. When the spreading factor is higher the date rate is lower, then the communication range is longer.

The below graph shows the time on-air with a bandwidth channel of 125 kHz and a coding rate 4/5. However, as shown with a larger spreading factor the time on-air increases. Signal-to-Noise Ratio (SNR): first of all, the test was done in an outdoor environment with a line of sight nearby Beirut city. Fig. 9 shows the SNR values (in dB) at each distance with periodical packet transmission. The SNR decreases when the distance from the gateway increase.

The SNR is the ratio between the received power signal and the noise level power level. The noise level depends on all the undesired interfering signal sources which will have an impact on the transmitted signal and will cause signal corruption which will lead to data packet retransmission.

 If the SNR value is positive, the received signal works above the noise level.

 If the SNR value is negative, the received signal works below the noise level.

Usually, the noise level is the physical limit of sensitivity, but LoRa performs under the noise level.

Particularly LoRa SNR varies between: -20dB and +10dB. If the SNR rate is close to +10dB which means that the signal at the reception is less corrupted. Signals with SNR value -7.5 dB to -20 dB under the noise level can be demodulated by LoRa [START_REF]LoRa Documentation[END_REF].

Fig. 9. SNR variation

Refer to the measure taken when the distance away from the gateway increases the SNR decreases and as we can see at 3 Km away from the gateway the SNR was -7dB however at 4Km it becomes -13dB.

The packet losses are about 0% at a distance of 1km and 2% at 2km. The height of the end-device plays role in the number of packet losses. Also, we can notice that the number of packet losses increases remarkably when the distance is more than 4 km as per the below graph. Therefore the gateway cannot receive the data transmitted from the end device at a distance higher than 4 Km.

Results Benchmarking

The designed system for energy measurement readings was tested by connecting some home appliances to create an energy load on the system. The MC and the gateway are powered on and the gateway was online and connected to the TTN cloud server. On the other hand, the MH-Sensor was connected to the electromagnetic utility meter. The relay responsibility is to define which source of energy is on. The MC starts to count the number of pulses of the active source of energy, and then these computed measurements are communicated using the LoRaWan and the Gateway to the TTN server by using a specific code that contains information about the different Keys to establish a secure TLS connection. The transmitted data are continuously displayed as is depicted in Fig. 11 using the TTN dashboard GUI. There is a small delay between the Arduino platform serial interface generated data packets and the values published on the TTN server, and this delay refers to the time taken by the LoRa shield to transmit the data packet and the cumulated delays from the TTN cloud server. This delay is not deterministic but as is in the order of seconds it is considered not important by considering that the directives in the European Union for energy smart metering demand sampling periods in the order of 15 min.

To verify the setup we have connected specific electric loads in the IoT smart meter prototype and we have verified the validity of data between the recorded locally and the reported using the TTN cloud server during a specific time interval.

Conclusions

To summarize, this article proposes the design and deployment of an open-source, low-cost, and modular system based on LoRa telecommunication technology for energy metering applications. This solution was designed and proposed for the Lebanese market as an important solution for accessing the electricity outages by deploying a near real-time energy metering infrastructure. The design was deployed and tested in an experimental energy metering application, where the measured values were published to a cloud server, allowing for running analytics and be accessible from the Energy sector operators and the smart meter owners simultaneously. These values can be accessed, processed, and presented using a multitude set of tools enabling the deployment of thirdparty valuable services like the implementation of Virtual Power Plants for Energy curtailment, the engagement of consumers for load-shifting and power consumption reduction through gamification, and the introduction of Distributed Ledger Technologies for peer-to-peer energy trading. The proposed platform design can be easily deployed for improving the Lebanese energy sector by changing the traditional role of consumers to prosumers (producers and consumers) since most of the consumers own diesel generators and can participate in an Internet of Energy implementation. It provides an open-source energy-smart metering solution requiring minimal intervention in an existing electrical installation with a very low budget that can be valuable to the scientific community and the Electricity companies for experimentation and evaluation of IoT smart metering technology implementations.

Fig. 1 .

 1 Fig. 1. Schematic Hardware Diagram

Fig. 3 .

 3 Fig. 3. LoRa Architecture.

Fig. 7 .

 7 Fig. 7. The TTN Server dashboard Graphical User Interface (GUI)

Fig. 8 .

 8 Fig. 8. Transmission Time Variation for different SF

Fig. 10 .

 10 Fig. 10. Packet Loss variation with Distance

  Fig. 11. Data Display


Khaoula Amri
email: akhaoulaomri2@yahoo.com

Rabeb Belghouthi
email: brabebbelghouthi@gmail.com

Michel Aillerie
email: cmichel.aillerie@univ-lorraine.fr

Rached Gharbi

An open circuit voltage decay system for a flexible method for characterization of carriers' lifetime in semiconductor

Keywords: Carrier lifetime, Automated system, Photoconductivity decay, Recombination mechanism, Open Ccircuit Voltage Decay

come

An open circuit voltage decay system for a flexible method for characterization of carriers' lifetime in semiconductor

Khaoula Amri, Rabeb Belghouthi, Michel Aillerie, Rached Gharbi

Introduction

Being the most important and significant material parameter of a semiconductor, the carrier lifetime, wich is defined as the average time it takes an excess minority carrier to recombine ,is extremely sensitive to smallest amounts of impurities or intrinsic defects [START_REF] Salemi | Conductivity modulated on-axis 4H-SiC 10+ kV PiN diodes[END_REF]. In fact, the carrier lifetime depends on the material nature and the various treatments subjected by the device. It enables to produce solar cells with a suitable bulk thickness and doping levels which leads to devices optimization. Measuring the carrier lifetime allows device modelling [START_REF] Ogunniyi | Analysis of carrier lifetime effects on HV SiC PiN diodes at elevated pulsed switching conditions[END_REF]. Furthermore, by combining this information with wafer level lifetime measurements techniques it can be used as a process control metric [START_REF] Pisarkiewicz | Photodecay method in investigation of materials and photovoltaic structures[END_REF]. Although Deep Level Transient Spectroscopy (DLTS) [START_REF] Lang | Deep-level transient spectroscopy: A new method to characterize traps in semiconductors[END_REF] is accepted as one of the most sensitive technique for detecting and analysing defects in p-n junctions, it couldn't cover defects that exist in concentration below the detection limit of the method. Photodecay methods are employed both for investigation of the photoconductive materials and the photovoltaic structures [START_REF] Sinton | Contactless determination of current-voltage characteristics and minority-carrier lifetimes in semiconductors from quasi-steady-state photoconductance data[END_REF], they are based on standard Shockley-Read-Hall theory (SRH) allowing a direct identification of impurities when the injection and temperature dependence of carrier lifetime are controlled [START_REF] Stevenson | Measurement of carrier lifetime in germanium and silicon[END_REF]. They offer a very sensitive method for characterizing defects affecting carrier lifetime, and since the effective lifetime itself is the primary quantity measured, these methods can be utilized to fill in missing data about the recombination activity of particular defects in various semiconductors witch can't be obtained by DLTS methods. In order to precisely apply the photodecay method, the effective lifetime must be measured as exactly as possible. Thus, a complete system was developed which allow the injection of wide range of current levels and uses built-in data acquisition to receive the decay waveforms produced. The Open Circuit Voltage Decay (OCVD) method was employed with a relatively unique data extraction algorithm that circumvents the inherent abstraction of data and added noise caused by conventional methodologies.

The Steady state (SSPC) and Quasi Steady-state (QSSPC) methods

In the steady state conditions, the generation of electron -hole pairs is in balance with the recombination of the same pairs.

In the steady state conditions, the generation of electron -hole pairs is in balance with the recombination of the same pairs.

G = R (1)
As a consequence, the photoelectric density Jph can be expressed in terms of an effective minority carrier lifetime 𝜏 !"" and the minority carrier density ∆ ! as:

𝐽 !! = (∆𝑛 𝑞 𝑑 ) 𝜏 !"" (2)
where d denotes the sample thickness.

The minority excess carrier density ∆ ! and the majority excess carrier density ∆ ! allow determining the photoconductivity 𝜎 !! as

𝜎 !! = 𝑞 ∆ ! 𝜇 ! + ∆ ! 𝜇 ! = 𝑞∆ ! (𝜇 ! + 𝜇 ! ) ( 3
)
where µ is the mobility of the carriers From (2) and (3), we can determine the effective minority carrier lifetime is given by

𝜏 !"" = ! !! ! ! !! (! ! !! ! ) (4)
If we modify the SSPC method described above and instead of using a constant illumination, we use a light pulse that varies slowly compared to the effective lifetime of the wafer, this method is called QSSPC [START_REF] Lederhandler | Measurement of minority carrier lifetime and surface effects in junction devices[END_REF]. It was introduced by Sinton and Quevas in 1966 [8]. The method permits obtaining the photoconductivity under a large range of illumination intensities in a short time without any significant sample heating. The quasi steady-state photo conductance data implicitly contain information about the short-circuit current versus the open circuit voltage.

The implicit voltage of a solar cell made on p-Type wafer with dopant density depends on the pn product at the junction is expressed as

𝑉 !" = k ! 𝑇 𝑞 ln [∆ ! (𝑁 ! + ∆ ! ) 𝑛 ! ! + 1] (5)
where 𝑛 ! is the intrinsic carrier density, k ! presents the Boltzman constant and T is the temperature.

The local excess minority carrier density is obtained from Eq (3) when the surfaces of the sample are passivized and the minority carrier diffusion length exceeds the wafer thickness

The QSS method was developed to measure simultaneously the open circuit voltage of the solar cells and the incident light intensity [START_REF] Sinton | A quasi-steady-state open-circuit voltage method for solar cell characterisation[END_REF].

The effective lifetime of minority carriers can be determined from the measured 𝑉 !" values:

𝜏 !"" = ! ! ! !"# ( ! !" ! ! ! ! ) ! !! (! ! !∆ ! ) !" (6)
The difference between the lifetime calculations based on Eqs (4) and ( 6) is the way in which the excess carrier density within the semiconductor is sensed.

The extension of OCVD methods to photo-decay measurements

Among the classical methods of semiconductor investigation, it is possible to apply the OCVD methods for the characterisation of the photocurrent decay (PCD), related to the carriers' lifetime as proposed by Stevenson and Keyes in 1955 [START_REF] Stevenson | Measurement of carrier lifetime in germanium and silicon[END_REF], of course applied to photoconductor devices as photodiodes.

The photoconductor sample is uniformly illuminated by the light pulses inducing adequate generation of the excess carriers and photocurrent variation. The photocurrent is recorded as a drop of the voltage on the resistor connected in series.

Starting from the basic continuity equation in a simplified form:

!! ! !" = 𝐺 - ! ! !! !! ! ! (7)
At the steady state, !! ! !! = 0, and from Eq ( 7)

𝑃 ! = 𝑃 !! + 𝑍 ! 𝐺 = 𝑐𝑜𝑛𝑠𝑡 (8)
Turning off the light at t=0, one can obtain the differential equation

!! ! !" = - ! ! !! ! ! ! ! (9)
This has the solution,

𝑃 ! 𝑡 = 𝑃 ! ! + 𝜏 ! 𝐺𝑒 !! ! ! (10)
An alternative method to measure the carrier lifetime is the microwave Photo conductance decay (MW-PCD). The principle of this technique is to excite the cell with a laser source (a short pulse of 100 ns) generating the excess carriers within the wafer. Then; we measure the decay of the carrier concentration via the reflected microwave power [START_REF] Schmidt | Accurate method for the determination of bulk minority-carrier lifetimes of mono-and multicrystalline silicon wafers[END_REF].

Comparing the MW-PCD with the QSSPC technique, the second allows accurate lifetime measurements over large injection ranges in one quick flash. Moreover; the carrier injection level is measured with no need for any device simulation [START_REF] Ch | Comparison of effective carrier lifetimes in silicon determined by transient quasi-steady-state photoconductance measurements[END_REF].

Another method for investigating the recombination parameters of solar cells is the open circuit voltage decay (OCVD) technique [START_REF] Rose | Determination of effective surface recombination velocity and minority carrier lifetime in high-efficiency Si solar cells[END_REF].

The method was first described by Leaderhandler and Giacoletto [START_REF] Lederhandler | Measurement of Minority Carrier Lifetime and Surface Effects in Junction Devices[END_REF]. Its simplest form. The p-n junction is forward biased until it reaches a steady -state and then quickly switched off from the excitation source to leave the junction in real open circuit conditions, (we measure then the voltage drop over time). The voltage across the diode immediately drops by an initial amount ∆𝑉 due to the junction's internal series resistance, and then the voltage decreases (ideally, assuming no excessive parallel resistance or capacitance) due to recombination of the injected carriers.

The derivative of the voltage expression for a p-n junction assuming asymmetrical doping is given by Equation [START_REF] Schmidt | Accurate method for the determination of bulk minority-carrier lifetimes of mono-and multicrystalline silicon wafers[END_REF].

𝐹 𝑡 = ! !! ! !! ! !"
!! [START_REF] Schmidt | Accurate method for the determination of bulk minority-carrier lifetimes of mono-and multicrystalline silicon wafers[END_REF] with η = 1 + 𝑝 ! / (𝑝 ! + 𝑁 ! ) is the injection -dependent ideality factor which varies from 1 at low injection (𝑝 ! ≪ 𝑁 ! ) to 2 under high injection level (𝑝 ! ≫ 𝑁 ! ) is the doping concentration of the n-type layer, and 𝑝 ! depends on 𝑉 ! , as

𝑝 ! = 𝑁 ! /2{-1 + [1 + 4(𝑛 ! ! ! ) / (𝑁 ! ! )) exp(𝑉 ! (𝑡)/𝑉 ! )] ! ! (12)
that can be calculated with the value of the intrinsic carrier density 𝑛 ! ! . For silicon semiconductors, the standard value of 𝑛 ! ! is considered as equal to 1.45 . 10 !" cm !! at room temperature (Value providing from the datasheet of the diode Vishay 1N4007). Vt is the thermal voltage, which is equal to 25 mV at room temperature.

OCVD System hardware

In order to measure the open circuit voltage decay with good accuracy an avoiding the joule heating effect of the junction, there with less noise affecting the signal, a new structure was set in place and build for the work presented here in • Keithley 2400, [15] as controllable source for current injection that can operate by a pulse signal to avoid joule heating. • Semelab D2081UK MOSFET that is controlled by an HM8030 HAMEG pulse generator

[16] to disconnect the DUT from the source current. • HM8030 HAMEG pulse generator • An oscilloscope Tektronix TDS 220 [17] to acquire data quickly.

• A control section that is connected to the oscilloscope via GPIB, which manages signals and calculates the carrier lifetime. • All of these blocks are incorporated in the same unit as represented by the block diagram of Figure 1.

The device under test, DUT is under excitation of a constant current source K Keithley 2400, when a pulse signal is applied via the HM8030 pulse generator, the D2081UK MOSFET disconnect quickly the DUT from the current source thanks to his low commutation time (<30ns). Thus, the voltage drop across the DUT can be measured via a TDS 220 oscilloscope and afterwards the signal will be transferred to the control section by GPIB.

Another source of illumination is added to the constant current source, to investigate the effect of illumination on the carrier lifetime. The source generates a white light with possible adjustable intensity.

Figure. 1. OCVD System bloc diagram

OCVD System Software

A Graphical User Interface implemented with LabVIEW [18] permit to send commands and collect data from the OCVD system. A user can initiate the system; manipulate all the parameters that allow him to get a readable signal. The voltage waveform thus obtained is displayed on the screen and data can be saved as CSV files. Moreover, the data will be processed in real time by applying a digital filter and then bypassing and differentiating in order to extract the lifetime value.

Figure 2. Developed LabVIEW Interface

The algorithm used to filter the signal is the moving average; it consists of calculating the smoothing point (𝑦 ! ) ! being the average of an odd number of consecutive 2n+1 points of the raw data [START_REF] Smith | Digital Signal Processing: A Practical Guide for Engineers and Scientists[END_REF].

(𝑦 ! ) ! = 𝑦 !!! (2𝑛 + 1) !!! !!!! (13)
Figure 3 Moving average algorithm applied to an example curve

Experimental results and discussions

Figures 4 show the V(t) curves obtained with our OCVD experimental setup using 1N4007 diode at two different current injections, the first at 100mA and the second at 1A. We observe the same behaviour but with different amplitude which is due to the increasing of the generation rate. Our results are similar to those obtained in literature, Lacouture et al. [START_REF] Lacouture | An open circuit voltage decay system for performing injection dependent lifetime spectroscopy[END_REF]. The design of the silicon diode (Vishay 1N4007) is unknown. Thus, we recorded a I-V characteristic and a C-V characteristic. The I-V curve allows determining the ideality factor and the shunt resistance Rsh while the C-V curve allows extracting N l and V bi from an asymmetric p-n junction [START_REF] Van Opdorp | Evaluation of doping profiles from capacitance measurements[END_REF][START_REF] Schroder | Semiconductor material and device characterization[END_REF]. Both curves are presented in Fig. 5. The ideality factor has been calculated through the local ideality factor η(V) [START_REF] Mcintosh | Lumps, Humps and Bumps: Three Detrimental Effects in the Current-Voltage Curve of Silicon Solar Cells[END_REF] with the following equation:

η 𝑉 = ! ! ! ! !" !(!" !) (14)
where dV /d(ln I) is the slope of the ln (I)-V curve at a given voltage represented Fig. 5(b). Then we obtained η=1.56 by considering the average over the voltage range [0.2 : 0.7V]. We found considering the voltage range [-0.6 : 0V] from the I-V curve. Regarding the C-V curve, diffusion and SCR capacitances are clearly distinguishable. It is possible to extract N l and V bi by fitting the C-V curve with linear regression of 1/𝐶 !"# ! [START_REF] Van Opdorp | Evaluation of doping profiles from capacitance measurements[END_REF][START_REF] Schroder | Semiconductor material and device characterization[END_REF] given by

! ! !"# ! = - !! !∈! ! ! ! + !! !" !∈! ! ! ! (15)
where A is the area of the silicon diode in cm 2 . We obtained N l = 2.19 10 12 cm -3 and V bi = 0.694V for a diode area of 3.14mm 2 As suggested above, the OCVD method allows the characterization of the modification with light of the photocurrent decay (PCD) related to the carriers' lifetime in a photodiode. To highlight this physical phenomena, we applied this to the characterisation of the photocurrent decay in a photodiode EG&G 444BQ, by adding to the setup a light source varying from 10% to 30% of total illumination, corresponding to the range from 0.25 mW/cm 2 to 3 mW/cm 2 . Thus, it is clearly point-out in Figure 6 that, within the OCVD setup as built, the intensity of the light directly influences the photocurrent decay time related to the carriers' lifetime in a photodiode. Nevertheless, a deeper analysis has to be improved to extract all parameters relative to the determination of the carriers's lifetime in photodiode by considering, in addition, the external physical parameters as the temperature, and the wavelength of the light used for the excitation. By else, this OCVD technique, that can firstly be considered as a simple experimental technique dedicated to the measurement of carriers' lifetime in semiconductor, allows the characterization of numerous semiconductor devices as diodes and photodiodes, and also for specific characterisations of semiconductor integrated in photovoltaic solar cells.

Summary

An automated OCVD system was designed allowing data acquisition in a wide range of current injection levels with a low noise .the use of recent numerical algorithm permit filtering the signal in each operation. The OCVD measurement was obtained under 300K using a packaged commercial 1N4007 PIN HV diode. We also applied this technique to the characterization of the modification with light of the photocurrent decay (PCD) in photodiode. A study of illumination effect on the carrier lifetime is done at three different values. In the aim of studying the effect of defect density on the perovskite solar cells which is one of the limitations of this category of solar cells, the OCVD method will be applied on those cells in future work.

Figure 4 :

 4 Figure 4: Decay curve V (t) a) at 100 mA current injection level b) at 1A current injection level

Figure 5 .

 5 Figure 5. I-V and C-V characteristics of the silicon diode

Figure 6 .

 6 Figure 6. V (t) with excitation of 5mA, under illumination.