A predictive control framework for edge following: Application to two types of mobile robots

In this paper, the accurate control of mobile robots is investigated in the framework of generic edge following. It proposes a new predictive control approach, based on the minimization of the lateral error along a distance of prediction. This permits to consider a distance of convergence independently from the yaw dynamics and the longitudinal velocity, allowing to achieve harsh maneuvers, with respect to potentially kinetically unachievable paths. The proposed algorithm is generic and permits to address the control of different kinds of robots (skid-steering, car-like, etc.) in a common framework and to consider independently the speed regulation. The control proposed here allows an accurate and reactive path tracking, even if the environment is complex and narrow. The efficiency of the approach is investigated through full-scale experiments in various conditions.


I. INTRODUCTION
The rising popularity of autonomous driving [1] shows the huge progresses achieved in the field of mobile robots. Beyond the transportation area, many applications may benefit from the advances in such a topic, such as workshop, defense or agriculture [2]. In this latter domain, the use of robots rises as a preponderant issue, since the level of production must increase while the environmental impacts have to decrease significantly, especially with respect to the use of chemical products [3]. The use of robots able to act autonomously to pull an implement or to carry out heavy loads may permit, among others, mechanical treatments while reducing the hardness of work [4]. Nevertheless, considering autonomous motion for such an application requires a high level of accuracy, despite various conditions of evolution.
Many developments in this area are based on trajectory tracking with respect to an absolute reference [5]. In open areas, this can be easily achieved using a GPS sensor, since it offers permanently an absolute localization for the robot navigation [6]. Nevertheless, the variety of encountered situations does not permit to use such a sensor in all cases, such as moving close to building, inside greenhouses, or close to high vegetation (trees for instance). Moreover, agricultural works supposes that the robot is located relatively to the vegetation instead of having an absolute location. As a consequence, alternatives must be developed to address such a variability. Among others, edge following based on the detection of a structure can be considered. This is particularly suitable for agricultural applications, since the robot may have to follow rows of vegetation (as it is the case for precision spraying [7]) or when considering autonomous motion inside the farm, where the robot may have to follow walls or furniture (such as in cleaning or feeding applications [2]). For that purpose, numerous developments are based on artificial vision such as considered in [8] or [9] for agricultural applications or based on a Lidar such as achieved in [10] or [11]. Based on this local reference, different control laws can then be applied (such as derived in [12] or [13]). Nevertheless, in such approaches, angular and lateral dynamics are not explicitly controlled, so that they are not suitable when moving autonomously in narrow spaces. In [14], a backstepping approach has been proposed to achieve edge following with an explicit computation of the robot position, heading and control variables, allowing to consider independently longitudinal and lateral controls and separate the position and the orientation servoing of the robot. It obtains satisfactory results as long as the variations in the structure to be followed are smooth and the robot does not meet limitations (such as saturation or high dynamics). When the structure to be followed includes harsh variations, some overshoots may occur, depreciating the accuracy of the motion, as such variations are not anticipated.
In this paper, a model predictive control [15] is derived, based on the backstepping approach previously developed. An optimal desired heading is computed to minimize the future lateral error along a horizon of prediction. Model Predictive Control (MPC) approach for mobile robots have already been developped for autonomoius parking, such as in [16], or high speed trajectory tracking in [17]. They propose an optimization criteria based on time. In the control approach proposed in this paper, the minimization is carried out with respect to a distance along the detected edge. This permits to consider independently the lateral and the longitudinal dynamics of the robot, allowing to achieve harsh maneuvers without a loss of accuracy. This paper is organized as follows. First, the model of a mobile robot with respect to an edge is presented. Based on this generic modeling, the backstepping approach previously proposed is briefly recalled. The proposed predictive approach is then detailed. Finally, the efficiency of the proposed control architecture is investigated through fullscale experiments in various conditions, using several kinds of robots.

