Improving Energy Efficiency of an Autonomous Bicycle with Adaptive Controller Design

A method is proposed to achieve lateral stability of an autonomous bicycle with only the rotation of the front wheel. This can be achieved with a classic controller. However, if the energy consumption of the bicycle also has to be minimized, this solution is not valid. To solve this problem, an adaptive controller has been designed, which modifies its gains according to the bicycle’s forward velocity, adapting its response with minimum energy consumption and satisfying the design specifications. The study demonstrates the efficiency of the proposed control, achieving an energy saving of 73.8% in trajectory tracking with respect to a conventional proportional-integral (PI) controller. These results show the importance of designing energy-efficient controllers, not only for autonomous vehicles but also for any automatic system where the energy consumption can be minimized.


Introduction
Energy management, from generation to consumption, is one of the main concerns in today's society.Energy-efficient systems reduce energy consumption and pollution, because most of the consumed energy is from fossil fuels.Thus, the use of energy-efficient systems and new renewable energy systems is very important.The current tendency, associated with a new social conscience, has been reported in some works such as [1,2], where the interest is focused on renewable energy systems, or [3,4] where efficient systems reduce the energy consumption.
Another example where energy-efficient systems are required to minimize the energy consumption is the electric car, for which autonomy is very important.The use of high-efficiency electric motors [5] and batteries [6] are some solutions to achieving a greater vehicle autonomy.
Autonomous robotic systems, which are capable of undertaking complex tasks without human teleoperation, also need energy-efficient systems for energy management.A particular type of these robots, mobile robots, which can move by land, sea and air, need energy-efficient systems.Some ways to increase its autonomy are, for example, to improve the dynamic resistance to the environment with an appropriate mechanical design, and to use an efficient controller to minimize the energy consumption.Furthermore, these control systems have to adapt to different operating points of the system.The gain scheduling method is an example of this type of control.This method is applied in [7] to control wind turbine models, where the controllers are designed from an H ∞ optimal control.
The importance of energy-efficient systems in autonomous vehicles increased with advances in space exploration [8], where vehicle autonomy is essential for a vehicle to complete a mission within its useful life.Other examples of autonomous vehicles, where energy-efficient systems are important, are those that can access places that humans cannot access, or those that do tasks which are dangerous for humans.This type of robots can move by land [9], by sea [10] and by air [11].
Among land vehicles, there are two groups of special interest for the present study: robots with wheels and robots with legs.The interest for robots with wheels in this study is evident: we aim to design an energy-efficient autonomous bicycle.The interest for robots with legs is important because the research results obtained with the bicycle could be applied to quadruped robots, particularly to DOGO II, a quadruped robot designed by the authors, where some lateral stability control strategies related to the Zero Moment Point [12] will be compared with the control strategies designed in this study.Although the forward velocity of most of the current quadruped robots is between 0.8 m/s and 1.2 m/s [13], the challenge is to achieve forward velocities between 1.4 m/s (normal walking speed of a human) and 3.5 m/s (light running), as in the case of BigDog of Boston Dynamics [14].The quadruped robots can move on steep terrains and therefore are ideal as transport vehicles on uneven terrain.
In 1899, Whipple [15] and Carvallo [16], obtained independently the equations that model the bicycle dynamic as an inverted pendulum, and these equations are still used by the scientific community.The bicycle is modelled in both cases as a mechanism defined by four rigid parts connected with three hinges: the rear frame joined to the rider; the front frame; the two wheels.Both models demonstrate that this kind of two wheeled-vehicle is statically unstable, but it is possible to balance the vehicle modifying the front-wheel angle, and some vehicles with free direction (free front-wheel angle) can balance themselves from a particular velocity.This velocity is referred to as auto-stability velocity and depends on the structural parameters of the bicycle as the trail, wheelbase and the wheels size, which is related to the gyroscopic effect.Although it could be thought that the auto-stability of the bicycle is due to the wheel gyroscopic effect, some works, such as [17] show that is not the decisive element.In the study presented in this paper, we control the lateral stability of a bicycle only with the rotation of the front-wheel.
The particular characteristics of a bicycle (non-holonomic, unstable, non-linear and non-minimum phase system) make of the stability control a complicated task.In addition, the dynamic behaviour of a bicycle changes with the forward velocity.Because of this, the design of control techniques to achieve the lateral stability is complicated.If the energy consumption of the bicycle is also considered in the controller design, the complexity of the problem increases even more.As previously said, a bicycle can be modelled as an inverted pendulum (unstable system).Fortunately, the control theory proposes effective solutions to control an inverted pendulum.Some of these solutions are proportional-integral-derivative (PID) controllers, such as [18], or modern techniques, such as adaptive fuzzy control [19] or neural networks [20].Some other solutions use additional mechanic systems, such as gyroscopes and mass balancers.With these latter methods, although the lateral stability improves, the mechanical complexity and weight of the system increases, and therefore the energy consumption also increases.Some works related to these stability control methods are shown in [21], where gyroscopes are used, and [22], where mass balancers are used.
Because of the system complexity, most of the current studies regarding the lateral stability control of a bicycle that is only controlled with the rotation of the front wheel, are theoretical, as is shown in [23,24].The few experimental studies that exist have been carried out by the Faculty of Science and Technology of the Keio University, where some controllers, such as a sliding mode control [25], or a posture control [26], have been demonstrated to be effective.On the other hand, no research has proposed the use of efficient energy controllers, or talks about the need for them.
In this study, energy-and non-energy-efficient controllers are designed to achieve the lateral stability of a desired, autonomous bicycle tracking trajectory, controlling only the front-wheel angle.The energy consumption of the system by using both controllers is compared.A bicycle is used in this study, but this same study could be extrapolated to other areas: industry [27]; internal-combustion engine [28]; energy generation systems [29]; electric vehicles [5]; robots [12].
The rest of the paper is organised as follows: In Section 2, the dynamic model of a bicycle is described in detail; In Section 3, an adaptive control of minimum energy is designed; in Section 4, the method of energy calculation is explained; in Section 5, some simulation results are shown; in Section 6, the most relevant conclusions of this study are explained.

