Trajectory Tracking Nonlinear Hybrid Control of Automated Guided Vehicles

. Automated guided vehicles (AGVs), so necessary in industrial environments, require precise control of trajectory tracking to make accurate stops at logistics stations, such as loading stations, or to pick up or drop of trolleys, pallets, or racks. Tis paper proposes a hybrid control architecture for trajectory tracking of a hybrid tricycle-diferential AGV. Te control strategy combines conventional proportional integral derivative (PID) control with advanced nonlinear Lyapunov control (LPC). Te LPC is used for trajectory tracking while the PID is used for speed control of the robot. Te stability of the controller is demonstrated for any diferentiable trajectory. When a PID optimized with genetic algorithms is compared with the proposed controller for several trajectories, the LPC outperforms it in all cases.


Introduction
Automated guided vehicles (AGVs) are used in industry to replace conveyors and manned industrial trucks.Tey provide more fexibility than other types of transportation for logistics and production applications.Tey are safer and more efcient than manned industrial vehicles, and they improve the quality of the processes where they are implemented [1].Te digitalization of processes and the industry 4.0 paradigm have driven its deployment in the industrial sector [2].
For these AGVs to develop their full potential, it is necessary to incorporate control systems that allow precise tracking of trajectories.On the one hand, they should not divert the defned routes so as not to cause safety problems, process failures and production stops [3].On the other hand, they need to be very precise in following the trajectories to make stops at stations, for example at charging stations (so that there are no problems with the brushes or charging pads) or when they are going to pick up or drop of a trolley, a pallet or a rack [4].
Today, most of these vehicles use conventional PID controllers [5], although some research show that intelligent controllers are more and more used, being a fact that such implementations in industry do not occur at the same speed as in other felds [6].Te conventional controllers have proven to be very efective and versatile in diferent applications.However, it is well known that they have certain limitations for the control of nonlinear systems.In the case of AGVs, the trajectories described in logistics applications can be nonlinear, and even more, sometimes they must cope with non-linear efects.So, it is interesting to explore other advanced techniques for the design of controllers, such as intelligent algorithms or those based on Lyapunov theory.
In this work, a nonlinear controller based on Lyapunov (LPC) is proposed for AGV trajectory tracking.Te controller is tested in simulation with a hybrid AGV that combines the tricycle and diferential kinematic models.Tose models represent a real AGV, the Mouse AGV developed by Asti Mobile Robotics.Tis AGV is quite common in the industry due to its versatility and performance although it is not usually considered in the literature because its model is quite more complex than a diferential robot [7].Te new controller is compared with a trajectory tracking PID regulator optimized with genetic algorithms for different trajectories, and in all of them the LPC obtains better results than the conventional PID in terms of precision in following the trajectories.In both control approaches the wheels speed control is performed with the same conventional PID controllers.
Te main contributions of this work can be summarized as follows: (i) A hybrid control architecture for mobile robots has been proposed.Tis control strategy combines nonlinear Lyapunov control with conventional PID controllers.(ii) Lyapunov's control law is based on the kinematic model of the vehicle and can be adapted for diferent types of mobile robots.(iii) Te stability of the proposed controller has been demonstrated.Following Lyapunov theory, it is proven that the controller is stable as long as the reference trajectory is diferentiable.(iv) Te controller has been evaluated with 3 diferent trajectories: circle, ellipse, and lemniscate.Tese trajectories are common in the industrial applications of these vehicles [3,8].
Te rest of the paper is organized as follows.In Section 2 some related works are commented.Te model of the AGV is described in Section 3. Section 4 presents the hybrid control architecture and proves its stability according to Lyapunov's theory.Simulation results are discussed in Sections 5 and 6.Te last section is dedicated to the conclusions and future works.