II. MOTION MODELING A. Assumptions and notations
This paper aims at proposing a predictive control architecture for mobile robots, dedicated to edge following. As a result, the motion is described with respect to a detected edge Γ, such as depicted in Figure 1. As classically achieved in mobile robotics, it is assumed that the robot is symmetrical, moves on a flat ground, and its wheels roll without sliding on the ground. Without loss of genericity, the point O to be controlled is chosen as the center of the driving wheels for skid-steered robots or the center of the rear axle for car-like mobile robots, see Figure 1. The distance between the point O and the closest point to O belonging to Γ (point A in Figure 1) is the lateral deviation denoted by y. The difference between the robot heading and the orientation of the tangent to Γ at point A constitutes the angular deviation and is denoted byθ . The longitudinal position along the trajectory is described by the curvilinear abscissa s. Finally, the curvature of Γ at the curvilinear abscissa s is denoted by c(s). The robot's motion is achieved thanks to two control variables: • the robot longitudinal velocity v, • the robot angular velocity u θ , which is directly controlled from the driving wheels velocities in the case of skid-steered mobile robots or linked to the front steering angle δ F in the case of car-like mobile robots: with L the car-like mobile robot's wheelbase. Using these notations, the objective is to ensure the convergence and the stabilization of the lateral deviation y to some desired distance y d , whatever the robot's speed. To achieve this goal, the robot's state vector is defined as X = [s yθ ] T .

B. Motion equations of mobile robots
In order to derive the control laws, the kinematic equations of motion with respect to the edge Γ to be followed are considered (dynamical phenomena are assumed to be negligible).
Referring for instance to [5], the robot model is then: Lines 1 and 3 in model (2) exist under the assumption that y = 1 c(s) (control point O is not superimposed with the center of curvature of the edge to be followed), which is considered to be always satisfied. This model expresses the derivative of the state vector with respect to time. As a consequence, when control laws are derived from such a model, their tuning impose a settling time, whatever the speed of the robot is. Nevertheless, when considering edge following, it may be more relevant to impose a settling distance, in order to control explicitly the robot trajectory. To this aim, the derivative with respect to the traveled distance s is introduced: let us define by ξ = dξ ds the derivative of any variable ξ with respect to the traveled distance. Model (2) can then be rewritten as: This model supposes that v cos(θ ) = 0, i.e. the velocity is not null and the robot orientation is not perpendicular to the edge to be followed. At this step, one can consider that these assumptions are met. Nevertheless, it will be shown in the sequel that these conditions are not restrictive for the proposed control law design.

III. BACKSTEPPING APPROACH
A generic control framework has been proposed in [14] for the problem of edge following for different classes of mobile robots. It consists in a backstepping control approach, illustrated in Figure 2, composed of the following steps: • Computation of a desired angular deviationθ d . The first step consists in deriving, thanks to model (3), a desired orientation for the robot allowing to reach the desired lateral deviation within a settling distance. Specifically, a first order asymptotically stable differential equation is imposed to the lateral error e(s) = y(s) − y d (s) by designingθ d as: where α(s) = 1 − y c(s) and k y is a negative gain tuning the settling distance. • Angular deviation regulation.
The robot will converge to the desired lateral deviation if its own orientation is equal to the desired one (i.e.θ =θ d ). The second step is then devoted to the regulation of the angular velocity u θ in order to ensure such a convergence. From model (2), a first order asymptotically stable differential equation is imposed to the angular error eθ (s) = tan(θ (s)) − tan(θ d (s)) by designing u θ as: with kθ a negative gain tuning the settling time to reach the desired orientation. Once an expression for u θ has been obtained, a skid-steered mobile robot can be directly controlled. For a car-like mobile robot, the corresponding steering angle δ F can then easily be deduced from (1). As shown in [14], this two-step control architecture imposes the convergence of the lateral deviation y to a desired set point y d , whatever the robot's speed as long as it is strictly positive.  [14] for edge following Once the lateral dynamic is regulated thanks to the previous strategy, the speed regulation can be addressed. In the case of skid-steered mobile robots, the yaw rate can be defined independently from the longitudinal speed (the robot can turn on itself for instance), so there is no constraint on velocity design. In order to enhance the capability to achieve maneuvers, the velocity is decreased when large variations of orientation have to be achieved. Specifically, the proposed velocity control law is: where f is the function depicted in Figure 3: the robot speed is decreased when the difference between actual and desired orientation increases, so that skid-steered mobile robots can follow accurately a tricky and narrow edge. This velocity control is based on sigmoid functions, allowing to regulate the robot speed in order to let it reach the desired position within the shortest possible distance. In contrast, for car-like mobile robots, the yaw rate also relies on the longitudinal velocity, so that a velocity regulation cannot be used to enhance maneuverability. Moreover, the control architecture proposed in [14] and summarized in this section is only reactive. As a result, harsh variations of curvature imply harsh variations of the desired orientation. This leads to abrupt reductions of the speed for skid-steered mobile robots or an impossibility to follow the edge for carlike mobile robots (or at least, an important overshoot due to the actuators properties and the settling distance imposed by the gain k y in equation (4)). To address this drawback, this paper proposes to take part of the knowledge of the edge to be followed in order to anticipate for such variations thanks to a model predictive control approach.