Modelling
A point-mass model, described in [30], has been used to model the bicycle, which supposes that the movement of the bicycle is limited, the lateral displacement of the tyres is not considered and, therefore, the non-holonomic limitations in longitudinal and lateral directions have to be taken into account.
The model can be seen in Figure 1, where the mass of the bicycle is concentrated at a specific point, located at a height h above the ground level and at a distance d from the rear-wheel.R is the turning radius, α is the front-wheel angle, θ is the roll angle, w is the wheelbase, ψ is the rear-wheel yaw angle and the pair (x, y) are the Cartesian coordinates of the bicycle displacement.From Figure 1, the vehicle kinematics can be defined by the following Equations [30]: where v is the bicycle forward velocity.The dynamic of the bicycle can be analysed as the dynamic of an inverted pendulum placed on a base subjected to some acceleration [31]: where g is the gravity and σ is the path curvature.From (4) and knowing that the velocity v and the yaw angle ψ are related to the path curvature σ by the following expression: it is obtained: Replacing ( 3) in (6) gives: which represents a simple non-holonomic bicycle model, where the control inputs are the front-wheel angle α and the bicycle forward velocity v.Because a control based on linear techniques is intended, the previous model has to be linearised around an equilibrium point (α = 0 rad), for any velocity Using the Laplace transform, the transfer function which relates the roll angle θ with the front-wheel angle α is: The gain factor − dv wh and the zero position − v d of the previous transfer function depend on the forward velocity.The poles position ± g h depend on the bicycle design.In addition, a disturbance Z(s) has been added to represent any external cause that can change the bicycle roll angle, for example, uneven floor or wind gusts.Thus, Equation ( 9) can be written as follows:

Controllers
As seen in the previous section, the transfer function parameters (the gain factor and the zero position of the plant), are modified according to the forward velocity v.If classic control strategies are used, the lateral stability of the bicycle can be achieved but this control strategy is not optimal from an energy point of view.In order to solve this problem, an adaptive control strategy has been proposed in this study.
This control strategy uses a self-tuning controller, which modifies its gains according to the bicycle's forward velocity.Figure 2 shows a scheme of this control strategy, where θ is the roll angle (output signal); θ * is the reference signal; α is the front wheel-angle (control signal); v is the bicycle forward velocity, which is depended on by the plant parameter values; k R are the controller gains calculated for each velocity.
The chosen design specifications for this control are as follows: (1) the bicycle lateral stability must be achieved even to disturbances such as uneven floor or wind gusts; (2) the steady-state error of the output signal must be as close to zero as possible; (3) the settling time of the output signal must be less than 3 s; (4) the system energy consumption must be minimal.This is achieved from the minimization of the following energy functional: Adaptation Law This functional is often used as an estimate of the energy consumption as seen in [32].The functional unit is defined as uE (dimensionless energy unit) and it is directly related to the actuator energy consumption, which modifies the angle α of the front-wheel.
Taking into account the plant model (10), the simplest controller able to meet the first three design specifications is a proportional-integral (PI) controller, as can be seen in Figure 3a, the transfer function of which is: In addition, to minimize the control energy with this controller, the gains values K p and K i must be calculated to minimize the energy functional (11), for each bicycle's forward velocity.Therefore, the use of a control law that adapts in real time to the values of the controller gains according to the forward velocity of the bicycle is necessary.Figure 3b shows a scheme of this control strategy.

Energy Calculation
As shown in ( 9), the roll angle θ is controlled with the front-wheel angle α and also depends on the forward velocity v. Thus, there are two actuation systems that must be taken into account to control the roll angle, namely, the bicycle lateral stability: (1) The actuation system used to control the bicycle lateral stability, where the control variable is α; (2) The actuator system used to control the forward velocity.Although this study focuses on the system that controls the bicycle lateral stability, the control system of the forward velocity has also to be considered to calculate the total energy consumed by the bicycle.The energy consumed by the bicycle is the sum of the energy consumption of each system described above, as shown in the following equation: where E θ is the energy used for the lateral stability control and E v is the energy used for the forward motion.In this study it is assumed that direct current electric motors are used to control both systems.
One motor controls the front-wheel angle α and the other one controls the rear-wheel velocity of the bicycle v. Expression (14) shows the transfer function of a direct current electric motor when it is used to control the front-wheel angle: where V θ c is the motor control voltage, A θ and B θ are parameters that depend on the motor characteristics and the mechanical design specifications of the bicycle.
On the other hand, when the bicycle forward velocity v is controlled with a direct current electric motor, the transfer function is: where V v c is the motor control voltage, A v y B v are parameters that depend on the motor characteristics and the mechanical design specifications of the bicycle.
Including the transfer function of the motor (14) in any of the schemes shown in Figure 3, the control system of the bicycle lateral stability is shown in Figure 4, where R(s) is the PI regulator.The energy consumed for this system is calculated with the following expression: On the other hand, the system that governs the bicycle forward velocity is defined by (15), and the energy consumed by this system is calculated with the following expression:

Choice of the Plant Parameters Values
In order to estimate the energy consumed by the bicycle, the parameters of the bicycle model ( 9) and the parameters of the actuation systems, ( 14) and (15), must be known.The values of the bicycle parameters are proposed in Table 1.These parameters were chosen for a theoretical prototype of a bicycle of maximum height 0.5 m.The wheelbase is chosen to adapt it to a platform of bicycle rollers (distance between rolls configurable from 0.65 m to 0.75 m).The values d and h, of the point mass position, are estimated from a chassis with electronics, actuators and batteries.The chassis would be made with a steel square tube of size 60 × 60 × 1.2 mm.The wheel radius is small to reduce the gyroscopic effect, and the bicycle fork does not have a trail to avoid the auto-stability.
On the other hand, the parameter values of the actuation systems (A θ , B θ , A v and B v ) can be calculated from the motor manufacturing specifications and the design mechanical specifications of the bicycle.In this particular case, the direct current motor chosen for both actuation systems (the bicycle lateral stability control system and the forward velocity control system) is the same: Maxon DC motor RE 40.Moreover, it is assumed that the radius of the bicycle wheels is 0.1 m and a reduction gear 15:1 is coupled to the motor that controls the front-wheel angle.Taking this into account, the values of A v , B v , A θ y B θ are obtained (see Table 1).
Table 1.Values of the bicycle model parameters and parameters of the actuation system models.

