1 Introduction

To reduce emissions and traffic in cities, electric bikes (e-Bikes) represent a suitable means of transport, whose diffusion significantly increased, see [1, 4] for a detailed review. Among the different alternatives, series-parallel e-Bike architectures, e.g., [8, 10], are interesting because they merge the advantages of parallel bikes, the most diffused on the market, and the series ones, which can increase the user experience when properly controlled to manage the absence of a mechanical chain. Indeed, an electrical transmission becomes, through the battery, the link between the in-wheel traction motor and the rider, whose power is converted into electrical by a generator directly mounted on the pedals. Therefore, when an e-bike can operate in series mode, a specific control law is necessary to deliver the human power to the wheel or to store it in the battery.

The current literature on series mode control is mainly focused on the control of the link between vehicle dynamics and human behavior. Indeed, it becomes a fundamental step before facing energy management, as in [3]. Particularly, [2] explored the potential of a chain-less bike by virtually emulating a chain transmission, whose ratio can be freely designed by the rider. This approach is known as virtual-chain. Recently, [10] evolved this framework into a virtual-bike, in order to emulate not only the behavior of the chain but also the dynamics of a virtual bike, whose parameters are user-chosen.

In this work, we aim at improving the virtual-bike framework by proposing a self-tuning strategy, in order to adapt its control parameters, making them independent of a specific rider/bike pair. Specifically, vehicle/rider’s parameters are identified in real-time while riding the bike: i.e., the bike coasting-down resistance and the total mass of the system, which are explicit parameters of the virtual-bike control law. Toward this aim, in this work, the virtual-bike control is integrated with a Recursive Least Squares (RLS) [7] approach in order to estimate the previously mentioned parameters. Indeed, RLS is an eligible solution for this application, where the identification problem is linear with respect to the parameters and the control law is an explicit function of the identified parameters.

The proposed approach has been experimentally tested to see the interaction of the control law and the adaptive strategy when the rider is on the bike. Experimental results show the general validity of the approach, but some limitations have been experienced. Indeed, the input applied to the system is not sufficiently exciting to correctly estimate the vehicle/rider’s parameters. This happens with some combinations of the user-chosen design parameters of the virtual-bike.

The remainder of the paper briefly shows the vehicle modeling in Sect. 2, before introducing the adaptive virtual-bike control in Sect. 3. Then, the experimental results are shown in Sect. 4. Finally, the paper ends with some concluding remarks and future directions.

2 Vehicle Overview and Modeling

The considered vehicle is the one introduced in [10]. It is composed of a rear in-wheel electric motor, and a mid-drive generator, fed by a battery pack. Then, the key element is the free-wheel mechanism in the chain, which is responsible for the switch from a series to parallel architecture. Indeed, it can engage or disengage the chain, depending on the difference between the rotational speed on the wheel and pedal side [10]. Given that the vehicle is designed to engage the chain at low speed only, the parallel bike is just a transient architecture handled as in [9]. Hence, the vehicle control is for the series mode only, and so the model is presented for this scenario.

When an e-Bike works in series mode, the pedal and wheel side are mechanically decoupled. Therefore, the longitudinal dynamics can be effectively described by considering the longitudinal force balance below [2, 10]:

$$\begin{aligned} M\frac{\textrm{d}v}{\textrm{d}t} = \frac{T_\textrm{m}}{R_\textrm{w}} - F_\textrm{cd}(v), \end{aligned}$$
(1)

where M is the total vehicle mass, composed of the bike \(M_\textrm{b}\) and the rider’s one \(M_\textrm{h}\). Then, v is the longitudinal speed, \(R_\textrm{w}\) is the wheel radius, and \(T_\textrm{m}\) is the torque provided by the in-wheel electric motor. \(F_\textrm{cd}\) is the coasting-down force that is typically modeled through a second-order polynomial function of the speed:

$$\begin{aligned} F_\textrm{cd} = F_\textrm{cd}(v) = C+Bv+Av^2, \end{aligned}$$
(2)

where ABC are model parameters. However, the longitudinal model in (1) can be simplified into a linearized one:

$$\begin{aligned} M\frac{\textrm{d}v}{\textrm{d}t} = \frac{T_\textrm{m}}{R_\textrm{w}} - \beta v, \end{aligned}$$
(3)

where

$$\begin{aligned} \beta = \frac{\textrm{d}F_\textrm{cd}}{\textrm{d}v} = 2Av+B. \end{aligned}$$
(4)

On the pedal side, due to the low inertia of the generator, the model is much simpler and the following torque balance holds:

$$\begin{aligned} T_\textrm{h} = -T_\textrm{g} \end{aligned}$$
(5)

where \(T_\textrm{h}\) is the human torque applied by the rider and \(T_\textrm{g}\) the one applied by the generator.

3 Adaptive Virtual-Bike Control

The virtual-bike control law, introduced in [10] is the evolution of the virtual-chain control law from [2]. The virtual-chain is the solution of a bilateral control problem [11]: it returns a reference speed \(\varOmega _\textrm{p}\) for the generator on the pedals, as a function of the wheel speed \(\varOmega _\textrm{w}\), and a reference torque \(T_\textrm{m}\) for the in-wheel traction motor, as a function of the cyclist’s torque \(T_\textrm{h}\). Then, if the reference pedal speed and motor torque share are designed to be respectively proportional to the wheel speed and rider’s torque, the proportionality factor plays the role of a virtual chain ratio:

