Introduction

Autonomous vehicles offer a huge potential for boosting the flow of traffic and safety achievement, making driverless vehicle technology more and more widespread, especially in established nations and rising markets1,2. Recent innovations in computer and sensor technology have led to significant progress in autonomous vehicles and robots research. Path tracking, a key component of autonomous vehicles, involves managing the vehicle's lateral and longitudinal movements to maintain a specified trajectory3, autonomous vehicle system architecture can be seen in Fig. 1. The optimal route-tracking controller considers future road data and can reject disruptions and uncertainty.

Figure 1
Figure 1
Full size image

An autonomous vehicle system architecture.

Model predictive control (MPC) is an effective control method for route tracking and car movement on the road. This method optimizes many objectives, including driver comfort, time consumption, and tracking accuracy, while considering limits on state parameters and control inputs3,4.

Path tracking, a fundamental component of driverless vehicles, includes managing the vehicle's longitudinal and lateral movements to follow an identified path. Making sure of the tracking accuracy and vehicle stability concurrently is regarded as a big problem because of the road curvature disturbances, nonlinearity of the car dynamics, uncertainties, and time lag. The optimal path-tracking controller considers future roadway information and can reject disruptions and uncertainty3,5.

Model predictive control (MPC) is a promising solution for path tracking6,7. The author of8 developed an MPC controller with a 4DOF vehicle model to prevent rollover accidents in autos. The MPC approach with prediction enhances route tracking by forecasting future dynamic behaviors. However, it needs recurrent optimization at each control step. This can increase computing complexity and pose dangers in real-time applications.

In real-world situations, the pure MPC technique may not be optimal for both processing efficiency and prediction accuracy. With all that in mind, this research proposes a new path following control architecture employing a hybrid controller of MPC and Stanley based using vehicle kinematics. As a solution, we add a Stanley controller to MPC and distribute the tasks between these two controllers to have a reliable and high-performance control system for driverless cars.

Control applications include a variety of fields in military and civilian areas, such as renewable energy9,10, reinforcement learning11,12, communications and networking13,14, microgrids15, power systems16, hybrid and electric vehicles17, unstable and distributed systems18 and many other fields of study. Here, we are focusing on the control applications of ground vehicle control, specifically in the autonomous driving part of both electrical and traditional vehicles.

The paper's key contributions are as follows:

  • This study uses vehicle kinematics to develop a novel hybrid controller based on Stanley and MPC for path following control architecture.

  • To build a dependable and high-performing control system for autonomous automobiles, we add a Stanley controller to MPC and divide the responsibilities between these two controllers.

  • Introduce a combination of two well-known controller types for the first time.

  • This paper presents a mathematical model of the newly suggested controller.

  • The paper provided a decent implementation of the suggested controller and produced a favorable outcome when compared to alternative systems.

This article is organized as follows: State of the art, Model predictive controller, Stanley controller, proposed system, mathematical model, simulation, results and discussion, and conclusion.

State of the Art

Every degree of automation has been outlined together with its features by Khan et al.19. Level '0' comprises warnings, and it goes up to level '5', which is a completely autonomous vehicle. Level 0: no automation driving features and the car driver has complete control. Level 1: Car driver assistance where the driver is fully responsible for lateral as well as longitudinal guidance. It includes adaptive cruise control (ACC) for instance. Level 2: Partial automation car driving where the driver’s duty is to continuously monitor the system of the vehicle. Level 3: conditional automation car driving in this case the driver may irregularly engage in non-driving actions. If the driving systems reach their limits, he/she should be able to intervene at any time. Level 4: high automation car driving, at this level the driver no longer needs to be prepared for intervention. The vehicle at this level still has certain conditions, like a predefined track. Level 5: full automation car driving, here the driver no longer exists. The person becomes a passenger. The car can drive through any traffic conditions with no human driver.

Sinder20 delivered a paper on developing control strategies and steering algorithms for route tracking applications. This article describes route tracking with geometric, kinematic, and dynamic models. Sotelo's study21 describes a lateral control method for autonomous cars based on the Ackerman system. Steering control considers velocity, making it suited for both low and high-speed vehicles. Park et al.22 developed a steering control system employing pure pursuit technique, a geometry-based approach. The authors improved the model's performance by using a PID controller along with a compensator.

