Pragmatic and Effective Enhancements for Stanley Path-Tracking Controller by Considering System Delay

: The Stanley controller is a proven approach for path tracking control in automated vehicles. If time delays occur, for example, in signal processing and steering angle control, precision and stability decrease. In this article, enhancements for the Stanley controller are proposed to achieve stable behavior with improved tracking accuracy. The approach uses the curvature of the path as feedforward, whereby the reference point for the feedforward input differs from that of the controller setpoints. By choosing a point further along the path, the negative effects of system delay are reduced. First, the parameters of the Stanley controller are calibrated using a straight line and circle maneuver. Then, the newly introduced feedforward parameter is optimized on a dynamic circuit. The approach was evaluated in simulation and validated on a demonstrator vehicle. The validation tests with the demonstrator vehicle on the dynamic circuit revealed a reduction of the root-mean-square cross-track error from 0.11 m to 0.03 m compared to the Stanley controller. We proved that the proposed approach optimizes the Stanley controller in terms of compensating for the negative effects of system delay. This allows it to be used in a wider range of applications that would otherwise require a more complex control approach.


Introduction
Automated driving is currently one of the most important development goals in automotive research, not only in the field of passenger cars and public transport [1]. Driverless operation also represents a major benefit for future commercial vehicles [2] or automated guided vehicles [3]. The interface between the automated driving functions and the driveby-wire chassis mechatronics is the path-tracking controller. Its task is to follow the path planned by the automation layer by adjusting the steering angle (lateral control) and the drive and braking torque (longitudinal control). Different control approaches are available depending on the requirements for control accuracy, velocity, and disturbances to be considered [4][5][6][7][8]. Among a number of different approaches of varying complexity, the Stanley controller [4], which belongs to the category of geometric path-tracking controllers, has been established for lateral control. The Stanley controller is a simple, efficient, and robust solution that provides sufficient control performance at moderate velocities [7][8][9][10]. Improving its accuracy, for example, by extending the approach or introducing methods for parameter tuning, is the subject of ongoing research [9,11]. More complex approaches, for example, model predictive controllers (MPCs), lead to comparatively better accuracy at higher velocities and in more dynamic driving situations but result in higher implementation complexity and often in higher computational effort [5][6][7]. Therefore, for applications that do not require higher velocity and high dynamics, the Stanley controller is a preferable solution.
As described by Xu et al. [12] and Zhang et al. [13], one major reason for the limitation of trajectory tracking accuracy and instability is the time delay within the whole vehicle system. Since it is not possible to avoid delays in most cases, solutions must be found to compensate for their effects on vehicle guidance control. The delays within the lateral control loop can be divided into input delay and steering delay, also called steering lag. Input delay results from reading sensor information, communication between sensors and control units, and processing and computation within control units. Steering lag is caused by the low-level controller design, communication delay from the control unit to the steering actuator, and hardware limits of the steering actuator system. In addition, steering lag is affected by the time it takes for the lateral tire force in the tire-road contact patch to be built up after the steering angle has reached the desired value [12,13].
The delay time depends on the characteristics of the sensor and actuator system. Zhang et al. [13] determined an input delay time of 0.1 s and a steering delay of 0.2 s. Other analysis found the steering delay time to be between 0.2 s and 0.5 s [14].
The challenge posed by system delay can be addressed using various advanced controller approaches. Delay compensation based on MPC or linear quadratic controller (LQR) approaches are described by, among others, Xu et al. [12], Luan et al. [15], and Zhang et al. [13]. Yu et al. [16] describe an MPC approach in which the actual position of the vehicle is predicted and the delay time is used as the prediction time to compensate for the effect of the delay. Based on the Stanley controller, AbdElmoniem et al. [17] propose a predictive Stanley lateral control approach in which the future driving states are considered to calculate the steering angle setpoints.
The advantages of these model-based extensions, or other more complex control approaches, become apparent at higher velocities and in more dynamic driving situations. For this reason, the Stanley controller is still widely used in practice for vehicles operating at lower velocities (e.g., mobile robots, indoor and outdoor logistics vehicles, and offroad applications). Its advantages include reduced implementation effort and less control engineering knowledge required compared to model-based solutions. However, there is also the challenge of steering lag compensation in these vehicle classes, especially since the performance of steer-by-wire systems may be limited due to their economic requirements, resulting in significant steering lag.
Therefore, for this article, we have analyzed the Stanley control law and propose a pragmatic adaptation of it that effectively increases its accuracy by reducing the negative effects of system delay. The goal was to find a solution that requires minimal additional implementation and parameterization effort compared to the original controller. We have achieved this improvement by feedforwarding the path curvature of a point along the path and selecting that point depending on the system delay time. Our approach extends the Stanley controller by only one additional parameter, keeping the implementation and parameter tuning effort at a comparable level.
With our solution, we target applications that are generally suitable (in terms of velocity and driving dynamics) for operation with a geometric path-tracking controller, such as the Stanley controller. For these applications, our proposed approach provides an improvement in accuracy without increasing the complexity of the approach and, thus, the required control engineering knowledge of the user. Due to the practice-oriented focus of our solution, we demonstrate a significant improvement in control accuracy compared to the Stanley control law not only with simulative but especially with real-world driving tests.
This article is organized as follows: Section 2 presents the methodology of this work, including the description of the demonstrator vehicle, the simulation model, and the maneuvers used for testing and validation. The path-tracking control approach and our proposed improvement to the Stanley controller are then derived, followed by a description of the testing and validation procedure, including the applied parameter optimization method. The results of both the simulation-based study and the driving tests with the demonstrator vehicle are presented and discussed in Section 3, followed by the conclusions in Section 4.