A. Limitation of feedforward approach
A natural way to anticipate for harsh variations of curvature in the framework of edge following is to consider the lateral and angular deviations of the robot ahead of its actual position. In other words, instead of using y(s) andθ (s), one can consider these variables at a curvilinear abscissa s H in front of the robot, namely y(s + s H ) andθ (s + s H ) can be considered as the inputs of control laws (4) and (5). In this feedforward point of view, the control laws can then be expressed as: α(s) (7) As it will be pointed out in the sequel, such an approach permits to anticipate for curvature variations, but is very sensitive to the choice of the horizon of prediction s H . Moreover, because of the noise attached to the edge detection and estimation, the predicted heading may be very noisy and the stability of such a feedforward approach becomes questionable. In this paper, a formal approach is favored, in order to derive a rigorous predictive control law, allowing the anticipation of harsh variations, while preserving the control stability and the accuracy of the edge following.

B. Predictive desired orientation computation
In this paper, the objective is to control accurately a mobile robot with respect to a detected edge, potentially containing harsh variations of curvature. As mentioned previously, a reactive approach does not permit to achieve such a goal satisfactorily, since it leads to: • important reductions of the velocity in the case of skid-steered robots, in order to let the robot's heading converge to the desired one. • important overshoots in the case of car-like robots, because of settling distances and actuator limitation, potentially leading to a collision with the edge. Since the edge is detected at each iteration, one can address these drawbacks by considering predictive control. In this point of view, the objective is to derive the desired angular deviation in order to minimize the lateral error along a horizon of prediction s H . Previously, a reactive desired orientationθ d has been computed with respect to the current error in order to impose its convergence within a settling distance tuned by kθ . In this paper, the objective is to find the desired heading which minimizes the predicted lateral error along s H .
For that purpose, the detected edge is assumed to be locally defined as a second order curve, obtained using least square method from the curvilinear abscissa s up to s H . Using this assumption, let us express the lateral error e y (s + ∆s), with ∆s ∈ [ 0 ; s H ]. Considering Figure 1 and robot models (2) and (3), one can write: where a i , i ∈ 1, 2 are the coefficients of the local second order interpolation of the detected edge. In order to achieve the minimization, let us consider n H ∈ N points of coincidence, regularly spaced along [ 0 ; s H ] by a step S = s H n H . The error e k y at the k th coincidence point (k ∈ [ 0 ; n H ]) is obtained straightforwardly by injecting ∆s = k.S into (8): 9) Using this formulation, the objective of predictive control is to find an expression forθ which minimizes the lateral error e k y for k ∈ [ 0 ; n H ]. For that purpose, one can consider the criterion J defined by: where e y (s)e −λ k.S constitutes a desired shape for the convergence of e y (s), which can be tuned by positive parameter λ . Let us regard ξ = α tanθ as a virtual control variable related to the orientation. The optimal control ξ H = α tan(θ H d ) is then the one which minimizes the criterion J. It can therefore be inferred from the condition: The formal computation of condition (11) permits to find an explicit expression for the optimal desired angular deviation: with the following notations: The angular deviationθ H d , since it satisfies condition (11), is the optimal angular deviation minimizing the criterion J along s H . It can be considered as a predictive term which has to be applied at present time to anticipate for edge variations. It can then be substituted to the reactive termθ d previously computed in (4) in the first step of the backstepping control approach.

C. Yaw rate servoing
Once the predictive desired orientation (12) is applied, the robot minimizes the criterion J defined by (10) while converging to the desired lateral deviation, i.e. its lateral error is minimized along the horizon s H . The second step then remains unchanged and aims at ensuring the convergence of θ to the desired predicted one, i.e.θ H d . Similarly to [14], this can be achieved by imposing: with eθ = tan(θ ) − tan(θ H d ), since this indeed leads to the following differential equation: eθ = kθ eθ (15) and ensures the convergenceθ →θ H d as soon as kθ is properly set. It can be directly applied as the yaw rate control in the case of skid-steered robots.
For car-like mobile robots, reporting (14) into (1) leads to: Control expression (16) thus obtained requires that velocity v is non-null. In practice, this assumption is met, since the velocity is supposed to be strictly positive in order to achieve edge following. Nevertheless, this assumption can be relaxed by considering the derivative of the yaw rate of a carlike mobile robot with respect to the curvilinear abscissa. Reporting (1) into (3) leads to: Then, it can be shown that the following control expression: leads to the first order asymptotically stable differential equation: This ensures the convergenceθ →θ H d within a settling distance imposed by the parameter kθ .