The study introduced by Zhou et al.23 used an adaptive inverse controller to counteract the effects of the steering system's backlash. To enhance the control performance of the Model Free Control, the authors have integrated it with the extremum-seeking control (ESC) technique, which also offers a fresh perspective for tweaking the MFC control gain, Wang et al.24 developed this system. Hu et al.25 provided a study that examines the integrated motion control of self-driving ground vehicles, considering the improvement of tracking performance, actuator failures, and input saturation.

In the paper that Takahama et al.26 provided, the utilization of MPC for adapted cruise control in road traffic jams is explained. They have considered the limitations in order to get better outcomes in a shorter amount of time by using the MPC characteristic. The comparison of Stanley, a Linear Quadratic Regulator, with MPC controllers on path tracking applications, is presented by Vivek et al.27. With the help of the three controllers, the path tracking was effectively performed.

A hybrid controller technique for tracking the trajectory of an autonomous vehicle is introduced by Cibooglu et al.28. Stanley and Pure-Pursuit are two popular geometric route tracking techniques that are paired with an easy-to-use and straightforward methodology.

This paper is written to come up with a solution that is in between of complexity of the MPC controller and the simplicity of the Stanley controller. MPS combines these two models in a way of getting the best of each one of them. One of the main challenges in the field is to find a system that is fast in application and accurate at the same time. A new method is needed to reduce the high computations of existing models such as MPC and increase the accuracy of the performance of the other such as Stanley.

The limitations of the existing models are: For the MPC is the complexity of the system in terms of high computational needed. For the Stanley model is an inaccurate path following where the vehicle can go out of the track with this model.

Model predictive controller

Model predictive based control, also known as MPC, is an optimum controlling approach in which estimated control procedures reduce a cost function used for a restricted dynamic system concluded a finite, fading horizon of time29. An MPC controller obtains or estimates the plant's current status at each time step. It then determines an ordered set of control procedures that minimizes costs over the next period by resolving a restricted optimization problem based on an inner plants model with the state of the present system. This controller then executes only the first calculated control step on the plant, disregarding subsequent ones. In the next time step, the procedure is repeated as shown in Fig. 2.

Figure 2
Figure 2
Full size image

Model predictive control system structure.

MPC frequently has many useful features such as the capacity to deal with delays in time, the capacity to handle multi input multi output (MIMO) model plants, and built-in reliability properties toward errors of modeling. Specific terminal limitations can also help to ensure nominal stability. Other major MPC characteristics are the ability to specifically address limitations and the ability to incorporate future reference and disturbing signal information when available.

In linear MPC the simplest model, where its cost function is quadratic, and the constraints and plant are both linear, the usual approach for developing an MPC controller involves the following phases, Fig. 3 shows the MPC design workflow.

Figure 3
Figure 3
Full size image

Model predictive control design workflow.

In this study, we aim to control an autonomous vehicle to follow a specific reference path. For this, the cost function ought to include the deviation compared to the path, the minor deviation the better results. However, minimizing control order magnitude to make riders in the automobile feel comfortable, and smaller steering gives better outcomes. That is related to the optimization issue in the best control theory, where the performance of control and input aggressiveness are traded off. As a result, we have the following cost function:

$${\varvec{J}}\left({\varvec{x}}\left({\varvec{t}}\right),{\varvec{U}}\right)=\sum_{{\varvec{j}}={\varvec{t}}}^{{\varvec{t}}+{\varvec{T}}-1}{\varvec{\delta}}{{\varvec{x}}}_{{\varvec{j}}\left|{\varvec{t}}\right.}^{{\varvec{T}}}{\varvec{Q}}{\varvec{\delta}}{{\varvec{x}}}_{{\varvec{j}}\left|{\varvec{t}}\right.}+{{\varvec{u}}}_{{\varvec{j}}\left|{\varvec{t}}\right.}^{{\varvec{T}}}{\varvec{R}}{{\varvec{u}}}_{{\varvec{j}}\left|{\varvec{t}}\right.}$$
(1)

Given the steer angle, δx represents the distance between the predicted and the reference points, as seen below.