Demonstrator Vehicle
We used a demonstrator vehicle (scale 1:1.5) to validate the proposed control approach (Figure 1). The main functions of the cascaded control system of the vehicle include the path tracking controller, the steering angle controller, and the velocity controller. Thus, from the specified path and the actual position, the torque output signals for the drive motors and the steering actuator are determined ( Figure 2). The localization is provided by a multi sensor RTK-GNSS module (Advanced Navigation Solutions -ANavS GmbH, Munich, Germany) which uses real-time kinematics (RTK) positioning techniques based on global navigation satellite systems (GNSS) signals. The controller runs on a DSPACE MICROAUTOBOX II (dSPACE GmbH, Paderborn, Germany), which allows a direct transfer of the control structures from the simulation model to the vehicle. The vehicle properties needed to configure the proposed control approach are listed in Table 1.   Figure 2. Main control loop of the demonstrator vehicle. The vehicle sensors measure the actual pose (position and orientation), the steering angle δ, and the vehicle velocity at the rear axle v r . The path tracking controller delivers the setpoints for the velocity controller v r,re f and for the steering angle controller δ. Finally, the vehicle dynamics controller outputs the drive torques M D 1 and M D 2 and the steering torque M steer to the actuator system. Table 1. Vehicle properties relevant for the control approach: tire stiffness of the tire pair at the front axle C y, f , tire stiffness of the tire pair at the rear axle C y,r , vehicle mass m, distance from the center of gravity to front axle a, and distance from the center of gravity to rear axle b and the wheelbase l, which is the sum of a and b.
C y, f (kN/rad) C y,r (kN/rad) Components involved in lateral vehicle guidance, thus contributing to the input delay, are the steering angle sensor, the yaw rate sensor, the RTK-GNSS module, and the DSPACE MICROAUTOBOX II. The controller algorithms are executed at 1000 Hz, with the steering angle sensor signal read at 100 Hz, the yaw rate sensor signals read at 200 Hz, and the RTK-GNSS module signals read at 50 Hz. The RTK-GNSS module calculates the vehicle position and orientation based on differential GPS measurements and predicts the actual position using acceleration and yaw rate measurement data. As a result, the delay caused by GNSS signal processing is already compensated for to a large extent in the localization signal provided.
The steering angle controller we have implemented on the vehicle control unit is based on the cascade control paradigm [18] with the aim of keeping the resulting steering lag as small as possible. In the outer loop, the desired steering angle is controlled with a proportional (P) controller, which outputs a target steering angle rate. The inner loop contains the measured steering angle rate as additional feedback and controls it with a proportional-integral-derivative (PID) controller. The target torque output calculated in this way is sent to the steering actuator at a frequency of 100 Hz. Steering lag measurements showed an average delay between target and actual steering angle signals of 0.1 s, indicating that the steering system of the demonstrator vehicle with the cascade control structure is less affected by steering lag compared to vehicles used in the literature [13,14].

Simulation Tools and Models
For the simulative development and optimization of the proposed control approach, the software tool CARMAKER (Version 8.0, IPG Automotive GmbH, Karlsruhe, Germany) was used in co-simulation with MATLAB SIMULINK (Version R2018b, The MathWorks, Natick, MA, USA) based on the CARMAKER extension CARMAKER FOR SIMULINK [19]. The demonstrator vehicle is represented by corresponding CARMAKER project files, and additional subsystems such as velocity and steering angle controllers are modeled in MAT-LAB SIMULINK. In the MATLAB SIMULINK model, the target velocity and target steering angle are converted into the CARMAKER inputs motor torques and tie rod displacement. This co-simulation model of the demonstrator vehicle can be accessed from [20] including a more detailed description of the modeling. It also contains the modeling of the steering system dynamics, including the delay caused by steering lag as well as the modeling of the behavior of the real RTK-GNSS localization module with the frequency of the signals reduced to 50 Hz.
For the application in this work, the simulation model was extended to provide vehicle guidance control functionality based on predefined paths. This includes the calculation of the reference pose and the proposed path tracking controller, which are also implemented in the MATLAB SIMULINK model. Figure 3 shows the resulting overall simulation model. The vehicle guidance control submodule is also integrated into the control software of the demonstrator vehicle and is published along with this article (Supplementary Materials, Source Code S1).

