Piecewise affine control for lane departure avoidance

This article presents the design of a lane departure avoidance system which is conceived to operate even in demanding manoeuvres with respect to the lateral vehicle dynamics. Piecewise affine state feedback and output feedback controllers are used to handle the nonlinear behaviour of the lateral tyre forces. The controllers are designed based on the search of a piecewise quadratic Lyapunov function casted as a bilinear matrix inequalities problem. Experimental tests demonstrate the performance of the controller in degraded road conditions.


Introduction
Advances in the technology of sensors and actuators have enabled the development of driver assistance systems (ADAS) to prevent road accidents, especially those caused by driver's mistakes or inattention. Several types of ADAS, such as Anti-lock Braking System (ABS) and Electronic Stability Control (ESC) (also known as Electronic Stability Program (ESP)), are already deployed in commercialised vehicles, and they operate by means of proprioceptive sensors. Such systems are conceived for emergency situations in which the tyre forces are usually saturated and they are very effective in enhancing the vehicle stability. Extensive research work has been devoted to ADAS based on proprioceptive sensors such as [1][2][3][4][5].
Lane departure represents a significant fraction of road accidents and in many cases it is due to the driver fatigue or inattentiveness. Such accidents may be mitigated by the use of lane departure warning system and lane keeping assistance system (LKAS), which are based on exteroceptive sensors. While the ESC deals with the vehicle dynamics in emergency situations, the currently commercialised LKAS are designed to work in conditions of weak lateral solicitation [6][7][8]. Moreover, literature studies show that vehicle lateral control has gained importance over the last 40 years. These research activities consist of either full or partial automation of driving tasks, as an attempt to increase safety by reducing driver's workload. It can be noted that earlier work was devoted to autonomous vehicles in highway *Corresponding author. Email: andre.benine-neto@ifsttar.fr scenarios in which the experienced lateral accelerations are generally low [9]. An overview of the recent research activity on autonomous vehicles is provided in [10], while a comparison of four control strategies based on output feedback self-tuning, H ∞ , Fuzzy logic and proportional is presented in [11].
The use of potential fields is explored in [12,13] for the design of lane keeping assistance in which the vehicle control is shared with the driver at the guidance level. A combined automated lane keeping and driver's steering through a two degree-of-freedom closed loop control strategy is presented in [14] for typical highway conditions. In this implementation the driver has control over the manoeuvres, but the automated lane keeping system brings the vehicle back to the centre of the lane when there is no driver steering action. In [15] the driver is considered in the loop of the lane departure avoidance system. The controller is inactive if the lateral offset at look-ahead distance is within a safety region, but as the vehicle tends to point towards an unsafe area, the steering controller becomes active and even rejects the driver input if it is even further towards the unsafer area.
On the other hand, in [16] the automata temporarily replaces the driver during the lane departure avoidance manoeuvres by applying the designed static control action. The stability of the system, considering the switching between driver and automata, is ensured by the activation of the assistance within an invariant set computed based on a quadratic Lyapunov function. Although the vehicle is controlled only by steering action in these systems, it is also possible to consider longitudinal torque distribution such as in [17], applied to an electric vehicle with independent four-wheel torque.
It can be noticed that the systems [9,[11][12][13][14]16,17] are not conceived for demanding manoeuvres. In order to enhance the safety provided from these LKAS, it is essential to design systems which are able to operate in the complete domain of tyre forces. Consequently, several accidents due to the loss of vehicle control when the tyre forces are saturated could be avoided.
A possibility to take into account the nonlinear behaviour of the lateral tyre forces is the design of a parallel distributed controller based on a Takagi-Sugeno model [18].
Piecewise affine (PWA) systems can approximate nonlinearities to arbitrary precision. Thus, they also offer a possibility to model the tyre forces saturation. In [19], the longitudinal tyre forces are approximated by PWA functions for a traction control problem. The lateral tyre forces have also been considered in PWA form to design yaw rate controllers (see [20][21][22]).
In [23], a PWA state feedback controller is designed for a lane departure avoidance. The control synthesis is based on the results from [24] to ensure the asymptotic stability. It consists of an optimisation procedure involving bilinear matrix inequalities' (BMI) constraints for the search of a piecewise quadratic Lyapunov function. This paper deals with the design of a system to avoid unintended lane departure, even in situations of strong lateral solicitation or degraded road adhesion. It integrates the information from the exteroceptive sensors (provided by a video camera) with the yaw rate control. For that, a procedure, similar to [23], is employed for the synthesis of a PWA state feedback controller for a lane departure avoidance system. Moreover, an extension using an observer-regulator structure is proposed in order to avoid the use of sensors that are not available in the currently commercialised passenger cars. Experimental tests on a prototype vehicle are presented for the PWA state and output feedback controllers. The article is organised as follows: Section 2 describes the vehicle model for control synthesis. Section 3 presents the PWA controller design and specific assumptions for the lane keeping objective. The experimental vehicle and results from the lane departure avoidance manoeuvre on degraded adherence conditions are presented in Section 4. Section 5 wraps up the work and provides some perspective for the future work.
where the involved variables consist of the vehicle yaw rate, denoted r and the vehicle sideslip angle, β. Concerning the vehicle parameters, v represents the longitudinal vehicle speed, m the vehicle mass, l f (l r ) the distance from the front (rear) axis to the centre of gravity (CG), and J the vehicle inertia with respect to the vertical axis through the CG. All numerical values for these parameters are presented in Table 1. The lateral forces f sκ , with κ = f , r, for the front and rear tyres are modelled according to the Pacejka tyre model [26] where α κ stands for the (front or rear) tyre sideslip angle. Considering that the angles remain small, the sideslip angles for front and rear tyres are given by where δ f is the steering angle. The Pacjeka tyre model is depicted by the dashed line in Figure 1. Three distinct behaviours can be distinguished for the lateral tyre forces as a function of the wheel sideslip angle. Firstly, for small values of wheel sideslip angle a linear behaviour is dominant. As the values of wheel sideslip angle increase, a nonlinear behaviour tends to take place, causing the wheels to skid. For larger values, saturation of the tyre forces occurs. The lane departure avoidance system proposed in this work has a main objective to take into account the nonlinear behaviour work and avoid the saturation of the tyre forces.
Bifurcation analysis of the nonlinear model (1) shows, as well-known in the literature (see for example [27]), a limited stability region which also depends on the driver steering wheel angle, two unstable equilibrium points and a stable one. The continuous blue lines in Sideslip angle a f (rad) Approximation of pacejka front tyre lateral force   The causes of the instability are due to the nonlinear behaviour of the tyre-road forces which are taken into account in the PWA vehicle model described in the next section.