$${\varvec{\delta}}{{\varvec{x}}}_{{\varvec{j}}\left|{\varvec{t}}\right.}={{\varvec{x}}}_{{\varvec{j}}\left|{\varvec{t}},{\varvec{d}}{\varvec{e}}{\varvec{s}}\right.}-{{\varvec{x}}}_{{\varvec{j}}\left|{\varvec{t}}\right.}$$
(2)

u indicates the steering input. First and foremost, we need the plant's predictive model. So, we can know δx.

Since the primary principle of MPC is the use of a plant model for predicting the future evolution of the system. A simple kinematic bicycle model is used in this study.

$$\text{x}\_dot =\text{ v }*\text{ cos }(\updelta +\uptheta )$$
(3)
$$\text{y}\_dot =\text{ v }*\text{ sin}(\updelta +\uptheta )$$
(4)
$$\uptheta \_dot =\text{v }/\text{ R }=\text{ v }/ (\text{L}/\text{sin}(\updelta ))=\text{v}*\text{sin}(\updelta )/\text{L}$$
(5)
$$\updelta \_dot ={ \varphi }$$
(6)
$$ {\text{x}}\_\left( {{\text{t}} + 1} \right) = {\text{x}}\_{\text{t}} + {{{\text{x}}\_dot}* {\Delta {\text{t}}}} $$
(7)
$$ {\text{y}}\_\left( {{\text{t}} + 1} \right){\text{}} = {\text{y}}\_{\text{t}} + {{{\text{y}}\_dot}*{\Delta {\text{t}}}} $$
(8)
$$ \uptheta \_\left( {{\text{t}} + 1} \right){\text{}} = {\text{}}\uptheta \_{\text{t}} + {{\uptheta \_dot}*{\Delta {\text{t}}}}$$
(9)
$$\updelta \_\left( {{\text{t}} + 1} \right){\text{}} = {\text{}}\updelta \_{\text{t}} + {{\updelta \_dot}*{\Delta {\text{t}}}} $$
(10)

where X represents the states [x, y, θ, δ], δ is the wheel steering angle, θ is the heading angle. The inputs U are [v, φ], v is the velocity, and φ is the steering rate.

Stanley controller

Stanley's approach uses the vehicle’s front axle to be a reference point. In the meantime, it examines both heading errors as well as track errors. For this technique, the tracking error can be identified as the distance that lies between the nearest point on the reference path and the vehicle's front axle as in Fig. 4.

Figure 4
Figure 4
Full size image

Stanley geometric relationship.

Where (t) represents the angle across the path heading to the heading of the vehicle. δ is the steering angle. Three natural laterals laws of the Stanley approach.

The first law is to eliminate the heading error.

$${\varvec{\delta}}\left({\varvec{t}}\right)=\uppsi (\text{t})$$
(11)

The second is to eliminate cross-track errors. It identifies the nearest point between the route to the vehicle, represented as e(t), and the steering wheel angle may be adjusted as:

$${\varvec{\delta}}\left({\varvec{t}}\right)={{\varvec{t}}{\varvec{a}}{\varvec{n}}}^{-1}(\frac{{\varvec{k}}{\varvec{e}}\left({\varvec{t}}\right)}{{{\varvec{v}}}_{{\varvec{f}}}\left({\varvec{t}}\right)})$$
(12)

The final stage is to follow the maximum steering angle limitations.

(t)  [δmin, δmax] So, we can have:

$${\varvec{\delta}}\left({\varvec{t}}\right)={\varvec{\uppsi}}\left(\mathbf{t}\right)+{{\varvec{t}}{\varvec{a}}{\varvec{n}}}^{-1}(\frac{{\varvec{k}}{\varvec{e}}\left({\varvec{t}}\right)}{{{\varvec{v}}}_{{\varvec{f}}}\left({\varvec{t}}\right)})$$
(13)

One modification for this model is simply to add the softening constant. This can verify a non-zero denominator.

$${\varvec{\delta}}\left({\varvec{t}}\right)={\varvec{\uppsi}}\left(\mathbf{t}\right)+{{\varvec{t}}{\varvec{a}}{\varvec{n}}}^{-1}(\frac{{\varvec{k}}{\varvec{e}}\left({\varvec{t}}\right)}{{{{\varvec{k}}}_{{\varvec{s}}}+{\varvec{v}}}_{{\varvec{f}}}\left({\varvec{t}}\right)})$$
(14)

