{'fraction_non_alphanumeric': 0.02611785335240644, 'fraction_numerical': 0.005491209450417609, 'mean_word_length': 4.7745803357314145, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Small-scale Experimental Test Rig for Lateral Vehicle Control

This paper presents the design and implementation of a small-scale hardware-in-the-loop test environment for lateral vehicle dynamics controllers. The test rig consists of a conveyor belt and a 1:10 scale model vehicle. The vehicle is anchored to the frame of the conveyor belt using a special fixture, which constrains only the longitudinal displacement of the car. Therefore, the longitudinal velocity of the vehicle is provided by the conveyor belt, while the steering is generated by the computational unit, where various control methods can be implemented. The test rig is equipped with sensors that provide accurate measurements of the position and orientation of the car, which can be used as feedback in the control algorithms. The paper includes a case study, where the analytical stability analysis of a lane-keeping controller is verified with experiments on the test rig. The proposed test environment provides a compact, cost effective and versatile framework for the testing of various steering control methods in a running vehicle, while maintaining the benefits of a controlled laboratory environment. The experimental setup can also be used for educational and demonstrational purposes.


Introduction
The development of advanced driver assistance systems is a time consuming, resource intensive process. In order to guarantee stable and safe operation under all potential circumstances, each individual system component, as well as their interactions have to be thoroughly tested and validated. It is estimated that up to 50 % of the total development cost of automotive control systems is related to verification and validation [1] due to the iterative nature of the development process.
Depending on the stage of development, several techniques are available for the validation of automotive control systems, with various advantages and disadvantages (the so-called V-diagram is often used to illustrate the relationship between different stages of development and the corresponding validation phases, see [2]). Generally, the most cost effective, fast and repeatable verification method is the use of numerical simulations. These benefits make it suitable for performing fast design iterations and detecting potential system defects early on, greatly reducing the time requirement and cost of later stage troubleshooting.
Basic numerical simulations can be extended by integrating actual system components and code into the simulation, leading to various software-in-the-loop and hardware-in-the-loop tests. Some examples from the field of vehicle control systems are shown in [3][4][5]. In addition, the interaction between the driver and the control system can also be tested in laboratory conditions using driving simulators, as in e.g. [6]. A unique solution was shown in [1], where a so-called vehicle-in-the-loop concept was presented. In the proposed test arrangement, the entire vehicle is mounted on a roller test stand, while the relative movement of other traffic participants is modeled with wheeled mobile robots. Since only relative motions with respect to the test vehicle need to be realized, this approach allows to test the implementation of the control system in a full-scale vehicle with multiple traffic participants, while maintaining the benefits of a controlled laboratory environment.
As a final stage of the verification process, the vehicle must be evaluated in test drives too (either on the test track or in real traffic), to gain a full picture of the control system's behavior in real-life circumstances. Although these tests are relatively hard to reproduce, expensive and time consuming, they still provide invaluable data, since none of the above alternatives can replicate all aspects of a real-life driving scenario.
In this paper, we propose a hardware-in-the-loop approach using a small-scale vehicle model running on a conveyor belt. The conveyor belt provides the longitudinal velocity of the vehicle, while the steering angle can be generated by the computational unit. The sensor system of the test rig provides accurate measurements of the vehicle's lateral position and yaw angle that can be used as feedback for the control algorithm. The proposed setup offers a compact, fast and flexible solution to validate vehicle motion control systems in a running vehicle at an earlier stage of development, without the complexity and expenses of a full-scale vehicle test. As a case study, the stability analysis of a lane-keeping controller is provided, where the analytical results are verified with experiments on the test rig.
The rest of the paper is organized as follows: in Section 2, the individual components and features of the experimental setup are detailed. Section 3 presents the design and stability analysis of a lane-keeping controller based on the single-track vehicle model. In Section 4, the lane-keeping controller is implemented on the test rig and the analytical results are verified with experiments.

Experimental setup
The main purpose of the test rig is to provide a compact and versatile experimental framework to help validate analytical results of various mechanical models and control schemes. With this in mind, the following general requirements were defined: • The ability to emulate lane-keeping and lane-changing scenarios, where the longitudinal velocity of the vehicle is significantly larger than its lateral velocity and the yaw angles remain small. • The test vehicle should have four wheels with rubber tires for realistic modeling of the tire-ground contact. • Steerable front wheels and adjustable longitudinal velocity. • Accurate measurement or estimation of the vehicle's in-plane position and orientation. • Hard real-time scheduling of the control software with variable sampling rate. • Robust structure, stability loss should not lead to personal injuries or equipment damage. • Modular design with the potential of future expansion for testing related problems.
Based on the above requirements, the experimental setup in Fig. 1 was constructed. In the remainder of Section 2, the individual functions and their implementation is detailed.

Road surface
The most obvious choice for modeling the road surface is to simply use the laboratory floor. However, this approach limits the usable space and surface inhomogeneities may also occur. In order to ensure both road surface homogeneity and an unlimited running distance, some kind of looped surface can be applied. Generally, this either means that the vehicle runs on the surface of rolling drums, or on a flat conveyor belt. We opted for the latter approach, since it makes it easier to realize actual lateral movement of the vehicle.
In order to reduce development time and cost, a commercially available treadmill was chosen with a track width of 40 cm. Its original power transmission and the DC motor drive have been replaced in order to achieve full control over the belt speed. As a result of these modifications, the maximum speed was increased to 20 km/h.

Small-scale vehicle
The test vehicle is based on an RC model car (Tamiya M-05, 1:10 scale), which includes sprung wheel suspensions and mechanically coupled steering of the front wheels, similarly to most passenger cars. The main specifications of the test car are listed in Table 1.

Fixation of the test vehicle on the conveyor belt
Instead of allowing the vehicle to run freely on the conveyor belt (which would make its accurate localization difficult), a custom 5 degrees-of-freedom suspension system was designed and built (see Fig. 2). This suspension system leads the small-scale vehicle in the longitudinal direction of the conveyor belt, while all the other degrees of freedom of the vehicle are not constrained.
The suspension system includes a roller bearing linear guide in the lateral direction. The carriage of the linear guide is connected to the vehicle using a 3D printed mechanism. Ball bearings are implemented at each joint of the mechanism to reduce friction.

Sensors
In order to apply lane-keeping control, the localization of the vehicle must be solved. To keep the sampling frequency on a high level, camera based solutions were excluded. Contact-less laser based sensors are expensive and their application can be circumstantial. After considering these alternatives, the fixation mechanism was equipped with the necessary sensory system. On the one hand, the position of the carriage of the linear guide is measured by a magnetic linear encoder (type: TMLS-25B) with a resolution of 0.025 mm, as shown in Fig. 2. On the other hand, the yaw and roll angles of the vehicle are measured by magnetic rotary sensors (type: Novotechnik RFD-4021-606-211-401) with a resolution of 0.15°. Fig. 3 shows the fixation mechanism with the angular position sensors.

Computation
A National Instruments CompactRio-9039 controller is used as a real target computational and signal processing unit, see Fig. 1. An NI-9201 (8-channel, 12-bit) analog input module digitizes the voltage signal of the rotary sensors; NI-9401 digital I/O interfaces are applied for the linear encoder, and to generate the PWM reference signal for the steering servo of the RC car and for the DC drive of the conveyor belt.
The applied control algorithm was implemented in LabVIEW. The controller runs at a fixed sampling rate of 1 kHz. In the course of each scan period, the controller reads and processes the sensor data, calculates the vehicle position and generates the control signal. In order to analyze the effects of time delay, a First-In Last-Out (FILO) buffer is applied by which artificial feedback delay can be added to the control loop.

Mathematical model
In the following, the stability analysis of a lane-keeping controller using delayed state feedback is presented.
The analytical results will be compared to experiments on the test rig in Section 4.

Vehicle dynamics
The calculations are based on the in-plane single-track vehicle model (see Fig. 4), which includes the following assumptions: • The vehicle is symmetric to its longitudinal axis.
• The tire contact patches are summarized axle-wise at the front and the rear axle. • The vehicle center of gravity is at the ground level (no roll and pitch dynamics). • External forces only arise at the tires.
The equations of motion of the vehicle in the body-fixed coordinate system are the following: where the vehicle states u, v and r are the vehicle's lateral and longitudinal velocity, and its yaw rate, respectively. Dots refer to derivatives with respect to time. The steering angle is denoted by δ. The vehicle parameters include the vehicle mass m, yaw moment of inertia J z , and the geometrical parameters a and b that define the location of the center of gravity, as shown in Fig. 4.
denote the longitudinal tire forces that can be considered as an input (the total driving or braking torque is distributed between the front and rear wheels with a given transmission ratio). The tire side forces F y i are modeled as linear functions of the slip angles: where the side slip angles at the front and rear wheels are and C i denote the (axle-wise summarized) tire cornering stiffnesses. The self-aligning moments M z are assumed to be small, therefore they are neglected.
Equation (1) describes the dynamics of the vehicle in its body-fixed coordinate system, which is independent from the vehicle's position and orientation in the plane. However, in order to implement a lane-keeping controller, the position information also needs to be considered. The main difference between the above, general vehicle dynamics model and the mechanical model of the towed RC car on the proposed test rig is illustrated in Fig. 5. During the analysis of constant speed motion, the  longitudinal velocity u of the vehicle is assumed to be constant in our mathematical model (see Fig. 5 (a)). The conveyor belt, on the other hand, generates a towing effect on the vehicle, which fixes the X component of the velocity vector in the hitch point J (see Fig. 5 (b)). It can be shown, however, that near the equilibrium corresponding to straight-line motion along the X axis (i.e. in the linear sense), the kinematic constraints of the two different models in Fig. 5 become equivalent. Therefore, this difference in modeling does not affect the linearized dynamics, and the linear stability analysis in Section 3.2 will lead to the same results in both cases. In the linear case, the longitudinal dynamics can be decoupled from the lateral dynamics, and the design of the steering controller can be based on the reduced linear system:

Control design
where the state vector x = ( ) v r Y ψ T and the input u = δ include small deviations from the equilibrium. The system and input matrices are In order to control the above linearized lateral dynamics of the vehicle, the feedback controller is applied, where τ denotes the feedback delay. Note that the delay term can also be interpreted as the reflex delay of a human driver [7]. Therefore, the above model is also suitable for modeling the dynamics of a human controlled vehicle.
Since in the experimental test rig the directly measured quantities are the lateral displacement Y and the yaw angle ψ, the gain vector K is chosen as The characteristic equation of the closed loop system is: where λ ∈  denotes the characteristic exponent. Substituting λ = 0 into Eq. (11) leads to the boundary of static loss of stability k y = 0, where a real characteristic root crosses the imaginary axis, and a divergent loss of stability occurs.
At parameter values where λ = ±iω ω ∈ ( ) +  , a complex conjugate pair of roots may move to the right half plane and the vehicle loses its stability with oscillations. Separating the real and imaginary parts of the equation D(λ = iω) = 0 (see Eq. (11)), the parametric expressions k y (ω) and k ψ (ω) can be expressed that form a boundary in the ( k y , k ψ ) plane, separating stable and unstable parameter regions. Among other ways, the stable regions can be verified using Stépán's formulae [8] or the semi-discretization method [9]. The stable domain and the D-curves are plotted in Fig. 6, along with the frequency of the arising oscillations along the boundary of dynamic stability loss (which is determined by the imaginary part of the critical roots, f = ω/2π).  Table 2.

Experimental results
In Section 4, the lane-keeping controller is implemented in the test rig to verify the analytical results from Section 3.
First, the vehicle parameters corresponding to the experimental setup had to be determined. These are listed in Table 2. The vehicle mass and center of gravity was measured in the same position as in the test rig, including the fixture connecting the car to the linear guide, as well as its support. The yaw moment of inertia was calculated by first approximating the vehicle as a cuboid with given mass, width, and length, then increasing this value to account for the fixation and the carriage.
The side force characteristics of the tires of the model vehicle were determined by experiments: while towing a pair of wheels on the running conveyor belt, a constant lateral force was applied and the resulting yaw angle was recorded. Since the running direction of the conveyor belt is fixed, the yaw angle corresponds to the side slip angle of the tires. Performing this measurement while increasing the lateral force in steps leads to the lateral tire characteristic curve of the wheels. The cornering stiffness values at the front and rear axles were determined by normalizing the lateral force for small side slip angles with respect to the vertical load and fitting a line to the measurement results (see Fig. 7). Multiplying the slope of this fitted line with the vertical load at the front and rear axles of the model vehicle lead to the cornering stiffness values listed in Table 2.
The goal of the experiments was to determine the stable domain of control parameters in practice for a given combination of vehicle speed and feedback delay. Since the sampling frequency was 1 kHz, the feedback delay was implemented artificially from the software side, while sensor delays and the dynamics of the steering system were neglected.
Before starting each measurement, the vehicle was steered into the equilibrium position to ensure identical initial conditions and to reduce the effects of possible nonlinear phenomena. The control gains were increased in small steps between each measurement, starting from stable values near the boundary of static loss of stability. Once the equilibrium of stable straight-line motion was reached, a small perturbation was applied to verify the stability of a given pair of k y and k ψ . The perturbation was added in the form of either increasing the steering angle by 0.5-1° for a small amount of time (< 1 s) or by applying some lateral force at the front axle by hand. The latter method was necessary in case perturbing the steering angle had no effect due to freeplay. As a result of the perturbation, the system either regained its stability, or it started oscillating with an increasing amplitude. The measurements were repeated by increasing either k y or k ψ in small steps, until oscillations were observed. In some cases, stability loss occurred without perturbing the system, due to measurement noise. Fig. 8 shows the results at the speed of 8 km/h for two different values of time delay. It clearly shows from the experimental results that increasing the feedback delay leads to a decrease in the stable region, similarly to the   analytical results. However, both the shape and the size of the experimentally determined stable areas are different from what the analytical model showed. In addition, there is some disparity between the oscillation frequencies predicted by the model and those observed on the test rig: as an example, in point A of Fig. 8 (a) a main frequency component of 0.7 Hz was observed instead of the 1 Hz predicted by the model (see Fig. 6 (b)).
There can be a number of reasons for this difference. First, the exact value of certain parameters (cornering stiffnesses and moment of inertia) were only estimated in the model, which affects the shape of the analytical D-curves.
Second, subcritical Hopf-bifurcations have been identified at the boundaries of dynamic stability loss [10], which is often the case in time delay systems [11,12]. This means that an unstable periodic orbit exists around the equilibrium of straight-line motion in some regions of the stable domain. If the perturbation (or even the measurement noise) is large enough to push the system outside the stable manifold of the equilibrium, the vehicle will lose its stability even if the control gains are chosen from the linearly stable domain. This phenomenon was clearly observed in the experimental results. Moreover, stable periodic orbits have also been found both in the mathematical model and on the test rig for certain parameter combinations. A thorough exploration of the nonlinear dynamics of the system is a main subject of our future research.
The mathematical model also includes a lot of simplifications compared to the real system. Apart from the idealizations of the bicycle model, the presence of dry friction and freeplay in the steering mechanism may have the most significant effect in altering the results. Even though smaller perturbations may be used to avoid unstable limit cycles, if the applied perturbation is too small, it will have no effect due to dry friction. Similarly, if the actuated steering angle is too small, the freeplay of the steering system will prevent it from showing up at the wheels. An additional unmodeled dissipation in the linear guide might also cause some discrepancies between the theoretical and the measurement results.
The dynamics and the lower-level control of the steering actuation were also neglected in our model. In particular, the quantization effects of the digital servo might have a strong influence on the overall dynamics of the system [13].
Nevertheless, the experimental results show good qualitative accordance with the calculations. The position, shape and size of the stable regions are comparable to what the analytical model suggested, and the negative effects of time delay are clearly visible in the experiments too.

Conclusion
A small-scale test environment was presented for the experimental analysis of certain autonomous driving functions. The main benefits of the proposed setup are that it is cost effective, and it can provide faster, safer and more easily reproducible experimental results than full-scale vehicle tests. Thanks to its modular framework, the system can be easily upgraded with better sensors, a higher quality vehicle model or a wider conveyor belt to cover more road surface. Apart from the experimental verification of academic results, the test rig also provides a good framework for educational and demonstrational purposes.
As a case study, the stability analysis of a lane-keeping controller was presented with experimental validation on the test rig. Good accordance was found between the analytical and experimental results, with some quantitative differences. The results could be improved with the use of more accurate vehicle parameters (cornering stiffness, moment of inertia), and a more advanced mechanical model (dry friction, freeplay). In addition, the nonlinear analysis of the system can uncover a more in-depth explanation for the observed results (Hopf-bifurcations, periodic orbits). The consideration of the above is the subject of future research.