Piecewise affine vehicle lateral dynamics
The front and rear tyre forces, described by Equation (2), are approximated by the following PWA functions: where the coefficients d k f and e k f depend on the affine approximation of the front tyre forces and the index k corresponds to the partitioning of the front tyre force domain (front tyre sideslip angles). The PWA approximations are illustrated by the solid lines in Figure 1 for the front wheel, while the partitioning of the front tyre sideslip angle is shown by the dash-dot line. Analogously for the rear tyre, d l r and e l r depend on the rear tyre force approximation and the index l represents the corresponding partitioning of the rear tyre sideslip angle. For the region containing the origin (k = k 0 and l = l 0 ), a simple linear approximation is considered, in this case, the cornering stiffness coefficients are related to the Pacejka parameters as: for the front and rear tyres, respectively, while the affine terms are zero, i.e. e k 0 f = 0 and e l 0 r = 0. For the example shown in Figure 1, k = k 0 = 2. An injective mapping T is useful to ease the notation of the operating regions, by associating an index i to a given pair of k and l, such that i = T (k, l). Consequently, the operating regions obtained from the partitioning of front and rear wheels sideslip angles are identified by i. Replacing the PWA approximation of lateral tyre forces (4) in the vehicle model (1) leads to the PWA systemẋ with the corresponding dynamics where the control input is the front wheel steering angle u d = δ f and the state x d = [β, r] T . Despite the use of the PWA systems to represent the vehicle lateral dynamics found in the literature [20][21][22][23], bifurcation analysis has been carried out on system (5) in order to verify the validity of the PWA representation with respect to the nonlinear dynamics. The dynamics of the PWA model at v = 21 m/s has been simulated for different initial conditions considering constant steering angles δ f = 0 rad and δ f = 0.04 rad on three different road adhesion conditions. The obtained results are shown in Figure 3.
By comparing subplots (a), (b) and (c) from Figure 3, it can be seen that as the adhesion is reduced so is the stable region. These results are similar to those obtained for the nonlinear model depicted in Figure 2. The response of the PWA vehicle model is very similar to the nonlinear one, also for a steering angle δ f = 0.04 rad as shown respectively in the subplots (d), (e) and (f) from both figures.
Denoting by l s the look-ahead distance, the equation giving the dynamics of the measurement of the lateral offset y L from the centre-line is obtained bẏ An illustration of the state variables is provided in Figure 4. The prototype vehicle has been equipped with a DC-motor that provides the torque on the steering column (described in detail in Section 4). For this reason, it becomes important to consider the steering column dynamics in the PWA vehicle model used to design the lane keeping assistance, so that the torque on the steering column can be used as control input for the practical implementation.
A second order linear system is adopted to model the steering column as follows: where δ p is the angle on the steering wheel, and the inputs are the torque on the steering wheel τ p and the self-alignment torque τ alg from the wheels at the steering wheel level. The parameters B s and I s stand for the damping coefficient and inertial moment of the steering column, respectively. The self-alignment torque, at the front wheels level, can be modelled as the product between the length of the tyre contact η and the front tyre lateral force f sf . Considering the PWA approximation for the front tyre lateral forces (4) and the front wheel sideslip angle as in Equation (3), the self-alignment torque at steering wheel level becomes where R s is the gear ratio from the steering wheel to the front wheels, given by R s = δ p /δ f . Rewriting the second equation from Equation (9) in terms of δ f and considering the selfalignment torque τ alg as described in Equation (10) yields The PWA vehicle model (5) can then be extended to take into account the positioning of the vehicle described by Equations (7) and (8) and the PWA dynamics of the electrically powered steering column (11). Henceẋ

