Leonardo B Groff

João M Gomes Da Silva

Giorgio Valmorbida

Event-Triggered Control for Discrete-Time Piecewise Affine Systems

Keywords: piecewise affine systems, event-triggered control, stability

This work addresses the event-triggered control (ETC) of discrete-time piecewise affine systems. We propose a method to design a triggering strategy relying on an implicit representation of piecewise affine systems. Thanks to this implicit representation based on ramp functions, we propose a partition-dependent piecewise quadratic functions to define the trigger criterion and use a piecewise quadratic Lyapunov function candidate to derive conditions to certify the global exponential stability of the origin under the ETC strategy. Since the stability conditions can be expressed as linear matrix inequalities constraints, we propose a convex optimization solution to design the triggering function parameters and to compute the Lyapunov function to ensure the closed-loop stability and a reduction on the control updates. The approach is illustrated by numerical examples.

Introduction

Many physical applications can be described by piecewise affine systems (PWA) such as nonlinear circuits [START_REF] Chua | The double scroll[END_REF][START_REF] Kahlert | A generalized canonical piecewise-linear representation[END_REF][START_REF] Rodrigues | Piecewise-affine state feedback for piecewise-affine slab systems using convex optimization[END_REF], and systems with saturation and deadzones nonlinearities [START_REF] Gomes Da | Polyhedral regions of local stability for linear discretetime systems with saturating controls[END_REF]. Moreover, smooth nonlinearities appearing in dynamical systems can be approximated by piecewise affine functions leading to PWA models. In the context of model predictive control (MPC) for linear systems with affine constraints and quadratic costs, the optimal solution can be expressed as a piecewise affine control law [START_REF] Bemporad | The explicit linear quadratic regulator for constrained systems[END_REF], leading to a PWA closed-loop system. Neural networks with Rectifier Linear Unit (ReLU) activation functions (i.e. ramp functions) can also be modeled by PWA systems. Moreover, the class of PWA systems encompasses the one of piecewise linear (PWL) systems [START_REF] Julian | High-level canonical piecewise linear representation using a simplicial partition[END_REF][START_REF] Kahlert | The complete canonical piecewise-linear representation. i. the geometry of the domain space[END_REF].

PWA systems are in general described by an explicit representation [START_REF] Sontag | Nonlinear regulation: The piecewise linear approach[END_REF]. In this case, the piecewise dynamics is associated to a partition of the state space and the sets of the partition are described by the intersection of halfspaces [START_REF] Johansson | Computation of piecewise quadratic Lyapunov functions for hybrid systems[END_REF][START_REF] Feng | Stability analysis of piecewise discrete-time linear systems[END_REF][START_REF] Ferrari-Trecate | Analysis of discrete-time piecewise affine and hybrid systems[END_REF][START_REF] Hovd | Relaxing PWQ Lyapunov stability criteria for PWA systems[END_REF][START_REF] Rubagotti | A Lyapunov method for stability analysis of piecewise-affine systems over non-invariant domains[END_REF] or by cone rays and vertices representations [START_REF] Iervolino | Cone-copositive piecewise quadratic Lyapunov functions for conewise linear systems[END_REF][START_REF] Iervolino | Lyapunov stability for piecewise affine systems via conecopositivity[END_REF]. Implicit representations instead do not have separate description for the sets in the partition and the dynamics defined in each set. Among the implicit representations, we can cite the max-min-plus-scaling (MMPS), which is equivalent to other models discussed in [START_REF] Heemels | Equivalence of hybrid dynamical models[END_REF]. More recently, an implicit representation, based on vector valued ramp functions has been proposed in [START_REF] Groff | Stability analysis of piecewise affine discrete-time systems[END_REF].

Most of the works addressing the stability analysis of discrete-time PWA systems consider an explicit representation and piecewise quadratic (PWQ) Lyapunov functions [START_REF] Feng | Stability analysis of piecewise discrete-time linear systems[END_REF][START_REF] Ferrari-Trecate | Analysis of discrete-time piecewise affine and hybrid systems[END_REF][START_REF] Hovd | Relaxing PWQ Lyapunov stability criteria for PWA systems[END_REF][START_REF] Rubagotti | A Lyapunov method for stability analysis of piecewise-affine systems over non-invariant domains[END_REF], where to each set of the partition a different quadratic function is associated. The main drawback of these methods is the need of enumerating the possible transitions between sets in the partition when evaluating the decrease of the Lyapunov function. To reduce conservatism, a reachability analysis should be performed to eliminate from the analysis transitions that never occur [START_REF] Feng | Stability analysis of piecewise discrete-time linear systems[END_REF]. This drawback can be overcome with implicit representations to describe both the system dynamics and PWQ Lyapunov functions. In [START_REF] Groff | Stability analysis of piecewise affine discrete-time systems[END_REF], we introduced an LMI-based method that avoids the enumeration of the transitions to compute the Lyapunov function parameters.

In the context of networked control systems, bandwidth and energy consumption constraints have motivated the development of event-triggered control (ETC) policies [START_REF] Hespanha | A survey of recent results in networked control systems[END_REF][START_REF] Peng | A survey on recent advances in event-triggered communication and control[END_REF]. Differently from time-triggered strategies, ETC updates the control law only when some criterion is satisfied, as means of avoiding unnecessary data transmission [START_REF] Heemels | An introduction to event-triggered and self-triggered control[END_REF]. In a continuous-time framework, the triggering rule can be implemented by continuously [START_REF] Tabuada | Event-triggered real-time scheduling of stabilizing control tasks[END_REF] or periodically [START_REF] Heemels | Periodic event-triggered control for linear systems[END_REF][START_REF] Borgers | Periodic event-triggered control of nonlinear systems using overapproximation techniques[END_REF] monitoring some systems variables. Considering discrete-time models the triggering rule is evaluated at each discrete-time instant, which corresponds in general to a periodic sampling strategy. Regarding linear systems, we can cite in this context the works [START_REF] Eqtami | Event-triggered control for discrete-time systems[END_REF], [START_REF] Golabi | Event-triggered control for discrete-time linear parameter-varying systems[END_REF] and [START_REF] Wu | Event-triggered control for discrete-time linear systems subject to bounded disturbance[END_REF].

Event triggered control has also been studied in the context of switched and switching affine systems [START_REF] Li | Periodic event-triggered control for switched affine systems[END_REF][START_REF] Chen | Event-triggered finite-time dynamic output feedback control for switched affine systems with asynchronous switching[END_REF]. In these references, the problem is significantly different from the one regarding PWA systems, since the changes on the dynamics is given by an external signal (switching signal), which can also be used for control purposes [START_REF] Albea | Time-triggered and event-triggered control of switched affine systems via a hybrid dynamical approach[END_REF]. For the class of PWA systems studied in the paper, the vector field is continuous and each affine dynamics is defined in a set of the partition. In [START_REF] Ma | Event-triggered feedback control for discrete-time piecewise-affine systems[END_REF], ETC for PWA discrete-time systems is studied considering an explicit representation and quadratic Lyapunov functions to assess stability with a classical quadratic relative error triggering criterion [START_REF] Tabuada | Event-triggered real-time scheduling of stabilizing control tasks[END_REF] based only on the control signal. Differently from a time-triggered strategy, when an eventtriggered strategy is designed using an explicit representation, the reachability analysis mentioned above becomes rather convoluted. The reason for the increase on the complexity of the reachability analysis is that the successor state also depends on the trigger rule and it is not possible to a priori define in how many instants ahead the control will be effectively updated. In practice, to prove closed-loop stability, we would have to enumerate and verify the decrease of the Lyapunov function for all transitions between two regions, which may lead to conservative results [START_REF] Hovd | Relaxing PWQ Lyapunov stability criteria for PWA systems[END_REF]. Moreover, since the dynamics of the system is different in each set of the partition, it is natural to introduce different triggering functions depending on the partition. Two issues arise if an explicit representation is used in this case: a) the set where the current state is has to be determined at each instant and the triggering function associated to each partition evaluated; b) the determination of the parameters of the trigger rule associated to each set of the partition such that the number of control updates is effectively reduced.

To tackle the above issues, this paper addresses the event-triggered control for PWA systems using an implicit representation based on vector-valued ramp functions proposed in [START_REF] Groff | Stability analysis of piecewise affine discrete-time systems[END_REF], which implicitly capture all possible transitions. One of the main aspects of the implicit representation is that no reachability analysis is required. Also considering vector-valued ramp functions, we propose a new PWQ triggering function that implicitly encodes the state partition in the event generator, leading to a partition-dependent weighted relative criterion. In particular, such a function allows to efficiently address the issues a) and b) above. Then, using a piecewise quadratic Lyapunov function candidate, LMI conditions are derived to assess the global exponential stability of the origin of the closed-loop system under the event-triggered control strategy. Based on these conditions, we propose a convex optimization problem to design the triggering function parameters aiming at a reduction of the control updates with respect to a time-triggered implementation. The approach is illustrated by some numerical examples.

The paper is organized as follows. In Section 2, the implicit representation of PWA systems is recalled and the event-triggered control problem is stated. Based on properties of vector-valued ramp functions and PWQ Lyapunov candidate functions, in Section 3 conditions for the exponential stability of the origin of the closed-loop system under the proposed ETC strategy are derived. In Section 4 these conditions are cast as linear matrix inequalities (LMIs) and an optimization problem is proposed to design the triggering function parameters. In Section 5 some numerical examples illustrate the application of the proposed approach. Finally, we present some concluding remarks to summarize the main features of the method.

Notation: Norm ∥M∥ denotes the largest singular value of M and, for square matrices, He{M} ≜ M + M ⊤ . M (i, j) denotes the (i, j) entry of matrix M and v (i) represents the i-th element of the vector v. The set of symmetric and symmetric positive (negative) definite matrices of dimension n are denoted, respectively, S n and S n + (S n -). Define the set of diagonal matrices