Driving Maneuvers
We use two driving maneuvers to optimize and evaluate the path-tracking performance of the controller. The maneuvers are defined as paths describing the desired poses of the vehicle with the center of the rear axle as the reference point.
The first driving maneuver is used to optimize the controller parameters (Section 2.5.1). The vehicle first accelerates on a straight line to a constant velocity. Then, the path contains a sudden lateral offset of 0.5 m, causing a step in the setpoints of the control input, which can be used to investigate the step response of the controller. At 50 m after the starting point, a step-steer transitions the maneuver to a stationary circular maneuver with a radius of 12 m. The path is defined sequentially with two geometric straight-line equations and one equation of the circle.
The maneuver used for validation is a dynamic circuit on the test area used for the demonstrator vehicle tests in the course of this work. It is labeled "track_01" and can be accessed at [21]. The track is shown in Figure 4a supplemented by the course of desired vehicle velocity of the rear axle v r,re f Figure 4b and the resulting lateral acceleration Figure 4c. The points of the path (global coordinates x r,re f (s) and y r,re f (s)) are described as functions of the path coordinate s. Besides the global coordinates, the path definition also includes the tangential orientation ψ r,re f (s) on each point of the path, the curvature of the path κ re f (s) (positive for left turns), and the desired vehicle velocity of the rear axle v r,re f (s). In the course of this work, the path was discretized with a list of points, each having a distance of 0.3 m from the other. To calculate the reference values with a higher resolution, a linear interpolation was applied between the two points in the list that are closest to the vehicle position. The algorithms for calculating the current reference values from the given path definition are included in the implementation published along with this article (Supplementary Materials, Source Code S1).  Alternative approaches may also be considered to provide appropriate maneuver input to the vehicle guidance controller. It is only crucial that the current setpoints for the coordinates x r,re f and y r,re f as well as the tangential orientation ψ r,re f and the curvature κ re f are given to the controller and that no sudden steps occur in the course of the tangential orientation ψ r,re f since the Stanley controller cannot handle them properly [6,17]. For example, the input can be a trajectory whose points are defined as a function of time t rather than as a function of the path coordinate s [7]. Instead of the specified velocity v r,re f , the longitudinal guidance is implemented by specifying a longitudinal acceleration, which is required to reduce the longitudinal error.

Path Tracking Control Approaches
To derive the proposed control approach, we first describe the calculation of the reference vehicle pose, including the definition of the tracking error at the rear axle. A conversion of the reference values from the rear to the front axle is necessary to obtain the appropriate definition of the cross-track error and guiding angle of the front wheels for the control approach. Finally, we derive the proposed control equations on the basis of the Stanley path-tracking control approach.

Actual Vehicle Pose and Path Reference Pose
The task of the path-tracking controller is to guide the vehicle along a specified path. For this purpose, the center of the rear axle P r is selected as a reference to define the actual pose of the vehicle with its coordinates x r and y r and the orientation of the vehicle ψ r ( Figure 5). With the wheelbase l, the coordinates of the center of the front axle P f are obtained using The vehicle position P r is measured at the center of the rear axle. The distance between P r and the center of the front axle P f is the wheelbase l. The orientation angle of the vehicle with respect to the global coordinate system is described by ψ r . P r,re f is the point of the path with the minimum distance e lat,r to P r and the tangential orientation ψ r,re f . First, the point of the path P r,re f closest to P r must be found. The global coordinates x r,re f (s re f ) and y r,re f (s re f ) of the reference point P r,re f are obtained by choosing s re f such that the cross-track error at the rear axle e lat,r is minimized. We get (2) and the cross-track error at the rear axle e lat,r results in with positive values for a deviation to the right of the path and negative values for a deviation to the left of the path.

