Keywords

1 Introduction

Modern traffic safety is increasingly dependent on Advanced Driver Assistance Systems (ADAS). Test track testing is required to ensuring effectiveness and function of these systems. These tests are typically performed by replicating a real traffic scenario, and may include many actors. For scenarios including bicyclists, a bicycle robot is required that can be controlled according to the specific scenario be a specified trajectory. In response to the complexities of evaluating ADAS in cycling-related scenarios, we have developed a robotic bicycle equipped with self-balancing and path-tracking capabilities.

A common nature of ADAS test track test problem is repeatability. In practice, multiple test objects may be configured to repeat the same motion profile to simulate a traffic situation. However, lackness of prior knowledge about test uncertainties such as side wind, leaning pavement etc., might influence the robustness and precision of the test.

The problem formulation fits the framework of iterative learning control(ILC), where adaptive feed forward is learnt from previous test interactions. Iterative learning control have been proposed previously in the literature for vehicles. In Kapania and Gerdes, [3], controllers are proposed for race car driving, where the lateral control is improved over the laps. Both a PD and an LQ controller were proposed. With a similar concept but more innovation, [4] uses iterative learning scheme to realize an adaptive model predictive controller for a rover on Mars. The dynamical model of the system is improved after each iteration for better overall performance. Both of the papers reduce the lateral errors using ILC controllers.

ILC algorithms acquire information from the previous errors and utilize them to reduce the errors over iterations. For multiple-input multiple-output(MIMO) and nonlinear systems, more techniques need to be combined with ILC to guarantee convergence. The challenge comes from the coupled dynamics in different dimensions [5]. In this paper, to track the two-dimensional trajectory represented in Cartesian coordinates (X(T), Y(T) ), we have decomposed the ILC trajectory tracking problem into a longitudinal and a lateral motion ILC tracking problems. This decomposition is based on several underlying assumptions related to lower level controllers and no tyre side-slip.

Fig. 1.
figure 1

Bike schematics

Fig. 2.
figure 2

Schematic Block of the roll tracking controller

2 Method

In this section, we first discuss the problem formulation and setup. Models will be given to describe the involved dynamics. Then the ILC framework will be introduced with the aim to reduce the tracking errors for each iteration. A theme across the approach taken is the separation in the dynamic states such that simpler control strategies can be applied. We start with the roll dynamics and its connection to the planar motion of the bicycle.

On the bicycle robot, tracking the planar position (X(T), Y(T) ) can be achieved by lateral and longitudinal control using steering motor and drive motor respectively. The lateral control controls the steering angle \(\delta \) and longitudinal control controls the rear wheel speed v.

The roll dynamics of the unstable bicycle \(G_{\varphi \delta }\) is given by (16) in [1]

$$\begin{aligned} \frac{d^2 \varphi }{d t^2} = \frac{g}{h_{CM}} \varphi + \frac{a v \sin {\lambda }}{b h_{CM}} \frac{d \delta }{d t} + \frac{ (v^2 h_{CM} - acg) \sin {\lambda } }{b h_{CM}^2} \delta \end{aligned}$$
(1)

where \(g = 9.81\) m/s\(^2\) and other parameters are detailed in Fig. 1.

The unstable bicycle is balanced by a cascaded controller, as illustrated in Fig. 2. The inner balancing loop in Fig. 2 stabilzing the roll dynamics \(G_{\varphi \delta }\) by controlling the steering angle rate \(\dot{\delta }\). The outer loop is a roll angle tracking controller that tracks a roll angle reference \(\varphi _{ref}\). There is a physical connection between the heading direction changes of the bicycle \(\dot{\psi }\) and the leaning angle \(\varphi \). Hence, the outer loop also influence the orientation of the bicycle. Under the assumption of fast closed loops in Fig. 2, we may neglect the dynamics from roll angle reference to heading. The model (1), can be used to obtain a function of a steering angle \(\delta \) and a roll angle \(\varphi \) in steady state. Hence, the reference steering angle \(\delta _{ref}\) can be translated into reference roll angle \(\varphi _{ref}\) and fed into the control loop (Fig. 4).

