Abstract
Introduction
Autonomous systems have demonstrated remarkable applications in replacing inefficient or redundant human efforts. Self-driving cars considered as one of the areas which draw those fascinated with AI applications. Autonomous vehicles act as a crucial pillar in setting up the future picture of the country’s infrastructure. It has a significant contribution to relieving road congestion and reducing car accidents caused by human mistakes. A lot of research relevant to this area has appeared on the scene to realize the potential and solve the challenges to reach this goal.
The future of urban mobility is supposed to be autonomous vehicles. By the end of 2025, self-driving cars are expected to be technologically mature enough for widespread use. 1 The most significant benefits of integrating autonomous vehicles into the transportation system are: (1) AVs are not prone to human errors, which will ensure passengers’ safety during the trip, (2) Allows more significant opportunity to utilize wasted driving time in increasing production, (3) Providing simple, safe, and private transportation for those with disabilities that prohibit them from driving, and (4) Increase road capacity and reduce congestion, resulting in a saving of wasted energy “fuel consumption.” 2
In order for any self-driving car to be able to plan, navigate, and perform tasks in its environment, it has to be able to localize itself in this environment as the vehicle position is the direct feedback of any lateral controller. Usually, a fusion algorithm is used as in Osman et al. 3 alongside different sensors, such as LIDARS, Global Positioning Systems (GPS), Inertial Measurement Units (IMUs), Cameras, and wheel-encoders.
This article introduces a Lateral steering control system for passenger cars, as it’s one of the preeminent modules in autonomous vehicles. In our implementation, the trajectory is provided, and the car is controlled to pursuit the path by calculating the optimal steering angle. A Supervisory Controller (Fuzzy Logic) is also introduced to supplement what has been done in Abdelmoniem et al. 32 Abdelmoniem et al. propose the Predictive Stanley controller (PS) that mimics the driver driving behavior. It is relies on a discrete kinematic model that estimates the vehicle’s coming states, allowing the use of the basic controller for upcoming expected states. Furthermore, to maintain the performance of PS, its parameters must be manually tuned for every change in the maneuver or vehicle speed. Consequently, a supervisory controller is added to automate the parameters tuning process and make the controller capable of being used in practical experiments.
The key contribution of this article is the use of a fuzzy supervisory controller to improve the parameterization of the predictive Stanley controller. The proposed method addresses the limitations of previous research by incorporating an online tuning feature for the controller’s weights, allowing it to adapt to real-time conditions and eliminating the need for predetermined weights for different paths or vehicle speeds.
The article is organized as follows: In Section I, the design of the supervisory controller and how it was integrated with the predictive Stanley controller to make it suitable for real-time experiments is described. Section II provides an overview of the tests conducted to validate the proposed method, the evaluation criteria used, and the results obtained. Finally, in Section III, the conclusions and future directions are summarized.
Related work
The trajectory tracking module in AVs considered as a crucial challenge of motion controller design. This can be attributed to the vehicle’s mobility constraints, the expected sharp maneuvers and the elevated vehicle velocities.
Among the several approaches examined was the PID controller.
4
Its simple structure allows for its ease of implementation on non-computationally extensive devices. However, the PID controller needs to have its coefficients
Other types of navigation controllers include the geometric controllers types. These make use of only the car’s kinematics while tracking a reference path. Accordingly, such types of controllers ignore the driving and resistance forces applied on the car and assume that there are no slip between the tires and the road at all times. The most popular types of geometrical controllers used in lateral control in autonomous vehicles are (1) Pure Pursuit controller and (2) Stanley controller.
The pure pursuit controller Elbanhawi et al., 7 Barton, 8 and Campbell, 9 being one of the most commonly used geometric controllers, maintains the vehicle on the road by guessing the necessary steering direction. 10 Sadly according to Coulter, 11 when implemented, the Pure Pursuit controller is only restricted to outside applications. 12 A supervisory controller (fuzzy controller) was introduced by Ollero et al. 13 The controller uses trajectory features, speed, and the error of the tracking to optimize the look-ahead distance and some other pure pursuit factors. Shan et al. 14 introduced CF-pursuit as a brand new pursuit method method where the error of the fitting is reduced using a clothoid C curve instead of the circles that are utilized in conventional pure-pursuit. In addition, they suggested a fuzzy system to establish a proper look-ahead distance online using the path’s curvature.
The second category of geometric controllers is the Stanley controller, 15 responsible for Stanford’s to DARPA challenge win in 2006. Studies Amer et al. 16 and Paden et al. 17 describe a good performance for the Stanley controller by taking together the side error and the yaw error into consideration. An earlier study by Amer et al. 18 introduced an adaptive Stanley controller that uses a fuzzy supervisory controller to automatically adjust the controller’s parameters. However, this method only adjusts the parameters of a single controller and does not incorporate any additional controllers for future states. Early database information collected using Particle Swarm Optimization (PSO) is used as the basis for supervisory controller relying on the car speed and the yaw error. Although the controller showed great performing at high velocities, it remains untested on extremely severe trajectories.
Additional categories of geometric controllers exist like Follow-the-carrot 19 as well as other geometrical controllers Kanayama et al. 20 and Kuwata et al. 21
Various methods of Optimal Control techniques are used among the autonomous vehicles. The most common methods used are (1) Model Predictive Control and (2) H-inf controller.
Model Predictive Control – MPC for short – is a repetitive method of optimization for the expected car states in a defined horizon window, although manipulating the control variables. The first input of the optimized horizon is then set to be achieved by the vehicle, and the whole procedure is repeated. 22 Additional developments on MPC were made like NMPC to cope with non-linearities in the systems and showed worthier performing. However, NMPC needs expensive computational time which restricts the products to perform in a practically. Mehrez et al., 23 developed NMPC using a recently developed tool-kit to control nonholonomic robots. NMPC Path tracking control was later developed to pursuit a pre-defined reference path by Ritschel et al., 24 on a VW Golf VII series vehicle. Where a path factor was added to the states to be optimized along with a virtual control input. MPC main drawback is that it needs weights tuning for each speed ranges and paths.
Additional controllers were reviewed such as the H-inf controller 25 which is used as an optimal control theory that achieves stabilization with a perfectly adequate performance by reducing the gain parameter, that is the result of minimizing the closed loop system. The non-linear system is linearized by figuring the system’s jacobian matrices. To calculate the gain, the solution of Ricatti equation at each sampling step is required. 26
Sliding Mode Controller is a robust control scheme Dong and Nguang 27 and Rigatos et al. 28 which is also widely used in motion control. Yet, its main drawback is the chattering phenomenon that occurs as the trajectory reaches the surfaces and remains there, it introduces some oscillations around the surface. However, many implementations were developed to solve this issue as in Nayl et al. 29 and Montaseri and Yazdanpanah. 30
To sum up everything that has been stated so far, furthermost of the aforementioned approaches tried to implement a supervisory controller to style the basic controller’s parameters to be adaptive as in Ollero et al. 13 and Amer et al. 18 or to reformulate the error determination technique as in Shan et al. 14 Zakaria et al. 31 proposed a trajectory tracking technique by the use of future estimate control, where the side error is determined based on only one upcoming point with no regards to the current car state. Nevertheless, the major trouble is that all of those techniques calculates the error based on one single point which is the closest point to the car. And that limits the controller’s capability to deal with unexpected variations of the path yaw angle at extreme velocities. This publication proposes a novel approach that emulates the driving behavior of a human driver by reducing errors along the trajectory, rather than just at a single reference point, as previously done by Zakaria et al. 31 using a kinematic model. This new method anticipates the future states of the car, allowing the control algorithm to be applied not only to the current state but also to the expected future states. The study applies the Predictive Stanley controller and compares it with the basic Stanley controller developed in Hoffmann. 15
The main contribution of this article is the introduction of a supervisory fuzzy controller to tackle the parameterization of the predictive Stanley controller. Our paper addresses limitations of the research presented in Abdelmoniem et al. 32 by incorporating an online tuning feature for the controller’s weights. This allows the controller to adapt to real-time conditions and eliminates the need for predetermined weights for different paths or vehicle speeds. As a result, our approach improves upon the real-time performance of the controller, this implementation showed considerably better results over most of the controllers mentioned. Even with respect to the MPC, it needed less computational cost where the MPC took more time solving the same problem.
Methodology
The Basic Stanley (BS) controller uses the vehicle’s current position and the desired path to calculate its heading error and lateral error. Abdelmoniem et al. 32 introduced the predictive Stanley controller, which utilizes a prediction model to anticipate the future states of the vehicle, thereby enhancing its overall performance. However, the efficiency of this controller is dependent on the vehicle speed and maneuver and as a result, its parameters must be manually adjusted for each change in speed range or maneuver, making its real-time application a challenge.
The proposed supervisory fuzzy controller receives the current state’s lateral error and its rate of change as inputs. These inputs are used to calculate the optimal time step (
Basic Stanley
The Basic Stanley (BS) controller is divided into three regions, as illustrated in equation (1). These consist of the (low-high saturated – nominal) regions. Where
Predictive Stanley controller
The predictive Stanley controller (PS) consists of several consecutive Basic Stanley (BS) controllers and a prediction model. The prediction model presented by Abdelmoniem et al. is used to estimate the vehicle’s future states at a fixed time step. Each controller receives its input state

Predictive Stanley controller block diagram.
Equations (2) and (3) illustrate the controller’s mathematical formulation after adding the outputs of the Basic Stanley (BS) controllers, where
Limitations of predictive Stanley controller
The predictive Stanley controller has two main parameters: the time step (
Fuzzy predictive Stanley controller
The proposed controller uses fuzzy logic to estimate the optimal values of the prediction model’s time step (

Fuzzy predictive Stanley controller block diagram.
This section details the input membership functions, fuzzy rules, and output membership functions. Those components are essential to design the fuzzy supervisory controller. That improves the Predictive Stanley (PS) controller’s overall performance in terms of the lateral error and gives it the capability to be used in real-time environments. where the linguistic variables: High (H), Low (Low), Medium-High (MH), Medium Low (ML), Negative-Big (NB), Negative-Medium (NM), Negative-Small (NS), zero (ZO), Positive-Small (PS), Positive-Medium (PM), and Positive-Big (PB) are used to represent the controller inputs and the outputs.
Input membership functions
The lateral error and its rate of change de(

Error membership function.

Rate of error membership function.
Output membership functions
The first output is
The optimal value of


Fuzzy rules of
The second output is the time step

Kinematic bicycle model.
The optimal value of

Fuzzy rules of
To summarize, the areas in red in Figures 6 and 8 indicate that the final control action will be heavily influenced by the future state controllers, while the blue areas indicate that the current state controller will have a greater impact.
Fuzzy rules
Table 1 shows the fuzzy rules used to infer the control action weight (K0).
Fuzzy rules of
Table 2 shows the rules used to infer the time step output
Fuzzy rules of
Adaptive prediction horizon
Equation (7) illustrates how the prediction horizon is calculated. Where
It’s clear that the prediction horizon (
Equation (8) illustrates that we measure each controller’s weight in the future state (
As shown in Figure 9, each controller’s weight

Controllers’ weights (
Experimental work and results
The proposed methodology was tested and validated on various maneuvers, including double lane change, hook road, and curved road, with varying velocities through multiple simulations and real-world experiments. This section showcases the results of the trials and the evaluation criteria used. The results are also compared with those obtained from the Predictive Stanley controller (PS) and the Model Predictive Controller (MPC). The evaluation standards used in this section are also presented.
Evaluation metrics
The evaluation metrics presented by Abdelmoniem et al.
32
are used when comparing the performing of the suggested controller to both the predictive and basic Stanley controllers. Testing was performed using several maneuvers at different velocities to calculate the following errors as shown in equations (9)–(12) the RMS of the lateral error
Simulation setup
The proposed controller was developed using MATLAB and the Ode3 (Bogacki-Shampine) solver, with a fixed time step of 0.01 s. Vehicle modeling was performed in V-REP, as depicted in Figure 10, with the V-REP car model serving as the system plant. The current state of the car is communicated to the proposed controller through ROS. Subsequently, the controller sends the control output from MATLAB to the V-REP simulator, as shown in Figure 11.

Simulation environment.

Communication architecture.
Real-time experiments setup
The level-3 autonomous golf cart, shown in Figure 12, was used in the proposed controller’s real-time validation and testing. Similar tests were performed using the previously mentioned controllers for comparisons.

Golf cart.
The golf cart was fitted with a VLP-16 LiDAR, a Vn-100 IMU, and wheel encoders. The ROS package “loam-velodyne” 33 is used to estimate the vehicle’s position base on the LIDAR odometry. The IMU and the wheel encoders also provided an estimate of the vehicle’s odometry and current velocity. Furthermore, a sensor fusion algorithm was performed using Extended Kalman Filter (EKF). 34
The fused odometry pose is then fed to the Adaptive Monte Carlo Localization (AMCL) ROS package, 35 alongside a static map and the LIDAR points as shown in Figure 13.

Real-time system architecture.
The vehicle’s estimated pose is published to the proposed controller’s node through ROS to publish the low-level controller’s desired steering angle.
Experimenting with MPC
Considering the following non-linear system,
where
The cost function to be minimized over the prediction horizon is defined as:
subject to the following constraints:
where
The reference path is assigned as a pre-defined vector of points
The point where the prediction horizon starts is set by finding the one with the shortest distance to the vehicle.
Results
Simulation results
This section demonstrates the obtained results from the simulation and plots the actual path followed by the vehicle when carrying out several maneuvers at different velocities with the Fuzzy Predictive Stanley (FPS), Predictive Stanley (PS), Basic Stanley (BS), and MPC controllers.
(1) Fuzzy Predictive Stanley Versus Predictive Stanley (FPS vs PS)
Table 3 demonstrates the superiority of the FPS controller over the PS controller when performing different maneuvers at 10 m/s.
FPS-PS (10 m/s).
Table 4 demonstrates the superiority of the FPS controller over the PS controller when performing different maneuvers at 15 m/s.
FPS-PS (15 m/s).
Figure 14 demonstrates the superiority of the fuzzy predictive Stanley controller over the predictive and the basic Stanley controllers for a curved road at 10 m/s.

Simulation curved road 10 m/s.
Figure 15 demonstrates the superiority of the fuzzy predictive Stanley controller over the predictive and the basic Stanley controllers for a curved road at 15 m/s.

Simulation curved road 15 m/s.
Figure 16 demonstrates the superiority of the fuzzy predictive Stanley controller over the predictive and the basic Stanley controllers for a hook road at 10 m/s.

Simulation hooked road 10 m/s.
Figure 17 demonstrates the superiority of the fuzzy predictive Stanley controller over the predictive and the basic Stanley controllers for a hook road at 15 m/s.

Simulation hooked road 15 m/s.
Figure 18 demonstrates the superiority of the fuzzy predictive Stanley controller over the predictive and the basic Stanley controllers for a double lane change at 10 m/s.

Simulation double lane change 10 m/s.
Figure 19 demonstrates the superiority of the fuzzy predictive Stanley controller over the predictive and the basic Stanley controllers for a double lane change at 15 m/s.

Simulation double lane change 15 m/s.
When analyzing the outcomes, it is important to acknowledge that the predictive Stanley controller was manually calibrated for each maneuver type and at various vehicle speeds. In contrast, the adaptive fuzzy predictive Stanley controller required only a single tuning process and was subsequently appropriate for all types of maneuvers and vehicle speeds. Furthermore, the adaptive fuzzy Stanley controller outperformed the predictive Stanley controller significantly in all maneuvers and at all vehicle speeds, despite the manual tuning efforts made for the predictive controller.
(2) Fuzzy Predictive Stanley Versus Model Predictive Control (FPS vs MPC)
Previous simulations illustrated the clear advantage that the fuzzy predictive Stanley controller has over the predictive Stanley controller. For that reason, the fuzzy predictive Stanley controller was compared with a model predictive controller. Both controllers’ accuracies and processing times were taken into consideration.
Table 5 shows the approximate similarity in performance of the fuzzy predictive Stanley controller and the model predictive controller in terms of the lateral error at 10 m/s.
FPS-MPC (10 m/s).
Table 6 shows the approximate similarity in performance of the fuzzy predictive Stanley controller and the model predictive controller in terms of the lateral error at 15 m/s.
FPS-MPC (15 m/s).
Figure 20 shows the approximate similarity in performance of the fuzzy predictive Stanley controller and the model predictive controller for a curved road at 10 m/s.

Simulation MPC versus FPS curved road 10 m/s.
Figure 21 shows the approximate similarity in performance of the fuzzy predictive Stanley controller and the model predictive controller for a curved road at 15 m/s.

Simulation MPC versus FPS curved road 15 m/s.
Figure 22 shows the approximate similarity in performance of the fuzzy predictive Stanley controller and the model predictive controller for a double lane change at 10 m/s.

Simulation MPC versus FPS double lane change 10 m/s.
Figure 23 shows the approximate similarity in performance of the fuzzy predictive Stanley controller and the model predictive controller for a double lane change at 15 m/s.

Simulation MPC versus FPS double lane change 15 m/s.
Despite their similarity in performance, the fuzzy predictive Stanley controller showed significantly lower processing times than the model predictive controller. This makes it more suitable for real-time hardware implementations where computational power may be limited.
Real time experiments
As demonstrated by the simulation results, the FPS controller and MPC displayed comparable performance. However, the fuzzy predictive Stanley controller displayed significantly lower processing times compared to the MPC. In this section, our objective is to validate these results through real-time experiments, which are similar to the simulations, but implemented on a golf cart. Due to the speed limit of our vehicle, these experiments were only conducted at 10 m/s.
We only did this experiments on 10 m/s, due to the speed limit of our vehicle.
Figure 24 shows the approximate similarity in performance of the fuzzy predictive Stanley controller and the model predictive controller for a curved road at 10 m/s.

MPC versus FPS curved road 10 m/s.
Figure 25 shows the approximate similarity in performance of the fuzzy predictive Stanley controller and the model predictive controller for a double lane change at 10 m/s.

MPC versus FPS double lane change 10 m/s.
Table 7 illustrates the comparable performance of the fuzzy predictive Stanley controller and the model predictive controller in terms of lateral error at 10 m/s. Furthermore, it highlights the advantage of the FPS in terms of computational time, making it a more suitable choice for real-time applications.
FPS-MPC (10 m/s).
Conclusion
A study on the Adaptive Fuzzy Predictive Stanley Lateral Controller for a golf cart (14 seaters) is presented in this article. The adaptive fuzzy approach mainly adds a supervisory controller to the Predictive Stanley (PS) controller to perform online tuning to its parameters
Different maneuvers were tested using V-REP simulations and real-life experiments on a level-3 autonomous golf cart at different vehicle speeds. The results obtained using the FPS controller had lower values of
The fuzzy predictive Stanley controller was then evaluated against a path-following MPC. Although both controllers produced comparable levels of error, the proposed FPS controller had significantly lower processing times compared to the MPC. This advantage in computational efficiency makes the FPS controller a more practical solution for real-time applications where computational resources may be limited.