$$\begin{aligned} \varOmega _\textrm{p} = \frac{\varOmega _\textrm{w}}{\tau _\textrm{v}} \quad \text {and} \quad T_\textrm{m} = \frac{T_\textrm{h}}{\tau _\textrm{v}}. \end{aligned}$$
(6)

It is worth mentioning that the virtual chain ratio is a user-chosen parameter, which can be freely designed, also as a function of the vehicle speed, according to the rider’s preferences, even to keep a constant desired cadence.

This framework has been extended to the virtual-bike control by solving an impedance control problem [5] in the Laplace domain. In this way, the pedal speed and the reference torque become:

$$\begin{aligned} \varOmega _\textrm{p} = \frac{\varOmega _\textrm{w}}{\tau _\textrm{v}} \quad \text {and} \quad T_\textrm{m} = \frac{Ms+\beta }{M_\textrm{v}s+\beta _\textrm{v}}\frac{T_\textrm{h}}{\tau _\textrm{v}}, \end{aligned}$$
(7)

where \(M_\textrm{v}\) and \(\beta _\textrm{v}\) represent the virtual mass and the virtual friction coefficient of the bike desired by the user. Considering that s is the Laplace operator, the electric motor torque is now related to the rider’s one through a transfer function and not by a static relationship as in the virtual-chain. The advantage of such an approach is the feeling experienced by the rider to be on a different bike, which can be freely designed. The main drawback of this control law is that the rider’s mass and the bike costing-down resistance are necessary to compute M and \(\beta \).

Therefore, in this work, the main goal is the self-tuning of these parameters, in order to have a control law independent of their previous knowledge. To self-tune M and \(\beta \), a recursive least-squares (RLS) problem has been formulated, exploiting that the vehicle dynamics in (3) can be re-written as:

$$\begin{aligned} a(t) = \frac{1}{M}\left( F_\textrm{m}(t) - Av^2(t)-Bv(t)-C\right) , \end{aligned}$$
(8)

where a is the vehicle acceleration and \(F_\textrm{m}= T_\textrm{m}/R_\textrm{w}\). The RLS solution is computed by analytically [6] solving:

$$\begin{aligned} \theta ^*(t) = \textrm{argmin} \sum _k^t \left( a(k)-\phi ^T(k)\theta \right) ^2, \end{aligned}$$
(9)

where \(\theta \) is the vector of parameters and \(\phi \) the vector of measurements sampled at time instant k:

$$\begin{aligned} \theta ^T = \frac{1}{M}\left[ \begin{array}{cccc} 1, & - A, & - B, & - C, \end{array} \right] \quad \text {and} \quad \phi ^T(k) = \left[ \begin{array}{cccc} F_\textrm{m}(k), & v^2(k), & v(k), & 1 \end{array} \right] . \end{aligned}$$
(10)

Hence, the self-tuned virtual-bike control law becomes:

$$\begin{aligned} T_\textrm{m}(t) = \frac{M(\theta ^*(t))s+\beta (\theta ^*(t),v(t))}{M_\textrm{v}s+\beta _\textrm{v}}\frac{T_\textrm{h}}{\tau _\textrm{v}} = \frac{1}{\theta ^*_\textrm{1}(t)}\frac{s-\left[ 2\theta ^*_2(t)v(t)+\theta ^*_3(t)\right] }{M_\textrm{v}s-\beta _\textrm{v}}\frac{T_\textrm{h}}{\tau _\textrm{v}}. \end{aligned}$$
(11)

To conclude, the adaptive virtual-bike control law affects the link between the rider’s torque and the motor one making it a transfer function with time-varying parameters. A graphical representation of the control scheme is given in Fig. 1.

Fig. 1.
figure 1

Adaptive virtual-bike control scheme.

Fig. 2.
figure 2

Experimental results. (Left) Measured speed is compared, during an acceleration phase, with the reference when in series mode (after the diamond), and the error is compared with the nominal non-adaptive solution, in tables. (Right) Evolution of the adaptive estimation of the coasting-down force compared with the nominal non-adaptive model, during a longer test.

4 Experimental Results

The effectiveness of the proposed methodology is experimentally tested on the same bike presented in [10] but with a different rider. Experimental tests showed the emulation capabilities of the self-tuning approach, despite a voluntary wrong parameter initialization \(\theta ^*(0)\). Moreover, different user-chosen parameters have been considered, ranging from a lighter to a heavier virtual tuning of the bike. Figure 2 shows the mismatch between the measured speed and the desired one, i.e., the speed computed imposing the chosen vitual-bike model, which is numerically quantified through the RMSE (Root Mean Square Error) comparing the adaptive approach and benchmark non-adaptive one developed in [10]. The adaptive solution was revealed to be superior except for one scenario. Indeed, when the virtual parameters represent a heavy bike, the cyclist rides at low speed; therefore, the RLS solution is not able to properly estimate the coasting-down force because of the lack of information. For such a reason, the emulation performance deteriorates. Opposite, in other cases, performance increases thanks to a better estimation of the coasting-down force.

5 Conclusions

In this work, an RLS-based adaptive strategy for the virtual-bike control strategy in an e-Bike operating in series mode has been proposed. The effectiveness of the self-tuned solution has been experimentally evaluated and a general good behavior has been experienced. However, also some limitations have been noted with specific choices of the parameters, related to experience heavier virtual bikes. Therefore, further improvement or different approaches will be tested to increase the overall performance, also when emulating heavier bikes.