Related Works
Tere are diferent studies focused on the control of an AGV in trajectory tracking and trajectory planning.Te recent review by [9] presents diferent methods such as PID, sliding control, fuzzy logic combining with neural networks, model predictive control, backstepping techniques, among other, to compensate for lumped disturbances on the path tracking during the movement of an AGV.A systematic literature review about the position control of AGVs is presented in [10].In this case the principal focus is on the control strategies used in the AGV position control problem, together with the mathematical model considered, the sensors and guidance system used, and the maximum payload of the vehicle and operation under diferent load conditions.
Studies on AGV trajectory tracking usually concentrate on controlling the AGV to minimize the guidance error for a defned trajectory.It is difcult to deal with the efects of nonlinearities present in the trajectories during AGV tracking of the reference path because they are implicit in the trajectories and afect the control of the guidance error.To address this problem, diferent techniques have been applied, some coming from the felds of artifcial intelligence or machine learning, or from the feld of nonlinear control such as sliding mode control or Lyapunov based control.
To mention some examples, in [11], a tracking controller for automatic guided vehicles (AGV) based on a kinematic model is proposed to follow a desired trajectory using Lyapunov method to provide robustness against load disturbances and sensor noise.Zhang et al. proposed a Lyapunov model-based predictive control method for the AGV path following problem [12].Te predictive path following the control method is restricted by the Lyapunov function, which guarantees the stability of the AGV motion control.Te controller is constrained by the Lyapunov stability criteria to prove the local and global convergence of the control system.In [13], the authors propose the design of an adaptive controller of a mobile robot for trajectory tracking, performing the stability study by applying Lyapunov's theorem.In [14], the authors perform an analysis of the trajectory tracking control using a Lyapunov function that guarantees the global stability of the system based on the kinematic model.For this purpose, they use as a nonlinear control technique the backstepping, designing a trajectory tracking controller of the AGV with nonholonomic constraints; this study is performed for diferent trajectories.Another interesting article is the one by [15], where based on a kinematic model of an AGV wheeled parking robot, a sliding mode controller is designed with a Lyapunov direct method and an improved fast stationary power approach law is then applied.Simulation of linear and circular trajectories are used to demonstrate the efectiveness of this approach.
In the paper by [16], the dynamics and kinematics models of a four-wheel steering AGV were established, and the Lyapunov direct method was used to construct a trajectory tracking controller with global asymptotic stability.Besides, an adaptive particle swarm optimization (PSO) algorithm was applied to optimize the control parameters of the controller.Te proposed control approach was compared with an adaptive model predictive control under simulated working condition of moving centroid giving better results regarding trajectory tracking accuracy.
Others research works use the sliding control approach as an efective method for nonlinear systems, with fast response and insensitivity to parameter changes and external disturbances.Jiang et al. address the AGV trajectory following control problem with nonholonomic constraints by proposing a sliding mode control approach [17].Tis work analyses the AGV motion characteristics and designs a backstepping sliding mode control with a ranging law.Tis range law obtains the convergence rate of tracking errors.In addition, with the sliding mode controller, it aims to strictly guarantee the asymptotic stability of the tracking deviations.It is applied to an AGV which structure consists of two 2 Complexity actuated wheels and two passive wheels, and the front wheels mainly support the body of the mobile AGV, whereas the rear wheels drive the vehicle.In [18], the authors design a robust controller for trajectory tracking of a two-wheeled mobile robot by applying a second-order sliding mode control methodology to ensure the continuity of torque input and robustness against disturbances.Te designed sliding mode control smooths out the commutation term.In [19], the authors defne the kinematic and dynamic models of the autonomous guided vehicle and propose a design of a closed-loop control to realize trajectory tracking.Tey design a sliding mode control based on an improved control law to control the guidance error of the AGV.Taghavifar and Mohammadzadeh [20], using a two-degrees-of-freedom bicycle model, propose an integral backstepping control that is hybridized with a terminal sliding mode control method to enhance the lateral path-tracking performance of the multilevel speed AGV.Te Lyapunov stability theorem is employed to guarantee the global asymptotic stability of the closed-loop system and the convergence of tracking errors.Model predictive control is another approach that has been used for autonomous guided vehicles.Te paper by [21] defnes a control scheme that consists of three parts: a referential path, a model predictive controller (MPC) controller, and a kinematic model of a two-wheel diferential driving AGV.Simulation control based on MPC is proposed and the simulation control experiment is carried out in the robotic operative system (ROS).Te MPC controller adopts a quadratic programming method to obtain the optimal linear and angular velocities as the output to control the AGV.Te work by Liu et al. [22] proposes a real time nonlinear MPC control method that considers both tracking accuracy and lateral load transfer limitation for heavy duty AGVs.In this case, the AGV with a four-wheel-steering four-wheel-driving structure is simplifed into the wellknown bicycle mode.In [23], the authors develop an adaptive learning MPC (ALMPC) scheme for the AGV trajectory tracking problem with input constraints.Tis article considers a general AGV with two diferential driving wheels subject to both the parametric uncertainty and external disturbances.A lemniscate trajectory is used to show the robustness of the method.Some intelligent techniques have also been used to enhance other controllers or to implement some control elements.Te paper by [24] designs a fuzzy logic controller for a 16-wheel heavy-duty AGV that is simplifed as a twowheel AGV model.Simulation of circular and straight trajectories prove a good tracking by the AGV.In [4], an intelligent hybrid control scheme that combines reinforcement learning-based control (RLC) with conventional PI regulators is proposed.Te PI regulators are used to control the speed of each wheel while the input reference of these regulators is calculated by the RLC in order to reduce the path tracking guiding error and to maintain the longitudinal speed.In addition, the PID regulators have been tuned by genetic algorithms.Another example is found in [25], where four tuning methods: Ziegler Nichols, empirical, particle swarm optimization (PSO), and beetle antennae searching (BAS) are applied to adjust the parameters of the PID that controls the AGV platform.Results are compared in four paths including the circle, ellipse, spiral and 8-shaped paths.Te paper by Binh et al. [26] proposes a solution for an AGV robot to efectively monitor a moving object using deep learning and follow it.It is based on a model of a fourwheeled self-propelled robot vehicle that is built and that can adaptively track the speed and direction of a human's movements.Similarly, in [27] an active tracking system and a control algorithm are implemented for a person-following real industrial AGV.Te algorithm uses a LIDAR sensor to detect and track the target.
Tis brief review of some related works shows that most authors agree that AGVs must have capabilities provided by nonlinear control techniques to address the efects of nonlinearities present in trajectories or other intrinsic efects of the vehicle, such as wear or friction.Although there are some studies in the scientifc literature on nonlinear control methods applied to trajectory tracking of AGVs, the main diferences with the work here presented is that in this paper the stability is analyzed, it deals with a general model of a hybrid tricycle diferential industrial vehicle, not just a diferential robot as most of them, and that the control has been tested including some non-linearities such as the friction in the wheels and in the drive unit.