D n = {M ∈ R n×n | M (i, j) = 0, i ̸ = j} and the sets D n {0,1} = {M ∈ D n | M (i,i) ∈ {0,1}} and D n [0,1] = {M ∈ D n | M (i,i) ∈ [0,1]}. P n×m = {M ∈ R n×m | M i, j ≥ 0,
∀i, j denotes a set of matrices with nonnegative elements. For vectors v, u ∈ R m , v ⪰ u denotes an elementwise inequality, i.e. v (i) ≥ u (i) for i = 1, . . . m. I n and 0 n denote the identity matrix and a square zero matrix of order n, respectively. 0 n,m is an n × m matrix of zeros. Given square matrices M 1 , M 2 , diag(M 1 ,M 2 ) denotes a block diagonal matrix composed by these matrices. The indicator function of a set N ⊆ N is defined as

I(k,N) = 1 if k ∈ N, I(k,N) = 0 if k / ∈ N.
For a set Γ, Int(Γ) and ∂ Γ denotes its interior and its boundary, respectively.

Problem Statement

The PWA system

Consider the discrete-time PWA system in closed-loop with a PWA control law and a polyhedral partition of the state-space given by

x(k + 1) = A j x(k) + a j + Bu(k) u(k) = H j x(k) + h j ∀x(k) ∈ Γ j , j = 1, . . . , N p , k ∈ N (1)
where x ∈ R n is the system state and u ∈ R m is the control input,

A j ∈ R n×n , a j ∈ R n , B ∈ R n×m , H j ∈ R m×n , h j ∈ R m
, and each partition Γ j is defined as

Γ j = {x ∈ R n | D j x + e j ⪰ 0} with Γ j ⊂ R n , ∪ N p j=1 Γ j = R n , D j ∈ R r j
×n , e j ∈ R r j and Int(Γ i ) ∩ Int(Γ j ) = / 0 for all i ̸ = j. We assume that the vector field is continuous, namely,

A j x + a j = A i x + a i for {x ∈ R n | x ∈ ∂ Γ j ∩ ∂ Γ i }.
The above expressions provide an explicit representation of the PWA system. In this paper we consider instead an implicit representation [START_REF] Groff | Stability analysis of piecewise affine discrete-time systems[END_REF] given by

x(k + 1) = F1 x(k) + F2 φ (z(x(k))) + Bu(k) (2a) z(x(k)) = F3 x(k) + F4 φ (z(x(k))) + f5 , (2b)
u(k) = K 1 x(k) + K 2 φ (z(x(k))) (2c) F1 ∈ R n×n , F2 ∈ R n×n z , B ∈ R n×n u , F3 ∈ R n z ×n , F4 ∈ R n z ×n z and f5 ∈ R n z , K 1 ∈ R m×n , K 2 ∈ R m×n z . z ∈ R n z
is the argument of the vector-valued function φ : R n z → R n z , defined element-wise by the ramp function r : R → R, that is

φ (i) (z) = r(z (i) ) = 0 if z (i) < 0 z (i) if z (i) ≥ 0 (3)
for each i = 1, ..., n z . Note that when F4 is equal to zero or has an upper (or lower) strict block triangular structure, z (and therefore φ (z)) can be straightforwardly determined from (2b). However, in the general case, (2b) is an implicit equation depending on x as f (z) := z -F4 (φ (z)) = F3 x + f5 . In this case, the following assumption is made to guarantee the well-posedness of the algebraic loop defined in [START_REF] Kahlert | A generalized canonical piecewise-linear representation[END_REF].

Assumption 1. For all ζ ∈ R n z , there exists a unique solution z ∈ R n z to the implicit equation z - F4 (φ (z)) = ζ .
The lemma below provides a test to verify whether, for a given F4 , Assumption 1 holds. Lemma 1. [START_REF] Groff | Stability analysis of piecewise affine discrete-time systems[END_REF] If there exists a matrix X ∈ D n z such that

-2X + X F4 + F⊤ 4 X < 0, (4)
then the implicit equation z -F4 (φ (z)) = ζ has a unique solution.

Remark 1. Note that if x ∈ Γ j the elements of φ (z(x)) will be either equal to zero or z (i) (x). In this case, we can write that φ (z(x)) = ∆ j z(x), with ∆ j ∈ D n z {0,1} . Thus, the solution of the algebraic loop for x ∈ Γ j will be given by

z = (I -F4 ∆ j ) -1 ( F3 x + f5 ). ( 5
)
As a matter of fact, condition (4) [START_REF] Groff | Stability analysis of piecewise affine discrete-time systems[END_REF], [START_REF] Zaccarian | A common framework for anti-windup, bumpless transfer and reliable designs[END_REF]. Hence, using (5), the explicit representation in (1) can be obtained from the implicit representation (2) by considering the possible values for ∆ ∈ D n z {0,1} , as follows:

ensures that I -F4 ∆ is nonsingular ∀∆ ∈ D n z {0,1}
A j = F1 + F2 ∆ j (I -F4 ∆ j ) -1 F3 , a j = F2 ∆ j (I -F4 ∆ j ) -1 f5 , K j = K 1 + K 2 ∆ j (I -F4 ∆ j ) -1 F3 , h j = K 2 ∆ j (I -F4 ∆ j ) -1 f5 .
Furthermore, since ∆ j (i,i) = 1 means that z (i) ≥ 0 and ∆ j (i,i) = 0 means that z (i) ≤ 0, or equivalently -z (i) ≥ 0, by defining ∆ j = (2∆ j -I n z ), the matrices describing the partition Γ j are recovered as follows:

D j = ∆ j (I -F4 ∆ j ) -1 F3 , e j = ∆ j (I -F4 ∆ j ) -1 f5 .
Note that the ramp function is a continuous function and r(z (i) ) = 0 for z (i) = 0. In fact, for z (i) (x) = 0, the state x belongs to the boundary of two neighbour regions Γ j (which will be associated to ∆ j (i,i) = 1) and Γ r (which will be associated to ∆ r (i,i) = 0).

Remark 2. PWL systems can be seen as a particular class of PWA systems. This corresponds to the case in which a j and h j are equal to 0 in the explicit representation (1), or equivalently, vector f5 = 0 in our proposed implicit representation (2).

Event-triggered Control Strategy

In this section, we formally state the ETC strategy to be used and the problem we aim to solve. We consider an emulation approach for the event-triggering strategy [START_REF] Peng | A survey on recent advances in event-triggered communication and control[END_REF][START_REF] Heemels | An introduction to event-triggered and self-triggered control[END_REF]. In this context, we assume that a stabilizing control law by considering a time-triggered updating of the control signal has been computed, that is (2c) is given. The main objective is therefore the design of a trigger rule aiming at reducing the number of control signal updates, while preserving the closed-loop stability. Hence, the following assumption is considered: Assumption 2. Matrices K 1 and K 2 are given and are such that the time-triggered control law (2c) ensures the global exponential stability of the origin of the closed-loop PWA system [START_REF] Kahlert | A generalized canonical piecewise-linear representation[END_REF] Note that the satisfaction of this assumption can be checked by the conditions proposed in [START_REF] Groff | Stability analysis of piecewise affine discrete-time systems[END_REF]. The discussion of methods for the computation of K 1 and K 2 satisfying Assumption 2 is out of the scope of this work. This assumption is satisfied, for instance, when global stabilizing state feedback time-triggered control laws are designed for systems with input saturation [START_REF] Tarbouriech | Stability and Stabilization of Linear Systems with Saturating Actuators[END_REF] or when some MPC strategies are used, which are equivalent to PWA control laws [START_REF] Bemporad | The explicit linear quadratic regulator for constrained systems[END_REF]. Furthermore, a method for designing global stabilizing control laws for PWA systems considering the implicit representation, i.e. the synthesis of K 1 and K 2 leading to the satisfaction of Assumption 2, has been recently proposed in [START_REF] Cabral | Stabilization of discrete-time piecewise affine systems in implicit representation[END_REF].

The ETC strategy aims therefore to reduce the number of control updates, with respect to a time-triggered control law (2c), by changing the value of the control signal only when an event occurs. The events correspond to a violation of a condition given in terms of a threshold of a function l t , called the triggering function. The triggering function considered here depends on the current value of the state and on its value at the last event.

We thus modify the control signal generated by (2c) by considering the expression below

u(k) = u(n i ) = K 1 x(n i ) + K 2 φ (z(x(n i ))), ∀k ∈ [n i , n i+1 ), i ∈ N, (6a)
z(x(n i )) = F3 x(n i ) + F4 φ (z(x(n i ))) + f5 (6b)
where the values n i ∈ N, i ∈ N indicate the time instants at which an event is triggered. From (6a), the control signal is kept constant between two successive events, namely in the interval [n i , n i+1 ), with the value of u computed at the trigger instant n i .

Let us define the state degradation

δ (k) = x(k) -x(n i ), ∀k ∈ [n i ,n i+1 ), (7)
which measures the difference between the current state and the state at the last event instant [START_REF] Tabuada | Event-triggered real-time scheduling of stabilizing control tasks[END_REF].

For simplicity of notation, the time dependence is henceforth omitted, that is, x(k) and δ (k) are simply denoted by x and δ , respectively, and x(n i ) = xδ . Moreover, x(k + 1) is denoted by x + . Hence, from (2a), (2b) and ( 6), the closed-loop dynamics under the ETC is described by the following equations:

x + = ( F1 + BK 1 )x + F2 φ (z(x)) + BK 2 φ (z(x -δ )) -BK 1 δ z(x) = F3 x + F4 φ (z(x)) + f5 z(x -δ ) = F3 x + F4 φ (z(x -δ )) + f5 -F3 δ (8) By defining y(x,δ ) = z(x) z(x -δ ) , F 1 = F1 + BK 1 , F 2 = F2 BK 2 , F 12 = BK 1 F 3 = F3 F3 , F 4 = F4 0 n z 0 n z F4 , f 5 = f5 f5 , F δ = 0 n z ,n F3 ,
we can write the closed-loop dynamics considering the event-triggered control policy as

x + = F 1 x + F 2 φ (y(x,δ )) -F 12 δ (9a) y(x,δ ) = F 3 x + F 4 φ (y(x,δ )) + f 5 -F δ δ . (9b)
Note that since F 4 has a block diagonal structure depending on F4 , the well-posedness of the closedloop ETC system (9) is ensured by Assumption 1.

The generation of an event is based on the evaluation of a triggering function l t (x,δ ) at each instant k. The trigger instants are then obtained from the following triggering rule:

n i+1 = min{k > n i such that l t (x(k),δ (k)) > 0}. (10)
We consider that l t : R n × R n → R is a piecewise quadratic (PWQ) function defined as follows:

l t (x,δ ) = x ⊤ Q x x + φ (z(x)) ⊤ Q φ φ (z(x)) + δ ⊤ Q δ δ (11) = x ⊤ Q x x + φ (y(x,δ )) ⊤ [I n z 0] ⊤ Q φ [I n z 0]φ (y(x,δ )) + δ ⊤ Q δ δ
where Q δ ∈ S n + is a symmetric positive-definite matrix and Q x ∈ S n and Q φ ∈ S n z are symmetric matrices such that

x ⊤ Q x x + φ (z(x)) ⊤ Q φ φ (z(x)) ≤ 0, ∀x ∈ R n . ( 12
)
Remark 3. The use of function l t (x,δ ) defined in [START_REF] Ferrari-Trecate | Analysis of discrete-time piecewise affine and hybrid systems[END_REF] leads to a piecewise quadratic weighted relative error threshold trigger criterion. It generalizes the weighted relative error threshold trigger criterion based on a quadratic triggering function [START_REF] Tabuada | Event-triggered real-time scheduling of stabilizing control tasks[END_REF][START_REF] Moreira | Event-triggered state-feedback control for continuous-time plants subject to input saturation[END_REF]. Recall that, when the state is in a given partition set Γ j we have that φ (z(x)) = ∆ j (I -F4 ∆ j ) -1 ( F3 x + f5 ), with the value of ∆ j depending on Γ j . Thus the triggering function [START_REF] Ferrari-Trecate | Analysis of discrete-time piecewise affine and hybrid systems[END_REF] implicitly depends on the set of the partition where the state is at the current time instant k.

We can now state the problem we aim to solve.

Problem 1. Design the triggering function matrices Q x , Q φ and Q δ such that the origin of the closed-loop system (9), under the ETC strategy given by [START_REF] Feng | Stability analysis of piecewise discrete-time linear systems[END_REF], is globallly exponentially stable.

To take effective advantage of the ETC strategy, in addition to the stability guarantees, the computation of Q x , Q φ and Q δ should be carried out aiming to reduce the number of generated events, i.e. the number of control updates with respect to a time-triggered strategy. We thus propose an optimization procedure to compute these matrices. This optimization problem takes into account the stability conditions presented below in its constraints.

Stability analysis under the ETC strategy

In this section, we formulate stability conditions to certify the global exponential stability of the origin of closed-loop piecewise affine systems with the event-triggered strategy described in Section 2.2. For notation simplicity, we may denote y(x,δ ) ∈ R 2n z simply by y ∈ R n y , with n y = 2n z .

Properties of ramp functions

Based on properties of the ramp function, this section states a lemma for the function φ . Such lemma will be instrumental for the analysis of the stability of PWA systems using the implict representation (8) and, by consequence, for devising conditions to solve the event-triggered control design Problem 1.

Since φ is defined elementwise in terms of a ramp function as given in (3), it inherits the following properties from the ramp function, valid for any vector y ∈ R n y [START_REF] Primbs | Kuhn-Tucker-based stability conditions for systems with saturation[END_REF], [START_REF] Groff | Stability analysis of piecewise affine discrete-time systems[END_REF]:

φ (i) (y) ≥ 0, ( 13a
) (φ (i) (y) -y (i) ) ≥ 0, (13b)
φ (i) (y)(φ (i) (y) -y (i) ) = 0. (13c)
∀i = 1, . . . ,n y .

Remark 4. In [START_REF] Groff | Stability analysis of piecewise affine discrete-time systems[END_REF], the relations (13) were stated using φ (-y) instead of (φ (y)y). Both forms are equivalent due to the identity φ (-y) = φ (y)y.

Based on properties given in [START_REF] Rubagotti | A Lyapunov method for stability analysis of piecewise-affine systems over non-invariant domains[END_REF], let us define

s 1 (T, y) := φ ⊤ (y)T (φ (y) -y) (14)
s 2 (M, y) :=   φ (y) φ (y) -y 1   ⊤ M   φ (y) φ (y) -y 1   (15)
and state the following lemma.

Lemma 2. For any matrix T ∈ D n y and any matrix M ∈ P (1+2n y )×(1+2n y ) , the function φ : R n y → R n y , defined elementwise in (3), satisfies the following relations:

s 1 (T, y) = 0, ∀y ∈ R n y , (16a)
s 2 (M, y) ≥ 0, ∀y ∈ R n y . ( 16b
)
Proof. Since the elements of φ are ramp functions we have s 1 (T, y) = ∑ n y i=1 T (i,i) φ (i) (y)(φ (i) (y)y (i) ) which, using (13c), gives (16a). On the other hand, since φ (y) verifies elementwise properties (13a) and (13b), ∀y ∈ R n y , provided that all elements of M are nonnegative, it directly follows that s 2 (M, y) is a nonnegative scalar.

It should be highlighted that relations [START_REF] Heemels | Equivalence of hybrid dynamical models[END_REF] apply only to vector valued functions φ that are elementwise defined as ramp functions. This is a key difference with respect to sector-bounded relations [START_REF] Khalil | Nonlinear Systems[END_REF], which applies to a broad class of functions.

Stability conditions

To evaluate the closed-loop stability of the PWA discrete-time systems under the proposed event-triggered control strategy, we consider the class of continuous piecewise quadratic (PWQ) Lyapunov function candidates V : R n → R ≥0 defined as follows

V (x) = x φ (z(x)) ⊤ P x φ (z(x)) , (17)
with P =

P 1 P 2 P ⊤ 2 P 3 , P 1 ∈ S n , P 2 ∈ R n×n z , P 3 ∈ S n z .
From the implicit representation (9) and a PWQ Lyapunov function candidate given by [START_REF] Groff | Stability analysis of piecewise affine discrete-time systems[END_REF], we formulate now a condition to certify the global exponential stability of the origin of the closed-loop system with the trigger instants defined by [START_REF] Feng | Stability analysis of piecewise discrete-time linear systems[END_REF] with l t (x,δ ) given by [START_REF] Ferrari-Trecate | Analysis of discrete-time piecewise affine and hybrid systems[END_REF].

To evaluate the variation of the Lyapunov function in one step, namely V (x + ) -V (x), we need to evaluate φ (y + (x,δ )). Following (9b), we have y + (x,δ ) = F 3 x + + F 4 φ (y + (x,δ )) + f 5 -F δ δ + , i.e. y + (x,δ ) depends on δ + = δ (k + 1). However, note that no dynamics for δ + can be explicitly obtained since its values depends on the triggering instants, which can not be defined beforehand. In this case, the following lemma, that relates the values of δ and δ + with the values of x and x + , is proposed to cope with terms presenting δ + . For this define

s 3 (S,δ ,x) := δ +⊤ S(δ + -δ + x -x + ). ( 18
)
Lemma 3. Consider δ = δ (k) as defined in [START_REF] Kahlert | The complete canonical piecewise-linear representation. i. the geometry of the domain space[END_REF], and δ + = δ (k + 1), then for any matrix S ∈ R n×n the identity

s 3 (S,δ ,x) = 0 ( 19
)
is satisfied along the trajectories of system (9) under the triggering rule [START_REF] Feng | Stability analysis of piecewise discrete-time linear systems[END_REF].

Proof. Recall from (7) that the state degradation is given by δ (k) = x(k)x(n i ). Considering the trajectories of system (9) under the triggering rule [START_REF] Feng | Stability analysis of piecewise discrete-time linear systems[END_REF], at instant k + 1 we have that either δ + = 0 or (δ +δ + xx + ) = 0 as detailed in the two cases below: a) An event is generated. In this case, it follows that n i+1 = k + 1 and x(n i+1 ) = x(k + 1) = x + . Then,