Description of the piecewise affine system operating regions
The operating regions of a PWA system are usually described by polytopes, although other possibilities also exist. The partitions of the PWA vehicle model (12) are defined by the domains of the lateral forces for the front and rear tyres (front and rear sideslip angles). Considering that the wheel sideslip angles remain small, Equation (3) is used to describe the partitions in terms of state-space variables, as the intersection of a finite number of hyperplanes. The operating region R i is defined as where , α k f andᾱ k f are respectively the lower and upper bounds on the front tyre sideslip angle, and, analogously, α l r andᾱ l r are the lower and upper bounds from the partitions of the rear tyre sideslip angle.
Each facet boundary between the neighbouring regions R i and R j is contained in the hyperplanes described by and the boundary parametric description (see [28] and [24]) can be obtained by: where F ij ∈ R 6×5 (full rank) is the matrix whose columns span the null space of c ij , and l ij ∈ R 6 is given by This description is useful for writing constraints to enforce continuity of the PWA controllers and Lyapunov function across the boundaries, as detailed in Section 3.
Alternatively, each region R i may be outer approximated by the union of ellipsoids [28] ε ij , for j = 1 . . . n i , which are described by the matrices E ij and f ij as follows: The quadratic form of Equation (17) may be advantageous for the search of piecewise quadratic Lyapunov functions.

Assumptions for lane keeping assistance system using piecewise affine control
As most vehicles have understeering behaviour, it is assumed that the front tyre forces tend to saturate first, therefore only the front tyre forces are approximated by PWA functions as in Equation (4), and a simply linear approximation is assumed for the rear tyre, as follows: The PWA approximations of the Pacejka model used in the design of the LKAS are shown in Figure 1, and the numerical values describing the coefficients of the tyre force approximations are shown in Table 1.
It is also assumed that the slopes describing the PWA approximations of the front tyres lateral force are positive, as illustrated in Figure 1.
These assumptions are important for two reasons. Firstly, it enables the use of system analysis and control synthesis based on quadratic Lyapunov functions, ensuring that the closed loop system has only one equilibrium point. Secondly, approximating the Pacejka nonlinear model (dotted line in Figure 1) with PWA functions of positive slopes determines partitioning values α f = ±ᾱ f such that the switching threshold are within the beginning of the saturation zone. Such partitioning is therefore advantageous, as it provides PWA controllers in which are able to anticipate critical situations.
Considering the front wheel sideslip angle as in Equation (3), it can be noticed that the cell partitioning described by Equation (18) depends only on the subset of state variables {x ∈ R 3 | x = [β, r, δ f ]} from the PWA vehicle model (12). Thus, the operating regions are unbounded in the direction of the other state variables. According to [28,29], when the operating regions present such slab shape, the ellipsoidal description (17) is particularly interesting, because each operating region can be exactly described by a single degenerated ellipsoid of the form For the PWA approximation of the lateral tyre forces as in Equation (18), the ellipsoidal cell description (17) of the operating regions become where the numerical values used to bound the regions R 1 and R 3 , in the direction of α f , arē The ellipsoidal description (19) for the slab operating regions is also more advantageous than the polytopic representation (14), since it involves fewer parameters in the optimisation procedure for the controller synthesis [24], as presented in the next section.
The parametric cell description (16) for this partitioning is given by Although the partitioning could be refined, the results obtained in practical implementation, presented in Section 4, show that the controller computed using this simple partitioning is able to handle the nonlinear behaviour of the tyre forces satisfactorily.

Controller strategy
In this section, the design requirements of the controllers for the lane departure avoidance system are presented. The synthesis of PWA state and output feedback controllers are also shown. For both controllers, the synthesis is based on the results from [24] in which a solution of an optimisation problem subject to BMI constraints is sought. These constraints are obtained from stability conditions associated to a piecewise quadratic Lyapunov function.
Disturbances and exogenous inputs, such as the road curvature, are not taken into account in the control synthesis, therefore ρ ref is set to zero for the model describing the vehicle dynamics (12).