Modelling of the AGV
In this section the model equations that describe the physical behaviour of a hybrid diferential-tricycle AGV are described.Briefy, the AGV is composed of a traction unit that functions as a diferential mobile robot, connected to the body of the AGV through an axis on which it pivots.Te AGV body kinematics follows the movement of a tricycletype vehicle, but steering control is performed by the drive unit itself rather than by the front wheel of the tricycle.Te mathematical model follows the equations described in detailed in [1]. Figure 1 shows a schematic of the AGV in the (X, Y) plane.
Te dynamic equations are based on the Lagrange-Euler approach (1) and (2) [1].Te efective torque on the right and left wheels of the traction unit (1) and the system equations that describe the angular accelerations are given by Complexity where the translational and rotational frictions are described by ( 3) and (4), respectively.
On the other hand, the kinematic equations are obtained as the combination of a diferential and a tricycle vehicle.Equations ( 5)-( 8) allows to obtain the position and orientation of the vehicle.
Te vehicle is subjected to kinematic constraints to avoid the winding of the cables and the slippage (91011):

Hybrid Control Architecture
As seen in equation ( 2), which models the dynamic of the system, the relationship between the torque (M eR , M eL ) and the acceleration ( € θ R , € θ L ), and thus with the speed ( _ θ R , _ θ L ), is mainly linear.Tere are only small nonlinearities related to the friction.Terefore, the control of the wheel speed by adjusting the torque can be efciently solved by PID regulators, whose ability to control linear systems has been widely demonstrated.
On the other hand, in equations ( 6) and ( 7) it is possible to observe that the sinusoidal functions introduce nonlinear behavior in the kinematic model of the vehicle.In addition, the trajectories are other sources of nonlinearities.Tese nonlinearities appear in the trajectory tracking control, that in this case is implemented so the references for the angular and the longitudinal speed (w, u) are generated to minimize the tracking error.Terefore, the trajectory tracking control is solved by the LPC strategy which has proven efcient in nonlinear control.
Terefore, the idea of this proposed control architecture consists of combining the following controllers: (1) Two conventional linear PI controllers, to control the speed of each wheel, right and left, of the traction unit.(2) A controller based on the Lyapunov stability method to deal with trajectory tracking control.
Figure 2 shows the architecture of this hybrid control system where the LPC and the PI controllers can be identifed.
Te variables involved in the speed control (PID) are: Tese desired position and orientation are used to calculate the error (X e , Y e , ∅ e ), that is the diference between these desired values and the current position and orientation (X r , Y r , ∅ r ).
Te functional description of this control strategy is as follows.Te PI controllers of the left and right wheels have the function of adjusting the input torque of the motors, M R , and M L , respectively, so the AGV can follow the speed reference of each wheel Tese speed references of each wheel are obtained by considering the inverse kinematics of the drive unit of the AGV.
Te inverse kinematics module receives both, the reference angular velocity w and the reference longitudinal velocity u obtained by the LPC controller, transforming them into reference velocities for each wheel Te LPC controller receives as input the position and orientation error, the diference between the position and orientation of the trajectory generated by the trajectory planner and the output position and orientation of the AGV Complexity model.Te reference longitudinal velocity v refd (of the system as a whole) confgured in the trajectory planner module is used to sample the trajectory to generate the position and orientation that has to be tracked.In this way, the reference longitudinal velocity is included in the control strategy.
With this control strategy, both the reference longitudinal velocity u and the reference angular velocity w are generated by the LPC control ensuring the stability, so that the AGV can follow the path predefned by the path planner correctly and, at the same time, solve both the v refd velocity profle tracking problem and the tracking control to minimize the error in the path, making both adjustments simultaneously and in real time.
It is important to remark that the speed profle tracking and trajectory tracking settings must be done simultaneously because they are interrelated and coupled in the AGV, and with this architecture the intention is to achieve that goal.
It is also noteworthy to note that v refd and u are diferent signals.Te input of the path planner is v refd , the reference longitudinal velocity.Tis speed is specifed by the user as it is intended that the robot follows a determined speed profle.Tis speed is used by the path planner to sample the desired points of the trajectory and this way to obtain the points (X d , Y d , ∅ d ).On the other hand, the outputs of the LPC, u and w, are generated to reduce the tracking error to zero.If the AGV perfectly follows the trajectory, the output u of the LPC would perfectly match v refd .However, there is always a small tracking error.In other words, the output u of the LPC asymptotically tends to follow v refd .
Tis control architecture can be formalized by equations. he