Bicycle Model Forward Motor Model Rotation Motor Model
In addition, α is constrained in a range of ±0.35 rad, and θ is constrained in a range of ±0.17 rad.These ranges have been calculated from a linearity study, in which it was verified that the relative error between the dynamic model (7) and the linearised version (8) does not exceed 5% in the range described, for a bicycle velocity range between 0 to 20 m/s (studied velocity range).

Controller Gains Calculation
The controller design is shown in section 3, Controllers.This section shows an explanatory example to calculate the controller gains for a forward velocity of 1.7 m/s. Figure 5a shows the values of K p and K i that satisfy the three first design specifications (yellow region).The disturbance was modelled as a step function of amplitude 0.0873 rad and the settling time of the output signal was chosen to be less than 3 s.Therefore, the minimum energy point is within this region.Figure 5b shows the energy as a function of the controller gains.There is a local minimum when K p = −3.9 and K i = −4.2.This study, carried out for a forward velocity of 1.7 m/s, has been repeated for the whole velocity range.Thus, the gains K p and K i are calculated for each velocity.Figure 6 shows the evolution of these values as a function of the bicycle forward velocity.There is not a combination of values of K p and K i that satisfies the design specifications below 1.4 m/s.On the other hand, as the velocity increases, the gain values decrease.This is a logical result because the gain factor of the plant increases with the velocity.
For the non-adaptive control, a classic PI controller is chosen to ensure the lateral stability of the bicycle in the studied velocity range (1.4-20 m/s) satisfying all design specifications, except, logically, the minimum energy specification.This is achieved by choosing values of K p and K i corresponding to one point within the valid controllers region for each velocity (yellow region in Figure 5a).In this particular case, the values K p = −6 and K i = −55 have been chosen arbitrarily.The bicycle lateral stability is guaranteed in all studied velocity ranges with these values, but the minimum energy consumption is obviously not achieved.The control scheme is shown in Figure 3a.In contrast, the proposed adaptive control, Figure 3b, minimizes the energy consumption because the controller gains change according to the bicycle forward velocity, as shown in Figure 6.

Energy Consumption
In this section, the energy required to maintain the lateral stability of an electric autonomous bicycle is analysed.Thus, the total energy ( 13) is calculated as the sum of the energy consumed by the lateral control stability system of the bicycle (system that controls the front-wheel angle), Equation (16), and the energy consumed by the forward velocity control system, Equation (17).As explained in the previous sections, the adaptive control, which is used to control the bicycle lateral stability with the front-wheel angle, is compared with a non-adaptive control.
The energy consumed by the bicycle has been calculated for each value of the forward velocity, taking into account that the roll angle reference is zero, that is, the bicycle follows a straight line trajectory, and the disturbance, Z(s) in (10), is a step function of amplitude 0.0873 rad.This value is chosen to not exceed the constraints in the angles α and θ, imposed by the linearization of the bicycle model (7).
Figure 7a shows the energy consumption of the bicycle lateral stability control system for both the non-adaptive controller E N A θ and the adaptive controller E A θ .As expected, the energy consumed by the adaptive control system is always less than the non-adaptive control system; Figure 7b shows the energy consumption of the bicycle forward velocity control system E v .By comparing Figure 7a,b, it is observed that E N A θ is greater than E v below 4 m/s (see Figure 8), and therefore this result demonstrates the importance of minimizing E θ with a smart controller for small velocities.With the adaptive controller proposed in this study, E θ is greatly reduced, as shown in Figures 7a and 8; Figure 7c shows the energy consumption of the total system E which is the sum of the previous ones.Note that the perceptual reduction of the energy consumption is notably reduced for small velocities (below 5 m/s) when an adaptive PI control is used instead of a classic PI control.