Control objectives for lane departure avoidance
In order to design a lane departure avoidance system that performs satisfactorily in situations of strong lateral solicitation, it is essential to take into account the nonlinear behaviour of the lateral tyre forces. As shown in the previous sections, PWA systems can adequately approximate nonlinearities. Therefore, the use of PWA controllers is a natural choice for the design of the vehicle lateral controller. The following requirements are imposed on the control synthesis: • The PWA controller must ensure asymptotic stability of the closed loop system. • In order to ensure satisfactory performance, the vehicle must be driven to the centre of the lane as fast as possible without detriment of the vehicle stability. • The vehicle displacement to the centre of the lane must be smooth despite the possible switches between the PWA controllers, so that they are imperceptible by the driver. • The control input must be bounded and continuous among the switches of the PWA controller in order to avoid damage of the actuators. • Use only of sensors and actuators that are already available in the currently commercialised vehicles in order to avoid significant cost increase for hardware in the implementation of the proposed lane departure avoidance system.
Based on these requirements, the design of a PWA state feedback controller for lane departure avoidance is shown in the subsequent part.

Piecewise affine state feedback control
Firstly, a PWA state feedback controller is proposed for the design of the lane departure avoidance system. The synthesis takes into account the requirements listed in Section 3.1.
The main goal is to stabilise the PWA vehicle model (12), with a PWA state feedback gain The matrixĀ i of the closed loop system of each region is designed such that it is invertible and its equilibrium point is denoted x i eq . This condition is mathematically expressed by The asymptotic stability of the closed loop system (21) can be ensured by the existence of a piecewise quadratic Lyapunov function. Such form is less conservative than a single quadratic Lyapunov function and it can be written as where P i = P T i , P i ∈ R 6×6 , q i ∈ R 6 and r i ∈ R. V i (x) is a Lyapunov function with a decay rate α i , for the region R i if the following conditions are satisfied: where x eq is the equilibrium point of the closed loop system and ≥ 0 is a fixed constant.
Rendering the vehicle to the centre of the lane is a stabilisation problem for systems (21), since in a straight line all state variables should converge to the origin. Therefore, the desired equilibrium point of the closed loop system, x eq is placed at the origin. In consequence, q 2 = 0 6×1 and r 2 = 0 to ensure that V (0) = 0 for systems (21).
Since the lateral tyre forces are symmetric with respect to the origin, and consequently also the dynamics of the PWA vehicle model (12), only regions R 1 and R 2 are considered in the control synthesis. The gains obtained for region R 1 are applied in region R 3 , i.e. K 1 = K 3 and m 1 = −m 3 . This procedure reduces the number of constraints to be solved.
Due to the quadratic form of the ellipsoidal description for the operating regions (17), the S-procedure [30] can be used in order to express the condition of Lyapunov stability in matrix inequality form, so that they are valid for each region. Considering the ellipsoidal cell description described in Section 2.3, these conditions can be written as where * indicates the transpose. The conditions of stability (25) and (26) relative to R 2 are simply those of a linear system, since the origin is chosen as the equilibrium point of the closed loop system. In other words, the S-procedure is not applied for R 2 in order to avoid strict infeasibility [28]. These constraints ensure the asymptotic stability of the closed loop system.
The actuators should also work continuously, even in the presence of control switches. The main goal of this measure is to preserve the actuators and ensure a smooth response of the vehicle. The continuity of the control input along the boundaries (R i ∩R j ) can also be guaranteed by using the following constraint: Constraints (26) consist of BMI due to the product of P i and B i K i . Although algorithms such as [31] are available for solving BMI, the V-K iterative method, as presented in [24], was used in this work. This algorithm consists in solving alternately two Linear Matrix Inequalities (LMI) problems which are obtained by fixing one of the terms in the BMI as follows: V-step: Given fixed controllers, and fixed α i , solve Find: P 1 , q 1 , r 1 and P 2 , such that: (25), (26), (27), K-step: For P i , q i and r i obtained at the previous step, solve max min such that (22), (25), (26), (28), where l 1 and l 2 are vector bounds. For each iteration of the K-step, the decay rates α 1 and α 2 must be greater than the value computed at the previous iteration. The loop must be repeated until there is no significant improvement on the cost function or the LMIs become infeasible. The previously obtained results are thus retained.
Maximising the decay rates α i is equivalent to searching the fastest closed loop system response, which corresponds to the design requirement to steer the vehicle to the centre of the lane as fast as possible. The bounds l 1 and l 2 are also used to moderate the system response.
The control synthesis proposed in [32] and tested on the same prototype vehicle has been employed for the design of the initial controller K n=0 i , used in the first iteration (n = 0) of the V-K method. The motivations for using this control synthesis are twofold. Firstly, the control synthesis in [32] is able to compute invariant sets for the lateral assistance given that the road curvatures are bounded, therefore it circumvents the neglection of the disturbances in the proposed method for PWA control of the vehicle. Secondly, the gains obtained from [32] have already been validated for the prototype vehicle in the linear domain of tyre lateral forces and in the presence of non zero road curvature. For these reasons, the controller chosen for the linear region R 2 is For the first iteration, the same gains have been applied for region R 1 , i.e. K n=0 1 = K n=0 2 . Due to the chosen partitioning and PWA approximation of the tyre forces, the equilibrium point of the closed loop dynamics in R 1 is already outside this region, i.e. x 1 eq / ∈ R 1 , therefore m n=0 1 = m n=0 2 = 0 have been set for the first iteration. It is known from [32] that the performance of the state feedback gain K n=0 2 is satisfactory, therefore the variation of K 2 is limited in the range K n=0 2 ± 5% in the K-step to avoid that the behaviour of the vehicle in the linear region is much altered during the optimisation process. The corresponding additional constraint is The bounds on the controller gain and affine terms have been set as l 1 = l 2 = 10 3 and = 10 −6 .
Considering a longitudinal speed of v = 21 m/s, the V-K method has been carried out using solver [33], until there was no significant improvement on the cost function. The resulting gains after 19 iterations are The system requirements mentioned in Section 3.1 are all included in the constraints used to synthesise the PWA state feedback controller, except for the last one, which restricts the measurable variables to those whose sensors are available in currently commercialised cars. This aspect is taken into account in the subsequent part.