δ (k + 1) = δ + = x(k + 1) -x(n i+1 ) = 0
and the identity ( 19) is satisfied.

b) No event is generated. In this case, one has that δ (k) = x(k)x(n i ) and δ (k + 1) = x(k + 1)x(n i ). Hence, it follows that

δ (k) -x(k) = x(k) -x(n i ) -x(k) = -x(n i ), δ (k + 1) -x(k + 1) = x(k + 1) -x(n i ) -x(k + 1) = -x(n i ), that is δ (k) -x(k) = δ (k + 1) -x(k + 1)
, thus yielding δ +δ + xx + = 0, which implies that identity ( 19) is also satisfied.

We can now state the following Lyapunov-based Theorem.

Theorem 1. Consider the functions V , l t , s 1 , s 2 , s 3 as defined in (17), ( 11), ( 14), [START_REF] Iervolino | Lyapunov stability for piecewise affine systems via conecopositivity[END_REF], and (18) respectively. If there exist matrices P ∈ S (n+n z ) , Q δ ∈ S n + , Q x ∈ S n and Q φ ∈ S n z , T 1 ∈ D n y , T 2 ∈ D n y , T 3 ∈ D 2n y , M 1 ∈ P (1+2n y )×(1+2n y ) , M 2 ∈ P (1+2n y )×(1+2n y ) , M 3 ∈ P (1+4n y )×(1+4n y ) and S ∈ R n×n and positive scalars η < 1, ε 1 and ε 2 such that the following inequalities are verified along the trajectories of (9), for all x ∈ R n , l t (x,δ ) ≤ 0, for δ = 0 (20a)

V (x) -ε 1 x ⊤ x + s 1 (T 1 , y) -s 2 (M 1 , y) ≥ 0 (20b) -V (x) + ε 2 x ⊤ x + s 1 (T 2 , y) -s 2 (M 2 , y) ≥ 0 (20c) (1 -η)V (x) -V (x + ) + s 1 (T 3 , ỹ) -s 2 (M 3 , ỹ) + s 3 (S,δ ,x) + l t (x,δ ) ≥ 0 (20d)
with ỹ = [y ⊤ y +⊤ ] ⊤ , then the origin of the closed-loop system (9) under the ETC strategy given by (10) is globally exponentially stable.

Proof. From Lemma 2, if (20c) and (20b) are satisfied, it follows that

ε 1 ∥x∥ 2 ≤ V (x) ≤ ε 2 ∥x∥ 2 . ( 21
)
Furthermore, using Lemma 2 and Lemma 3, we have that (20d) implies

V (x + ) -(1 -η)V (x) ≤ l t (x,δ ). ( 22
)
along the trajectories of system [START_REF] Johansson | Computation of piecewise quadratic Lyapunov functions for hybrid systems[END_REF]. The remaining of the proof is carried out considering two cases: k = n i and k ∈ (n i ,n i+1 ).

If k = n i , it means that an event occurs at the time instant k. In this case, it follows that x(n i ) = x(k) and, consequently, δ = 0. Since from (20a) l t (x,δ ) ≤ 0 for δ = 0, it follows from [START_REF] Heemels | Periodic event-triggered control for linear systems[END_REF] that ∆V (x) ≤ -ηV (x) whenever k = n i .

Considering now k ∈ (n i ,n i+1 ), it means that an event does not occur at the time instant k, which implies from (10) that l t (x,δ ) ≤ 0, because otherwise an event would have occurred and the control state would have been updated, leading to the situation analyzed for k = n i . Then, from [START_REF] Heemels | Periodic event-triggered control for linear systems[END_REF], this leads to ∆V (x) ≤ -ηV (x) whenever k ∈ (n i ,n i+1 ).

From both cases, we can conclude that ∆V (x) ≤ -ηV (x), ∀k ∈ N, provided that (20d) is verified. This fact along with [START_REF] Tabuada | Event-triggered real-time scheduling of stabilizing control tasks[END_REF] imply the global exponential stability of the origin

Design of the triggering function

The proposition below shows that the conditions of Theorem 1 can be expressed as a set of LMIs.

Proposition 1. If there exist matrices P =

P 1 P 2 P ⊤ 2 P 3 ∈ S (n+n z ) , T 0 ∈ D n y , T 1 ∈ D n y , T 2 ∈ D n y , T 3 ∈ D n y , T 4 ∈ D n y , M 0 ∈ P 1+2n y , M 1 ∈ P 1+2n y , M 2 ∈ P 1+2n y , M 3 ∈ P 1+4n y , L 0 ∈ R (1+2n+2n y )×n y , L 1 ∈ R (1+2n+2n y )×n y , L 2 ∈ R (1+2n+2n y )×n y , L 3 ∈ R (1+4n+4n y )×2n y , L 4 ∈ R (1+4n+4n y )×n , S ∈ R n×n , Q δ ∈ S n + , Q x ∈ S n and Q φ ∈ S n z , and positive scalars η < 1, ε 1 and ε 2 such that Π 0 + He{Π 2 (T 0 ) + L 0 G 1 } -Θ ⊤ 1 M 0 Θ 1 ≥ 0, (23a)
Π 1 (ε 1 ) + He{Π 2 (T 1 ) + L 1 G 1 } -Θ ⊤ 1 M 1 Θ 1 ≥ 0 (23b) -Π 1 (ε 2 ) + He{Π 2 (T 2 ) + L 2 G 1 } -Θ ⊤ 1 M 2 Θ 1 ≥ 0 (23c) -Π 3 + He{Π 4 + L 3 G 2 + L 4 G 3 + S } -Θ ⊤ 2 M 3 Θ 2 + Q t ≥ 0 (23d) with Π 0 =       -Q x 0 n 0 n,n y 0 n 0 n 0 n,n y 0 n y ,n 0 n y ,n -Qφ   0 2n+n y ,n y +1 0 n y +1,2n+n y 0 n y +1     , Π 2 (T j ) =   0 2n,2(n+n y )+1 0 n y ,2n T j -T j 0 n y ,1 0 n y +1,2(n+n y )+1   j = 0,1,2, Π 1 (ε i ) =       P 1 -ε i I 0 n P2 0 n 0 n 0 n,n y P⊤ 2 0 n y ,n P3   0 2n+n y ,n y +1 0 n y +1,2n+n y 0 n y +1     i = 1,2, P2 = P 2 0 n,n z , P3 = diag(P 3 , 0 n z ), Qφ = diag(Q φ , 0 n z ), G 1 = -F 3 F δ -F 4 I n y -f 5 , Θ 1 =   0 2n y +1,2n   I n y 0 n y ,n y 0 n y ,1 I n y -I n y 0 n y ,1 0 1,n y 0 1,n y 1     , Π 3 =                   -(1 -η)P 1 0 n 0 n 0 n -(1 -η) P2 0 n,n y 0 n P 1 0 n 0 n 0 n,n y P2 0 n 0 n 0 n 0 n 0 n,n y 0 n,n y 0 n 0 n 0 n 0 n 0 n,n y 0 n,n y -(1 -η) P⊤ 2 0 n y ,n 0 n y ,n 0 n y ,n -(1 -η) P3 0 n y 0 n y ,n P⊤ 2 0 n y ,n 0 n y ,n 0 n y P3         0 4n+2n y ,2n y +1 0 2n y +1,4n+2n y 0 2n y +1           , Π 4 =     0 4n,4(n+n y )+1 0 2n y ,4n T 3 0 n y -T 3 0 n y 0 n y ,1 0 n y T 4 0 n y -T 4 0 n y ,1 0 2n y +1,4(n+n y )+1     , G 2 = -F 3 0 n y ,n F δ 0 n y ,n -F 4 0 n y I n y 0 n y -f 5 0 n y ,n -F 3 0 n y ,n F δ 0 n y -F 4 0 n y I n y -f 5 , G 3 = -F 1 I n F 12 0 n -F 2 0 n,n y 0 n,n y 0 n,n y 0 n,1 , S =   0 3n,4(n+n y )+1 S -S -S S 0 4n y +1 0 4n y +1,4(n+n y )+1   , Θ 2 =       0 4n y +1,4n      
I n y 0 n y 0 n y 0 n y 0 n y ,1 0 n y I n y 0 n y 0 n y 0 n y ,1 I n y 0 n y -I n y 0 n y 0 n y ,1 0 n y I n y 0 n y -I n y 0 n y ,1 0 1,n y 0 1,n y 0 1,n y 0 1,n y 1

            , Q t = diag(Q x , 0 n , Q δ , 0 n , diag(Q φ ,0 n z ), 0 3n y +1 ),
