Skip to main content
Advertisement
Browse Subject Areas
?

Click through the PLOS taxonomy to find articles in your field.

For more information about PLOS Subject Areas, click here.

  • Loading metrics

A new approach of a path-tracking system of a differential drive robot for an arbitrary set of waypoints using sliding mode control

Abstract

Autonomous differential-drive robots are typically controlled to follow a desired path. This path may be defined by a continuous curve or set of waypoints. Few studies have examined cases in which a path is defined by an arbitrary set of waypoints. This paper introduces a new approach to a path-tracking system for an arbitrary set of waypoints using a sliding mode control (SMC) system. This approach is based on a nonlinear kinematic model of the tracking error derived in this research for a differential-drive robot. Based on the derived error model, a sliding mode controller is introduced to drive the tracking error to zero. The stability of the system was also investigated. In addition, the effects of robot dynamics were incorporated into the proposed controller without prior knowledge of the exact parameters of the robot. Simulations were conducted to compare the proposed control system with a widely used approach to demonstrate the effectiveness of the proposed controller in tight maneuvers, particularly at directional discontinuity and/or sharp turns. The proposed technique was verified through real-time experimental tests using a differential drive robot.

1. Introduction

Autonomous robots have a wide range of applications in various fields. These robots are typically used to track desired paths. If paths are drawn as lines and detected by sensors, this is called the line-following approach, as in [1]. For paths defined by smooth curves or waypoints, this approach is called the path-tracking approach. The path is planned based on the environment in which the robot is moving. Path-tracking algorithms are more complex than line-follower systems. A line-follower system can be viewed as a special case of a path-tracking system. In [2], a kinematic model was developed for the path-tracking error of a differential-drive robot. Based on this model, the target velocities are calculated to reduce the tracking error to zero. These target velocities are applied to the robot to track the desired path. However, the effect of robot dynamics was ignored by assuming that the robot was capable of perfectly tracking the target velocities. In addition, the desired path in [2] is a piecewise continuous function of time and not a set of waypoints. Moreover, the proposed controller has a cross-track error (perpendicular lateral distance from the desired path) in the case of a desired path with directional discontinuity. The kinematic controller introduced in [2] is widely used in the literature, as in [3–6]. In [3], a backstepping control approach was introduced to address the dynamics of real robots. In this approach, a dynamic controller was added to achieve the target velocities from the kinematic controller introduced in [2]. The control scheme introduced in [3] has been used widely by several researchers. That is, the target velocities were generated as in [2] and another controller was used to drive the real velocities of the robot to follow the target velocities. Different controllers have been introduced to achieve accurate tracking of target velocities, such as those in [4–6]. In [4], a modified PID controller was used to track the target velocities of a tracked vehicle. However, the proposed controller was not experimentally verified in a real vehicle. In [5], SMC was used to control the robot velocities to follow the target velocities. In addition, fuzzy logic was used to change a certain gain to reduce the chattering effect of the sliding mode control. In [6], a control scheme similar to that in [5] was employed. The control scheme consists of a kinematic controller and an integral SMC as a dynamic controller to deal with robot dynamics and uncertainties. The controller parameters were optimized using sequential quadratic programming (SQP). It was shown in [6] that the performance of the SMC is better than that of the modified PID controller [4]. All former approaches are derivatives of the control scheme introduced in [3]. This type of path tracking is primarily used for continuous, smooth paths. Various approaches have been proposed in the literature [7–12]. All these approaches are for continuous paths. Some approaches use fuzzy-based controllers [8,9]. Nonlinear model predictive control with neural networks was introduced in [10]. Even for discrete reference points, curve-fitting techniques have been used to obtain continuous smooth paths [7,11]. A feedback linearization method was used in [12], in which the derivation of the control laws assumed a differentiable path. A few researchers have introduced waypoint path-tracking algorithms [13–15]. In [13], the path was composed of a smooth polynomial connecting the waypoints. However, in [14], the proposed approach was a point-to-point control technique. The robot is controlled to reach each waypoint. However, no specific path existed between any two successive waypoints. In other words, the controller has no cross-track error measures to eliminate. This case was solved in [15], where the desired path was defined by a set of waypoints connected to each other with straight segments. A modified version of the kinematic controller introduced in [2] was developed in [15] by adding a cross-track error measure to be eliminated using the modified controller. This technique outperforms that in [2] for turns with directional discontinuities. However, another controller must be used to achieve the desired linear and angular velocities calculated using this modified kinematic controller. Moreover, the angular velocity control signal produced by this controller exhibits fluctuations that may limit its applicability in real-world applications. In addition, this controller does not perform tight maneuvers during sharp or directional discontinuous turns.