Piecewise affine output feedback control
Currently commercialised passenger cars are not equipped with sensors to measure the sideslip angle, therefore an observer-based control strategy is proposed so that the controller can be implemented without additional costs on components.
Except the vehicle sideslip angle, all the state variables are available for measurement, therefore the vector of measurable variables y from the PWA vehicle model (12) is given by where C i = [0 5×1 , I 5×5 ], for i = 1, 2, 3. The PWA output feedback controller can be defined aṡ The closed loop system can be expressed in the same form as in Equation (21), by defining Similarly to the state feedback case, the matrixÃ i from Equation (37) must be designed so that it is invertible and its equilibrium point is denotedx i eq , for each of the operation regions of the PWA system. The corresponding constraint is The candidate piecewise quadratic Lyapunov function for the augmented system (37) has the form Similarly to the state feedback case, the origin is chosen to be the equilibrium point of the closed loop system (37),x eq = 0 12×1 . Consequently,q 2 = 0 12×1 andr 2 = 0 in order to ensure V (x eq ) = 0.
The conditions of positive definiteness and negative first derivative along the system trajectories (24) can be rewritten using the S-procedure [30] and the ellipsoidal cell boundaries (17). They are expressed as The conditions to ensure the continuity of Equation (40) across the boundaries becomẽ F T 1,2 (P 1 −P 2 )F 1,2 = 0, F T 1,2 (P 1 −P 2 )l 1,2 +F T 1,2q 1 = 0, l T 1,2 (P 1 −P 2 )l 1,2 + 2q T 1l 1,2 +r 1 = 0, whereF ij andl ij are the parametric description of the boundaries (16), adjusted to the augmented system (37) and given bỹ It is assumed in this approach that the switching between the controllers is driven only by the system outputs. In order to enable switches based on estate estimates, a structure of a regulator and an estimator is required. Therefore, the following constraint must be added: The optimisation procedure to find A ci , K i L i , m i , b ci , and the piecewise quadratic Lyapunov function (40), can be solved with the V-K method, analogously to the PWA state feedback synthesis, as follows: V-step: Given a fixed controller, and a fixed α i , solve Find:P 2 ,P 1 ,q 1 andr 1 , such that: (41), (42), (43), > 0, γ 1 > 0, λ 1 > 0.
where l 1 and l 2 are vector bounds.
Similarly to the state feedback controller, the numerical values from the prototype vehicle described in Table 1 and the resulting gains for the observer are This control synthesis takes into account all the requirements described in Section 3.1 for the design of the lane departure avoidance system.