then the origin of the closed-loop system (9) under the ETC strategy given by (10) is globally exponentially stable.

Proof. Define the vectors

ξ 1 = x ⊤ δ ⊤ φ (y) ⊤ y ⊤ 1 ⊤ and ξ 2 = x x +⊤ δ ⊤ δ +⊤ φ (y) ⊤ φ (y + ) ⊤ y ⊤ y +⊤ 1 ⊤ .
If (23a) holds, it follows that

ξ ⊤ 1 Π 0 + He{Π 2 (T 0 ) + L 0 G 1 } -Θ ⊤ 1 M 0 Θ 1 ξ 1 ≥ 0.
From the algebraic equation (9b) relating y and x, it follows that G 1 ξ 1 = 0. From Lemma 2 note that ξ ⊤ 1 Π 2 (T 0 )ξ 1 = s 1 (T 0 ,y) = 0. Since all entries of M 0 are non-negative, also from Lemma 2 we have that ξ

⊤ 1 Θ ⊤ 1 M 0 Θ 1 ξ 1 = s 2 (M 0 ,y) ≥ 0. Hence, since ξ ⊤ 1 Π 0 ξ 1 = -x ⊤ Q x x -φ (y) ⊤ Qφ φ (y) = -x ⊤ Q x x - φ (z(x)) ⊤ Q φ φ (z(x)
) we conclude that condition (20a) from Theorem 1 is verified with l t (x, δ ) defined in [START_REF] Ferrari-Trecate | Analysis of discrete-time piecewise affine and hybrid systems[END_REF].

Following the same reasoning with (23b) and (23c), as

ξ ⊤ 1 Π 2 (T 1 )ξ 1 = s 1 (T 1 ,y) = 0, ξ ⊤ 1 Θ ⊤ 1 M 1 Θ 1 ξ 1 = s 2 (M 1 ,y) ≥ 0, ξ ⊤ 1 Π 2 (T 2 )ξ 1 = s 1 (T 2 ,y) = 0, ξ ⊤ 1 Θ ⊤ 1 M 2 Θ 1 ξ 1 = s 2 (M 1 ,y) ≥ 0 and since ξ ⊤ 1 Π 1 (ε i )ξ 1 = V (x) - ε i x ⊤ x, i = 1,2,
we conclude that conditions (20b) and (20c) from Theorem 1 are verified provided that these two LMIs hold.

If (23d) holds, it follows that

ξ ⊤ 2 (-Π 3 + He{Π 4 + L 3 G 2 + L 4 G 3 + S } -Θ ⊤ 2 M 3 Θ 2 + Q t )ξ 2 ≥ 0.
From the definition of G 2 and G 3 , we also have that G 2 ξ 2 = 0 and G 3 ξ 2 = 0 on the trajectories of system [START_REF] Johansson | Computation of piecewise quadratic Lyapunov functions for hybrid systems[END_REF]. Again from Lemma 2, note that ξ ⊤ 2 Π 4 ξ 2 = s 1 (T 3 ,y) + s 1 (T 4 ,y + ) = 0 and since all entries of M 3 are non-negative, it follows that ξ

⊤ 2 Θ ⊤ 2 M 3 Θ 2 ξ 2 = s 2 (M 3 , ỹ) ≥ 0. Moreover, from Lemma 3, ξ ⊤ 2 S ξ 2 = s 3 (S,δ ,x) = 0 along the trajectories of system (9). Furthermore, note that ξ ⊤ 2 Q t ξ 2 = l t (x,δ ). Hence, as ξ ⊤ 2 Π 3 ξ 2 = V (x + ) -(1 -η)V (x)
, we can conclude that the condition (20d) from Theorem 1 is verified on the trajectories of the system (9), which concludes the proof.

Remark 5. If f5 ⪯ 0, the function V (x) has a quadratic upper bound given by V (x) ≤ ε 2 ∥x∥ 2 , where [START_REF] Groff | Stability analysis of piecewise affine discrete-time systems[END_REF]). In this case, LMI (23c) can be dropped from Proposition 1. Remark 6. Note that if Assumption 2 is not verified the conditions in Theorem 1 and Proposition 1 will not be feasible. Indeed, at the instants in which an event is generated, we have δ = 0. Then, at these instants, it follows that (9) becomes (2). Thus condition (20d) implies that ∆V < 0 when x + is given by (2), which is not possible if Assumption 2 does not hold.