Fig. 3.
figure 3

Tracking error definitions

Fig. 4.
figure 4

The bicycle robot

The dynamics of position (XY) relates to the heading \(\psi \) and the steering angle \(\delta \):

$$\begin{aligned} \dot{X} &= v \cos {(\delta _{eff} + \psi )} & \dot{Y} &= v \sin {(\delta _{eff} + \psi )} \end{aligned}$$
(2)

To evaluate the tracking performance, tracking errors can be computed in bicycle local coordinate, resulting in lateral and heading components (\(e_{1}\) and \(e_\psi \) in Fig. 3):

$$\begin{aligned} \dot{e}_1 &= v (\delta _{eff} + e_\psi ) & \quad & \dot{e}_{\psi } = \dot{\psi } - v\mathcal {K} \approx v (\frac{\delta _{eff}}{b} - \mathcal {K}) \end{aligned}$$
(3)
$$\begin{aligned} \frac{d {e_1}}{d d_s} &= (\delta _{eff} + e_\psi ) & \quad & \frac{d {e}_{\psi }}{d d_s} \approx (\frac{\delta _{eff}}{b} - \mathcal {K}) \end{aligned}$$
(4)

In these formulations, \(\delta _{eff} = \delta \sin {(\lambda )}\) represents the effective steering angle reference \(\delta _{eff}\) computed by the lateral controller, and \(\mathcal {K}\) the path curvature. \(d_s\) is the travel distance, with \(v = \dot{d_s} \) as its time derivative. A key insight derived from (4) is that, if the lateral controller only depends on position (XY), or equivalently \(d_s\), the lateral and heading errors \(e_{1}\) and \(e_\psi \) are both time-independent. This is because \(\delta _{eff}\) does not depend on time. This result is based on several assumptions on the model (2): non-slip tyre ground contact and ideal control of steering angle \(\delta \). The slip-free assumption accords with the relatively slow speed (<4 m/s) and the ideal control of steering requires fast enough balancing and steering control loops, such that the transients can be neglected. We utilized a time-independent controller from [2] to reduce the lateral error, denoted as \(K_{lat}(X, Y)\). Then the learned ILC feedforward signal \( K_{\delta ILC}(T)\) can be re-indexed into \( K_{\delta ILC}(d_s)\), independent of time T or speed v.

As another important factor, the longitudinal control relates to the test progress. The rear wheel speed v determines how fast the bicycle runs and the total duration of the iteration. Noticing path length to be roughly unaffected by the path deviation due to the lateral controller, we assume the speed v is independent on the lateral tracking errors \(e_1\) and \(e_{\psi }\). This assumption allows us to split the ILC trajectory tracking problem into a lateral ILC and a longitudinal ILC problem. Integrated into the motor microcontroller, a local speed PID controller tracks a given speed reference \(v_{ref}\). By changing \(v_{ref}\), ILC controller influences the progress indirectly. The propulsion motor dynamics can be modelled simply as resistor, inductor , voltage source and motor connected in series. The load of the motor in longitudinal dynamics can be modelled as a Mass-Damping system and a speed controller integrated in the motor driver tracks a reference speed \(v_{ref}\). A longitudinal controller \(K_{v}(X, Y, T) = v_0 + k_{v} e_2(T)\) tracks the progress with a constant gain \(k_{v}\).

The ILC framework refines feedforward signals for steering angle \(\delta \) and speed v over repetitions. As the lateral path is independent of speed variations, the lateral feedforward signals \(K_{\delta ILC}(d_s)\) can also be indexed by the travel distance \(d_s\), resulting in,

$$\begin{aligned} \delta _{ref}(X, Y) &= K_{lat}(X, Y) + K_{\delta ILC}(d_s) \end{aligned}$$
(5)
$$\begin{aligned} v_{ref}(X, Y, T) & = K_{v}(X, Y, T) + K_{v ILC}(T) \end{aligned}$$
(6)