Energy Saving
This section analyses the energy saving in the bicycle when an adaptive controller is used instead of a non-adaptive controller.The energy saving has been calculated in three different ways, according to the following expressions: Figures 9, 10 and 11 show each energy saving defined by Equations ( 18), ( 19) and ( 20) respectively.The energy saving relative to the energy consumption of the lateral stability control system by using a non-adaptive controller (Figure 9) is 50% when v = 1.5 m/s, and quickly increases up to 98% when v = 5 m/s.
The energy saving relative to the energy consumption of the forward velocity control system, Figure 10, is greater at low velocities (from 1.4 to 5 m/s), reaching up to 400% when v = 1.55 m/s.Most autonomous robots and vehicles are within this velocity range, hence the importance of this result.The energy saving relative to the total energy consumption of the bicycle (Figure 11), is also greater for low velocities, being greater than 35% below 5 m/s, and reaching its maximum value (64%) when v = 2.3 m/s.This result implies a greater autonomy of the bicycle, if, for example, the energy supplied to the bicycle is from an electric battery.

Trajectory Tracking
This section shows the energy efficiency of the proposed system when the bicycle has to follow a desired trajectory.There are three main strategies for the trajectory tracking of autonomous bicycles: (a) change of the mass centre position [33]; (b) change of the reference inclination [34]; (c) gyroscopic stabilization [21].We have used as an illustrative example the change of the reference inclination strategy.
This strategy is based on the dynamic inversion of the model which relates the yaw and the roll angle of the bicycle.Figure 12 shows the control loop.The inner control loop is the lateral stability controller, Figure 2, Λ F (θ) is the relation of the yaw angle ψ with the roll angle θ of the bicycle and Λ I (ψ) is the inverse relation.G(s) is the plant transfer function (9) and R(s) is the controller.As in previous sections, the non-adaptive controller (Figure 3a) will be compared with the adaptive controller (Figure 3b).
* () () The equation which relates θ and ψ is (6).The resolution of this nonlinear differential equation results in the direct dynamic (Λ F (θ)).This equation is solved by an algebraic loop with MATLAB/Simulink R .Further, Equations (1) and (2) relate the yaw angle and the bicycle displacement in Cartesian coordinates (x, y).
The desired forward velocity v and the desired trajectory of the bicycle have to be defined before simulations.Figure 13a shows the desired velocity profile in which velocity is increased from 1.5 m/s to 5 m/s. Figure 13b shows the desired trajectory represented by Cartesian coordinates (x, y).The desired yaw angle ψ * , Figure 13c, is obtained from Equations (1) and ( 2), and the desired roll angle θ * , Figure 13d, is obtained from ψ * from Equation (6).In addition, for the most realistic case, a white noise of maximum amplitude 3.5 × 10 −3 rad is added in the roll angle to simulate external perturbations (Z), such as vibrations because of the bicycle circulation by a non-regular floor.Figure 14 shows the trajectories followed by the bicycle with the adaptive and non-adaptive controller and Figure 15 the total energy consumption.The trajectories are similar for both controllers.The error is 0.8% in the x coordinate and 5% in the y coordinate with the adaptive controller.The error is 0.4% in the x coordinate and 3.7% in the y coordinate with the non-adaptive controller.This error is normal because there is no feedback in the position control.In terms of energy saving, the adaptive controller is 73.8% better than the non-adaptive controller, as Figure 15 shows.