Proposed system

Two main parts of controlling any autonomous vehicle are needed. The first one is the lateral control of the vehicle, and the other is the longitudinal control of the car. In this proposed system we introduced a novel method of these controllers called Model Predictive and Stanley based controller (MPS). This new type of controller combines the features of these two robust controllers. It uses the strong part of each one and employs it for its performance. Since MPC is one of the best systems in the field of autonomy especially in the longitudinal control part, MPS uses it as a longitudinal controller. On the other hand, Stanley is considered one of the top controllers for lateral control and it is designed to solve the racing car path following, MPS uses it in the same way by controlling its lateral control.

This hybrid control system can be seen in the block diagram below, Fig. 5. It is clear that both parts of the main system receive the same input. In terms of signals, feedback, reference path, reference velocity, etc.

Figure 5
Figure 5
Full size image

Proposed system block diagram.

Combining the MPC and Stanley controllers in the area of autonomous driving is feasible. This is because each of them has its own features and strengths. Using these two models together can result in increasing robustness and improving the overall control performance. As we know, MPC is a system that can predict the future behavior of the planet and enhance its control performance over a finite time horizon. It is a good model that is able to deal with constraints and restrictions30. The Stanley control model is an effective model in the field of unmanned driving, yet it is a basic method. It is focused on the lateral part of the controlling issues, which mainly means the distance from the original path. It calculates the steering wheel angle and the direction error in terms of the difference between the vehicle’s direction and the target heading31.

The collaboration of model predictive control and Stanley control is considered an advanced way of controlling methods. This new combined model takes advantage of MPC in handling complicated dynamics and restrictions, while the Stanley controller can focus on the path tracking part. We can use them together as follows:

For high-level control tasks such as path planning and decision-making, we can use the MPC controller. It can determine the ideal trajectory. This can be done by taking the vehicle’s dynamics, the vehicle's limitations, and road environment conditions into consideration.

For low-level control systems, the Stanley method is used, where its responsibility is to handle real-time trajectory tracking. It is responsible for adjusting the steering wheel based on lateral and direction errors. This will ensure that the vehicle is following the desired path precisely.

The two controllers communicate with each other. MPC sends the information about the ideal path to Stanley, and the latter will modify the vehicle’s steering angle accordingly32. The combined controllers have a feedback loop connecting the two types together and linking the output and input of the system. This information exchange is very important for the system’s performance. MPC will receive updated data based on real-time data collection, which is done by Stanley. In this case, MPC can modify the trajectory according to the received data in such a way that the predicted trajectory matches the real-world vehicle behavior. In difficult situations, bad road conditions, or complicated maneuvers, MPC plays a more dominant role while Stanley concentrates on fine-tuning33.

We will try to test these integrated controllers in both simulation and real-world conditions. The resulting system from this combination is a type of hierarchical control system called MPS. In this model, MPC handles the high-level choices, and Stanley deals with low-level path tracking. This new control system is a robust and adaptable controller that is appropriate for a variety of driving circumstances. This hybrid approach will enhance path convergence and guard against overshooting or cutting corners. The flow chart of the proposed MPS control system is explained in Fig. 6 below.

Figure 6
Figure 6
Full size image

Proposed MPS control system flow chart.

Below are lists of the advantages and disadvantages of the proposed system:

Advantages:

  • MPS controller combines MPC and Stanley controllers in one control model.

  • The MPS is less computational than the MPC.

  • MPS has better performance than Stanley.

  • The MPS only used the longitudinal part of MPC, which has way fewer computations than the lateral part.

  • The MPS uses the lateral part of Stanley, which is simple yet effective and less complex.

  • It is faster to apply and more accurate.

Disadvantages

  • At some points, the decision of the lateral part comes faster than the longitudinal part.

  • This is because the Stanley controller is simpler than the MPC.

  • This control model needs to be tested in the real world to overcome any issues that can appear in the future. We will apply it in our next study.

  • MPS is slower than Stanley’s controller, yet it is more accurate.

  • MPS needs to add different types of disturbances to the system.

Mathematical model

The combination of these two models can be done mathematically by considering the MPC as a high-level model and the Stanley as a low-level model.