where \(K_{v ILC}(T)\) is the ILC feedforward for longitudinal speed v. \(\delta _{ref}\) is converted into \(\varphi _{ref}\) and fed into the outer loop in Fig. 2 according to (1) in steady state.

The ILC controllers, \(K_{\delta ILC}(d_s)\) and \(K_{v ILC}(T)\) are chosen to be standard Proportional-Derivative controllers, as in e.g. [3]:

$$\begin{aligned} K_{v ILC}^+(T) &= v_{ref}(T) - k_{v p} e_2 (T) - k_{v d} (e_2(T) - e_2(T-1)) \end{aligned}$$
(7)
$$\begin{aligned} K_{\delta ILC}^+(d_s) &= \delta _{ref}(d_s) - k_{\delta p} e_1 (d_s) - k_{\delta d} (e_1(d_s) - e_1(d_s- \varDelta d_s)) \end{aligned}$$
(8)
$$\begin{aligned} d_s(T) &= \int _0^T v dt \end{aligned}$$
(9)

with the superscript \(^{+}\) denotes the variable in the new iteration. \(\varDelta d_s\) is a constant longitudinal step to obtain equidistant samples. \(k_{\star p}\) and \(k_{\star d}\) denote the proportional and derivative gains in the dimension \(\star \) respectively. Zero-phase low-pass filters have been further added on \(K_{v ILC}^+(T)\) and \(K_{v ILC}^+(T)\) for robustness. See (16) in [3] for details (Fig. 5).

Fig. 5.
figure 5

Control structure of the overall system

Fig. 6.
figure 6

Validation tests

3 Result

To assess the effectiveness of the ILC framework (5)(6), we conducted a simulation with the unstable linearized model of the bicycle in (1). A dynamical drive motor model is also used for longitudinal dynamics, together with the modeling of road inclinations and uneven road surfaces. Incorporating curves and straight lines, an infinite-shaped path with equidistant waypoints profile was selected for the simulation. The ILC speed controller is expected to dynamically adjust \(v_{ref}\) to counteract longitudinal speed v variations induced by steering actions \(\delta \). The results visualized in Fig. 6 show a progressive reduction in the root-mean-square(RMS) error across multiple iterations. Initial offsets in heading \(\psi \) and position (XY) have also been imposed to create initial transients. In 5 iterations, the RMS is reduced from 1.7 m to 0.6 m. The residual errors may be related to the coupling of longitudinal speed (acceleration) and steering with the lower level balancing loops (Fig. 2). They are neglected in our previous assumptions regarding ideal control in (3).

The absolute values of the lateral error \(e_1\) and longitudinal error \(e_2\) are further visualized in time domain, shown in Fig. 7. The errors during the beginning of each iteration (0–10 s) were similar, because of the overwhelming transients of the balancing and longitudinal speed control loops. While improvements can be seen after this start-up, where the maximum absolute errors are reduced from 1.49 m to 0.67 m and from 1.55 m to 0.73 m in \(e_1\) and \(e_2\), respectively.

Fig. 7.
figure 7

\(|e_1|\), \(|e_2|\), \(\delta \) and v in time domain.

4 Conclusions

This paper presents the design of a MIMO Iterative Learning Controller specifically tailored for the trajectory tracking of an autonomous bicycle. By assuming ideal control over steering and neglectable balancing transients, the task is effectively divided into longitudinal and lateral sub-problems. The lateral-longitudinal error separation is the crucial component in this approach. Simulation results demonstrate the effectiveness of this approach. Under the typical position dependent disturbances from slopes and resistances, the ILC controllers could reduce the errors over repeated test iterations.

However, the authors see more challenges in real application. Both the steering ILC controller \(K_{\delta ILC}\) and the path-tracking controller [2] are based on linearization and may fail with large \(e_1\) or \(e_{\psi }\). Moreover, the real roll-longitudinal coupling may be more complicated than what we have modelled.