In this paper, a new approach for the path tracking of an arbitrary set of waypoints is introduced. This approach is based on the nonlinear kinematic model of the differential-drive robot derived in Section 2. An SMC scheme is introduced in Section 3, in which a sliding surface is selected to ensure that the tracking error approaches zero. The effect of robot dynamics is incorporated into the introduced controller. In Section 4, the proposed controller is tested through simulations and verified using a differential-drive robot. Finally, the conclusions of the results and future work are discussed in Section 5.

The main contribution of this research is the introduction of a new control approach for an arbitrary set of waypoints. This approach is based on a single sliding mode control method, taking into account both the kinematics and dynamics of the system. The proposed controller performs tight maneuvers at directional discontinuities and/or sharp turns (where a turning angle is considered sharp if it is ≥ π/2 radians) while accurately following the straight segments connecting the waypoints.

2. Kinematic mathematical model

In this section, the kinematic model of a differential-drive mobile robot is used as a foundation for the proposed path-tracking controller. While the basic pose kinematics rely on standard coordinates transformations the primary focus here is the derivation of a specialized error state model. This formulation, based on cross-track and angular errors, is explicitly tailored for tracking an arbitrary set of waypoints and allows the system to be treated as a single-input model for the subsequent sliding mode control design.

2.1. Standard differential-drive kinematics

The main objective is to drive a differential-drive robot to follow a path defined by an arbitrary set of waypoints, as shown in Fig 1. The robot must tightly follow straight segments that connect the waypoints. Fig 1 shows there are two frames: a fixed frame attached to the ground and a robot frame attached to the robot. The origin of the is located at point, which is in the middle of the distance between the powered wheels. The is rotated with respect to the with pose angle . The angular velocity of the robot is . The linear velocity of the robot is in the direction of the .

thumbnail
Fig 1. Differential drive robot.

All the quantities are functions of time , which is omitted for simplicity.

https://doi.org/10.1371/journal.pone.0357979.g001

The coordinates of the point in the fixed frame are . The desired path is defined as a sequence of desired waypoints in the fixed frame. These waypoints are connected by straight segments. The coordinates of the waypoint in the are . As shown in Fig 1, the cross-track error is the perpendicular distance between the point and the segment connecting the current waypoint and the previous waypoint . The angle between the segment connecting waypoints and and the of the fixed frame is . The distance between point and the waypoint is . The angle between and the in the is .

The linear velocity and the angular velocity are calculated as follows [16]:

(1)

where and are the right and left linear velocities in for the right and left wheels, respectively. The robot moves in the positive direction of the in the . That is, , in other words, both and never simultaneously become negative. If the maximum achievable speed by the powered wheels is then:

(2)

Consequently, both the linear and angular velocities of the robot can be expressed as:

(3)

where is the maximum achievable angular velocity and is the normalized angular velocity; hence, . is the normalized linear velocity where . From Eq. (1) and Eq. (3), we get:

(4)

In the following subsection, a mathematical formulation of the cross-track and angular errors is introduced.

2.2. Proposed kinematic error model

The cross-track error in Eq. (5) is obtained from the dot product of two vectors, and , where is the unit vector perpendicular to the segment connecting the current waypoint and the previous waypoint .

(5)

Whereas the angular error is defined as in Eq. (6), which is a modified version of the angular error in [15].

(6)

From Eq. (5), we get as follows:

(7)

Since and , then from Eq. (7), we get as follows:

(8)

From Fig 1, , then from Eq. (6), we get:

(9)

Then from Eq. (8) and Eq. (9), the proposed kinematic error model, incorporating cross-track and angular errors, can be expressed as follows:

(10)

From Eq. (10) and Eq. (3), the kinematic model becomes a single-input system with input control signal . Based on the kinematic model shown in Eq. (10), a control law is developed in the following section to obtain and as .

3. Proposed path-tracking control system

In this section, a kinematic controller based on the SMC technique is proposed. This controller pushes the system to move on a certain sliding surface in the error state space . This surface is chosen such that the tracking errors vanish with time. Hereafter, time variable is omitted without ambiguity for simplicity. For example, is written as , and so on.

3.1. Control law

The proposed kinematic controller is a sliding mode controller. This controller has a sliding surface in the state space defined as follows:

(11)