ε 2 = (∥P 1 ∥ + 2σ ∥P 2 ∥ + σ 2 ∥P 3 ∥) with σ = max ∆∈D nz {0,1} ∆(I -F4 ∆) -1 F3 (see details in
Thanks to the proposed formulation, the triggering function matrices Q δ , Q x and Q φ can be considered as design parameters, since they appear affinely in the LMIs (23a) and (23d).

We propose below a convex optimization problem to compute the parameters of the triggering function l t aiming to reduce the trigger activity following an approach similar to the one used in [START_REF] Moreira | Event-triggered state-feedback control for continuous-time plants subject to input saturation[END_REF]. With this aim, let us define an auxiliary quadratic triggering function

l q (x,δ ) = δ ⊤ Q δ δ +x ⊤ Q σ x with Q δ > 0, Q σ < 0, which is used in the following proposition. Proposition 2. If there exist matrices Q x ∈ S n , Q φ ∈ S n z , Q σ ∈ S n -, T a ∈ D n y , M a ∈ P 1+2n y and L a ∈ R (1+2n+2n y )×n y such that Π 5 + He{Π 6 + L a G 1 } -Θ ⊤ 1 M a Θ 1 ≥ 0, (24)
with

Π 5 =       Q σ -Q x 0 n 0 n,n y 0 n,n y 0 n,1 0 n 0 n 0 n,n y 0 n,n y 0 n,1 0 n y ,n
0 n y ,n -Qφ 0 n y ,n y 0 n y ,1 0 n y ,n 0 n y ,n 0 n y 0 n y 0 n y ,1

0 1,n 0 1,n 0 1,n y 0 1,n y 0 1       , Π 6 =   0 2n,2(n+n y )+1 0 n y ,2n T a -T a 0 n y ,1 0 n y +1,2(n+n y )+1   , Qφ = diag(Q φ , 0 n z ). Then {(x,δ ) ∈ R 2n | l t (x,δ ) ≤ 0} ⊇ {(x,δ ) ∈ R 2n | l q (x,δ ) ≤ 0}.
Proof. Similarly to (23a), the satisfaction of [START_REF] Eqtami | Event-triggered control for discrete-time systems[END_REF] implies that ∀x, δ ,

x ⊤ Q x x + φ (z(x)) ⊤ Q φ φ (z(x)) ≤ x ⊤ Q σ x. (25)
Thus it follows that, ∀x, δ ,

l t (x,δ ) = x ⊤ Q x x + φ ⊤ Q φ φ + δ ⊤ Q δ δ ≤ x ⊤ Q σ x + δ ⊤ Q δ δ = l q (x,δ
). In conclusion, if l q (x,δ ) ≤ 0 then l t (x,δ ) ≤ 0 and the set inclusion of the claim holds.

Note that matrices Q x and Q φ are symmetric, but no assumptions on their sign definiteness are made. Thus, provided (25) holds, Q x and Q φ can be sign-indefinite.

The above lemma implies that if a pair (x,δ ) generates an event with l t it also generates an event using the quadratic triggering function l q . We can then conclude that the number of events generated with l t is not larger than the number of events generated by a quadratic triggering function.

To obtain a triggering function that reduces the number of events we aim at enlarging the set {(x,δ ) ∈ R 2n | l t (x,δ ) ≤ 0}, that is, the set of points (x,δ ) ∈ R 2n for which an event does not occur. Hence, from Proposition 2, this can be indirectly carried out by enlarging the set {(x,δ ) ∈ R 2n | l q (x,δ ) ≤ 0}. Recalling that Q δ > 0 and Q σ < 0, the following optimization problem is therefore proposed:

minimize trace(Q δ -Q σ )
subject to [START_REF] Borgers | Periodic event-triggered control of nonlinear systems using overapproximation techniques[END_REF], [START_REF] Eqtami | Event-triggered control for discrete-time systems[END_REF] (26)

Numerical Examples

Example I: Consider the piecewise affine system (2), defined by matrices

F1 = 0.5 0.85 -1 0.5 , F2 = 0.75 0.75 0 0 , B = I 2 F3 = -1 -1 1 -1 , F4 = 0 -1/3 -1 0 , f5 = 0 0 , K 1 = 0 α 0 0 , K 2 = α α 0 0 ,
with α being a scalar. For α = -0.1, the solution to [START_REF] Wu | Event-triggered control for discrete-time linear systems subject to bounded disturbance[END_REF], gives the following parameters for the triggering function ( 11) To assess the efficiency of the event-triggered strategy in reducing the control updates we carried out simulations for k ∈ [0,50] of 100 initial conditions evenly distributed in a unitary circle around the origin. The average number of events over the simulation interval was n avg = 27.83. Note that with a time-trigger policy we would have 51 control updates. The ETC strategy leads therefore to a reduction of 45.5% in the number of control updates. Simulation results for x 0 = [-0.9989 0.0476], resulting in 26 events is depicted in Figure 1. Considering the set of event instants given by N = {n 0 ,n 1 ,n 2 , . . .}, the bottom plots shows the indicator function I(k,N), i.e the value 1 denotes that an event has been generated at the instant k.

Q x = -2.
We recall that the triggering function l t (x,δ ) defined in ( 11) is piecewise quadratic due the presence of the term φ (z(x)) ⊤ Q φ φ (z(x)). In fact, this term allows to adapt the triggering criterion according to the dynamics in each region of the partition. This can be seen as a relevant contribution of the proposed method. To show this, let us consider now a classical quadratic triggering function by setting Q φ = 0, which corresponds to consider the same triggering criterion in each one of the regions of the partition. In this case, the following parameters were obtained when solving (26)1 :

Q x = Q σ =
-0.4268 -0.2126 -0.2126 -0.1063 , Q δ = 1.0534 0.0030 0.0030 1.0141 .

We then carried out simulations for 100 initial conditions evenly distributed in a unitary circle around the origin. All initial conditions led to 51 events in this case, meaning that an event happened at every single time instant and therefore the ETC strategy did not reduce the number of the control updates. This example illustrates that the term φ (y) ⊤ Q φ φ (y), introducing the piecewise quadratic terms in the triggering function, efficiently helps to reduce the number events. In the literature, the results in [START_REF] Ma | Event-triggered feedback control for discrete-time piecewise-affine systems[END_REF] for ETC of PWA systems use an explicit representation, a quadratic Lyapunov function and a relative error triggering function that depends only on the control signal. However, considering the conditions given in [START_REF] Ma | Event-triggered feedback control for discrete-time piecewise-affine systems[END_REF], no triggering function leading to stability was obtained for the same system, which reinforces that the proposed conditions are less conservative.

Example II: Consider the following discrete-time linear system

x + = A p x + B p u, We consider that the control input u is generated by an explicit MPC law computed as in [START_REF] Bemporad | The explicit linear quadratic regulator for constrained systems[END_REF], leading to an explicit PWA representation of the closed-loop system (see Appendix A for the description of the control law). From this explicit representation reported in that paper, we built the following compact implicit representation of the closed-loop system (2) with

F1 = A p , F2 = 0 2,4 , B = B p , F3 =     K2 -K1 K1 -K2 -K1 K1     , F4 =     0 0 0 0 1 0 0 0 -1 1 0 0 1 -1 1 0     , f5 =     -0.6423 -0.6423 -2 -2     , K 1 = K1 , K 2 = 1 -1 1 -1 ,
with K1 = -5.9220 -6.8883 and K2 = -6.4159 -4.6953 . Solving [START_REF] Wu | Event-triggered control for discrete-time linear systems subject to bounded disturbance[END_REF], we obtain the following parameters for the triggering function ( 11) .

Q x = -1.
The efficiency of the event-triggered strategy was assessed by simulating 1000 initial conditions generated with uniformly distributed random initial conditions for x 1 and x 2 in the interval [-1.5 1.5], for k ∈ [0 25]. The average number of events was n avg = 13.50 thus reducing the number of control updates to almost a half when compared to the number of updates of a timetriggered policy. Figure 4 presents the trajectories for the initial conditions x 0 = [-1.1804 0.4036] and x 0 = [0.7791 -0.7600]. The simulation results of the of the states and the trigger instants are shown in Figures 2 and3 where the bottom plot shows the indicator function of the triggering instants. A substantial reduction in the number of control updates can be observed, showing the effectiveness of the proposed ETC strategy. Figure 4 shows the trajectories for both initial conditions along with the state space partition corresponding to the piecewise affine control law.

Conclusions

In this paper an emulation-based design of an ETC strategy for PWA systems was proposed. The adopted approach relies on an implicit representation of the PWA system, which is based on vector valued ramp functions. We proposed the use of a piecewise quadratic triggering function that takes into account the partition information through terms depending also on vector valued ramp functions. In this context, considering a piecewise quadratic Lyapunov candidate functions and properties of the ramp function, we derived conditions to ensure the global exponential stability of the origin under the ETC strategy. These conditions are cast as LMIs and an optimization problem was formulated to compute the triggering function parameters aiming at stability and reduction of control updates. Since the transitions are implicitly defined and do not have to be enumerated, the implicit representation makes possible the stability assessment without a preliminary reachability analysis to define the possible transitions between sets in the partition. Moreover, the numerical examples show that it is possible to effectively reduce the number of events using the proposed strategy. The numerical results also illustrate that the proposed PWQ triggering function yields better results than a standard quadratic triggering function.

Figure 1 :

 1 Figure 1: Simulation with x 0 = [-0.9989 0.0476]: 26 events occurred.

Figure 2 :

 2 Figure 2: Simulation with x 0 = [-1.1804 0.4036] : total of 14 events.

Figure 3 : 2 Figure 4 :

 324 Figure 3: Simulation with x 0 = [0.7791 -0.7600]: total of 14 events.

Table A .

 A 1: Explicit MPC law: regions of the partition and associated piecewise linear control laws

	Region Description					u(k)
		 -5.9220 -6.8883 	 2 
	1.	   -1.5379 5.9229	6.8883 6.8296	   x ≤	   2 2   	-5.9220 -6.8883 x
			1.5379	-6.8296		2
	2.	  -6.4159 -4.6953 -0.0275 0.1220 6.4159 4.6953   x ≤	  -0.0357  1.3577 2.6423 	-6.4159 -4.6953 x +0.6423
	3.	  -6.4159 -4.6953 6.4159 4.6953 0.0275 -0.1220   x ≤	  -0.0357  1.3577 2.6423 	-6.4159 -4.6953 x -0.6423
		 -3.4155 4.6452					2.6341	
	4.		0.1044	0.1215  x ≤	 -0.0353 	2
			0.1259	0.0922			-0.0267
	5.	0.0679 -0.0924 0.1259 0.0922	x ≤	-0.0524 -0.0519	2
	6.	-0.0679 -0.1259 -0.0922 0.0924		x ≤	-0.0524 -0.0519	-2
			3.4155	-4.6452			2.6341	
	7.	 -0.1044 -0.1215	 x ≤	 -0.0353 	-2
		-0.1259 -0.0922		-0.0267

In this case we can set Q x = Q σ < 0 and drop constraints (23a) and[START_REF] Eqtami | Event-triggered control for discrete-time systems[END_REF]

⋆ J.M. Gomes da Silva Jr. is also supported by the Brazilian National Council for Research (CNPq) (Grant 307449/2019 -0). This work is also partly supported by ANR (France) via grant HANDY, No ANR-18-CE40-0010.

Appendix A. Control law of Example 2

The explicit MPC law computed in [START_REF] Bemporad | The explicit linear quadratic regulator for constrained systems[END_REF] leads to a piecwise affine state feedback, corresponding to seven partitions of the state space, as described in Table A.1.


Snehashis Majhi

Rui Dai

Quan Kong

Lorenzo Garattoni

Gianpiero Francesca

Franc ¸ois Brémond

Human-Scene Network: A Novel Baseline with Self-rectifying Loss for Weakly supervised Video Anomaly Detection

Keywords:

Video anomaly detection in surveillance systems with only video-level labels (i.e. weakly-supervised) is challenging. This is due to, (i) complex integration of human and scene based anomalies comprising of subtle and sharp spatio-temporal cues in real-world scenarios, (ii) non-optimal optimization between normal and anomaly instances under weak-supervision. In this paper, we propose a Human-Scene Network to learn discriminative representations by capturing both subtle and strong cues in a dissociative manner. In addition, a self-rectifying loss is also proposed that dynamically computes the pseudo temporal-annotations from video-level labels for optimizing the Human-Scene Network effectively. The proposed Human-Scene Network optimized with self-rectifying loss is validated on three publicly available datasets i.e. UCF-Crime, ShanghaiTech and IITB-Corridor, outperforming recently reported state-of-the-art approaches on five out of the six scenarios considered.

Explosion

Road Accident Fire Abuse Shoplift

Introduction

Anomaly detection in real-world videos is a crucial computer vision task thanks to its potential applications in smart cities empowering timely anomaly prevention and investigation. This problem remain unsolved due to the scarcity of spatio-temporally annotated data and the sparsity in occurrence of anomaly events. In consequence, earlier popular methods [START_REF] Adam | Robust real-time unusual event detection using multiple fixed-location monitors[END_REF]3,[START_REF] Hasan | Learning temporal regularity in video sequences[END_REF]8,8,[START_REF] Liu | Future frame prediction for anomaly detection-a new baseline[END_REF][START_REF] Lu | Abnormal event detection at 150 fps in matlab[END_REF]17,[START_REF] Sun | Scene-aware context reasoning for unsupervised abnormal event detection in videos[END_REF]26,[START_REF] Yu | Abnormal event detection and localization via adversarial event prediction[END_REF][START_REF] Zaigham Zaheer | Generative cooperative learning for unsupervised video anomaly detection[END_REF][START_REF] Zhao | Online detection of unusual events in videos via dynamic sparse coding[END_REF] learn a uni-class (i.e. only normal class that is easy to acquire) encoder-decoder network for learning the global temporal regularity and treat abnormality as an out-of-distribution detection (OOD) w.r.t the learned normal distribution. As a matter of fact, these methods fail at learning generalized representations for all possible normal scenarios and hence cause false alarm for unseen normal ones. In light of superior generalization capabilities and detection performance, weakly-supervised video anomaly detection (WS-VAD) methods [START_REF] Sultani | Real-world anomaly detection in surveillance videos[END_REF]27,[START_REF] Zhong | Graph convolutional label noise cleaner: Train a plug-and-play action classifier for anomaly detection[END_REF] have recently gained popularity. These methods learn from both normal and anomaly distributions to optimize the separability among the classes with only video-level labels.

Despite the prosperity in mainstream WSVAD ap- proaches [START_REF] Dubey | 3d resnet with ranking loss function for abnormal activity detection in videos[END_REF][START_REF] Lin | Social mil: Interaction-aware for crowd anomaly detection[END_REF][START_REF] Sultani | Real-world anomaly detection in surveillance videos[END_REF]27,31,[START_REF] Zhang | Temporal convolutional network with complementary inner bag loss for weakly supervised anomaly detection[END_REF][START_REF] Zhong | Graph convolutional label noise cleaner: Train a plug-and-play action classifier for anomaly detection[END_REF][START_REF] Zhu | Motion-aware feature for improved video anomaly detection[END_REF], their performance is still limited due two major challenges: (a) complex realworld abnormalities: difficulties in obtaining discriminative spatio-temporal representations with only video-level labels, when there exists an integration of local human-centric anomalies (Abuse, Shoplifting, Stealing, Robbery, Vandalism) with the global scene-centric anomalies (Explosion, Road Accidents, Fire, Burglary), as illustrated in Figure 1;

(b) non-optimal separation between normal and anomaly classes: obscure consideration of normal and anomaly instances (or temporal segments) in a long untrimmed video labeled as "anomaly" for optimizing the separation among the classes leads to non-optimality.

To address above challenges, attempts have been made in earlier works [START_REF] Sultani | Real-world anomaly detection in surveillance videos[END_REF]27] which first, extract features using a 3D ConvNet and then learn a ranking model by multiple instance learning (MIL) based optimization. Since many previous methods consider only global feature representation (i.e. features from whole frame) for optimizing the ranking model, they still lag in detecting human-centric anomalies. This is majorly due to the different features characterizing the anomalies. Scene-centric anomalies are characterized by strong appearance and global motion cues, where as human-centric anomalies have rather subtle and local motion patterns. As a result, global features fail to capture the human-centric subtle cues although they succeed in characterizing scene-centric cues. Furthermore, for optimizing the ranking model, earlier WSVAD approaches adapt a classical MIL loss function proposed in [START_REF] Sultani | Real-world anomaly detection in surveillance videos[END_REF] which selects two instances based on the presence of abnormality (i.e. one each from normal and anomaly videos) to take part in the optimization process. We believe such an optimization can perform well when anomalies are short in duration like explosion and road accidents, but it may fail drastically when anomalies last longer like shoplifting.

In contrast, we propose a novel Human-Scene Network (HSN) comprising two decoupled sub-networks (subNet) i.e scene and human subNets, which are optimized independently with a soft-selection module as the key component for addressing the stringent requirement of WSVAD. The decoupled design of the network helps in learning discriminative representations for scene and human-centric anomalies in a mutually exclusive manner, thus enabling each subNet to detect either coarse scene-centric or fine-grained human-centric anomalies effectively. Now, instead of treating both subNets as independent decision modules to detect anomalies, we propose a class-agnostic soft-selection coupler to choose between the scene and human-centric sub-Nets for a given video. The key difference between the previous WSVAD methods and our approach is outlined in Figure 2. Since the overall performance of the proposed network can be affected due to the limitations of classical MIL loss, we propose a self-rectifying loss function for enhanced optimization with video-level labels. Unlike the earlier loss, the proposed loss not only ensures video-level context maximization between normal and anomaly classes, but also performs an instance-level maximization by dynamically choosing the optimal number of instances empowered by a self error-minimization procedure. The main contributions of this work are as follows:

• A novel Human-Scene Network (HSN) is proposed as a baseline framework for effectively detecting scene and human centric anomalies under weak-supervision.

• A new self-rectifying loss function is proposed for ensuring superior separation between normal and anomaly instances by overcoming the drawbacks of the previous MIL loss.

• An exhaustive experimental analysis is performed to corroborate the robustness of HSN along with the self-rectifying loss on three competitive datasets UCF-Crime [START_REF] Sultani | Real-world anomaly detection in surveillance videos[END_REF], ShanghaiTech [START_REF] Lu | Abnormal event detection at 150 fps in matlab[END_REF] and IITB-Corridor [START_REF] Rodrigues | Multi-timescale trajectory prediction for abnormal human activity detection[END_REF] datasets, outperforming previous approaches on five out of the six scenarios considered.

Related Work

Weakly-supervised anomaly detection has been studied extensively in the past few years [START_REF] Dubey | 3d resnet with ranking loss function for abnormal activity detection in videos[END_REF][START_REF] Lin | Social mil: Interaction-aware for crowd anomaly detection[END_REF][START_REF] Sultani | Real-world anomaly detection in surveillance videos[END_REF][START_REF] Wan | Weakly supervised video anomaly detection via centerguided discriminative learning[END_REF]27,31,[START_REF] Zhang | Temporal convolutional network with complementary inner bag loss for weakly supervised anomaly detection[END_REF][START_REF] Zhong | Graph convolutional label noise cleaner: Train a plug-and-play action classifier for anomaly detection[END_REF][START_REF] Zhu | Motion-aware feature for improved video anomaly detection[END_REF]. Majority of previous works follows multiple instance learning (MIL) [START_REF] Maron | A framework for multiple-instance learning[END_REF] approach introduced by Sultani Previous methods considers only scene-centric features (i.e. from whole frame) and it fails to detect complex human-centric anomalies. In contrast, our HSN can learn from both cases and obtain better performance.

et al. [START_REF] Sultani | Real-world anomaly detection in surveillance videos[END_REF] to overcome the drawbacks of traditional unsupervised one-class learning based anomaly detection methods [START_REF] Adam | Robust real-time unusual event detection using multiple fixed-location monitors[END_REF]3,8,8,[START_REF] Liu | Future frame prediction for anomaly detection-a new baseline[END_REF][START_REF] Lu | Abnormal event detection at 150 fps in matlab[END_REF]17,[START_REF] Sun | Scene-aware context reasoning for unsupervised abnormal event detection in videos[END_REF][START_REF] Zhao | Online detection of unusual events in videos via dynamic sparse coding[END_REF]. In weakly-supervised anomaly detection task only video-level labels are provided for learning, authors in [START_REF] Sultani | Real-world anomaly detection in surveillance videos[END_REF] only extract off-the-shelf global scene features from a pre-trained 3D ConvNet backbone [START_REF] Carreira | Quo vadis, action recognition? a new model and the kinetics dataset[END_REF]23,28] and aim at training a classification network through a classical ranking loss function. Although superior separation between normal and anomaly instances is ensured by the ranking loss than that of unsupervised anomaly detection methods by choosing only the maximum scoring segment of both normal and anomaly videos for optimization but Sultani et al. [START_REF] Sultani | Real-world anomaly detection in surveillance videos[END_REF] were able to produce limited detection performance. This is due to, they only focus on global feature representation ignoring the local features and temporal context modeling of videos in order to discriminate anomaly segments at the feature level.

To address temporal context modeling, authors in [START_REF] Zhang | Temporal convolutional network with complementary inner bag loss for weakly supervised anomaly detection[END_REF] utilize TCN [START_REF] Lea | Temporal convolutional networks: A unified approach to action segmentation[END_REF] in MIL based approach to learn temporal dependency encoding for anomaly instances at the feature level. In addition, they also adopt an inner-bag ranking loss function for improved optimization. Another approach [START_REF] Zhu | Motion-aware feature for improved video anomaly detection[END_REF] combines global optical flow features obtained from PWCNet [START_REF] Sun | Pwc-net: Cnns for optical flow using pyramid, warping, and cost volume[END_REF] with the RGB feature map for discriminating the anomaly instances that exhibit strong motion. Similarly, authors in [27] claim that combining audio features obtained from VGGish [7] with global RGB map can discriminate the anomaly instances effectively at the feature level. In addition, Wu et al.

[27] also utilize Graph Convolution Network (GCN) for temporal context learning in videos leading to improve anomaly detection performance. Recently, Tian et al. [22] propose a global temporal feature magnitude based learning paradigm for better separability between maximum and minimum magnitude temporal segments. However, the feature magnitudes are influenced by only strong spatio-temporal variation across temporal segments leading ineffective separability for subtle and local anomalies. Two key drawbacks observed in the above approaches are: (i) consideration of less separable global features to capture real-world anomalies, (ii) optimization with classical ranking loss which only consider selected instances for optimization do not ensure optimal separability. To combat the limitation of classical ranking loss in obtaining discriminative features, Zhong et al. [START_REF] Zhong | Graph convolutional label noise cleaner: Train a plug-and-play action classifier for anomaly detection[END_REF] and Feng et al. [START_REF] Feng | Mist: Multiple instance self-training framework for video anomaly detection[END_REF] aim at training the 3D ConvNet backbone by generating pseudo temporal annotations through a cleaning noisy labels approach. In this Zhong et al. captures the the temporal consistency in a GCN and Feng et al. uses a deep MIL ranker module to generate pseudo temporal annotations. Although they obtain higher performance than MIL approaches but still limited by learning the global features in 3D ConvNet and in the pseudo annotation generator. A drawbak lies in these approach is, they operate in two-step manner, where first step is to generate pseudo labels followed by 3D ConvNet optimization. Again as noisy pseudo labels can be result of non-discriminative global features, it can mislead the optimization of 3D ConvNet backbone. Thus, we propose a novel method: Human Scene Network (HSN), which considers both local and global spatiotemporal cues for obtaining discriminative representation in real-world scenarios. In addition we also propose a selfrectifying loss to optimize the HSN which generates pseudo labels to select optimal number of instances in MIL optimization paradigm for maximum separability.

Untrimmed Video Sequences

Self-rectifying Loss

T ⨉ 1 T ⨉ 1 T ⨉ 1 T ⨉ H ⨉ W T ⨉ k ⨉ t ⨉ h ⨉ w T ⨉ k ⨉ n T ⨉ k s ⨉ n h G = 1 G = 2 G = 3 GT ⨉ H ⨉ W G = 1 G = 2 G = 3 GT ⨉ n T ⨉

Human-Scene Network (HSN)

The overview of the proposed HSN is delineated in Figure 3. Its three key components, human subNet , scene subNet and soft-selection coupler are designed to precisely detect real-world anomalies when an untrimmed video is given as input. A detailed description of each component in HSN along with the optimization strategy is given in the following subsections.

Scene-subNet

The objective of the Scene-subNet (SsN) is to learn discriminative global representations characterizing scenecentric anomalies. The SsN ensures to capture strong appearance and global motion cues with its four salient building blocks as elaborated below.

Multi-Granularity Temporal Segment Generation Primarily, this section considers a new temporal segment generation strategy ideal for WSVAD. A key drawback in earlier works [START_REF] Sultani | Real-world anomaly detection in surveillance videos[END_REF]22] is, they generate fixed scale (namely granular) temporal segments (say T ) for each video V . By dividing V of length T l into T , where T ≪ T l , it loses out the fine temporal cues. For this, the anomalies those are short in duration, get suppressed by the neighbouring normal ones and hence lags in detection performance. To preserve fine temporal cues, our strategy divides each V at multiple granularities G = 1, 2, 3 for generating temporal segments of size T , 2T and 3T respectively. This temporal segment generation is performed by varying the sampling rate of V .

Global Feature Description For global feature description, off-the-shelf spatio-temporal features are extracted from a pre-trained 3D ConvNet for each temporal segment (GT i ) generated from V . A GT i is a set of consecutive frames that has both background and foreground scene. For a given GT i the 3D ConvNet extracts a feature map of dimension c × n, where c is the number of 64-frames clips inside GT i and n is the channel size. Since multiple 64-frame clips can be present inside a GT i , a max-pooling is done over c to get a uni feature map per GT i . So for a given V containing GT segments, a feature map F GT Sc of dimension GT × n is obtained from this block, where G = 1, 2, 3.

Multi-Granularity Temporal Modeling

To obtain discriminative video representation for long and short anomalies, it is crucial to encode the contextual and fine-grained temporal dependencies respectively. This is due to short and long anomalies are characterized by sharp and progressive change in spatio-temporal features respectively. Hence, high-granular feature map F 3T Sc ∈ R 3T ×n is desirable for short anomalies as it can preserve fine temporal details to capture sharp changes. Similarly, lower-granular feature map F T ∈ R T ×n can succeed in providing the context for long anomalies. So to effectively learn the representations for both long and short anomalies from the pre-computed feature maps F T Sc , F 2T Sc , F 3T Sc , a multi-granularity temporal modeling (MGTM) block is proposed in SsN as shown in Figure 4.

MGTM aims at building a temporal feature pyramid followed by dependency modeling by its three modules: (i) temporal downscaler (ii) bottleneck layer and (iii) LSTM cell to encode the contextual and fine-grained temporal dependencies. MGTM obtains the temporal feature pyramid by aggregating the feature maps from multiple temporal granularities i.e. G = 1, 2, 3. The aggregation is done by first reducing the temporal dimension of higher granular feature map (say F 3T Sc ) and then combining with the successive lower granular feature map (say F 2T Sc ). The temporal downscaler block ensures to reduce the temporal dimension by a factor of T with its two sequential 1D convolution layers with kernel size k ∈ {5, 3} and dilation rate d ∈ {4, 8} respectively. The temporal downscaling is performed by encapsulating the features from neighboring temporal segments with the increased receptive field of 1D dilated convolution layers. The MGTM has two-levels of temporal downscaler i.e. level-1 between G = 3 and 2, level-2 between G = 2 and 1. Further, to combine the temporally down scaled feature with lower granular features F GT Sc (where G = 1, 2), first F GT Sc is applied to a bottleneck module having one layer of 1D convolution with with kernel size k = 1 and then a concatenate operation is performed between the feature maps. At the end of final concatenate operation that combines the features from G = 2 and 1, it results in a feature map of dimension T × 2n c (where T = temporal dimension similar to G = 1, n c = number of convolution filters in final bottleneck and temporal downscaler module). The resultant feature map is subsequently input to a many-to-many LSTM cell with n h hidden neurons for global temporal dependency encoding (F * Sc ). Since the obtained temporal encodings are enriched by fine-grained and contextual temporal dependency modeling at multiple granularities, it ensures a better discriminative representation among the temporal segments T i .

Scene Ranker The scene ranker is a multi-layer perceptron (MLP) with three fully-connected (FC) layers which inputs the F * Sc ∈ R T ×n h to assign anomaly ranks (or scores) to each temporal segment. For this, final layer of MLP has a single neuron with sigmoid activation to rank each temporal segment independently. Finally the scene ranker outputs a detection score map D Sc of dimension T × 1 to be used in anomaly detection.

Human-subNet

The objective of the Human-subNet (HsN) is to learn discriminative local representation characterising human-centric anomalies. In real-world situations human-centric anomalies can either contain subtle or sharp appearance and motion cues. The HsN ensures to learn a local discriminative representation in all possible scenarios with its four major building blocks as described below.