Conclusions
This study demonstrated an adaptive controller design for an autonomous bicycle with the objective of minimizing input energy for trajectory tracking.As has been shown, the proposed adaptive controller achieves the design specifications: it is robust to disturbances, such as wind or uneven floor, and minimizes the energy used in the lateral stability control of the bicycle.
In order to achieve the lateral stability of the bicycle, the energy saving of the front-wheel angle control system reaches up to 99.5% compared with a non-adaptive control system.
However, the total energy consumption of the bicycle is divided in two: the energy consumption of the forward velocity control system and the energy consumption of the lateral stability control system.The energy savings relative to the forward velocity control system are between 125% and 412% when the velocity range is from 1.4 m/s to 3.5 m/s.This demonstrates that the energy consumption of the front-wheel angle control system is an important part of the total energy consumption of the bicycle for small velocities.
These results involve a decrease in the total energy consumption to achieve the lateral stability of an autonomous bicycle.By using the optimal adaptive control of the present study, the autonomy can increase up to two-fold when the velocity range is from 1.5 m/s to 3.5 m/s, because the energy saving is greater than 50%.
A trajectory tracking case with dynamic inversion included, in order to verify the energy saving in these cases.The energy saving with the adaptive controller is 73.8% with respect to the non-adaptive controller.
The simulations have demonstrated that the use of the proposed control techniques allows the energy consumption of the bicycle to be managed more efficiently.It is possible to achieve robots and vehicles with longer travel time, motors and industrial machines which consume less or generation systems which are more efficient.The optimization of the can make a significant difference in many automatic systems and must be included as a premise in the controller's design.
Castillo-Garcia and Ismael Payo-Guitierrez designed the controllers and wrote all sections of the paper except the Introduction; In addition, David Rodriguez-Rosa and Ismael Payo-Guitierrez performed the simulations and analyzed the data.

Conflicts of Interest:
The authors declare no conflict of interest.

Abbreviations
The following abbreviations are used in this manuscript:

Model of the current electric motor A v
Transfer function parameter of the current electric motor controlled in velocity.

A θ
Transfer function parameter of the current electric motor controlled in position.

B v
Transfer function parameter of the current electric motor controlled in velocity.

B θ
Transfer function parameter of the current electric motor controlled in position.

Energies and energy savings E
Energy consumed by the bicycle.

E v
Energy used for the forward motion control.

E θ
Energy used for the lateral stability control.

ES
Energy saving relative to the total energy consumption of the system by using a non-adaptive control.ES v Energy saving relative to the energy consumption of the forward velocity control system.

ES θ
Energy saving relative to the energy consumption of the lateral stability control system by using a non-adaptive control.

Figure 2 .
Figure 2. Control scheme with an auto-tuning controller.

Figure 3 .
Figure 3. (a) Control loop with a classic PI controller; (b) Control loop with an adaptive PI controller.

Figure 4 .
Figure 4. Control loop of the bicycle lateral stability with actuator.

Figure 6 .
Figure 6.(a) Value of the K p controller gain according to the bicycle forward velocity.(b) Value of the K i controller gain according to the bicycle forward velocity.

Figure 7 .
Figure 7. (a) Energy consumption of the lateral stability control system with adaptive controller and non-adaptive controller; (b) Energy consumption of the forward velocity control system; (c) Total energy consumption of the bicycle.

Figure 8 .
Figure 8.Comparison between E θ and E v for small forward velocities.

Figure 9 .
Figure 9. Energy saving relative to the energy consumption of the lateral stability control system of the bicycle by using a non-adaptive control.

Figure 10 .
Figure 10.Energy saving relative to the energy consumption of the forward velocity control system.

Figure 11 .
Figure 11.Energy saving relative to the total energy consumption of the system by using a non-adaptive control.

Figure 12 .
Figure 12.Control scheme to control the bicycle trajectory by dynamic inversion.

Figure 14 .
Figure14.Desired trajectory (P * ), trajectory followed by the bicycle with the adaptive controller (P A ) and trajectory followed by the bicycle with the non-adaptive controller (P N A ).

Figure 15 .
Figure 15.Total energy consumption by the bicycle with the adaptive (E A ) and non-adaptive controller (E N A ).

MMcc
Transfer function of the current electric motor controlled in velocity.G θTransfer function of the current electric motor controlled in position.V vControl voltage of the motor controlled in velocity.V θControl voltage of the motor controlled in position.
Displacement in the x coordinate.y Displacement in the y coordinate.G Transfer function of the stability dynamic model of the bicycle.P A Trajectory followed by the bicycle with the adaptive controller.P N A Trajectory followed by the bicycle with the non-adaptive controller.Relation of the yaw angle ψ with the roll angle θ of the bicycle.Λ I (ψ) Relation of the roll angle θ with the yaw angle ψ of the bicycle.