Complexity
Te inverse kinematics model is calculated by equation (14).Tese expressions are obtained from the kinematic model of the diferential vehicle (5).Substituting the current speed by its reference in the equations of the angular and longitudinal speed, the equation of the inverse kinematics ( 14) is derived and then it is possible to obtain equation (18).Tis explains how reference angular velocity and the reference longitudinal velocity are obtained from the inverse kinematics model.
Te tuning constants of the PI speed controllers were adjusted by genetic algorithms (GA).Te equation ( 19) was used as ftness function.Te confguration of the GA was as follows.Te size of the population was set to 50 individuals, the crossover fraction was set to 0.8, the mutation rate was 0.2, and the elite size was 5%.Individuals were randomly initialized.
4.1.Mathematical Description of the LPC.Te control objective is formulated directly in the trajectory space.Te goal is that the vehicle must follow the desired motion in the plane of the trajectory to be followed.
In this industrial robot, the kinematic model is defned as a function of longitudinal velocity u and angular velocity w, with the point located at the center of the axle of traction unit (x h , y h , ∅ h ), as represented in Figure 3.It can be expressed by.
Te matrix that describes the kinematic model of equation ( 21) is not invertible.However, this is a requirement to apply the state feedback technique to design the control low.Tus, to make it invertible, the orientation of the diferential unit is not considered.In this way, one row of the matrix of the kinematic model is removed, obtaining a square and thus invertible matrix.
A point (x hp , y hp ) located in the perpendicular axis to the axle of the wheels at a distance called "a" is defned (see Figure 3).Tis point of the traction unit will follow the path.Te Jacobian matrix of the kinematic model at the point displaced from the wheel axis a distance "a" will be used.For this purpose, it is considered that there is no lateral displacement.
Tis point (x hp , y hp ) is given by Te derivative of this point is.
Tese equations can be expressed in matrix form As said, the matrix J must be invertible; therefore, its determinant must be diferent from zero.To ensure this, the distance a must be also diferent from zero.In this work the value a � 0.0 8 cm has been set, without losing generality.
By applying the state feedback, the control law is defned as follows: Tose equations illustrate the design of J for a diferential robot unit.But this control law can be applied to diferent types of robots just updating matrix J.For instance, if the traction unit were a tricycle, equations ( 23) and ( 24) must be updated and therefore, so must the J matrix.
In this case the point (x hp , y hp ) is given by equations as follows: where c is the steering angle of the steering wheel.Now let us defne the auxiliar control signals: u 1 � u cos(c) and u 2 � u sin(c).Ten equations ( 27) and (28) can be also expressed in a matrix form (29), which is equivalent to (25).
Tus, the same control law (26) used for the diferential traction unit is also applicable to the tricycle case, but it is necessary to consider that the J matrix has to be updated.It is noteworthy to remark that in this case the control law generates the signals u 1 and u 2 .
From signals u 1 and u 2 , the control signals for the tricycle u and c are obtained by  Complexity Tis process can be applied for other robots with different kinematic confgurations to obtain the equivalent J matrix and control law.