Fixed Temporal Segment Generation Unlike SsN, here the video V is divided into a fixed number of temporal segments, (say T ). This is because in the following blocks of HsN, humans are detected and tracked in each temporal segment. So, humans are tracked as long as possible making the multi-temporal granularities non-suitable. For instance, with a high granularity value (such as G = 3), the length of a segment T i is reduced by a multiplication factor of G, hence the tracking may be lost in such reduced temporal duration. Thus, for a given V , HsN outputs T temporal segments of spatial resolution H × W which are provided to the subsequent block.

Human Detection and Tracking In order to learn a local representation in HsN a pre-requisite is to obtain human bounding boxes (BBox) and their corresponding trajectories (namely tracks) with a sufficient quality. For this, a pre-trained human detector and tracker network (Byte-Track [START_REF] Zhang | Bytetrack: Multi-object tracking by associating every detection box[END_REF]) is used to extract humans BBox and the tracks in each segment T i . So, for T segments generated from video V with k humans present in the scene, this block outputs a tracklet map of dimension T × k × t × h × w, where t is the maximum track duration of each tracklet and h × w is the BBox dimension.

Local Feature Description A pre-trained 3D ConvNet is used to sequentially extract spatio-temporal features for each tracklet k j present in each temporal segment T i . Since the 3DConvNet used in HsN is bounded by the input size of 64 frames, each with resolution 224 × 224 , the tracklet map is resized and padded to meet the input requirements. For a given tracklet k j present in T i , the track duration t can be larger than 64-frame sequences. So, a max-pooling operation is performed to obtain a n-dimensional unitary feature vector per tracklet k j in each T i . The obtained local feature map F T r ∈ R T ×k×n is fed to the subsequent block to encode the dependency among tracklets.

Tracklet Selection and Relation Modeling A key intricacy of encoding the individual tracklets behaviour and relation among them lies in number of people present in the video. With a large number of people, the relation modeling seems difficult and increases the model complexity as well. For this, a tracklet selection (TS) strategy targeted only for anomaly detection task is proposed here to filter out the salient tracklets, followed by a relation modeling method to obtain local discriminative representation in an effective and efficient manner.

The TS filters out k s salient people out of k in F T r , where k s people has significantly distinctive behaviour (assuming sharp change in the spatio-temporal feature space as distinctive) than that of remaining (i.e. k -k s ). For a given spatio-temporal feature vector X corresponding to tracklet k j , the distinctive behaviour is defined by computing the feature magnitude (FM) of X that captures the variation of appearance and motion cues in the spatio-temporal feature space. Formally, F M (X) = ∥X∥ 2 . So, the proposed selection strategy starts by computing F M for all k followed by arranging them in descending order and then keeps top k s to be used in relation modeling, as computed by T S(F T r ) = max (

j=k j=1 ∥F T r j ∥ 2 ). With the top k s tracklets where F M (k 1 ) ≤ F M (k 2 ) ≤ . . . ≤ F M (k s ),
a LSTM cell with n h hidden neurons is used to output a fixed order dependency encoded feature map F * T r the as a relation modeling among the selected tracklets.

Tracklet Ranker The tracklet ranker is identical to the scene ranker which inputs F * T r ∈ R T ×k s ×n to assign anomaly scores to each tracklet present in temporal segments. The difference lies in obtaining the temporal detection score map D T r of dimension T × 1 which is computed by applying a max-pooling operator over k s .

Soft-Selection Coupler

In order to detect effectively both human and scene centric anomalies by selecting either HsN or SsN, a Soft selection coupler (SSC) is proposed in HSN. The SSC shown in Figure 5 computes two selection factors i.e. S HsN and S SsN by inputting the intermediate representations of tracklet ranker F T ∈ R T ×k s ×m and Scene ranker F S ∈ R T ×m , where T is the number of temporal segments, k s is the number of tracklets and m is the channel size. Essentially, SSC has three blocks: (i) segment-level, (ii) video-level and (iii) final selection block to output S HsN and S SsN . The segment-level selection block computes two attention weights i.e. A S HsN ∈ R T ×1 and A S SsN ∈ R T ×1 for each temporal segment T i signifying the weighted association of each T i to HsN and SsN. In this block, a max-pooling operator is first applied over k s dimension of F T to identically match with F S dimension. The output of max-pooling operation is denoted by F M T . Then, F M T and F S are projected to two parallel FC layers followed by ReLu activation for latent space representation. This dissociative latent representations are coupled by a concatenate operator. The coupled representation is then applied to two parallel sigmoid activated FC layers, each having one units to compute A S HsN and A S SsN in a mutually exclusive manner. The segment-level selection block outputs A S HsN and A S SsN by learning fine-grained temporal representation of a video. Dissimilar to this, video-level selection block encodes the association of a video by computing two attention weights i.e. A V HsN ∈ R 1×1 and A V SsN ∈ R 1×1 from the contextual temporal representation. For this, temporal contextual initialization is done by applying a average-pooling operation over T to the F M T and F S feature map. Then the contextual representations are entangled by a concatenate operation. This feature map is then projected to two parallel sigmoid activated FC layers, each having one units to compute A V HsN and A V SsN in a mutually exclusive manner. The output from segment-level and video-level selection blocks are masked in final selection block to obtain S HsN ∈ R T ×1 and S SsN ∈ R T ×1 . For masking, the A V HsN and A V SsN are first inflatted across T to match the dimension of A S HsN and A S SsN and then the corresponding weights are combined by a Hadamard product.

Segment-level Selection

T ⨉ m T ⨉ m T ⨉ m T ⨉ m Sigmoid Sigmoid Sigmoid Sigmoid A S HsN A V HsN A V SsN T ⨉ 1 T ⨉ 1 1 ⨉ 1 1 ⨉ 1

Inflate across T Hadamard Product

A S

SsN

Inflate across T Hadamard Product

T ⨉ 1

Final Selection

Video-level Selection

Optimization of Human-Scene Network

The proposed human-scene network (HSN) is endto-end trainable (excluding the local and global feature extractors) with a novel self-rectifying loss. Although HSN follows multiple instance learning (MIL) optimization paradigm similar to earlier WSVAD works [START_REF] Sultani | Real-world anomaly detection in surveillance videos[END_REF], the error computation procedure differs significantly. In this, due to the unavailability of precise temporal annotation for each video, the error is computed by considering two bags of instances, namely D a and D n . D a and D n are collection of detection scores (D) corresponding to the temporal segments extracted from anomaly and normal video sequences respectively.

Self-rectifying Loss: It is designed in such a way that, it not only ensures context level but also performs instance level score maximization by generating a pseudo temporal annotation for each segment.The aim of pseudo label generation is to choose the correct number of anomaly and normal instances to take part in the optimization. The pseudo temporal annotations are computed during each iteration of optimization (i.e. one step) to avoid two-step optimization paradigm [START_REF] Feng | Mist: Multiple instance self-training framework for video anomaly detection[END_REF][START_REF] Zhong | Graph convolutional label noise cleaner: Train a plug-and-play action classifier for anomaly detection[END_REF] (where, first step to generate pseudo annotations, second step for separability maximization). Since our loss function is based on one-step optimization and since the pseudo annotations computed at the initial iteration can be noisy, a self-rectification mechanism is also proposed to refine the labels during the optimization. The proposed self-rectifying loss is presented in eq [START_REF] Adam | Robust real-time unusual event detection using multiple fixed-location monitors[END_REF], which is a weighted sum of two components L C and L I to perform context and instance level maximization respectively.

L C first computes the sum of scores from all T instances present in D a and D n to obtain video context and then maximize the separation among them to ensure context separability. With only L C , it is not sufficient to ensure optimal separability between normal and anomaly classes, since video containing short anomalies will be suppressed by neighboring normal scores and hence can not be optimized effectively.

L SR (Da, Dn) = λ 1 max (0, 1 - T i=1 (D i a ) + T i=1 (D i n )) L C + λ 2 ∥Err(Correct) -Err(N oisy)∥ L I (1) Err(X) =                                        1 T T i=1 (D i n -P i yn ) 2 ∀i, P i yn = 0 M SE(Dn) , if X = Correct 1 T T i=1 (D i a -P i ya ) 2 , if X = N oisy ∀i, if D i a ≤ D ref then P i ya = 0, ∀i, if D i a > D ref then P i ya = 1 M SE(Da)
(2) For this, L I performs the instance-level optimization in D a and D n by generating pseudo-temporal labels which are empowered by a self-rectification mechanism. Since D n contains no anomaly instances, so the pseudo temporal label for segment i (P y i n ) for D n is correct (i.e. ∀i, P y i n = 0 1 ). In contrast, D a contains a mixed distribution (i.e. normal and anomaly) with no prior knowledge, so the pseudo temporal labels for D a (i.e. P y i a ) are noisy.

1 Kindly note, we refer label = 0 for normal and label = 1 for anomaly instances. In D a , the pseudo temporal labels P y i a are computed by comparing their prediction scores (D i a ) to a dynamic referpoint (D ref ). The D ref for D a is calculated by taking the average between the maximum and minimum score of D a , D ref = (max(D a ) + min(D a ))/2, which essentially provides a dynamic threshold point for each video characterizing different categories of anomaly. The quality of P y a computation depends on choosing an appropriate D ref , which may be a rough approximation at the initial iteration. Hence, for optimal instance-level separation, it is necessary to rectify the noisy pseudo temporal labels (i.e. P y a ) with the help of the correct ones (i.e. P y n ). So, to rectify the noisy distribution, L I minimizes the difference between the errors (Err) obtained from the correct pseudo labels to the noisy pseudo labels. It can be observed that Err(N oisy) has a direct dependency on the D ref point. So, by minimizing ∥Err(Correct) -Err(N oisy)∥, the D ref gets adjusted and reaches an optimal point where P y a has minimum noise. Thus, this self-rectification procedure enables the noisy pseudo labels to get rectified with the guidance of correct labels. Kindly note, for computing Err, we adopt mean-squared-error (MSE) between the predicted scores and their corresponding pseudo labels as portrayed in eq (2).

Experiments

Datasets and Evalution Metric

The experiments are conducted on three publicly anomaly detection datasets, namely, UCF-Crime [START_REF] Sultani | Real-world anomaly detection in surveillance videos[END_REF], ShanghaiTech [START_REF] Lu | Abnormal event detection at 150 fps in matlab[END_REF] and IITB-Corridor [START_REF] Rodrigues | Multi-timescale trajectory prediction for abnormal human activity detection[END_REF]. Following [START_REF] Feng | Mist: Multiple instance self-training framework for video anomaly detection[END_REF][START_REF] Sultani | Real-world anomaly detection in surveillance videos[END_REF]22,[START_REF] Zhong | Graph convolutional label noise cleaner: Train a plug-and-play action classifier for anomaly detection[END_REF], frame-level Receiver Operating Characteristics (ROC) and its corresponding Area Under the Curve (AUC) are used to evaluate the anomaly detection performance. For UCF-Crime dataset, category wise detection performance is also computed on both official test split [START_REF] Sultani | Real-world anomaly detection in surveillance videos[END_REF] and whole dataset (i.e. using 5-fold cross validation) to evaluate the robustness of detection performance in various critical situations. For the 5-fold cross-validation, we report the mean-AUC (mAUC) of all 5-folds to evaluate the method. Since for the 5-fold evaluation, we need the temporal annotation of the complete UCF-Crime dataset, we obtained it from Wan et al [START_REF] Wan | Anomaly detection in video sequences: A benchmark and computational model[END_REF]. Kindly refer to supplementary material for complete dataset descriptions and implementation details.

Ablation Study

