1. Introduction
In smart cities, bicycle-sharing systems have become essential as last-mile transportation solutions, seamlessly integrating into urban mobility networks worldwide. To enhance riding efficiency, research on automatic gear-shifting systems for electric bicycles has gained significant attention. The gear-shifting mechanism consists of components such as chains, freewheels, derailleurs, and corresponding control devices. By adjusting the gear through these control devices, riders can maintain an optimal cadence to efficiently transfer power while tackling various terrains. While the flexible adjustment of gear ratios has significantly enhanced the riding experience, there is no definitive guideline for pairing the front and rear gear ratios correctly. Beginners often lack the knowledge to configure gear ratios appropriately, leading to inefficiencies in pedaling and diminished riding experience due to improper gear selection. This challenge has sparked the invention of automatic gear-shifting systems.
One of the pioneers of automatic gear shifting is the Browning transmission [
1]. Its controller calculates the optimal cadence by considering variables such as bicycle velocity, hub speed, and crank rotation speed, mapping these to the most suitable and closely matched gear ratio to achieve automatic gear shifting. This design became the prototype for many subsequent automatic gear-shifting mechanisms. In recent years, environmental issues have gained increasing attention, prompting countries to establish environmental standards aimed at reducing carbon emissions from fuel-powered vehicles. This shift has accelerated the transition toward electric vehicles and created new market opportunities for bicycles. In addition to the construction of dedicated bicycle lanes in urban planning, many countries now offer shared bicycles and electric-assisted bicycles as part of rental services. With the rapid advancement of technology, sensors and controllers have been widely integrated into electronic devices and automotive systems. The performance of traditional bicycles has gradually been deemed insufficient. By incorporating various sensors and applying derived dynamic bicycle models, advanced controllers tailored to riders’ needs have been developed.
Research on electric-assisted bicycles includes innovative methods proposed by Abagnale et al. [
2], who utilized Hall sensors to measure and experiment with chain tension under different gear ratios. From the measured tension, they calculated the pedaling torque and angular velocity. Based on optimal pedelec torque control (OPTC), they derived a dynamic model between the electric motor and pedaling force. The total output power was obtained by summing the output power of the motor and the pedaling force. This total power was fed back to adjust the assistance force according to the pedaling force, achieving smaller tracking errors and better stability. Lee et al. [
3] derived the dynamics of electric-assisted bicycles, setting a target velocity and using fuzzy control to adjust motor power output based on the velocity error and pedaling power. They proposed an adaptive method that, after a learning phase, adjusts the membership functions of pedaling power according to the rider’s characteristics, enabling control tailored to different riders’ pedaling forces. Compared to traditional fuzzy control, the learning-based controller showed significant improvements in reducing velocity fluctuations when encountering changes in slope. Lee et al. [
4] built upon the dynamic model from [
3], setting a threshold for velocity error. If the error exceeded the threshold, the membership functions for velocity error would be adjusted. Unlike [
3], which required a learning period, this method allowed for faster adjustments to the controller, better meeting the needs of the rider. Dai et al. [
5], building upon the work of [
4], proposed a new FLC architecture by incorporating slope as an additional input, where velocity error, slope, and pedal power were combined for fuzzy rule calculations. The defuzzified output determines the corresponding level of electric assist force. In the literature, evaluation metrics included not only velocity but also acceleration, battery energy consumption, and other comfort and safety indicators, reflecting considerations for rider comfort and safety. Uyar et al. [
6] designed an electric assist motor that connects to the front chainring to provide pedaling assistance. They developed separate dynamic models for the DC motor and the bicycle, combining them into a third-order transfer function, which was then converted into state-space representation and simulated in Simulink. Users could input their desired target velocity into the model, with velocity error and acceleration used as inputs. The computed results were output through the electric assist motor. In their simulations, the same parameters were applied to fuzzy PID, fuzzy PI, and fuzzy PD controllers to analyze their respective time-domain performance and control efficiency. Ho et al. [
7] used wheel speed, wheel acceleration, motor power, and pedaling power as inputs. They developed a model based on the delay phase as pedaling torque (DPPT) to output appropriate assistance force according to different external resistance factors. This was referred to as compensation for the gap in the pedaling torque (CGPT). Four different control methods for electric assist motors were tested, demonstrating that the proposed method had the lowest motor output and the smallest variation in angular acceleration, making it suitable for commuting and environments with limited power supply.
Most electric-assist bicycles focus solely on controlling the auxiliary motor. However, the primary source of power in a bicycle is pedaling force, which drives the rear wheel through the chainring and chain. If inappropriate gear is used, even starting can become challenging. Therefore, it is essential to prioritize the gear, i.e., the function of the transmission system, to adjust the gear ratio between the front and rear chainrings. Three main types of gear-shifting systems are currently available on the market: The first one is mechanical shifting, which is the most common and traditional form found in bicycles. It relies on a gear shifter pulling a steel cable, which in turn drives the derailleur to adjust the gear ratio. Although this design has a slower shifting process due to the difficulty in precisely controlling the cable tension, it is widely used due to its simple mechanism and low cost. The second approach is electronic shifting; in this system, signals are transmitted electronically, and a microcontroller receives the signals to control a servo motor. The servo motor adjusts the gear using pulse-width modulation (PWM) to achieve electronic shifting. Its advantages include fast and precise gear changes, while its primary drawback is the higher cost. With advances in technology, electronic shifting systems have become increasingly popular and can be modularly installed on different bicycle models. They are highly regarded by professional cyclists and enthusiasts. The third is continuously variable transmission (CVT), this system employs a mechanism connected to the crankshaft to achieve gear changes by altering the gear ratio within the mechanism. It uses closely spaced gear ratios across multiple chainrings to provide smooth transitions, enabling stepless shifting. A well-known example is the NuVinci CVT system designed by Fallbrook Technologies [
8], which replaces traditional gears with spheres and springs. The power transmission depends on the contact area of the spheres, mimicking the effect of gear ratio changes to the rear wheel. Another example is custom-designed shifting mechanisms; for example, in [
9], a gear-shifting mechanism called eDrive was designed using SolidWorks and embedded in the rear wheel hub. It adjusts gear ratios based on pedaling power, allowing riders to maintain a comfortable pedaling force. However, the initial design was focused on control for low pedaling force and low-speed conditions. Chen et al. [
10] aim to minimize gear ratio variations during shifting. However, due to their bulky size, complex structure, and limited gear range, these designs face challenges in becoming mass-produced universal components for regular bicycles. As a result, they are primarily explored in research contexts and are rare in the commercial market.
Due to differences in riding environments, individual physical fitness, and cycling habits, pedaling force and the timing of gear shifting vary among riders. Current studies primarily consider factors such as cadence, pedaling torque, bicycle velocity, and acceleration as the basis for gear-shifting decisions and evaluation metrics, with differing perspectives in various research contexts. There are three main control methods for gear-shifting: The first approach is threshold-based control, this approach sets target values for the controller and compares them with sensor data. For instance, gear shifting is triggered when cadence or velocity exceeds predefined ranges. This approach sets target values for the controller and compares them with sensor data. The authors of [
10] designed a shifting mechanism connecting a ring gear to the hub motor and the crankshaft to the planetary carrier. Planetary gears adjust the gear ratio, and when cadence increases, instantaneous acceleration rises, prompting the planetary gears to reduce auxiliary force, achieving CVT. Tandon et al. [
11] set the cadence target to 50–60 rpm, with an upshift occurring when it exceeds 60 rpm and a downshift when it falls below 50 rpm. In addition to deriving the bicycle dynamics, the designed circuit maps the feedback voltage to different cadence levels and simulates the controller’s performance in LabVIEW for validation. Rauch et al. [
12] recorded data such as cadence and pedaling torque during gear shifting to establish six shifting conditions, including torque and cadence thresholds, as well as rapid changes in torque within a specific timeframe. Simulink data were compared with recorded datasets to evaluate the controller’s alignment with shifting intentions. Savaresi et al. [
13] proposed a comfort index targeting novice riders to minimize longitudinal acceleration. Cadence was estimated via rear wheel speed and filtered acceleration data. A 15 min training phase produced data on cadence and acceleration corresponding to gear settings. Gear shifts occurred when acceleration fell below a threshold. Atencio et al. [
14] recorded normal riding velocity, cadence, and gear settings. When cadence was high without an increase in velocity, the system shifted up; conversely, when velocity was high without an increase in cadence, the system shifted down. Ay et al. [
15] utilized an inertial measurement unit (IMU) to measure slope values and compiled them into an effect coefficient table. The slope values in the table determine the upper and lower limits of cadence and velocity, which are used to decide whether to shift gears. However, the experiment included a limited number of gear ratio combinations, and the cadence was significantly higher compared to other studies, making it less suitable for general riding needs. The second is AI-based gear shifting; recent advancements have leveraged AI to process large sensor datasets for determining optimal gear settings. Lin et al. [
16,
17] integrated data from velocity, global positioning system (GPS), slope, heart rate, and pedaling power to create datasets. These datasets were split into training and testing sets for random forest (RF) classification to predict gear settings. Shift data were uploaded to the cloud for further optimization. In [
17], they expanded routes and applied additional learning models to verify results. The third is fuzzy logic controllers. Fuzzy logic has been extensively applied to map sensor inputs to gear ratios or gear outputs. Lin et al. [
18] used cadence and torque as inputs to a fuzzy controller, which mapped five gear ratios as outputs. By comparing the current and calculated gear ratios, shifts were executed only when differences were detected. Tsai et al. [
19] proposed Interval Type-II (IT2) fuzzy logic to reduce noise and interference in inputs such as bicycle velocity, torque, and cadence, leading to smoother gear ratio outputs. Lin et al. [
20] addressed frequent shifting caused by zero cadence on descents by introducing a virtual cadence derived from wheel speed. A prediction of gear shifting was increased when cadence exceeded acceptable values for a gear. Once the prediction exceeded a threshold, a gear change was triggered, and cadence data were incorporated into membership functions for learning. Bjarkason et al. [
21] categorized exercise intensity into three levels with corresponding cadence targets of 60 rpm for commuting purposes, and 80–90 rpm for cardiovascular training. Using posture, they scored different cadences and gears, incorporating bicycle velocity as a fuzzy input to determine the output gear setting.
As mentioned earlier, several FLC-based approaches have been proposed for automatic gear shifting in electric bicycles. However, in many of these methods, cadence or bicycle velocity is commonly used as the input, which often leads to frequent shifting due to the positive correlation between bicycle velocity and cadence. In this paper, we propose a modified FLC, referred to as the automatic gear-shifting with FLC (AGS-FLC), for electric bicycles. The proposed scheme, inspired by insights from [
5,
10,
13], replaces bicycle velocity with acceleration changes in the membership functions to assess the impact of acceleration on riding comfort. Our primary contribution is the introduction of a novel AGS-FLC approach to reduce frequent shifting caused by acceleration and slope changes for electric bicycles in urban mobility solutions for smart cities. To the best of our knowledge, this approach has not been explored in this context before. Furthermore, we conducted both simulations and experimental evaluations to assess the effectiveness of the proposed AGS-FLC scheme across diverse rider profiles, including powerful, general, and powerless riders. The simulation and experimental results clearly demonstrate that our AGS-FLC scheme outperforms existing gear-shifting control methods in terms of performance, effectively addressing the issue of frequent shifting and validating our approach through experimental testing.
The structure of this paper is organized as follows:
Section 2 provides a brief overview of bicycle dynamics modeling.
Section 3 presents the proposed AGS-FLC scheme in detail.
Section 4 showcases the simulation and experimental results. Finally,
Section 5 offers the conclusion.
2. Modelling of Bicycle Dynamics
When the cyclist pedals to propel the bicycle forward, the dynamics can be illustrated as shown in
Figure 1. The pedaling force applied to the pedals is transmitted to the rear wheel through the chainring and chain. This propelling force must exceed the resistive forces present in the environment, which include air resistance
, frictional resistance
, and the gravitational component on an incline
, as described in Equations (1)–(3).
Air resistance, or drag force, is influenced by the surrounding air medium and acts in the opposite direction of motion. It is determined by the drag coefficient
, frontal area
, air density
(kg/
), and bicycle velocity
(km/h). Frictional resistance arises from the contact between the tires and the ground, producing a reactive force opposite to the direction of motion. It is influenced by the friction coefficient
and the rider’s weight
M (kg), the bicycle’s weight
m (kg), and the angle
(deg) between the road surface and the horizontal plane. Gravitational force on a slope
is the component of the rider’s and bicycle’s weight due to Earth’s gravity and the slope angle. During uphill riding,
increases as
rises. The total environmental resistance forces, combined and multiplied by the velocity, yield the total dissipative power
, as shown in Equation (4).
The force applied by the rider on the pedals,
, when multiplied by the gear ratio
, results in the propulsion power of the rear wheel,
, as expressed in Equation (5). The calculation of the gear ratio
is shown in Equation (6),
is the number of teeth on the front chainring sprocket and
is the number of teeth on the rear wheel cassette sprocket.
The bicycle velocity
, combined with the gear ratio
and the wheel circumference
, yields the cadence
(rpm), as shown in Equation (7). To convert
from km/h, divide it by 3.6. Then, divide the product of the wheel circumference
and gear ratio
by this value, and multiply the result by 60 to obtain the cadence.
The propulsion force of the bicycle, as shown in Equation (8), is calculated by subtracting the power lost to environmental resistance from the forward power, and then dividing the result by the bicycle velocity. This propulsion force can be further divided by the total weight to determine the bicycle’s acceleration
(m/
), as expressed in Equation (9).
5. Conclusions
In the context of smart cities, bicycle-sharing systems have emerged as vital last-mile transportation solutions, seamlessly integrating into urban mobility networks. This paper reviewed recent advancements in automatic gear-shifting systems and electrically assisted bicycle control methods, emphasizing their objectives and evaluation metrics. Among these methods, fuzzy logic controls were chosen for their simplicity, adaptability, and ease of implementation. However, frequent shifting remains a significant challenge in FLC-based approaches, adversely affecting rider comfort and system performance. To address this issue, the proposed AGS-FLC incorporates slope and acceleration as key input parameters, derived from an in-depth analysis of bicycle dynamics and refined membership function design. By integrating slope data into the control scheme, the proposed system better reflects real-world cycling conditions. Additionally, cadence was included as an input variable, allowing customization for individual rider preferences and enhancing the overall adaptability of the system. The effectiveness of the AGS-FLC was validated through both simulations and experimental evaluations across a diverse range of rider profiles, including powerful, general, and powerless riders. The results demonstrated that the proposed approach significantly reduces acceleration ripple, maintains average cadence within the target range, and aligns gear shifts with the intended design. Notably, this leads to a substantial 20% improvement in safety and a reduction of 1 m/s2 in acceleration ripple. Moreover, the AGS-FLC effectively eliminates the problem of frequent shifting, thereby improving riding comfort and efficiency. These advancements hold great promise for public bicycle-sharing systems, offering a robust, adaptable, and rider-centric solution suitable for various cycling conditions and rider capabilities. The integration of AGS-FLC into smart city transportation frameworks could further enhance urban mobility, contributing to sustainable and efficient mobility solutions for diverse user needs. Future research directions will focus on enhancing the stability of sensors and conduct tests with users of different age groups and physical abilities, thereby enriching our experimental data. As mentioned earlier, the instability in acceleration has hindered precise control in accordance with the designed membership functions. This limitation represents a significant drawback in the current testing process and serves as one of the key areas for future improvement.