Robustness analysis
Simulations and stability analysis have been carried out in order to verify the robustness of the synthesised PWA state and output feedback gains with respect to parameter variations, such as longitudinal velocity and road adhesion.
The simulations have been run on the nonlinear vehicle model (1), with lateral forces according to the Pacejka model (2). The road profile used for the practical experiments and detailed in Section 4 has been considered for the simulations. It consists of an S-turn with the first curve to the left-hand-side. The corresponding road curvature estimated by the lane detection algorithm [34] at v = 15 m/s is depicted in the bottom subplot of Figure 10.
Concerning the stability analysis, a piecewise quadratic Lyapunov function has been sought for the PWA closed loop systems (21) or (37). For that, the feasibility of the LMI constraints (25)- (27) have been tested for the PWA state feedback controller. Similarly, for the PWA output feedback controller, constraints (41)-(43) have been used.
Piecewise quadratic continuous Lyapunov functions have been found for closed loop system  Figure 6. The vehicle sideslip angle and yaw rate are shown in Figure 7. It can be seen that the PWA controller is able to stabilise this variable faster than the single linear controller, showing an enhanced performance of the PWA controller to deal with the nonlinear behaviour of the lateral tyre forces.
In order to verify robustness of the controllers with respect to variation of the road adhesion coefficient μ, the terms of the Pacejka model have been modified according to [35], as follows: B κ to (2 − μ)B κ , C κ to (5 − μ)C κ /4 and D κ to μD κ . These modified coefficients have been considered for the PWA approximation of the nonlinear lateral tyre force.
Constraints (25)   The robustness of the controller with respect to variations of the threshold value of front wheel sideslip angleᾱ f , which defines the controller switches, has also been evaluated. Simulations of the linear and PWA state and output feedback controllers applied to the nonlinear vehicle model have been carried with variation of ±30% ofᾱ f considering the same lane departure avoidance manoeuvre. An earlier switch, i.e. |ᾱ f | lower than its nominal value, results in a attenuation of the front wheel sideslip angle, leading to smaller lateral forces. In consequence, the vehicle tends to deviate more from the centre of the lane. On the other hand, if the threshold value |ᾱ f | is larger, the PWA controller response becomes more similar to the response obtained with the linear controller, as switches occur only when skidding (or saturation of lateral tyre force) is imminent. Despite the variation ofᾱ f , the simulation results showed satisfactorily responses. Nevertheless, if switches occur only at higher values of front wheel sideslip angle the vehicle yaw stability may be mitigated as the response of the PWA controller becomes closer to that of the linear system.
The stability of the PWA state feedback closed loop system has also been analysed with respect to variation of the look-ahead distance l s . The conditions of stability were satisfied for a continuous piecewise quadratic Lyapunov function for l s within the range l s ∈ [1,15] m. The simulations on the nonlinear vehicle showed that even though the system is stable for values of l s > 15 m, its response is not satisfactory due to the oscillatory behaviour.
The observer-regulator structure of the closed loop system with PWA output feedback (37) is more sensitive to longitudinal velocity variations than the state feedback controller for two reasons. Firstly, the estimator is designed for a constant longitudinal speed, therefore the estimation of vehicle sideslip angle is directly affected. Secondly, the LMI constraints (41), (42) and (43) have larger dimensions, thus it is more cumbersome for the solver [33] to find a solution. The results obtained from the solver when changing the vehicle longitudinal velocity is that it is likely to have a complementary solution, therefore one cannot ensure stability.
Both control strategies have been implemented on the prototype vehicle as described in the following section.

Practical implementation
The PWA state feedback and output feedback controllers have been implemented on the prototype vehicle shown in Figure 8. For validation purposes, the experimental vehicle is equipped with a CORREVIT sensor to measure the vehicle sideslip angle β; an inertial navigation system to measure the vehicle yaw rate r; and an odometer to compute the vehicle longitudinal speed, v, at each sampling interval, based on the ratio between the measured distance travelled and sampling time. A 48 V DC-motor mounted on the steering column provides the assistance torque at a maximum nominal torque of 40 N m in steady-state condition. An optical encoder is used to measure the steering angle, δ f , and load cell sensors integrated on the steering wheel are used to measure the driver torque.
A video camera is used to detect the lane markings by the vision algorithms developed in [34]. It enables the measurements of lateral offset y L at look-ahead distance l s , relative yaw angle ψ L and the road curvature ρ ref .
The vision algorithm is able to compute the vehicle position with respect to the lane at each 40 ms, while the proprioceptive sensors can provide measurements from 10 to 50 ms. The gains for the controller are computed offline, therefore the computation of the control input requires very low computational resource (determination of operating region and matrix multiplication for observer and control input computation), which is carried out in less than 10 ms in a PC equipped with a 2.2 GHz processor. Considering all the data acquisition and treatment, the algorithm for the lane departure avoidance runs at a period on 100 ms, which is satisfactory for a real time application.
The experiments took place on a test track located in Satory-Versailles, 20 km west of Paris, France. The track is 3.5 km long consisting of typical road profiles with straight lines and bends of various radii. Figure 8 depicts an aerial view of the test track.
Forcing the instability of the vehicle to test the developed driving assistances may become very critical in terms of safety. For this reason, the prototype vehicle has been equipped with composite rings (skid-concept [36]) that are mounted on the front tyres, in order to reproduce a degraded road adhesion condition.A picture of the ring mounted on the front wheel of prototype vehicle is shown in Figure 9. The use of these rings eases the occurrence of vehicle instability which occurs at relatively low speeds, due to the reduced adhesion coefficient (μ ∈ [0.2, 0.4]). Consequently, the cornering stiffness and values of sideslip angle, at which the nonlinear behaviour is observed, are also reduced. Due to these characteristics, these composite rings enable the evaluation of the lane departure avoidance assistance without jeopardising the safety of the vehicle and passengers.
The results presented for both controllers correspond to a lane departure avoidance manoeuvre performed at approximately v = 15 m/s on an S-curve. This chosen speed is a lower value than one considered during synthesis, for several reasons: safety, testing at a different speed and the fact that the considered curve already leads to tyre saturation when the vehicle is equipped with the rings.