where and are the normalized cross-track and angular errors, respectively. and are the normalizing constants for the error and angular error , respectively. and can be interpreted as the maximum allowed errors for both the cross-track and the angular errors, respectively, at which the controller takes the maximum action. and 1/ represent the relative weights of both the cross-track and the angular errors, respectively. Consequently, these relative weights determine which error (cross-track or angular) has a greater impact on and hence on the control output. The error with higher impact will be prioritized for minimization. The proposed controller’s strategy is to push the system states ( and towards the surface . On the surface , both tend to zero as as proven by Theorem 1. Theorem 2 introduces a control law that pushes the states to surface in finite time whenever , ensuring that the states remain on surface . Theorem 3 is similar to Theorem 2 after considering robot dynamics.

Theorem 1: In case of both .

Proof:

In the case of and from Eq. (11), can be expressed as follows:

(12)

From Fig 1, , and substituting Eq. (12) into Eq. (10), the rate of change of the error is given by Eq. (13).

(13)

Let be a Lyapunov function candidate, defined as . Then . Multiplying both sides of Eq. (13) with , we find that and hence, for all Consequently, and hence, from Eq. (12) . Therefore, the proof is complete.

As shown in Theorem 1, for the system is asymptotically stable because the errors vanish as time passes, as shown in Fig 2.

thumbnail
Fig 2. State Plane . In the second and fourth quarters the error . On , and hence, .

https://doi.org/10.1371/journal.pone.0357979.g002

At this point, a control signal is required to push the system to . In Theorem 2, a control law is proposed that pushes the system towards .

Theorem 2: The Control law in Eq. (14) guarantees the reachability of the sliding surface in finite time and remains on it.

(14)

where

Proof:

From Eq. (10), Eq. (3), and Eq. (11), can be obtained as follows:

(15)

Since

Therefore, . We have three cases as follows:

Case 1:

In this case, as shown in Eq. (14), . Therefore, from Eq. (15), we obtain:

Case 2:

This case occurs, when . From Eq. (14), . Therefore,

Case 3: or

In this case . One of the following cases may occur:

  • In the case of (as a special case of when ), since cannot be greater than , therefore must be clipped such that . Consequently, the control signal is set to be , then from Eq. (3), Eq. (15) becomes:
  • In the case of , the control signal is , as shown in Eq. (14). By substituting for in Eq. (15), we obtain:

Since therefore .

Let be a Lyapunov function candidate, where . Then, . At , the initial value of , where is . The time required to reach (is .

In case 1, . is obtained by integrating . Thus, . Therefore, the system states are pushed to in a finite time.

In case 2, . is obtained by integrating . Thus, . Thus, the system states are forced to in a finite time.

In case 3, we have three cases as follows

(16)

In the first case, is obtained from to be , which is a finite time. For the other two cases, in Eq. (16), . Subsequently, by integrating , we obtain .

Therefore, at any instant , the system states are always pushed back to in a finite time. Therefore, the system is maintained on the sliding surface . Thus, the proof is complete.

To eliminate the known chattering phenomenon associated with the sliding mode control technique, the sign() function is approximated as in Eq. (17) [17]:

(17)

where is a small positive scalar.

While the mechanical inertia of the DC motors inherently acts as a low-pass filter against high-frequency vibrations, applying raw discontinuous chattering directly to the motor driver circuits causes excessive wear and inductive heating. Therefore, the continuous approximation in Eq. (17) is utilized to smooth the control reference mathematically, protecting the driver electronics and preventing the excitation of unmodeled high-frequency electrical dynamics.

The proposed path-tracking approach is based on the kinematic model introduced in Eq. (10). In this approach, the states of the system are pushed to move on the sliding surface Theorem 1 shows that tracking errors and approach zero as on the sliding surface. Theorem 2 introduces a control law that guarantees the reachability of the sliding surface in finite time whenever and maintains the system there. In the following subsection, the effects of robot dynamics are investigated.

3.2. The effect of the system dynamics

So far, the effects of system dynamics have been ignored. If the axis of rotation passes through a point sufficiently close to the center of mass of the robot, and the linear and rotational velocities of the robot are not high (specifically limited to 70 cm/s and 10 rad/s, respectively), the Coriolis and centrifugal forces can be neglected. However, these motors are typically DC motors with negligible inductances [18]. The dynamics of the differential drive robot [18,19] coupled with the dynamics of the DC motors can be modeled as follows:

(18)

where and represent the total equivalent mass and the moment of inertia of the robot, wheels, and motors, respectively. and represent the friction and back EMF of the motors for rotational and linear motions, respectively. and are the voltages applied by the controller to the right and left motor, respectively. and are constants that depend on the physical parameters of the motors and the robot such as back EMF and torque constants, armature resistances, masses, moment of inertia, distance between wheels, and wheel radii. Therefore, owing to the dynamics in Eq. (18), the angular and linear velocities require time to reach the required values to maintain the motion on the sliding surface. At the current instant , the normalized linear and rotational velocities are and , respectively. The new linear and rotational velocities corresponding to the voltages newly applied to the motors by the controller are and , respectively. Then the actual velocities and at the instant , where is the sampling period, can be calculated as follows:

(19)

where and represent the linear and rotational dynamics of the robot, respectively. By substituting and from Eq. (19) for and in Eq. (15), respectively. Thus, we obtain the actual , as expressed in Eq. (20), which represents the rate of change in considering robot dynamics.

(20)

Then the control law in this case can be defined as follows:

(21)

The following theorem shows that the reachability of the sliding surface is assured using the control law in Eq. (21).

Theorem 3: The Control law in Eq. (21) guarantees the reachability of the sliding surface in finite time and remains on it.

Proof:

From Eq. (21), we have the following cases:

Case 1:

In this case, from Eq. (21) . Consequently, in the next samples and . Hence, . Therefore,

Case 2: .

This case occurs, when . From Eq. (21), . Consequently, in the next samples and . Hence, , Therefore, .

Case 3:

In this case, no prior knowledge of the exact values of is needed; only the lower bound is required. Because , then / and hence, substituting for from Eq. (21) into in Eq. (20) yields .

Therefore, the system states are pushed to , where the tracking error approaches zero as time approaches infinity.

Let be a Lyapunov function candidate, where . Then, . At , the initial value of , where is . The time required to reach (is .

In case 1: , where . Thus, . Therefore, the system states are pushed to in a finite time.

In case 2: . Therefore, . Thus, the system states are forced to in a finite time.

In case 3: as shown in theorem 2, when it is clipped to be . Thus, we have the following cases:

Similar to theorem 2, in the first case, , which is a finite time. For the other two cases, . Subsequently, by integration .

Therefore, at any instant , the system states are always pushed back to in a finite time. Therefore, the system is maintained on the sliding surface . Thus, the proof is complete.

3.3. Path handling

The desired path is defined by a set of waypoints as shown in Fig 1. These waypoints are connected by straight segments. These waypoints are targeted sequentially. The path handler module shown in Fig 3 calculates and . The angle between the segment connecting the targeted waypoint and the previous waypoint is calculated as follows:

The tracking errors are calculated using Eq. (5) and Eq. (6), respectively. The path handler changes the targeted waypoint using the following algorithm until the last waypoint is reached, where the index of the last waypoint is .

  1. At the beginning, the waypoint index is initiated by setting .
  2. The distance is calculated by .
  3. If () then
    If ( AND ) then

    End
    Elseif ( then

    End
  4. Calculates and

In the next subsection, the entire control system is described.

3.4. Control System

The complete control system is illustrated in Fig 3. The control algorithm can be summarized as follows:

  1. A set of waypoints on the desired path is determined.
  2. Pose Calculation:
  1. a. The speeds of the left and right wheels are measured to calculate the actual angular velocity and linear from Eq. (1).
  2. b. The current pose of the robot is numerically calculated using the odometry equations in Eq. (22), which are required for the microcontroller to calculate the real-time pose from encoder data.
(22)

where and are the direction of the right wheel and left wheel, respectively. The direction equals 1 for forward and −1 for reverse. and are the counts of the right and left encoders, respectively, during the sampling period. The current updated pose is , , and Whereas , , and are the previous pose. The linear displacement corresponding to each pulse is , which equals the reciprocal of the encoder resolution.

  1. 3. Path Handler:
    1. a. Receives a set of the desired waypoints.
    2. b. Determines the current waypoint and calculates the associated errors and angles.
    3. c. Calculates and .
    4. d. Sends , to the controller.
  2. 4. Controller:
    1. a. Calculates the angular velocity from:
      1. i. In the case of ignored robot dynamics, Eq. (14) is used.
      2. ii. When considering robot dynamics, Eq. (21) is used.
    2. b. Calculates the linear velocity from Eq. (3).
    3. c. The desired right and left velocities are calculated using Eq. (1).

In the next section, simulations are conducted to show the effect of the controller parameters and to compare the proposed technique with that introduced in [15]. Subsequently, the proposed technique was tested using a differential robot.

4. Simulation and experimental tests

This section is divided into two subsections. The first subsection 4.1 presents simulations conducted to demonstrate the effects of the controller parameters. Then, the proposed controller is compared with the path-tracking controller in [15] (hereafter referred to as the benchmark controller), which is a modified version of the control approach introduced in [2] (the control approach in [2] is widely used in many recent path-tracking control systems such as [4–6]). In subsection 4.2, the proposed controller is applied to an actual differential drive robot.

4.1. Simulations

Simulations were conducted to demonstrate the effects of the controller parameters and to compare the proposed controller with the benchmark controller assuming that the robot dynamics were ignored. Consequently, the control law of the proposed controller expressed by Eq. (14) was used.

Three simulations were performed to illustrate the effects of the controller parameters . The values of the sampling period, and were 70 cm/s, 10 rad/s, and 1 cm, respectively. First, were set as /18 and 0.01, respectively. The results obtained using the two values of (1 cm and 10 cm) are depicted in Fig 4 and Fig 5. Second, and were set as 1 cm and 0.01, respectively. Two values of (/18 rad and /2 rad) were used to demonstrate the effect of this parameter, as shown in Fig 6 and Fig 7. Third, were set as 1 cm and /18 rad, respectively. The results of setting the parameter to two different values (0.01 and 0) are illustrated in Fig 8 and Fig 9.

thumbnail
Fig 4. The effect of on the controller performance.

https://doi.org/10.1371/journal.pone.0357979.g004

thumbnail
Fig 5. The effect of on cross-track error, linear velocity, direction error, and .

https://doi.org/10.1371/journal.pone.0357979.g005

thumbnail
Fig 6. The effect of on the controller performance.

https://doi.org/10.1371/journal.pone.0357979.g006

thumbnail
Fig 7. The effect of on cross-track error, linear velocity, direction error, and .

https://doi.org/10.1371/journal.pone.0357979.g007

thumbnail
Fig 8. The effect of on the controller performance.

https://doi.org/10.1371/journal.pone.0357979.g008

thumbnail
Fig 9. The effect of on cross-track error, linear velocity, direction error, and .

https://doi.org/10.1371/journal.pone.0357979.g009

From the simulation results, increasing reduces the weight of the cross-track error relative to the angular error, causing the cross-track error to take longer to vanish, as shown in Fig 4. In contrast, a larger decreases the impact of the angular error, leading to a faster disappearance of the cross-track error with an overshoot, as depicted in Fig 6. Moreover, from Eq. (17), sign() is exact when that induces chattering in the angular velocity control signal as illustrated in Fig 9. Due to fluctuations in the control signal, the linear velocity is slower than in the case of , which produces a smoother control signal.

Subsequently, the proposed controller was compared with the benchmark controller. The robot was initially positioned at the first waypoint: , , and rad. The parameters of the benchmark controller are set to 1.51 and 45.84, respectively, as calculated in [15]. The reference linear and angular velocities of the benchmark controller are 70 cm/s and 0 rad/s, respectively. On the other hand, of the proposed controller are 70 cm/s, 10 rad/s, 1 cm, /18, and 0.01, respectively. For both the benchmark and proposed controllers, the sampling period and parameter were and 1 cm, respectively.

As shown in Fig 10–Fig 21, a comparison was made using three paths defined by four waypoints. The robot was required to perform two turns of rad at the 1st and 2nd waypoints. At the 3rd waypoint, the robot performed turning angles of rad as depicted in Fig 10, Fig 14, and Fig 18, respectively. As illustrated in the figures of the three paths, the path of the robot with the proposed controller is very tight compared with that of the benchmark controller at turns with directional discontinuity and/or sharp turns. The proposed controller follows the desired straight segments between waypoints more accurately than the benchmark controller does. In Table 1, the average of the cross-track errors of both the proposed and the benchmark controller are presented. This average was calculated using Eq. (23), where is the sampling period. As shown in the table, the proposed controller significantly reduced the average cross-track error. The maximum absolute cross-track error achieved by the proposed controller was much smaller than that achieved by the benchmark controller, as shown in Table 2. Therefore, the proposed controller outperforms the benchmark controller in terms of maneuvers with directional discontinuities and/or sharp turns.

thumbnail
Fig 11. The angular velocity on the path with an angle of π/4 rad.

https://doi.org/10.1371/journal.pone.0357979.g011

thumbnail
Fig 12. The linear velocity on the path with an angle of π/4 rad.

https://doi.org/10.1371/journal.pone.0357979.g012

thumbnail
Fig 13. The sliding variable on the path with an angle of π/4 rad.

https://doi.org/10.1371/journal.pone.0357979.g013

thumbnail
Fig 15. The angular velocity on the path with an angle of π/2 rad.

https://doi.org/10.1371/journal.pone.0357979.g015

thumbnail
Fig 16. The linear velocity on the path with an angle of π/2 rad.

https://doi.org/10.1371/journal.pone.0357979.g016

thumbnail
Fig 17. The sliding variable on the path with an angle of π/2.

https://doi.org/10.1371/journal.pone.0357979.g017

thumbnail
Fig 19. The angular velocity on the path with an angle of 3π/4 rad.

https://doi.org/10.1371/journal.pone.0357979.g019

thumbnail
Fig 20. The linear velocity on the path with an angle of 3π/4 rad.

https://doi.org/10.1371/journal.pone.0357979.g020

thumbnail
Fig 21. The sliding variable on the path with an angle of 3π/4.

https://doi.org/10.1371/journal.pone.0357979.g021

(23)

Moreover, the angular velocities produced by the proposed controller were much smoother than those produced by the benchmark controller, as shown in Fig 11, Fig 15, and Fig 19. The angular velocity produced by the proposed controller increased rapidly during turns and then returned to zero throughout the straight segments. Conversely, the angular velocity control signal of the benchmark controller fluctuates continuously. This may limit the applicability of the benchmark controller in real-world applications. Conversely, the proposed controller is applicable to actual robots as shown in the next subsection.

As illustrated in Fig 12, Fig 16, and Fig 20, the proposed controller produces very tight turns by a sharp reduction in the linear velocity when the angular velocity is high. However, the benchmark controller did not significantly reduce the linear velocity, and hence, the turns were not tight. However, because of the sharp reduction in the linear velocity, the proposed controller required a longer time to complete the path than the benchmark controller.

In Fig 13, Fig 17, and Fig 21, the sliding variable is depicted. As shown, the sliding variable is always pushed to zero in case of any deviation due to sudden changes in the path direction.

Simulations of three paths were conducted to evaluate the performance of the proposed controller using a robot dynamical model with . Additionally, and the other controller parameters remain the same as in previous simulations. The first path is circular, formed by a set of 21 waypoints; the second path is ∞ -shaped, also composed of 21 waypoints; and the third path is a right-angle trajectory defined by a set of three waypoints.

As shown in Fig 22, Fig 23, and Fig 24, the controller successfully guides the robot along the desired paths, achieving a convergent cross-track error. As depicted in Fig 25, Fig 26, and Fig 27, spikes appear in the graph of , corresponding to sudden directional changes at the waypoints.

thumbnail
Fig 22. Simulation of a circular path: Error is the normalized error and Direction error is .

https://doi.org/10.1371/journal.pone.0357979.g022

thumbnail
Fig 23. Simulation of an -shaped path: Error is the normalized error .

Direction error is .

https://doi.org/10.1371/journal.pone.0357979.g023

thumbnail
Fig 25. Simulation of a circular path: The control input () and the sliding variable ().

https://doi.org/10.1371/journal.pone.0357979.g025

thumbnail
Fig 26. Simulation of an -shaped path: The control input () and the sliding variable ().

https://doi.org/10.1371/journal.pone.0357979.g026

thumbnail
Fig 27. Simulation of a right-angled path: The control input () and the sliding variable ().

https://doi.org/10.1371/journal.pone.0357979.g027

4.2. Experimental tests

In this section, the proposed control system is tested using a differential drive robot, as shown in Fig 28, to track paths described by sets of waypoints. The robot has two motorized wheels with a quadrature encoder mounted on each wheel. The encoder resolution is 28 pulses/ cm. The encoders are sampled each s. The robot total mass is approximately 0.8 kg. The robot is controlled using an Arduino Due microcontroller. The parameters of the robot are , . The robot was initially located at coordinates , , and rad. The controller parameters were , /18. The parameter was set as 1 cm. The sampling time of the controller was . It is assumed that the exact parameters of robot dynamics are unknown. Only the lower bound was estimated. Consequently, the control law in Eq. (21) is used. During the operation of the robot, the data were stored in an array in microcontroller memory. At the end of each path, the collected data was sent to a PC via a Wi-Fi link. During the physical experiments, the current pose of the robot is continuously updated from the encoder data using the discrete-time odometry equations previously established in Eq. (22) in subsection 3.4.

thumbnail
Fig 28. The differential drive robot that was used for the experimental tests.

https://doi.org/10.1371/journal.pone.0357979.g028

For a slow-moving robot, slipping can be ignored. Consequently, over short distances, encoders may accumulate only small errors, making the calculated pose nearly identical to the robot’s actual pose. However, in applications involving long distances or higher velocities, additional sensors-such as GPS, lidars, and cameras along with more advanced sensor fusion algorithms, may be required for accurate pose estimation.

In the 1st Experiment, the robot tracked a circular path defined by a set of 21 waypoints. The desired path, actual robot path, normalized error , and direction error in degrees are illustrated in Fig 29. As shown, the initial position of the robot was not at any waypoint. The robot successfully moved to the 1st waypoint and tightly tracked the path. From the results, the controller was able to drive the robot to follow the desired path with a negligible error.

thumbnail
Fig 29. Experiment 1- a circular path: Error is the normalized error .

Direction error is .

https://doi.org/10.1371/journal.pone.0357979.g029

In the 2nd experiment, the robot tracked a -shaped path, as shown in Fig 30. The -shaped path was defined using 21 waypoints. The robot successfully tracked the path following the straight segments connecting the waypoints.

thumbnail
Fig 30. Experiment 2- an -shaped path: Error is the normalized error .

Direction error is .

https://doi.org/10.1371/journal.pone.0357979.g030

In the 3rd experiment, the robot tracked a path defined by three waypoints with a directional discontinuity at an angle of rad, as shown in Fig 31. The robot successfully performed a tight maneuver to change direction by rad.

thumbnail
Fig 31. Experiment 3- a right-angled path: Error is the normalized error .

Direction error is .

https://doi.org/10.1371/journal.pone.0357979.g031

As shown in Fig 32, Fig 33, and Fig 34, the sliding variable is pushed to zero except at some points it becomes high because of sudden changes in the direction of paths. However, this variable has some ripples around zero because of the ripples in error due to the ripples in the readings of the encoders and consequently the controller takes corrective actions revealed in the angular velocity graphs.

thumbnail
Fig 32. Experiment 1- a circular path: The control input () and the sliding variable ().

https://doi.org/10.1371/journal.pone.0357979.g032

thumbnail
Fig 33. Experiment 2- an -shaped path: The control input () and the sliding variable ().

https://doi.org/10.1371/journal.pone.0357979.g033

thumbnail
Fig 34. Experiment 3- a right angled path:The control input () and the sliding variable ().

https://doi.org/10.1371/journal.pone.0357979.g034

5. Conclusion and future work

The main objective of this research is to build a stable controller for a path-tracking system with an arbitrary set of waypoints. A new approach was introduced for a path-tracking control system for differential drive robots. This approach is based on a nonlinear model of the tracking error, namely the cross-track error and angular error shown in Eq. (5) and Eq. (6), respectively. A kinematic model of the cross-track and angular errors was developed in this research, as shown in Eq. (10). Based on the developed error model, a stable SMC was proposed that pushes the error states to the sliding surface . The stability of this controller is proven by showing that the error approaches zero when the system moves on the sliding surface, that is, . A control law is introduced to guarantee the reachability of the sliding surface in finite time. The proposed SMC is expressed by Eq. (14). The effect of robot dynamics is investigated, where the Coriolis and centrifugal forces are assumed to be insignificant, as in the case of low velocities, and the center of rotation is sufficiently close to the center of mass. The modified control law in Eq. (21) was introduced to compensate for the dynamics of the robot. This control algorithm was successfully tested through numerical simulations using different sets of waypoints with directional discontinuities and/or sharp turns at angles /4, /2, and /4. The effects of the controller parameters were demonstrated by conducting simulations using different values of the parameters. The performance of the proposed controller was compared with that of the controller introduced in [15], which was a modification of the widely used controller introduced in [2]. Simulations show that the proposed controller outperforms the existing control technique for an arbitrary set of waypoints at directional discontinuity and/or sharp turns. In addition, the proposed controller converges tightly to the straight segments between waypoints, achieving smaller values of average and maximum errors than those of the existing control technique. Subsequently, the proposed controller was successfully verified by using a differential drive robot with different waypoint sets. Experiments using a real robot demonstrate the applicability and tracking accuracy of the proposed controller.

Future Work:

Based on this research, several open research questions remain to be addressed in the future. Some of these points are as follows:

  • Finding a suitable nonlinear sliding surface for finite-time error convergence for the error modeled by Eq. (10).
  • Studying the performance improvements that can be achieved by using second-order sliding mode control.
  • Trajectory-tracking applications require a desired time profile: in this case, it may be necessary to derive a modified error model to address timing requirements.
  • Autonomous car-like vehicles with front-wheel steering system: the model introduced in Eq. (10) is used for the differential drive steering system. A new model may be required to address the car-like steering systems. Consequently, a suitable sliding surface is required to ensure vanishing errors.
  • Autonomous aerial drones: based on the kinematics of drones, a new mathematical model for posing errors is required. Based on this model, a suitable sliding surface must be chosen to eliminate posing errors over time. Therefore, a control law is required to consider this new sliding surface and drone dynamics.
  • Vehicle dynamics under Coriolis and centrifugal forces: in this paper, the Coriolis and centrifugal forces are ignored, assuming low velocities and that the center of rotation is sufficiently close to the center of mass. These assumptions are valid for several robotic applications in workshops, hospitals, and warehouses. However, high speeds are required for autonomous street vehicles, and fast robots are even preferable in some large warehouses. In such cases, Coriolis and centrifugal forces must be considered. Consequently, the introduced control law must be modified to ensure the reachability of suitable sliding surfaces.
  • Diverse environmental scenarios and sensor noise: in real-world robotic applications, path-tracking is often subjected to uneven terrains, variable surface friction, and noisy sensor measurements. Future studies will focus on evaluating the robustness of the proposed control algorithm under more diverse environmental scenarios and varying levels of encoder noise, potentially incorporating advanced noise filtering or sensor fusion techniques to further validate its practical reliability.

References

  1. 1. Asham AD. Mathematical analysis of a line-follower robot, a stable controller design using Lyapunov approach, and experimental tests. Int J Dynam Control. 2022;11(1):385–95.
  2. 2. Kanayama Y, Kimura Y, Miyazaki F, Noguchi T. A stable tracking control method for an autonomous mobile robot. In: Proceedings., IEEE International Conference on Robotics and Automation; 1990 May 13-18. p. 384–9. https://doi.org/10.1109/robot.1990.126006
  3. 3. Fierro R, Lewis FL. Control of a nonholonomic mobile robot: Backstepping kinematics into dynamics. In: Proceedings of 1995 34th IEEE Conference on Decision and Control. 3805–10. https://doi.org/10.1109/cdc.1995.479190
  4. 4. Zou T, Angeles J, Hassani F. Dynamic modeling and trajectory tracking control of unmanned tracked vehicles. Robotics and Autonomous Systems. 2018;110:102–11.
  5. 5. Wu X, Jin P, Zou T, Qi Z, Xiao H, Lou P. Backstepping trajectory tracking based on fuzzy sliding mode control for differential mobile robots. J Intell Robot Syst. 2019;96(1):109–21.
  6. 6. Sabiha AD, Kamel MA, Said E, Hussein WM. ROS-based trajectory tracking control for autonomous tracked vehicle using optimized backstepping and sliding mode control. Robotics and Autonomous Systems. 2022;152:104058.
  7. 7. Yan Y, Geng K, Liu S, Ren Y. A New Path Tracking Algorithm for Four-Wheel Differential Steering Vehicle. In: 2019 Chinese Control And Decision Conference (CCDC), 2019. 1527–32. https://doi.org/10.1109/ccdc.2019.8833020
  8. 8. Tiep DK, Lee K, Im D-Y, Kwak B, Ryoo Y-J. Design of Fuzzy-PID controller for path tracking of mobile robot with differential drive. IJFIS. 2018;18(3):220–8.
  9. 9. Mondal S, Ray R, N. SR, Nandy S. Intelligent controller for nonholonomic wheeled mobile robot: A fuzzy path following combination. Math Comput Simul. 2022;193:533–55.
  10. 10. Hu Y, Su H, Zhang L, Miao S, Chen G, Knoll A. Nonlinear model predictive control for mobile robot using varying-parameter convergent differential neural network. Robotics. 2019;8(3):64.
  11. 11. Bin Salamah Y. Sliding mode controller for autonomous tractor-trailer vehicle reverse path tracking. Applied Sciences. 2023;13(21):11998.
  12. 12. Rabbani MJ, Memon AY. Trajectory tracking and stabilization of nonholonomic wheeled mobile robot using recursive integral backstepping control. Electronics. 2021;10(16):1992.
  13. 13. Nguyen VD, Soh GS, Foong S, Wood K. De-coupled dynamics control of a spherical rolling robot for waypoint navigation. In: 2017 IEEE International Conference on Cybernetics and Intelligent Systems (CIS) and IEEE Conference on Robotics, Automation and Mechatronics (RAM), 2017. 562–7. https://doi.org/10.1109/iccis.2017.8274838
  14. 14. Boucher P. Waypoints guidance of differential-drive mobile robots with kinematic and precision constraints. Robotica. 2014;34(4):876–99.
  15. 15. Mathew R, Hiremath SS. Development of Waypoint Tracking Controller for Differential Drive Mobile Robot. In: 2019 6th International Conference on Control, Decision and Information Technologies (CoDIT), 2019. 1121–6. https://doi.org/10.1109/codit.2019.8820389
  16. 16. Siciliano B, Sciavicco L, Villani L, Oriolo G. Robotics: Modelling, Planning and Control. 1st ed. Springer; 2009. https://doi.org/10.1007/978-1-84628-642-1
  17. 17. Shtessel Y, Edwards C, Fridman L, Levant A. Sliding mode control and observation. 2014. https://doi.org/10.1007/978-0-8176-4893-0/COVER
  18. 18. Tzafestas SG. Introduction to Mobile Robot Control. 2013; 1–691.
  19. 19. Dhaouadi R, Hatab AA. Dynamic modelling of differential-drive mobile robots using lagrange and newton-euler methodologies: A unified framework. Adv Robot Autom. 2013;02(02).