The high-level model, MPC algorithm optimizes the vehicle's trajectory over a finite time horizon by considering its dynamic model, constraints, and objectives.

$${\varvec{m}}{\varvec{i}}{\varvec{n}}{\varvec{U}}\sum_{{\varvec{k}}=0}^{{\varvec{N}}-1}{\Vert {{\varvec{x}}}_{{\varvec{k}}}-{{\varvec{x}}}_{{\varvec{r}}{\varvec{e}}{\varvec{f}},{\varvec{k}}}\Vert }^{2}+{\Vert {{\varvec{u}}}_{{\varvec{k}}}\Vert }^{2}$$
(15)

S.T.

$$xk+1=f\left(xk,uk\right),$$
$$h\left(xk,uk\right)\le 0,$$
$$g\left(xk,uk\right)=0,$$
$$x0=xinitial$$

where

  • U = [u0, u1,…,uN−1] is the control input vector.

  • xk is the state of the vehicle at time step k.

  • xref,k is the reference state at time step k.

  • f() represents the dynamic model of the vehicle.

  • h() and g() are inequality and equality constraints, respectively.

In the low-level model, the Stanley controller adjusts the steering angle based on lateral and heading errors to ensure the vehicle follows the desired path.

$${\varvec{\delta}}={\varvec{\delta}}\text{feedforward}+{\varvec{\delta}}\text{feedback}$$
(16)
$${\varvec{\delta}}=\text{arctan}(\frac{{\varvec{k}}\cdot {\varvec{e}}\mathbf{l}\mathbf{a}\mathbf{t}}{{\varvec{v}}})+\text{arctan}\left(\frac{{\varvec{k}}\mathbf{s}\mathbf{t}\mathbf{a}\mathbf{n}\mathbf{l}\mathbf{e}\mathbf{y}}{ {\varvec{e}}\mathbf{h}\mathbf{e}\mathbf{a}\mathbf{d}\mathbf{i}\mathbf{n}\mathbf{g}} \right)$$
(17)