A. Experimental set-up
The proposed predictive control law has been tested on two robots in two different conditions 1 , as depicted in Figure 4: • a skid-steered mobile robot. It moves in indoor conditions and follows several kinds of structures, such as depicted in Figure 4(a). It weights 25kg, with a 1 Video of experiments are available at https://stratus.irstea.fr/f/acac69b39e0e4c8abe77/ wheelbase of 0.6m. The Lidar is settled at 0.8m from the rear wheel and with an elevation of 0.5m; • a car-like mobile robot moving in off-road conditions, following a row of trees, see Figure 4(b). This robot has a weight of 520kg and a wheelbase of 1.2m. The Lidar is in front of the robot at a 0.65m height and is situated at 1.8m from the middle of the rear axle.

Fig. 4. Robots used during experiments
Both robots are equipped with a Sick-LMS laser. The structures to be followed, quite different, are depicted by red lines in Figure 4, reflecting some harsh curvatures in both conditions. Indoor, the robot must first follow an artificial hedge and construction poles (almost straight, with a 25 cm step) and next boxes constituting a second straight line, perpendicular to the first one. In outdoor conditions, the carlike mobile robot has to follow a line of trees, interrupted by construction cones and poles introducing a severe curvature.
In both cases, the edge is detected as a cloud of points by the Lidar. From this cloud, points are sorted in groups depending on their distance to the robot. From these groups, one can identify a second order curve using the closest points to the robot. Potentially, two curves have to be defined, one on the left and one on the right. Depending on the distance, only one is selected. For the sake of clarity, in the forthcoming experiments, only an edge on the right of the robot is detected in the indoor case, while only an edge on the left is detected in the outdoor application. The parameters detailed in the following table are used during the experiments. Selected parameters are different for the two robots, since their properties are slightly different. In particular, for reactive and feedforward approaches (where k y is used), the settling distance is much lower for the skid-steered robot, since it is able to turn on itself and may then have a reduced settling distance. One can note that in Table I, the parameter k y is only used for reactive control (i.e. first step of the backstepping control law (4)) and feedforward control (7). Similarly, the horizon of prediction s H , as well as the parameter λ , are only used in the framework of the proposed predictive control (12). The difference in the horizon of prediction are also explained by the reactivity of each robots and their admissible settling distance to reach a trajectory without oscillation.

B. Skid-steered results
Let us first consider the results obtained in indoor conditions with the skid-steered mobile robot. The structure to be followed, see Figure 4(a), is composed of three phases: • A: the following of an artificial hedge (from 0 to 4m); • B: the following of construction poles in front of the artificial hedge (from 4 to 7m); • C: the following of boxes arranged in a straight line perpendicular to the artificial hedge (after 8.5m). This structure has been followed three times and a comparison of lateral errors obtained during these tests is reported in Figure 5: • the first test uses the reactive backstepping approach described by (4) and (5). It is reported in blue dotted line; • the second test is based on the feedforward method described by (7) and results are reported in red dashed line; • finally, the third run has been achieved using the proposed model predictive control (12) and (14). The results are reported in plain magenta line. The results depicted in Figure 5 show the improved accuracy obtained thanks to the proposed model predictive control law. The error converges around 0 during phase A (i.e up to 4m) and phase B (from 4 to 7m) as well. It is not exactly the case for the other approaches. The feedforward strategy is less accurate, since the relevance of the predicted error strongly depends on the quality of the edge detection: the heading of a skid-steered robot may be fast varying. In these situations, the detected edge also changes quickly and the estimated error at s + s H is then noisy. It results in some instabilities and a larger convergence distance. Eventually, the reactive approach converges to zero, but is affected by the step in the trajectory imposed by the construction poles. As it does not anticipate for this step, an error of 25cm is recorded at that point.
The transition between phases B and C (from 7 to 8.5m) generates an equivalent overshoot (30cm). At this transition, the robot has to turn on itself: the edge detection is then changing quickly and the robot cannot adapt instantaneously its position. After the robot is correctly oriented, it can speed up and then converge to zero with the three approaches, even if model predictive control is still slightly more accurate. This follows from the anticipation of edge variations, allowing the robot to stay closer to the set point related to the detected edge. This anticipation also permits to smooth the control variables and then limit the speed reduction when large  Figure 6.
One can indeed see in Figure 6 that both control laws using anticipation (feedforward and model predictive control) are able to foresee the big curve imposed by the transition between phases B and C (around 8m). Even if the velocity is reduced, it does not go to zero. On the contrary, reactive control does not anticipate for the curve variation and an abrupt variation of heading is then required. As a result, the robot has to stop in order to decrease the heading error. This explains the important error of -20cm recorded using this control law at abscissa 9.2m, see Figure 5. For skid-steered mobile robots, the proposed predictive control law permits to ensure a high level of accuracy thanks to the anticipation of edge variations and enhances as well the stability of the tracking.