A detailed and sequential ablation study is carried out in this section to quantify the two novel contributions i.e. human-scene network (HSN) and self-rectifying loss. For all ablation studies, UCF-Crime [START_REF] Sultani | Real-world anomaly detection in surveillance videos[END_REF] dataset is chosen as it has a good number of human and scene based anomalies.

Effectiveness of HSN :

As HSN comprises of multiple building blocks, each block is evaluated in terms of anomaly detection performance as shown in Table 1. At first, human and scene subNets are independently considered for experimentation. The temporal segment generation blocks, feature descriptors (i.e. I3D-ResNet50) and ranker block are inherently added to both subNets for determining detection performances. In human subNet, the human baseline experiment is performed with only the tracklets obtained from people detection and tracking (PDT) method. Subsequently by adding tracklet selection and relation modeling (TSRM) block to human subNet, it boosts the performance (+4.68%) significantly compared to the human baseline. Similarly, in scene subNet, the global scene (GS) is only taken at the beginning to define the scene baseline. On top of that, adding multi-granularity temporal modeling (MGTM) block improves the detection performance (+5.16%) by a large margin. The performance boost for both human and scene subNets outlines the potentiality and significance of TSRM and MGTM blocks respectively.

Further, in order to verify the complementary nature of representations learned by both subNets, we visualize the category wise detection performance as in Figure 6. It is shown that for human-centric anomaly categories such as arrest, burglary, fighting, stealing, vandalism the performance of human subNet is superior to the one of scene sub-Net and vice versa for scene-centric anomaly category like arson, explosion. The soft selection coupler (SSC) is introduced in HSN to take benefits from both subNets and to improve the overall detection performance. only human and scene subNet respectively. From Figure 6, it can be inferred that thanks to the decoupled design of HSN, distinctive features are learned for human and scene based anomalies and the SSC effectively combine the complementary representations to boost the performance.

Effectiveness of L SR : In order to gain enhanced performance, optimization with L SR plays a key role in HSN.

Qualitative Analysis

In Figure 7, we show the prediction scores (Row-1) obtained from proposed method along with the selection factors (Row-2) corresponding to human and scene subNets (i.e. HsN and SsN) in three cases (case-1: human centric, case-2: scene centric, case-3: both human and scene) of anomaly scenarios. The samples "Shoplifting16", "Ex-plosion08", and "Burglary79" give an overview of the performance for all three cases. In "Shoplifting16" where the anomaly is being done by a women, the effective detection score is majorly influenced by HsN since higher selection factor to HsN is assigned to the localized area. Similarly, for "Explosion08" where a bomb blast is recorded, we see the detection performance is triggered due to higher factor assigned to SsN. From both anomaly cases, the proposed method yields superior detection performance by effectively selecting either subNet. Moreover, we choose a third case where the anomaly is characterized by both human and scene localized areas. "Burglary79" consists of such a scenario where a group of criminals are illegally entering to a building by breaking the entrance.

State-of-the-art Comparison

Overall Performance Comparison In Table 4, we compare the overall performance of the proposed method with recently reported state-of-the-art methods for UCF-Crime, ShanghaiTech and IITB-Corridor datasets. For a fair comparison, as several feature extractor backbones are used to report AUC in previous methods, we report results using two widely used backbones i.e. Inception-v1 I3D (I3D-Inc) and ResNet50 I3D (I3D-Res) for the three datasets. [15] by +4.86%, but the method fails to achieve better performance than [22] with I3D-Res backbone. This is due to Shang-haiTech, that has only 65 anomaly videos collected from a small and focused data distribution for training. It contains only simple human anomalies (e.g. run, fall down, ride cycle etc.) characterized by strong motion, so only few events are not correctly detected. Due to the small number of anomaly samples, our HSN could not be optimized sufficiently to outperform methods dedicated to strong motion events. Further, to confirm the robustness of our method in complex and diverse anomaly distributions, we have also validated our method on the IITB-Corridor dataset. In this, it surpasses the recent I3D-Inc method [15] and I3D-Res method [22] by +2.3% and +2.34% margin respectively.

Category Wise Performance Comparison Further, we also compare the abnormal category wise performance with Tian et al. [22] in UCF-Crime dataset. First, we made the comparison in the official test split [START_REF] Sultani | Real-world anomaly detection in surveillance videos[END_REF] and found that our method is superior in detecting human-centric abnormal categories like abuse, arrest, arson, assault, robbery, shoplifting compared to Tian et al. [22] as reported in Table 3. However, the performance gain is not significant. This is due to fewer number of samples in the official test set. For this, we perform the 5-fold cross-validation and report the mean-AUC (mAUC) of 5-folds for categories-wise performance comparison. Since it covers the entire UCF-Crime dataset, we believe it provides a more robust and justified performance w.r.t official test set [START_REF] Sultani | Real-world anomaly detection in surveillance videos[END_REF]. From the 5-fold cross-validation, we found that our method outperforms Tian et al. [22] in all fine-grained and subtle human-centric anomalies (abuse, arrest, arson. assault, fighting, robbery, shooting, shoplifting, stealing) by a significant margin as reported in Table 3. As a result, our method surpasses Tian et al.

[22] by 2.3% margin in total performance in K-fold evaluation. But, our method lies behind Tian et al. on simple scene based anomalies (explosion, bruglary, road accidents) and on human anomalies like vandalism (humans tampering the cameras) where there exists a sharp change Methods FLOPs(G) Speed(FPS) PDT [START_REF] Zhang | Bytetrack: Multi-object tracking by associating every detection box[END_REF] 281.9 30 in the scene.

Network Complexity Analysis

In this section, a complexity analysis of HSN is performed to meet real-world applicability. Since HSN rely on people detection and tracking (PDT) method, the complexity of the PDT method (ByteTrack [START_REF] Zhang | Bytetrack: Multi-object tracking by associating every detection box[END_REF]) is evaluated first and then the complexity of anomaly detection methods are reported and compared w.r.t FLOPs, and speed as shown in Table 5. It can be seen that our HSN is computationally competitive in terms of FLOPs and speed w.r.t recently reported articles. For fair comparison, evaluation is done on a single 2080Ti GPU. Considering recent CCTV cameras which operates in 30 FPS, HSN can detect anomalies effectively in near real-time.

Conclusion

In this work, we presented a novel human scene network (HSN) optimized by a self-rectifying loss function as a baseline to detect real-world anomalies under weaksupervision. The HSN ensures superior detection performance in complex real world scenarios for two reasons: First, the decoupled design of HSN comprising Human and Scene subNet followed by soft-selection coupler can effectively learn a local and global discriminative representations for human and scene centric anomalies, respectively. Second, optimizing HSN with the proposed self-rectifying loss ensures greater separability between the classes. From experimentation, it can be noted that the proposed method gain competitive performance in five out of six scenarios considered compared to the recently reported methods for three popular datasets.

Limitation-and-Contribution Trade-off : As HSN rely on people detection and tracking method for learning human centric representation, it induces slightly more complexity compared to the previous methods. However, it opens up new directions to analyse the complex abnormal scenarios in a more fine-grained way to address the real-world challenges which is majorly missing in earlier weakly-supervised methods. From the performance and complexity analysis prospective, our method establish a good trade off to meet the real-world applicability.

Figure 1 .

 1 Figure 1. Visualization of scene and human centric anomalies in CCTV videos. The scene-centric anomalies (row-1) contain sharp changes of spatio-temporal cues. But, human-centric anomalies may carry strong local motion (row-2: abuse) or characterized by subtle features (row-3: shoplift).

Figure 2 .

 2 Figure 2. Comparison of previous WSVAD methods with ours.Previous methods considers only scene-centric features (i.e. from whole frame) and it fails to detect complex human-centric anomalies. In contrast, our HSN can learn from both cases and obtain better performance.

1 CFigure 3 .

 13 Figure 3. Human-Scene Network (HSN): It comprises of three key biulding blocks i.e. (A) Human subNet, (B) Scene subNet and (C) Soft-Selection Coupler. HSN inputs a long video sequence that is processed by (A) and (B) to learn either human or scene centric representations synchronously. Afterwards, (C) is optimized to compute a coupled selection factor based on the representation learned by (A) and (B) to focus on either of them.

Figure 4 .

 4 Figure 4. Multi-Granularity Temporal Modeling (MGTM): It creates a temporal feature pyramid with Temporal Downscaler and Bottleneck module followed by a LSTM cell to learn discriminative fine-grained and contextual temporal representation.

Figure 5 .

 5 Figure 5. Soft-Selection Coupler (SSC): It learns two selection factors SHsN and SSsN to couple the local and global representations learned by HsN and SsN respectively.

Figure 6 .

 6 Figure 6. Category wise detection performance (AUC%) for UCF-Crime dataset quantifying effectiveness of HSN.

Figure 7 .

 7 Figure 7. Visualization of Ground truth (Green shed) vs. prediction scores (Red shed) for various cases in Row-1. Row-2 is the selection factors S HsN (Yellow plot) and S SsN (Violet plot) to focus on either HsN or SsN for effective coupling.

  In UCF-Crime, our method outperforms the recent I3D-Inc and I3D-Res based method ofMajhi et al. [15] and Tian et al. [22] by +1.66% and +1% margin respectively. For ShanghaiTech dataset, although our method outperforms the recent I3D-Inc based method of Majhi et al.

Table 1 .

 1 Ablation on each component of HSN on UCF-Crime dataset in terms of AUC(%). Here, SLS:Segment-level selection, VLS:Video-level selection block of SSC.

	Human subNet. PDT TSRM	Scene subNet. GS MGTM	SSC SLS VLS	AUC(%)
	✓	✗	✗	✗	✗	✗	76.53
	✓	✓	✗	✗	✗	✗	81.21
	✗	✗	✓	✗	✗	✗	78.62
	✗	✗	✓	✓	✗	✗	83.78
	✓	✓	✓	✓	✓	✗	84.52
	✓	✓	✓	✓	✓	✓	85.30

Table 1

 1 31% and 0.74% compared to individual subNets. Finally by combining both segment-level and video-level selection in SSC (i.e. S HsN and S SsN ), it further boosts the detection performance by 4.07% and 2.5% compared to that of

	shows that

Table 2 .

 2 Ablation Study to showcase the AUC gain by L SR loss in various methods evaluated on UCF-Crime dataset.

  To corroborate the effectiveness and adaptability of L SR , an experimental ablation study is performed as shown in Table 2. We choose two recently reported MIL based methods i.e. Sultani et al. [19] and Majhi et al. [15] for comparison. Those methods were previously optimized with classical ranking loss (L). Optimizing the Sultani et al. and Majhi et al. methods with L SR gives 0.97% and 1.39% performance gain respectively. Similarly, HSN optimized with L SR boosts the detection performance by 2.52% compared to L. Since previous methods operate on coarse spatiotemporal features which have lower separabilities compared to HSN representation, so the performance boost by L SR is marginal in those methods. But in HSN, a superior discriminative representation is captured due to the decoupling of scene and human cues and hence it generates less noisy pseudo labels leading to greater separable features.

Table 4 .

 4 State-of-the-art performance comparisons in terms of frame-level

	AUC on UCF-Crime (UCF-C), ShanghaiTech (ST) and IITB-Corridor
	(IITB-C) dataset. Kindly Note: * marked AUC is our implementation.

Table 5 .

 5 Complexity comparison of Human-Scene Network. Here, G: Giga, FPS: Frames-per-second,w-o: with-out.

	Majhi et al. [15](I3D-Inc)	108.1	267
	Tian et al. [22](I3D-Res)	153.2	211
	HSN(I3D-Inc) w-o PDT	108.7	227
	HSN(I3D-Res) w-o PDT	153.7	159

Official Test-Evaluation [START_REF] Sultani | Real-world anomaly detection in surveillance videos[END_REF]