where:

  • •δ is the steering angle.

  • •elat is the lateral error (distance from the reference path).

  • •eheading is the heading error (the difference between the desired heading and the vehicle's heading).

  • •k is the vehicle gain.

  • •kstanley is the Stanley controller gain.

  • v is the vehicle velocity.

The combined control input is obtained by integrating the MPC and Stanley controller outputs.

$${\mathbf{U}} = {\mathbf{u}}_{{{\text{MPC}}}} + {\mathbf{u}}_{{{\text{Stanley}}}}$$
(18)

where uMPC is the control input from MPC. uStanley is the control input from the Stanley controller.

Simulation

The control systems and surrounding environment in this paper have been built using a MATLAB simulation. Additionally, it's used to create various scenarios for self-driving cars and traffic situations. The system was coded piece by piece. Initially, the MPC system was built and utilized for the car's brake and throttle controls. Second, we built the Stanley control and employed it to regulate the vehicle's steering angle.

The spline function is used to build an arbitrary driving path for the system test. This is done by choosing suitable (x,y) points, and then performing the spline function to have a smooth reference path for the experiments. Figure 7 shows the reference path that is used in this paper for all types of autonomous controllers. In this figure, the blue line connects the reference points, and the red line represents the reference path that will be used in this paper.

Figure 7
Figure 7
Full size image

Reference driving path of the models.

Different models have been coded in this article to perform the proposed control system and the traditional ones for the sake of comparison. First, we implemented the MPS code and showed its results. Then we implemented the Pure Pursuit controller with the same conditions and constraints. Finally, we implemented the PID using the same reference path and conditions. The kinematic bicycle of the vehicle is used in this paper, especially the Ackermann steering model. The vehicle is a front-wheel-based model, and it is assumed that the wheels have no slip laterally and it has a steerable front wheel. For continuous-time simulation of the system, the linear dynamic bicycle model is used in this experiment22. Simulation settings: wheelbase = 2.5 m, time constant of steering dynamics = 0.27, width = 0.724 m, steering limit = 30°, and velocity range = (− 5 to 10) km/h.

Results and discussion

The created driving path has both straight lines and curves to cover different real-road scenarios. These scenarios have been employed to evaluate the proposed system's dependability and determine its feasibility for practical implementation. Initially, we employ the path tracking scenario, in which the autonomous vehicle is required to follow a predetermined route that is fed into the system. Three different models have been used in this paper for the sake of comparison and to ensure the performance and robustness of the MPS model.

Our code has the feasibility of performing one model at a time or performing all the models together. This allows us to save time and make more accurate comparisons. Before implementing any model, we need to set some simulation settings; some of them are general settings that apply to all models, and others are specific to each model. Table 1 shows the parameter settings of all models.

Table 1 Simulation parameters of the MPS model.

First, we apply the PID controller, especially the PD feedback control system, to the autonomous vehicle. This is because the PD feedback controller is able to smooth the system’s response and reduce unwanted overshoots. These are significant for driving stability. As can be seen from Fig. 8, the PID controller can maintain the vehicle’s movement on the track, yet it is not in the perfect position. This model fails at some point and allows the vehicle to go off track, especially at the curves. This is considered a drawback of the system. In addition, Fig. 9 shows a high deviation between the desired (blue line) and the actual (orange line) steering command. This will lead to an unstable system and bad performance in the car. Moreover, the model shows high error in terms of latitude error, as illustrated in Fig. 10. All of that makes the PID an unreliable control system for autonomous vehicles.

Figure 8
Figure 8
Full size image

Simulation of PID control model.

Figure 9
Figure 9
Full size image

Steering angle simulation of PID model.

Figure 10
Figure 10
Full size image

Vehicle’s latitude error of PID model.

Second, we applied the Pure Pursuit control model to the vehicle. The results of this model show that it has some good points, yet it has some bad ones in terms of the vehicle’s performance. As can be seen from Fig. 11, the vehicle goes out of the driving path more than once, specifically at the curves (at seconds 7 and 17). This is undesirable output for autonomous vehicles and can lead to some bad situations in the real world. In addition, the steering wheel angle in Fig. 12 has a shift between the desired line and the actual one. Also, its latitude error is jumping higher than one, as shown in Fig. 13, which makes the system unreliable and unstable.

Figure 11
Figure 11
Full size image

Simulation of Pure Pursuit control model.

Figure 12
Figure 12
Full size image

Steering angle simulation of Pure Pursuit model.

Figure 13
Figure 13
Full size image

Vehicle’s latitude error of Pure Pursuit model.

At this point, we applied our model (the MPS model) to the autonomous vehicle and got the following results, as can be seen in Figs. 14, 15, and 16. It is obvious from Fig. 14 that the MPS model enables the vehicle to follow the desired path in a very accurate way and has low hesitation. Also, it allows the vehicle to maintain the desired velocity and maintain stable performance. By looking at the figure, we can see the vehicle represented by a red rectangle, the black line, which represents the reference path, and the red line, which is the moving path of the vehicle (simulation output). Also, we can see the green circles, which are the horizon steps of the MPS model. Depending on the red line, it is clear that the vehicle did not deviate out of its trajectory, and it almost stayed in the middle of the street. This is considered a success of our model, where one goal is to keep the car on the right track even at sharp curves.

Figure 14
Figure 14
Full size image

Simulation of MPS control model.

Figure 15
Figure 15
Full size image

Steering angle simulation of MPS model.

Figure 16
Figure 16
Full size image

Vehicle’s latitude error of MPS model.

Figure 15 shows the steering wheel angle commands in two types. The first one is the calculated steering angle commands in the blue line, which is the perfect way of steering movement. The model can measure it since the driving path is known and the vehicle parameters are also available. This will be used to see the difference between the actual commands in the orange color and the desired ones in the blue color. It is clear from the figure that the MPS model has high performance in terms of steering wheel angle commands, and it follows the desired path in good shape, yet it has some deviations at the sharp curves of the path, which is normal in autonomous vehicles. One point is that MPS has a shortcoming in the high number of steering angle commands, which needs to be decreased in the next studies because they lead to high computations.

From Fig. 16, we can see the latitude error curve of the MPS performance in this simulation. It can be noticed that it has a very low error rate, which is almost around zero except at the beginning until the vehicle corrects its direction. Also, the curve goes down at the second (17), which is normal because the vehicle passes through the hardest curve of the driving path. In general, the maximum error is 0.5 m, which is considered an acceptable error, and the minimum is almost equal to zero, which is a perfect indication of the system's stability.

Finally, all three models were implemented at the same time to show the differences among them. The MPS model is represented in the red line, the Pure Pursuit model is in the green line, and the PID model is in the blue line. In Fig. 17, below the black dashed line is the reference path for all systems. MPS is the best model of path-following among them since it follows the desired path perfectly and its vehicle does not go off-road. Another point can be noticed from this figure, which is the distance that each mode has reached. The Pure Pursuit has the longest distance of the three models, yet this cannot be an advantage for the Pure Pursuit. This is because it goes out of the path at each curve, and that saves it some distance due to its bad performance. On the other hand, PID has the lowest distance of the models. This is because of the sharp turns it makes through the path curves and slow coming back to the right track.

Figure 17
Figure 17
Full size image

Simulation of MPS, Pure Pursuit, and PID models.

Figure 18 is the steering wheel angle of all systems together. This figure shows that all the models have almost the same performance from the beginning of the simulation until the 7th second when we have the first curve on the path. After that, each model has its performance, as explained previously.

Figure 18
Figure 18
Full size image

Steering angle simulation of MPS, Pure Pursuit, and PID models.

A track-following error comparison has been done to assess the robustness of the MPS controller. It is obvious that the new controller outperforms PID and Pure Pursuit, two conventional controllers. Calculating the inaccuracy of the car traveling the same route is necessary for this comparison. Every experiment had the same tracking path, and all parameters were set to the same values. We obtained the findings shown in Figs. 17 and 18 by modeling the three models. Low mistake rates demonstrate that MPS is outperforming both.

Finally, we compare MPS controllers with both MPC and Stanley controllers. Figure 19 shows the results of comparing these three models. It can be noticed that MPS gives better performance than the other models in terms of path-following accuracy and time consumption. The vehicle with MPS travels a slightly longer distance than the other two models. It is less hesitant in steering wheel movement, which means it has more stability.

Figure 19
Figure 19
Full size image

Simulation of MPS, MPC, and Stanley models.

Tracking error calculation has been done among the main models that have been used in this paper with the proposed one. It is obvious from Fig. 20 that the MPS model outperforms the other two models; MPC and Stanley; in terms of giving lower tracking error of the vehicle. Different speeds used in this experiment ranged from 10 to 60 km/h as can be seen from Table 2 below.

Figure 20
Figure 20
Full size image

Tracking error comparison among different control models used in this paper.

Table 2 Tracking error results for three models with different speeds.

To sum up, the MPS is less computational than the MPC and has better performance than Stanley. This is due to the fact that we only used the longitudinal part of MPC, which has way fewer computations than the lateral part, and the lateral part of Stanley is simple yet effective and less complex.

Conclusion

This work is the first introduction of a novel controller that combines two widely recognized controller types. This paper presents a new hybrid controller that combines the Stanley and Model Predictive Control (MPC) methods for controlling autonomous vehicles. The primary objective of the suggested model, known as the MPS, is to ensure the autonomous vehicle stays on its intended path and adjusts its movement accordingly. In order to create a reliable and efficient control system for self-driving cars, we include a Stanley controller into the Model Predictive Control (MPC) framework and allocate specific tasks to each of these controllers. MPS offers a solution that strikes a balance between the complexity of model predictive control (MPC) and the simplicity of the Stanley controller. It integrates these two models to use the advantages of each. Only the longitudinal part of MPC—which requires far fewer calculations than the lateral part—was utilized by the MPS. Additionally, it makes use of Stanley's lateral part, which is less complex and simple yet effective. When compared to other systems, the paper's implementation of the suggested controller was respectable and yielded a good result. A mathematical model of the newly suggested controller is presented in this study. The MPC and Stanley are not as effective as this controller. Additionally, it processes data faster than MPC. Furthermore, compared to the current ones, the MPS provides a more precise path following. In terms of vehicle stability and latitude error, MPS performed better than PID and Pure Pursuit controllers, two of the currently used models. The MPS model beat the previous ones in terms of tracking inaccuracy. Soon, we will be implementing AI into constraint processing as part of our ongoing research. On top of that, we'll be using this controller on our test car in the real world.