Study of the Control Law Stability.
To carry out the stability analysis, the AGV is assumed to perfectly follow the reference, so he � [0 0] T .Tis way it is possible to express the relationship between the velocity vector _ h of the AGV and the reference vector u Ref that is the output from the Lyapunov controller by Tis expression can be considered correct if a perfect tracking of the AGV velocity _ h is assumed, that is, without errors.Tis way the control law cancels the J matrix.
A Lyapunov candidate function given by ( 34) is proposed to demonstrate the stability of the control law.Tis function is a positive defnite function V ≥ 0.
As K is positive defned, _ V is negative defned, and this implies that the system with this control law is locally asymptotically stable (LAS).
When t ⟶ ∞, then V ⟶ ∞, therefore the system also is globally asymptotically stable (GAS).It is noteworthy to remind once again that the trajectories must be derivable, which is usually the case of real trajectory of these industrial vehicles.
As equations ( 25) and (29) are equivalent as well as ( 26) and (30), the study of the stability according to Lyapunov is the same for diferential or tricycle traction units.

Simulation Setup
Te architecture of Figure 2 with the Lyapunov stability controller (LPC) has been validated in simulation with the model of a hybrid AGV with the parameters listed in Table 1.Te results have been obtained using Matlab software.Each simulation runs for 40 s.
Te values of the parameters used in the simulation that correspond to a real AGV, the commercial Mouse AGV of Asti Mobile Robotics, are shown in Table 1 [1].
Te application of the equations derived in the previous sections can be implemented by an algorithm which pseudocode is shown in Algorithm 1.Given a set of known motor torques (M L (t i ), M R (t i )) in t i ∈ t 0 , t 1 , . . ., T sim  , this algorithm can be run in open loop, obtaining the evolution of the state variables: For closed-loop execution, as it is part of the pathfollowing control strategy, the function Controller() must be substituted by the expression of the function used to control the system in practice.In our case, the implementation of the controllers is explained in Section 4.

Trajectories Evaluated.
To validate the proposed hybrid control strategy, three diferent trajectories have been used: a circle (Figure 4), an ellipse (Figure 5) and a lemniscate (Figure 6).Tese are characteristic curves that can be found in the workspace where AGV performs logistics operations. Circle: x(t) � a cir cos(t), (37) For this circular trajectory, a cir is the radius.Te kinematic constraints of the AGV are considered, so trajectory tracking becomes more difcult as the radius becomes smaller.If the curves are very sharp, the AGV could leave out the circular trajectory.After several simulation tests with the circular trajectory this parameter is set to a cir � 0.7 m. Ellipse: In the ellipse trajectory, a eli and b eli are the semi-axes of the ellipse.Again, due to the kinematic constraints of the AGV, the trajectory tracking becomes more difcult as the semi-axes become smaller.If they are too small, the AGV could abandon the trajectory.After several simulation tests, the selected values are (a eli , b eli ) � (1.4,0.7) m. Lemniscate: Complexity  Complexity 11 In the lemniscate trajectory, a lem is the width of the curve.After several simulation tests, the value of a lem is set to 1.6 m.

Trajectory Tracking Conventional Regulator Used for
Comparison Purposes.As already explained, in these commercial vehicles the guidance error controller is usually a PID.Terefore, a comparison of the proposed Lyapunov stability controller with a PID controller given by ( 43) is performed.
Te PID parameters [K p , K i , K d ] are tuned with the following procedure.A simulation scenario is created with Simulink software, considering the complete dynamic model of the AGV.Te guidance error will be obtained for three diferent trajectories, namely circle, ellipse, and lemniscate.For each trajectory, the gains of the PID have been optimized with genetic algorithms.
Equation (44) was used as ftness function of the GA.T sim denotes the total simulation time when the AGV correctly completes the simulation without losing its track.e MAX represents the maximum assumable error, in this case this value was set to 40 cm.Tis ftness function is piecewise defned.Te frst row is used to ensure the AGV completes the simulation without leaving out the route.Te second row is used to reduce the tracking error to zero.
Te confguration of the GA is as follows.Te size of the population was set to 50 individuals, the crossover fraction was 0.8, the mutation rate was 0.2, and the elite size was 5%.Initial individuals were randomly initialized.Te PID tuning parameters obtained during this optimization are shown in Table 2.
It is important to correctly tune the gains of the PID, if the gains are set with the values of Table 2, the AGV does not looses the track.However, poorly tuned gains can make the AGV to lose the track as shown in Figures 7-9.It is assumed that the AGV loses the trajectory when the tracking error is larger than 40 cm.When this event raises the simulation is stopped.
To summarize, the here proposed control strategy uses a LPC for trajectory tracking control and a PI regulator for speed control, that is, LPC + PI.It has been compared to a conventional PID controller for trajectory tracking that has the same PI for speed control, that is, PID + PI.In both cases the gains of the PI speed controller have the same values.