C. Car-like mobile robot results
Let us now consider the results related to the car-like mobile robot in the outdoor environment shown in Figure 4(b). In this configuration, the robot cannot turn on itself (i.e. turning without a longitudinal velocity). Since the target velocity is 0.8m.s −1 , the harsh curve is difficult to track due to the steering angle saturation. Reactive control (4) is indeed unable to follow the edge and tends to collide the construction barrier. This can be noticed in Figure 7, where the lateral error e y (s) for this test is reported in blue dotted line: during the tree following (up to curvilinear abscissa 13m), the robot converges to the desired distance y d . Nevertheless, after 13m the robot does not turn sufficiently to maintain the error close to zero and the error rises up to 1.5m. The robot then stops as it is about to collide the barrier. On the contrary, the predictive control proposed in this paper succeeds in preserving a reduced overshoot when the robot is in the harsh curve imposed by the barrier: in Figure 7, the result related to the predictive control is reported in magenta plain line. Before 13m, one can see the convergence of the error to zero and next a transient overshoot of 0.4m is recorded when the curve appears. This proposed approach permits to achieve harsh maneuvers, without colliding the edge to be followed.
In order to highlight the benefits of the proposed predictive control with respect to a feedforward approach, the results related to this latter control (7) are reported in red dashed line in the same figure. Just before the curve (at 13m), the robot starts turning in advance and consequently an overshoot inside the curve appears: the robot moves aside from -0.5m.
Moreover, during straight line parts, the feedforward anticipation of the robot orientation generates an oscillating behavior and then an inaccurate tracking. This can be checked in Figure 8, where the same control has been used to achieve tree following when the construction barriers are removed. The robot has then to follow an almost straight line, even if the irregularities of the trees generate some noise. One can see that the feedforward approach is not as stable as both reactive and predictive approaches, leading to errors up to 0.6m when the reactive and predictive controls stay accurately around a null error, with a more stable behavior for the proposed predictive approach. Table II shows the mean and standard deviation of the lateral error e y (s) during these last three tests and highlights the very satisfactory results achieved by the proposed predictive control strategy in this straight line following scenario. Its accuracy in harsh curve following had been demonstrated in Figure 7 above. In this paper, a generic predictive control framework is proposed for the problem of edge following, here detected thanks to a lidar. It permits to ensure a stable and high accurate tracking by anticipating for huge variations of curvature. This enables to follow an important collection of structures, even the structures difficult to track because of robot limitations (in particular, the radius of curvature of carlike robots). The genericity of the proposed algorithm gives the possibility to consider in the same way the control of different kinds of robots. In the proposed approach, two steps are considered to ensure the accurate convergence of the robot at the desired distance from the edge to follow. The first step is dedicated to the computation of the desired heading for the robot in order to converge to the targeted lateral deviation along a distance of prediction. This desired heading is computed thanks to a model predictive control approach, as it minimizes the lateral error along the detected edge, locally approximated as a second order curve. Once the optimal desired heading is computed, the yaw rate is controlled. A convergence with respect to time is considered (particularly interesting for a skid-steered robot, since it can turn on itself) or with respect to the traveling distance (particularly interesting for car-like mobile robots, since it permits to avoid a singularity at null speed). Such an approach permits to separate the lateral and longitudinal dynamics, allowing to control independently the robot's speed and then modulate the velocity to enhance turning capabilities.The efficiency of the proposed control law has been highlighted through full-scale experiments with two types of robots and in two different configurations (using different kinds of structures and environments). The results demonstrate the capability of anticipation and the accuracy that can be reached thanks to the model predictive approach. If variations in the edge to be followed are an important perturbation, the terrain conditions are also to be accounted for edge following at higher speeds. Future works are focused on the observation of grip conditions, compatible with only the edge detection and no additive exteroceptive sensors, in order to preserve the accuracy at high speed when moving on uneven surfaces with car-like mobile robots.