Setpoints and Cross-Track Error at Front Axle
The proposed approach, as well as the Stanley controller, use the front wheels as guiding wheels [4], so the reference position of the front axle P f ,re f needs to be known to obtain the appropriate cross-track error input for the controllers. The coordinates of P f ,re f can be calculated by assuming that the vehicle follows exactly the desired path with its reference point in the center of the rear axle. Applying a dynamic bicycle model, the vehicle orientation deviates from the kinematic reference ψ r,re f by the slip angle of the rear axle θ ss,r ( Figure 6). For the coordinates of P f ,re f we get Figure 6. Reference vehicle position and orientation. The position of the middle of the front axle P f ,re f results from the reference position P r,re f , orientation ψ r,re f , and slip angle of the rear axle θ ss,r . With the instant center of rotation ICR and the curve radius r r,re f the direction of motion ψ r,re f of the front reference point P f ,re f is obtained where δ κ,re f represents the kinematic part of the steering angle resulting from the curvature of the path. Furthermore, the orientation ψ f ,re f needs to be found, which is the direction of motion of the point P f ,re f . Therefore, in addition to already known quantities, the angle δ κ,re f is needed. This angle can also be understood as the kinematic reference steering angle, which results from the curvature of the vehicle motion. To derive δ κ,re f , the instant center of rotation ICR is considered. At this point, all lines perpendicular to the direction of motion of any fixed point of the vehicle intersect. The correlations in Figure 6 apply to the case of cornering, so κ re f = 0 and δ κ,re f = 0 are assumed for the following Equations (5) and (6). The distance between ICR and P r,re f is the curve radius r r,re f which results from the curvature κ re f .
By applying trigonometric functions, the distance h can be expressed both by δ κ,re f and by means of θ ss,r .
Finally, δ κ,re f results in which is also valid for the case of a straight path (κ re f = 0), and we get the required orientation ψ f ,re f as With the reference values serving as setpoints for the controller, the cross-track error at the front axle e lat, f and the guiding angle of the front wheels θ f (Figure 7) become (9) and Figure 7. Actual (black) and reference (blue) vehicle position with the cross-track error of the front axle e lat, f and the guiding angle of the front wheels θ f . The steering angle δ is specified using the path controller output. The proposed control approach requires setpoints from the additional reference point P re f , f f , which is offset from P r,re f by the arc length s f f in the direction of travel along the path.

Stanley Control Approach
In this section, we describe the equations of the Stanley controller by Hoffmann et al. [4], which serve as the reference approach in this article. The labels of the variables are adapted to the definitions used in this work as well as the definition of the positive direction of the steering angle. A positive curvature of the path κ re f (left turn) leads to a positive yaw rateψ r and requires a positive steering angle δ. In the same sense, a positive cross-track error e lat, f as well as a positive guiding angle of the front wheels θ f lead to a steering angle adjustment in a positive direction.
The Stanley control law is given with The first term θ f makes the steered wheels turn according to the desired direction of travel. Assuming ideal vehicle behavior, no further terms would be required for the vehicle to follow the path. If a cross-track error e lat, f occurs, the second term adjusts the steering angle to reduce the cross-track error. The intensity of the correction can be adjusted with the parameter k and is automatically reduced when the actual velocity at the rear axle v r increases. To avoid aggressive corrections at low velocities, k so f t is added to the denominator. The arctan function limits the second term to ±0.5π, which allows the vehicle to compensate for large cross-track errors. If e lat, f is getting large, the first and second terms are approximately equal in amount (0.5π) but have opposite signs, allowing the vehicle to travel vertically towards the desired path until the cross-track error is significantly reduced and θ f leads to turning into the direction of the path. For dynamic driving situations, Hoffmann et al. [4] propose additional terms, which are summarized in this work by δ add .
+θ ss, f (t) (12) The first part of the additional terms in (12) is based on the difference of the actual yaw rateψ r and the expected yaw rateψ κ,re f multiplied by the parameter k d,yaw . The expected yaw rateψ κ,re f results from the curvature of the path κ re f and the actual velocity of the rear axle v r withψ To avoid the instability caused by delays and overshoots of the steering actuator, Hoffmann et al. [4] add the second line of (12) where δ(i + 1) is the current measured steering angle and δ(i) the measured steering angle one time period earlier. Using k d,steer , the effect of this term can be parameterized.
The output of the Stanley controller is a steering angle which is assumed to be the direction of motion of the vehicle at the front axle. This applies only to kinematic behavior at low velocity. At higher velocity, it is necessary to add the slip angle of the front axle θ ss, f to the output steering angle to achieve the desired direction of motion. According to Hoffmann et al. [4], the slip angle is given by the steady state yaw angle resulting from vehicle parameters (Table 1), the actual velocity v r , and the expected yaw rateψ κ,re f θ ss, f (t) = m C y, f 1 + a b v r (t)ψ κ,re f (t) (14) Consequently, we define the slip angle of the rear axle θ ss,r required in (4) and (8) as