Comparison Metrics.
To make a comparison of the diferent controllers in a quantitative way some metrics that measure the performance when tracking the diferent reference trajectories are defned.Te metrics applied for the evaluation of the control strategies are expressed by equations.
MAX � MAX

Discussion of Simulation Results of Trajectory Tracking Controllers
Te two AGV tracking trajectory controllers, PID and LPC, have been simulated for the three defned paths: circle, ellipse, and lemniscate.Te AGV reference longitudinal velocity v refd , is the absolute value of a sinusoidal signal with amplitude 1 m/s.Te simulation lasts 40 s, although it ends if the AGV completes or leaves out the trajectory.Figures 10-12 show the results obtained for the trajectory described by the AGV drive unit and the guidance error of the two controllers, LPC and PID.Te color coding is as follows.In the trajectory tracking plots, the reference trajectory is the black line, the one followed with the LPC controller is the blue line and the one followed by the AGV with the PID controller is in red.In the tracking error plots on the x-axis and y-axis, the Lyapunov controller error is represented in blue and the PID error in red.show the yaw rate, the lateral acceleration and the longitudinal velocity obtained when the LPC and the PID are applied.Te color coding is as follows.Te results obtained when the LPC is applied are shown in blue, and in red for the PID.In the fgure that illustrates the longitudinal velocity, the reference for the velocity v ref d is depicted in black.
For the circular trajectory, we consider that the AGV vehicle is initially located at the point (0.7, 0) and moves counterclockwise.Figure 10 shows the simulation results for this trajectory.It can be seen (Figure 10(a)) how the LPC trajectory and the reference trajectory are very close.With the PID controller, a greater distance to the reference is observed.In the x and y axis tracking error graphs it can be seen that the errors of the LPC controller are closer to zero and are much smaller than with the PID (Figure 10(c)).
In Figure 13 it is possible to see how the yaw rate is larger at the starting of the simulation.Tis may be caused because the AGV needs to be aligned with the trajectory.After this, the yaw rate tends to stabilize around a constant value.Tis result is logic as the curvature in the circle is also constant.On the other hand, as the turning radius is constant the lateral acceleration has a similar shape to the speed.Finally, it Figure 10(c), it is possible to observe how the controller correctly follows the speed profle sinusoidal in absolute value.