Activation strategy
The human interactions play an important role in driving assistance systems, therefore an adequate activation strategy is required. In order to avoid an intrusive assistance that may not be well accepted by drivers, it is important to consider the driver awareness, as well as the risk of lane departure or collision accidents.
Assessment of driver's awareness can be found for instance in the work of [37,38], while [39] presents a survey of methods to estimate the risk of lane departure. The authors in [14,15] have proposed control strategies that keep the driver in the loop, while [16] switches between the driver and automata when the assistance system intervenes. Other sophisticated strategies can be used for the design of driver assistance, but they are beyond the scope of this work, since it focuses on the control synthesis and its performance.
The strategy chosen for this work is similar to the one used in [16], which takes into account the driver's attentiveness as well as the risk of lane departure during lane keeping manoeuvre.
The driver's attentiveness is estimated by comparing the driver's input torque on the steering wheel, τ p with a threshold value. The risk of lane departure is estimated through the position of the front wheels with respect to a fixed strip of width 2d located in the centre of the lane. According to [16], the condition of both front wheels inside the centred strip can be mathematically represented by the state vector in region between two parallel hyperplanes, as follows: where F = (0, 0, (2(l f − l s )/(2d − a)), (2/(2d − a)), 0, 0) and a is the front axle width. In summary, the activation and deactivation of the assistance system takes place in the following cases: where & represents the Boolean operator AND. More details about the activation strategy are provided in [16].
Throughout the practical experiments the driver was considered inattentive.

Results from practical implementation of piecewise affine state feedback controller
The results from the lane departure avoidance manoeuvre are illustrated in Figures 10 and 11. The road profile can be seen in the bottom subplot of Figure 10 which depicts the road curvature estimated by the lane detection algorithm. It consists of an S-turn with the first curve to the left-hand-side. The vehicle is located at the centre of the lane as it approaches the curve, and tends to continue forward, since there is no action of the driver on the steering wheel, as depicted in Figure 12. The activation takes place as the front right wheel crosses the centre strip with width 2d = 2.2 m, shortly after t = 15 s and it is indicated by the red symbol ' * ' on the figures.
The position of the front wheels with respect to the lane is reconstructed from the exteroceptive signals representing the positioning of the vehicle and illustrated in Figure 13, with the lateral offset at look-ahead distance and the relative yaw angle on the top and bottom subplots respectively.
The control input, corresponding to the activation of the assistance is shown in Figure 12. The state variables representing the dynamics of the car are shown in Figure 14 describing the measurements of sideslip angle and yaw rate.  These two variables, the front wheel steering angle, shown in Figure 15 and the vehicle longitudinal speed shown in Figure 16, are used to compute an estimate of the wheel sideslip angle, according to Equation (3). The resulting front wheel sideslip angle is illustrated in Figure 10, which drives the switching between the PWA state feedback controllers. The thresholds limiting the linear region of operation are depicted by the green dash-dot line. The switching takes place, as shown in the bottom plot of Figure 12 from R 2 to R 3 shortly after the assistance is activated.
It can be noticed that the control input (top plot of Figure 12) is reduced when the switching takes place, as an attempt to drive the state variables to the linear operating region of the tyre lateral force, under the action of K 3 and m 3 . Consequently the reduction on the steering action, shown in Figure 15, shortly before t = 16 s induces a reduction of the front wheel sideslip angle.  Since the vehicle is still negotiating the left-hand-side curve, the control input is forced to increase again to keep the vehicle in the lane in spite of the brief excursion from the lane exhibited in Figure 11 around t = 17 s.
The manoeuvre is successfully performed and the vehicle is repositioned at the centre of the lane while it negotiates the right hand side turn until the driver retakes the control, as indicated by the red symbol 'o' in the presented plots.
Having presented the results from practical implementation of the PWA feedback controller, the results of the PWA output feedback controller are discussed in the sequel.