Proposed Approach for Enhancing the Stanley Controller
The derivation of the proposed control approach starts with the reformulation of the Stanley control law. Using (8), we reformulate (10) and obtain Here, θ * r can be interpreted as the actual orientation error of the vehicle considering the steady-state error. With (16), the Stanely control law (11) becomes δ Stanley (t) = δ κ,re f (t) +θ * r (t) Considering (7), (15), and (13), we see that δ κ,re f depends only on constant vehicle parameters, current velocity v r , and path curvature κ re f (s re f ). Since it is independent of the current vehicle position relative to the path, the term δ κ,re f can be considered to be feedforward of the Stanley control law. θ * r takes into account the orientation error and, as before, the arctan term compensates for the cross-track error, while δ add provides stabilization of the vehicle motion. Thus, for driving without major initial deviations along a curved path, the term δ κ,re f contributes most to the controller output δ Stanley .
The idea of the proposed enhancement of the Stanley approach is to use the feedforward term δ κ,re f to compensate for all delay effects within the entire lateral control loop of the vehicle system. For this purpose, δ κ,re f is replaced by δ κ, f f , which considers the curvature of the path at a position offset by s f f along the path in the direction of travel. With (7) we get We assume a constant delay time, which must be compensated by a corresponding feedforward time t f f . The path coordinate offset s f f results from the distance traveled within t f f and becomes For the purpose of keeping the approach simple, we have assumed that, in Equations (19) and (20), v r and θ ss,r are constant during the time interval t f f . For a more precise consideration, the course of the two quantities during t f f would have to be predicted.
Finally, the proposed enhancement of the Stanley control law is given with It further results from the derivation that both control laws "enhanced Stanley" (δ Stanley,enh ) and Stanley (δ Stanley ) are identical when t f f = 0 s is chosen or κ re f is constant in the path segment considered.
An adaptation of the control law for reverse driving can be found in Appendix A. Correspondingly, for longitudinal dynamics, a compensation of the delay in the course of the velocity can be implemented by choosing the velocity reference as v r,re f (s re In this paper, however, this is not considered further, and therefore t v = 0 s is chosen.

Test and Validation Procedure
The test and validation procedure comprises three main steps, which are described in the following subsections. First, the parameters of the control approaches were identified, followed by a comparison of the two control approaches in the simulation environment, and finally, the application and validation on the real demonstrator vehicle. In summary, we obtained six test runs for both the simulation and the real vehicle tests, which are shown in Table 2. In addition to the vehicle-specific parameters (Table 1), the control laws (11) and (21) contain further parameters that have to be adjusted to optimize the control behavior. Both approaches share the parameters k, k so f t , k d,yaw , and k d,steer . For the enhanced approach, the parameter t f f is additionally required. To find appropriate parameters, we followed the recommendations and procedure described by Hoffmann et al. [4]. According to the suggestion, we chose k so f t = 1 m/s. We initially set k d,steer = 0, following the recommended approach of keeping the value as small as possible and increasing it only to avoid instabilities caused by delays in the steering control response.
For the adjustment of k and k d,yaw , within the scope of this work, the following procedure has proven to be effective in order to achieve the best possible control performance while maintaining stability. The parameters are determined by analyzing the step response of the controller when the vehicle is moving on a straight track with a sudden offset of the path of 0.5 m. We have defined the optimization objective to reduce the cross-track error at the rear axle e lat,r as quickly as possible without causing overshoots or dynamic oscillations. Increasing k makes the vehicle respond faster to a cross-track error, but a too-large k causes overshoot and oscillation. These can be compensated for by increasing k d,yaw . However, if k is too large, no k d,yaw can be found that sufficiently compensates for the oscillations. So the objective is to find the largest possible k for which there is a suitable k d,yaw that results in a stable step response without overshoot.
By increasing k step by step and adjusting k d,yaw accordingly, a suitably optimized combination is found. We first applied this for the maximum vehicle velocity 8 m/s (test run 2.1, maximum yaw rate 0.67 rad/s, and maximum lateral acceleration 5.33 m/s²) and then checked whether these values also led to the desired behavior at a velocity of 3 m/s (test run 1.1, maximum yaw rate 0.25 rad/s, and maximum lateral acceleration 0.75 m/s²). If not, k was further reduced, and k d,yaw was adjusted accordingly.
It should be noted that slight oscillations in the cross-track error should always be expected when driving straight due to system delay. Sufficient compensation of the oscillations is given if they occur immediately after the step response to the same extent as when driving straight ahead without step excitation.
The proposed enhanced control approach uses the same parameter setting as the Stanley reference control approach. In order to find the additionally needed optimized parameter of the feedforward time t f f , we consider the tracking performance on the circuit (test run 3.2). We choose the root-mean-square cross-track error e lat,r RMSE as the metric for evaluating the performance. The evaluation includes a whole lap on the circuit, whereas the segment marked in red in Figure 4a was excluded from the evaluation because it features a curvature that is larger than the maximum drivable curvature of the vehicle, causing an unavoidable cross-track error.
To find the feedforward time t f f that minimizes the root-mean-square cross-track error e lat,r RMSE , we started with t f f = 0 s, then increased it in steps of 0.1 s for each repetition of the test run execution as long as e lat,r RMSE was decreasing, and stopped when the minimum was reached. To fine-tune t f f , we continued the procedure in steps of 0.01 s around the previously found value.

Comparison of the Control Approaches in the Simulation Environment
The controller approaches differ with respect to the consideration of the variation of the path curvature. The different behavior is most obvious when a sudden step in curvature occurs. Therefore, a first comparison is made using the step-steer maneuver where the curvature changes from 0 m −1 to 1/12 m −1 at the transition from the straight line to the circular movement. For velocities of 3 m/s and 8 m/s, we consider how large the respective maximum cross-track errorê lat,r of the two approaches is after the curvature step and how it affects the stability (test runs 1.1 S , 1.2 S , 2.1 S , and 2.2 S ).
In addition, the tracking performance of the test runs 3.1 S and 3.2 S on the test circuit is compared, taking into account not only the maximum cross-track errorê lat,r , but also the root-mean-square cross-track error e lat,r RMSE .

Application and Validation on the Real Demonstrator Vehicle
For the real demonstrator vehicle, parameter tuning is conducted as described in Section 2.5.1. The test runs 3.1 DV and 3.2 DV on the test circuit provide results to evaluate the benefits of the proposed approach on a real demonstrator vehicle. Additionally, comparisons can be made with the corresponding simulative test runs 3.1 S and 3.2 S .

Results and Discussion
According to the test and validation procedure, the analysis and discussion of the results are also divided into three subsections. First, we discuss the results of the parameter tuning, followed by the simulative results, and finally, the validation on the demonstrator vehicle. Overall, the focus is on the comparison of the Stanley approach with the proposed enhanced Stanley approach. In the diagrams, the results labeled "Stanley" refer to results using the steering angle input δ = δ Stanley from (11) and, correspondingly, the label "enh. Stanley" refers to results using δ = δ Stanley,enh based on (21).

Parameter Tuning Results
Parameter tuning was conducted following the procedure in Section 2.5.1 for both the simulation vehicle model and the real demonstrator vehicle and yielded the parameters listed in Table 3. In both cases, k so f t was chosen as recommended, and k d,steer remained at its default value since no instabilities due to delays in steering behavior occurred. The optimal parameters for k and k d,yaw differed between the simulation and the real demonstrator vehicle. For the real demonstrator vehicle, k could not be chosen to be as large as it had been in the simulation (0.8 s −1 instead of up to 3.0 s −1 ) because for larger k there was no suitable k d,yaw that met the objective of sufficient compensation of the oscillations after the step response. We see one reason for this in the fact that the yaw rate sensor signal had to be filtered on the real demonstrator vehicle to obtain a smooth signal. This resulted in a delay of the signal and, thus, a reduced stabilization effect on the vehicle guidance behavior. Model errors and other effects of the real vehicle that are not represented in the simulation model could also be among the reasons. These include sensor noise that is not part of the simulation model and insufficiently detailed modeling of the steering system behavior. On the real demonstrator vehicle, for example, small steering angle corrections are executed with a delay, especially during direction changes, because the system has a breakaway torque that must first be exceeded by a correspondingly large controller output before a movement is initiated. As a result, the oscillations around the setpoint are amplified when traveling on tracks with constant curvature, for example, on a straight line or on a stationary circular track. Both in the simulation and on the demonstrator vehicle, the optimization of t f f leads to similar results (0.18 s in the simulation and 0.2 on the real demonstrator vehicle). The purpose of t f f is to read the vehicle curvature of the point on the path that the vehicle will reach after a time of t f f . From this, the feedforward component of the steering angle output is calculated. This compensates for all delay effects within the feedforward loop so that, in the best case, the response of the vehicle to the feedforward output corresponds to the current curvature of the path. Delay effects (Section 1) include the delayed signal from the localization input, the delayed realization of the steering angle target, delays due to the build-up of lateral tire force and thus a delayed yaw rate response, and other delays due to communication between control units. The exact quantification of the delay effects is not part of this work; nevertheless, in the following, we will try to plausibilize the found value for t f f . The RTK-GNSS module used has a prediction for the vehicle's position and thus compensates for most of the delay effects that occur within the module. Only the reduced frequency of 50 Hz compared to the controller output frequency of 100 Hz has a delaying effect; we assume an average value of 0.01 s here. The realization of the steering angle using the steering angle controller was determined to be 0.1 s as described above (Section 2.1). The vehicle response (yaw rate) follows the steering angle with a delay of about 0.05 s on average, which was obtained from the evaluation of the measurement data on the test track. Based on the total delay of 0.2 s, this leaves 0.04 s for further delays in communication and effects that are not taken into account in this analysis.

Simulation Study Results
First, the results of the step-steer test runs are considered, followed by the results from the circuit test runs.

3.2.1.
Step-Steer Maneuver Figure 8 shows the course of the vehicle position and the reference path for the two controller approaches during the step-steer maneuver with 8 m/s. During straight-line driving and the lateral step, the courses of the two controller approaches are identical since, at constant curvature, the two approaches do not differ. After the transition to circular motion, differences appear in the course of the steering angle δ act and consequently also in the vehicle position and the cross-track error e lat,r as shown in Figure 9b.
When using the Stanley approach, a deviation of 1.21 m occurs as a result of the transition to circular motion since steering into the circle is conducted too late. The deviation induced leads to further oscillations, which do not fade until half of the circular path has been completed. With the enhanced Stanley approach, overshooting also occurs, but it is smaller (0.39 m) and does not lead to oscillation. In the second half of the circle, the resulting paths of the two approaches are again congruent. The results confirm the desired functionality of the enhanced Stanley approach. With the enhanced approach, the vehicle follows the given path more precisely during changes in curvature. The maneuver presented here includes a step in the curvature and, thus, in the expected yaw rate at the transition to circular motion. The yaw rate of a vehicle, however, cannot change immediately due to rotational inertia and limited tire forces. Therefore the considered maneuver represents a corner case, which, however, allows us to show the limits of both approaches.  The courses of the actual steering angle δ act and the cross-track error e lat,r for the test run with 3 m/s are shown in Figure 9a. The resulting maximum cross-track errors after the transition to circular motion occur to a smaller extent than for the test run with 8 m/s, and again the maximum deviation using the enhanced Stanley approach is smaller (0.02 m) than for the original Stanley approach (0.12 m). The dependency of the maximum deviation on the velocity is obvious since the vehicle with increasing velocity drives straight a longer distance during the delay time before the measured deviation can lead to a vehicle reaction.

Circuit Maneuver
The results of the step-steer maneuver are also confirmed in the dynamic circuit maneuver. The course of the cross-track error of both controller approaches in Figure 10 shows that the enhanced Stanley approach leads to smaller deviations over the entire round of the circuit. The evaluation of the metrics (Table 4) yields a maximum cross-track errorê lat,r of 0.013 m, which corresponds to a reduction of 77% compared to the Stanley approach (0.058 m). The root-mean-square cross-track error e lat,r RMSE is also reduced from 0.028 m to 0.004 m (−86%). Table 4. Evaluation of the two control approaches for the circuit maneuver test runs in simulation and with the demonstrator vehicle based on the metrics maximum cross-track errorê lat,r and rootmean-square cross-track error e lat,r RMSE . The relative improvements of the metrics for the enhanced Stanley approach compared to the Stanley approach are given in parentheses.

Simulation
Demonstrator

Demonstrator Vehicle Validation Results and Summary
To validate the simulated results, Figure 11 shows the course of the cross-track error on the circuit from the test runs with the real demonstrator vehicle. For the two controller approaches, the results are qualitatively comparable with the simulation results. However, the absolute cross-track errors are larger on the real vehicle. Using the Stanley approach, the maximum cross-track errorê lat,r is 0.262 m and the root-mean-square cross-track error e lat,r RMSE is 0.106 m and, thus, both metrics are about four times as large as in the simulation (Table 4). This is due to the different values obtained from the parameter tuning in the simulation compared to the demonstrator vehicle tests. By using a smaller value for k, cross-track errors on the real vehicle are corrected using smaller steering angle adjustments than in the simulation, resulting in larger deviations.
As in the simulation, the enhanced Stanley approach also leads to a reduction in the deviations for the real demonstrator vehicle, with the maximum cross-track errorê lat,r decreasing by 68% to 0.084 m, and the root mean square cross-track error e lat,r RMSE decreasing by 69% to 0.033 m. The improvement due to the enhanced approach is also clearly shown in Figure 12, where the same map segment of the simulated result and the real vehicle tests are compared. The course of the position, when using the Stanley approach, follows the path with a deviation that is on the outside of the curve. Using the enhanced Stanley approach, the course follows the nominal path with only minor deviations, partly on the outer and inner sides of the curve.    Figure 11. cross-track error e lat,r of the demonstrator vehicle circuit test runs 3.1 DV (Stanley) and 3.2 DV (enhanced Stanley). The red dashed framed segment is excluded from the evaluation because, in the beginning, it contains a curvature that is greater than the maximum drivable curvature of the vehicle. The resulting metrics for maximum cross-track errorê lat,r and root-mean-square cross-track error e lat,r RMSE are summarized in Table 4. The segment framed in blue corresponds to the map segment used in Section 3.3 to compare the simulation and demonstrator vehicle test run results.
In summary, the described results demonstrate the improvement of the tracking accuracy of the Stanley approach by the proposed enhancement. This was the primary objective of this work. A comparison of the presented approach with other control approaches has been omitted since it was not the authors' claim to achieve a better control performance than other state-of-the-art approaches. Rather, the focus was to demonstrate the significant effective improvement of the Stanley controller through a relatively minor modification. This is significant since the control approach is widely used because of its well-known simplicity, efficiency, and robustness.
The fields of application of the Stanley controller are moderate velocities and moderate vehicle dynamics, as indicated by the references [7][8][9][10] cited in the Introduction section. The proposed approach enhances the control performance by predictive feedforwarding the steering angle based on the path curvature. When the path curvature changes continuously, the feedforward component of the enhanced Stanley controller ensures that the resulting steering angle input matches the current path curvature better than it does with the original Stanley controller. This eliminates or reduces deviations from the path that would otherwise occur due to system delay. As a result, the control approach with predictive feedforward requires less control action to compensate for deviations, thus improving the robustness of the approach. At constant curvature, the controller dynamics of the proposed approach are identical to that of the Stanley controller (see Section 2.4.4). Therefore, it can be assumed that the fields of application in terms of driving dynamics and velocity of the controller remain unchanged by the enhancement and that the advantage is, therefore, mainly related to the increase in control accuracy.
To achieve robust behavior over the entire velocity range of the application, appropriate control parameters must be chosen. In none of the driving situations considered in our study, neither in the simulation nor in the driving tests with the demonstrator vehicle, did unstable behavior occur with either the Stanley or the proposed control method. This indicates that the approach we have chosen to identify suitable controller parameters is effective; however, no statement about the limits of stability at higher velocity can be made from this as the velocity of the investigated maneuvers was limited due to the vehicle's maximum velocity of 8 m/s.

Conclusions and Outlook
We have proposed an enhancement to the Stanley path tracking controller that improves its tracking accuracy by mitigating the disturbing effects of system delay. We first reformulated the Stanley approach so that the reference path curvature appears explicitly in the equation. While the reference values of all other path inputs are read from the point on the path closest to the vehicle's reference point, we chose a point on the path that is offset by the feedforward distance along the path to read the path curvature input. For the feedforward distance, we have chosen the distance that the vehicle travels at the current velocity during the constant specified feedforward time. The approach is designed pragmatically to avoid additional effort for implementation and application on a vehicle in order to retain one of the key advantages of the Stanley path-tracking controller approach. Nevertheless, the enhancement resulted in a significant reduction in cross-track error metrics. We have demonstrated this in this article both in the simulative study and with the real demonstrator vehicle.
With our solution, we address applications with moderate velocities and moderate vehicle dynamics on vehicles with sensors and steering systems affected by delays. By improving accuracy despite system delay with low computational cost, we provide a path-tracking solution that can contribute to the realization of economical, automated vehicle systems based on low-cost components. With the same input and output sizes as the Stanley controller, our solution can also be used as an easy-to-implement upgrade for existing applications using a Stanley controller without requiring structural changes or increased complexity.
In further investigations, the approach should be tested at higher velocities and, thus, more dynamic driving maneuvers to determine the limitations of the proposed controller. This requires the implementation of the device on a vehicle that allows higher velocities than the demonstrator vehicle used. Further insight can be gained by comparing the control performance of the proposed approach with the performance of other approaches, especially more complex approaches.
For the adjustments described in the following, it is necessary that the actual velocity v r has negative values for reverse driving. With the help of the sign function, the change in the sign of the velocity is used to apply sign changes in the control law at the appropriate positions.

•
The actual orientation error θ * r has an inverse effect on the desired steering angle when driving backward, so it has to be considered with an inverse sign. • The rear wheels become the guiding wheels when driving backward. This is taken into account by using the cross-track error of the rear axle e lat,r instead of the cross-track error of the front axle e lat, f . The cross-track error e lat (t), which is independent of the direction of travel, is therefore defined as e lat (t) = 1 2 e lat, f (t)(1 + sgn(v r (t))) + 1 2 e lat,r (t)(1 − sgn(v r (t))) (A1) • In (11), (18) and (21) the absolute value of the actual velocity v r must be used so that the denominator cannot become 0 and the effect of parameter k so f t is preserved. • The slip angle's orientation also changes with the direction of travel. Since the expected yaw rateψ κ,re f and the actual velocity v r also change their sign for reverse driving, (14) and (15) must be adjusted to account for the change in sign of the slip angles: θ ss, f (t) = m C y, f 1 + a b |v r (t)|ψ κ,re f (t) θ ss,r (t) = m C y,r 1 + b a |v r (t)|ψ κ,re f (t) (A2) • To maintain the stabilizing behavior of k d,yaw an additional change of sign is required in (12): δ add (t) = k d,yaw ψ κ,re f (t) −ψ r (t) sgn(v r (t)) +k d,steer (δ(i) − δ(i + 1)) +θ ss, f (t) (A3) • An adjustment of the term δ κ, f f (t) is not necessary because the sign change of the velocity automatically changes the direction of the path coordinate offset s f f in (20).