Complexity
For the elliptical trajectory, the AGV starts at the right side of the ellipse, at point (1.4,0), and moves counterclockwise.In Figure 11, the simulation result for tracking the elliptical trajectory is shown.Te LPC controller tracks the reference trajectory better than the PID, especially at the ends of the ellipse, where they overlap.Te PID maintains a nearly constant and larger error than with the LPC over the entire ellipse.Te error of the LPC controller remains close to zero, presenting smaller error in amplitude than the PID in both the x-axis and y-axis, especially in the x-axis where the error amplitude with the LPC controller is much smaller.
Te large value of yaw rate at the start of the simulation is also observable in the case of the ellipse in Figure 14.However, in this case the yaw rate does not tend to a constant value as the curvature changes along the trajectory.Like in the error signal, the values show a repetitive pattern as the trajectory is repeated several times.Te lateral acceleration changes with the longitudinal speed, when the longitudinal speed becomes zero, the lateral acceleration also does it.Te changes in the turning radius also afect this value, when the AGV moves in the zones of the ellipse where the radius decreases the acceleration grows.Finally, as in the case of the circular trajectory, the speed profle is correctly followed.
For the lemniscate trajectory, the AGV starts at the right end, at point (2.25, 0), and moves counterclockwise.Figure 12(a), shows the simulation results of this trajectory tracking with the PID controller and the LPC.Te trajectories are very similar, indeed both controllers track the reference trajectory quite well, although the LPC controller is slightly better as shown in the guiding errors.In addition, the PID controller presents a disturbance at the beginning of the AGV motion, which causes the error to present large peaks (Figure 12  18 Complexity Yaw rate in Figure 15 reaches smaller values than in previous trajectories, this is due to the in the middle of the lemniscate the curvature is very low, and the AGV behaves like in a straight line.Another interesting result is that in this case, the yaw rate takes positive and negative values.Tis is explained because in the frst half of the lemniscate the AGV travels counterclockwise, and the second half clockwise.Regarding the lateral acceleration, as expected the zones of the trajectory with a low curvature, mainly the center of the lemniscate, experiment the lowest lateral acceleration.Conversely in the zones with larger curvature the acceleration tends to be larger.Again, the controller follows perfectly the sinusoidal speed profle. Te values of the metrics are shown in Table 3, where the columns present the mean absolute error (MAE), root mean squared error (RMSE), the standard deviation, the maximum value of the guidance error, and the yaw angle rate (YAR) obtained when the LPC or the PID are applied to the reference trajectories.
Analyzing the results of Table 3, the error values are smaller when the LPC controller is used in the tracking of each of the reference trajectories.Lyapunov controller gives good results in curved trajectories and with varying radius.If we look at the results of the table by type of trajectory, the lemniscate is the one with the smallest error for both, the PID and LPC controllers.
If we make a comparison between LPC and PID for each type of trajectory, the LPC controller gives better results.For the ellipse, the MAE with the LPC shows an improvement by 65.22% with respect to the PID, the RMSE improvement is 65.38%, 69.15% improvement of the STD and regarding the MAX metric, the LPC improves by 65.52%.Complexity

Complexity
Summarizing, the Lyapunov LPC stability controller outperforms the PID for the guidance control of the tested trajectories.

Sensibility Analysis: Infuence of the Gain of the LPC.
An analysis of the efects of varying the gain K of the Lyapunov controller has been carried out.Te paths followed by the AGV for diferent LPC gains when tracking each of the proposed trajectories are studied.Te simulation period is 40 s.Tree values of K have been considered: less than 1, 1, and bigger than 1.
In the following fgures of the trajectories and the errors, the AGV trajectory tracking response with the LPC controller is represented in blue for K � 1.5, in green for K � 1 and in red for K � 0.5.Te reference trajectory is shown in black.
Figure 16 shows the efect of the variation of the Lyapunov control gain K when it follows the circular trajectory.Te AGV starts at (0.3, 0), outside the circle, and moves counterclockwise.
It can be observed in Figure 16 that for K � 1.5 (blue line), the variations at the beginning of the AGV movement are larger but it quickly follows the circular reference (black line).Reducing the LPC gain K � 1 (green line) makes the path to join the reference shorter.With a LPC gain smaller than 1, i.e., K � 0.5 (red line), the response is even quicker, but the errors are bigger.In fact, there is a stationary error with all the values of K tested (Figure 16, right), being the LPC with K � 1.5 the more stable and with less stationary error.
Figure 17 shows the efects of varying the gain K of the LPC when the AGV follows the elliptical trajectory.Te AGV starts at (0.7, 0), outside the path, and moves counterclockwise.
Again, the larger the gain of the LPC the slower it is to join the reference.But observing the error (Figure 17(a)), the LPC with the smallest gain K � 0.5 requires more time to reach the reference and it presents the more unstable response, with oscillations.Te green line (K � 1) shows a peak at the beginning and then it also presents an oscillatory stationary error, although the amplitude of these oscillations is smaller than with K � 0.5.Finally, the solution with K � 1.5 (blue line) is the more stable although it still presents small error oscillations.Te stationary error is bigger than with the circular trajectory.
Figure 18 shows the response of the AGV following the lemniscate trajectory with the three values of K. Te vehicle starts at (1.2, 0), outside the path, and moves counterclockwise.
As in the previous trajectories, the larger the K the shorter the time it requires to reach the reference trajectory (Figure 18(a)).Again, there are small perturbations at the beginning of the movement.In this case, the LPC makes the AGV follow the trajectory with a very small error, that presents smooth oscillations, but it can be considered stable.
In conclusion, it seems that Lyapunov controller K values bigger than 1 gives better response as the stationary error is smaller than with smaller values of K, and the response is also faster.

Conclusions and Future Works
In this article, a control architecture is proposed that combines a Lyapunov controller for tracking the trajectory of an AGV and PID controllers.Tis hybrid conventional and advanced control scheme has proven very efcient in industrial and engineering applications.
Te objective of proposing an LPC system is to guarantee the stability of the controller and provide it with robustness Complexity 21 against non-linearities, such as those related to the trajectories and friction experienced by the wheels or the traction unit of the AGV, which brings it closer to reality.Te main advantages of the controller proposed in this paper can be summarized as follows: (i) Te stability of the trajectory tracking is mathematically demonstrated, something that is lacked in most of the papers found in the literature.(ii) Te independence of the tuning of the speed control and the trajectory control that is something that facilitates the design of these controllers.Specifcally, the speed control is tuned adjusting the gains of the PI speed controllers.On the other hand, the tuning of trajectory tracking control is done by adjusting the gain K in the control law.(iii) Te control law can be applied to diferent mobile robots adjusting the J matrix.
To evaluate the controller, a hybrid AGV that combines the tricycle and diferential kinematic models is used, with parameters that correspond to a commercial vehicle.Te LPC has been compared with a PID controller optimized with genetic algorithms when following three trajectories that can be found in the work environment of these industrial vehicles.Te LPC outperforms the PID in all cases in terms of trajectory tracking.
Furthermore, the sensitivity of the LPC has been analyzed for diferent values of its gain, which allows it to be better adjusted.
Among other possible future works, it is possible to highlight the application of optimization techniques to tune the gain of the LPC controller.Te infuence of the changes in friction in the performance of the controller is something that deserves to be analyzed.Finally, the validation of the controller with an industrial AGV prototype could be worth it.

(XFigure 1 :
Figure 1: Traction unit and AGV body [1]. motor torque of the right wheel (output of the right PI speed controller) (ii) M L , motor torque of the left wheel (output of the left PI speed controller) (iii) v R , longitudinal speed of the right wheel (output of the AGV and input of the right PI speed controller) (iv) v L , longitudinal speed of the left wheel (output of the AGV and input of the left PI speed controller) (v) v R REF , reference speed of the right wheel (input of right PI speed controller), it comes from the LPC passing frst through the inverse kinematics of the AGV model.(vi) v L REF , reference speed of the left wheel (input of right PI left controller), it comes from the LPC passing frst through the inverse kinematics of the AGV model.Te variables involved in the trajectory control (LPC) are: (i) u, longitudinal speed reference generated by the LPC.(ii) w, angular speed reference generated by the LPC.(iii) (X e , Y e , ∅ e ), position error (m) and orientation error (rad) with respect to the trajectory to be tracked.Te LPC tries to make these values zero.Finally, the variables that play a role in the trajectory planner are: (i) v refd , reference longitudinal velocity, specifed by the user; it is the one considered to sample the points in the trajectory.(ii) (X d , Y d , ∅ d ), reference position (m) and reference orientation (rad) generated by the trajectory planner.

Figure 2 :
Figure 2: Hybrid control architecture for AGV trajectory tracking with Lyapunov-based controller.
) hd � x d y d   is the vector of the desired or reference position.(ii) h � x hp y hp   is the position vector of the vehicle.(iii) he � [hd − h] � x d − x hp y d − y hp   is the position error vector.Complexity (iv) _ h � _ x hp _ y hp   is the velocity vector of the mobile robot.(v) _ hd � _ x d _ y d   is the velocity vector of the reference.(vi)K is a positive defned matrix which determines the gain of the controller.(vii) u Ref � u w   is the reference vector of the control law.Te components are the longitudinal reference speed u and the rotational reference speed w that are the outputs of the LPC.

Figure 3 :
Figure 3: Traction unit of the AGV and displaced point.

Figure 7 :
Figure 7: Tracking of circle with poorly tuned PID (a) and its tracking error (b).

Figure 8 :
Figure 8: Tracking of ellipse with poorly tuned PID (a) and its tracking error (b).

Figure 16 :
Figure 16: Circular trajectory (a) for diferent values of gain K and its corresponding guiding error (b).

Figure 17 :
Figure 17: Ellipse trajectory (a) for each K and its corresponding guiding error (b).

Figure 18 :
Figure 18: Lemniscate trajectory (a) for each K and its corresponding guidance error (b).

Table 1 :
Parameters of the AGV.

Table 2 :
Tuning parameters of the PID for the diferent trajectories.

Table 3 :
Comparison of the controller performance for diferent trajectories.