Results from practical implementation of piecewise affine output feedback controller
The PWA output feedback controller obtained in Section 3.3 for the lane departure avoidance system has been implemented on the prototype vehicle. The results shown in Figures 17-23 correspond to the lane departure avoidance manoeuvre on the same S-curve as the previously presented results.
The activation takes place at about t = 12 s as the vehicle tends to drift out of the right lane without action of the driver (|τ d | < τ on in Figure 21). Figure 17 shows the activation as the front right wheel crosses the centred strip on the lane of width 2d = 2.2 m, depicted by the dotted lines.
The switching of the PWA output controller is based on the estimate of the front wheel sideslip angle. As the vehicle sideslip angle is assumed to be unavailable for measurement,  its estimate is used for the computation of the front wheel sideslip angle, using also the measurements of yaw, steering angle and longitudinal velocity, as follows: The estimated vehicle sideslip angle (β (est) ) is plotted in the top of Figure 18. Its measurement, provided by the CORREVIT optical sensor (β meas ), is also depicted only to enable a comparison and evaluation of the synthesised observer. The vehicle yaw rate (r) is shown in the same figure, while the steering angle (δ f ) is provided in the top plot of Figure 19 and the longitudinal velocity v is shown in Figure 20.  The computed wheel sideslip angle (α f (est) ) based on the estimation of the vehicle sideslip angle is shown by the blue solid line in Figure 22. For comparison purposes, the computed front wheel sideslip angle computed using the measurement of the vehicle sideslip angle is also shown in the same figure, represented by the dashed line.
It can be seen that the observer obtained from the control synthesis tends to overestimate the vehicle sideslip angle, which induces also a overestimation effect on the computed front wheel sideslip angle. Designing a better observer for the state vector turned out to be challenging, considering the proposed method. Since there is no constraint on the observer, the poles of its dynamics tend to become faster at each iteration of the K-step, as an attempt to maximise the decay rate of the piecewise quadratic Lyapunov function. Thus it is likely that the errors between the vehicle and its model tend to increase. Fixing the gains for the observer at the  K-step does not seem to overcome the problem as the LMIs become infeasible, probably due to the lack of flexibility for the decision variables.
Despite the errors on the estimated variables, no significant changes in the performance of the PWA output feedback controller with respect to the PWA state feedback controller can be noticed.
It is interesting to note the reduction on the steering action after the first switch from R 2 to R 3 at approximately t = 12 s as shown in the bottom plot of Figure 21. On the top plot of the same figure, it can be seen that the reduction of the control input τ a due to the action of K 3 and m 3 , is able to reduce the vehicle sideslip angle, as an attempt to avoid the saturation of the lateral tyre force that can be seen in Figure 22. The controller even switches back to R 2 , but since it is still negotiating the curve, a more pronounced input torque is required to avoid the lane departure.
Similarly to the results presented for the PWA state feedback controller, an excursion from the lane occurs briefly in the time interval 13 < t < 14 s, as it can be seen in Figure 17 from the projected position of the front wheels, which are computed based on the lateral offset and relative yaw angle shown in Figure 23.
While negotiating the following curve to the right hand side (for t > 17 s), some switches can also be noticed. In this case, it is mainly due to the overestimation of the front wheel sideslip angle as can be seen in Figure 22. Nevertheless, the action of the overall controller is able to negotiate the S-turn and steer the vehicle back to the centre of the lane, when the driver retakes control of the vehicle, deactivating the assistance.

Conclusions
In this article, PWA state and output feedback controllers are synthesised for the design of a lane departure avoidance system, which is able to handle strong solicitation of the lateral dynamics. By choosing beforehand the closed loop equilibrium point and using Lyapunov stability conditions, the synthesis of the controllers can be casted as a BMI optimisation problem.
Despite the availability of software to solve BMI, the use of the V-K method to obtain a suboptimal solution has been particularly advantageous due to the availability of a state feedback controller for linear model. Consequently, the main challenges have become the adequate modelling and the optimisation of the controllers for the affine operating regions.
The PWA state feedback controller has been deployed as lane departure assistance system and evaluated in practical implementation. The results have shown satisfactory performance and adequate action to avoid the tyre forces saturation on degraded road adhesion.
Nevertheless, the reduction on the steering action may deteriorate the vehicle trajectory and, depending on the road profile, this control action may not be sufficient to keep the vehicle in the lane which implies that a combined control action may require to generate the adequate yaw moment.
The vision algorithm has shown some limitations that prohibited the evaluation of the controller for more demanding manoeuvres. Being designed for the detection of a single lane, it was not able to restore and treat the images adequately when sudden direction changes or lane excursions took place.
As currently commercialised vehicles are not equipped with sideslip angle sensors (COR-REVIT), and their costs render it impracticable to be introduced in production, a solution avoiding the use of such sensors has been implemented. PWA output feedback controller uses an estimator-regulator structure to estimate the vehicle sideslip angle, and the PWA output feedback controller can be designed, based on a piecewise quadratic Lyapunov function.
The lack of bounds for the observer gains combined with the objective function of maximising the Lyapunov decay rate has caused the poles of the observer dynamics to become very fast, which is not desirable when discretisation is needed for practical implementation.
The results from the practical implementation are equivalent to those of PWA state feedback controller, from which it can be concluded that the observer-based control synthesis is adequate for the design of a driving assistance system that takes into account the nonlinear tyre forces and is based only on sensors currently in use.