An Intelligent Control System for an Electrically Power Assisted Cycle (EPAC)

Corresponding Author: Nirosh Jayaweera Department of Mechanical Engineering, University of Moratuwa, Sri Lanka Email: niroshj@uom.lk Abstract: This paper is focused on proposing an enhanced controller for a hybrid drive mechanism in an Electrically Power Assisted Cycle (EPAC) to improve the battery energy utilization while maintaining the rider’s physical comfort. A real time data acquisition system was set up on a conventional bicycle using sensors and interfacing modules to verify the operating parameters. A fuzzy logic based novel control algorithm was developed upon the acquired data, to overcome the limitations in proportional assist control aided EPACs. The fuzzy controller was implemented using a novel ‘iControl’ algorithm. The developed control algorithm was installed on the newly developed EPAC and practically implemented. The developed algorithm showed the capability to improve range via better energy utilization and maintain rider comfort at the same time.


Introduction
Bicycles have become a popular transportation mode in modern world with an escalating demand due to the zero emissions, minimal carbon footprint and being a simple solution to urban congestion. In addition, cycling is also a prevalent evening activity and an adventure sport as well.
In most tropical countries (i.e., Sri Lanka), many people are hesitant to use bicycles because of the physical discomfort that comes with the effort in pedaling. Electrically Power Assisted Cycles (EPAC) are a good solution for Sri Lankan cyclists, as they make the riding effort low, by providing partial assistance. The significant demand for EPACs in developed countries, have influenced to design and develop of EPACs, consequently there are many types of EPACs readily available in the global market.
Low All-Electric Range (AER) and regular changing of gears to reach the desired balance between torque and speed are some drawbacks with available EPACs. A key problem with electric assistance controlling is that most of the available bicycles are unable to provide the electric assistance timely, as the rider requires it. However, research is lacking on implementing an automatic or semi-automatic transmission method to maximize the energy utilization in EPACs and increase rider comfort. Therefore, the design and development of an EPAC incorporating an enhanced hybrid drive mechanism to improve the battery energy utilization while maintaining the rider's physical comfort, will be able to overcome the limitations of available EPACs. To achieve this, the authors propose a novel intelligent control system for an EPAC capable of ensuring the rider's physical comfort and increasing the battery energy utilization. This includes the system design of the EPAC and the presentation of the intelligent control system.

Literature Review
An effective EPAC system comprises three main components, (a) the hybridized bicycle (b) the rider and (c) the control system. The following section describes the background and the state-of art of the hybrid bicycle detailing energy storage and power-split mechanisms, Biomechanics of cycling and rider comfort, control and verification of the bicycle for rider comfort.

The Hybrid Bicycle
EPACs are often called hybrid bicycles because those are driven by combination of two power sources, human power and battery power. Hybrid bicycles can be classified as parallel or series hybrid, depending on their drive mechanism. In a parallel hybrid, human power and motor power are mechanically summed up by use of a power train. The summation of the two sources of power then transferred to a wheel to take the output. In a series hybrid, the energy input given at the pedal directly transferred to a generator which powers up the drive motor. Any excessive power generated is employed to recharge the battery. In this method, as the user power is totally directed to the battery, the motor should be able to deliver the full mechanical torque required because none is available from the pedals (Mi et al., 2011). Series hybrid bicycles are commercially available, because they are simple in theory and manufacturing. Some commercial human-electric hybrid bicycles are described in Table 1 (references omitted for brevity).

987
Among the major sub-systems of EPACs, the energy storage system and the power-split mechanism require special attention.

Energy Storage Systems
Electrical energy storage is a major obstacle faced by all hybrid-drive vehicle systems. The major limitation being the limited energy storage density. Recent studies have shown that 20 Wh of electrical energy needs to travel 1.6 km (Andrea and Andrea, 2010). Most common battery type found in commercial EPACs are lead-acid batteries. Their usage is largely hindered by the low energy density and requirement of continued maintenance. Nickel-Metal Hydride (NiMH) and Nickel-Cadmium batteries have a higher energy density compared to the Lead acid at the expense of cycle life (Weinert et al., 2018). Li-ion has a high-energy density which is advantageous in EPAC applications. There are many variants such as Li-Mg, Li-Ni and Li-Co. Li-Co have become of interest in EPACs (Nitta et al., 2015). Li-Ni has been specially developed for HEVs, PHEVs and EVs with higher C-rate, but has lower energy density than Li-Co (Gohm and Cruden, 2012). Lithium ion polymer is another contender, with the distinct advantage of allowing for slimmer battery packs due to easy stack ability (Gohm and Cruden, 2012). Another alternative is super-capacitors (Hatwar et al., 2013), which are still held back by their cost. They provide rapid charging, but the voltage drop during discharging is problematic in EPAC applications. A combination of super-capacitor and battery bank has been presented in (Malan et al., 2014).

Power-Split Mechanism
Commercial EPACs usually incorporate three main types of transmission systems: Manual gear shifting with derailleur, hub-gear transmission and Continuously Variable Transmission (CVT) systems. Few other concepts have been presented in literature, which are yet to be implemented in commercial EPACs. Chien and Tseng (2004) has proposed an automatic gear shifting mechanism for conventional bicycles based on comfortable cadence and torque. Tandon et al. (2011) has presented an intelligent transmission system, based on the theory of cadence intervals considering the comfort of the rider, for bicycles with discrete transmission ratios.
A key feature expected from an improved EPAC is the ability provide seamless combination of battery power and human power. Devices used in this regard are called power-split mechanisms. A series hybrid drive, with a generator in the crank and a motor in the rear wheel hub, which are mechanically isolated is presented in (Dalvi and Ashtagi, 2014). The major disadvantage here is that human power is converted twice before being utilized. Another e-CVT is presented in (Watterson, 2008), where only a portion of the human power is converted to electrical power and the rest is directly driving the wheel.

Biomechanics of Cycling and Rider Comfort
The rotational speed of crank is a one parameter that can be used to measure the physical comfort of the rider. The rotational speed that can be applied by a rider over the pedal crank is called as "cadence" (Seabury et al., 1977). The cadence varies from person to person; hence the physical comfort also varies. Several studies have presented desirable parametric values for a comfortable cadence.
A cyclist cycling with a cadence of 50-65 rpm consumes the least oxygen (Seabury et al., 1977). It has also been found that most cyclists cycle at a cadence 988 between 85 and 95 rpm (Hagberg et al., 1981). The optimum cycling cadence, based on a muscle stressbased cost function, has been found to be between 95-100 rpm (Neptune et al., 1997). It has also been found that the minimum neuromuscular activation, force, stress and endurance occurs at a cadence of 90 rpm (Hull et al., 1988).
The output power which exerted by the cyclist is another important parameter. Previous studies have shown that typical steady-state cycling over level ground at ~9 m/s the power required is ~200 W at a cadence of 65 rpm (Hull et al., 1988). More recent studies have shown that world class cyclists generate 7.6 W/kg while an average cyclist would generate 3.7 W/kg (Coggan, 2008).

Control Systems
Several control systems have been used in existing EPACs as well as been presented in literature. Reference (Lomonova et al., 2002) presents a control system where a predefined assisted power is provided without considering the rider's physical condition, so that the comfort and the safety of the rider might not be guaranteed. Most commercial systems such as Bosch and Panasonic mid drive system, provide a motor power proportional to the rider's input power. In these systems, rider can select the percentage of proportional assist whether 100%, 200%, 300% or 400% (Cai et al., 2010). A method called the 'Delta learning rule' has been presented where, the rider's pedaling power is forecasted using the delta rule, to calculate the weights of neurons in a neural networkbased control system (Cai et al., 2010). The essential assisted motor power can be thus calculated from the forecasted pedal power under the preferred comfortable speed. A reinforcement learning based controller is proposed in (Hsu et al., 2012), where the riding comfort is achieved by maintaining a velocity comfort zone. This provides the advantage of reducing the instantaneous forward acceleration which can make the rider feel unsafe if sudden assisted power produced too much acceleration. This is defined as a safe acceleration zone.

Verification of Cadence for Rider Comfort
To setup the experimental foundation for the biomechanic and rider comfort parameters, an experimental model and a test protocol was set up using a conventional bicycle with an attached sensor array. Initially, a bicycle was fitted with four sensors; a cadence sensor, a wheel rpm sensor, an accelerometer and a pulse sensor. An Arduino Mega2560 was used to capture sensor data and store them on a SD card as shown in Fig. 1.

Fig. 1: Data Acquisition system developed for experimentation
A test protocol was developed to cover different ride environments so that the system parameters can be identified which is useful in making a robust design. The test has been performed by using a rider of near the average weight (63 kg), on a level and smooth asphalt terrain without hindrances from other vehicles, under three different road conditions in a tropical climate. The obtained sensor data is used to calculate the output power which is available for drive the bicycle: i. Flat road (00 gradient) -This setting is required to ascertain the rated power requirement to be given by the motor ii. An uphill travel on a road with 50 gradients (measured with an accelerometer with a ±10 tolerance) -most of the common road gradients are less than 50. This value is important to determine the maximum power that the motor can produce iii. A downhill travel on the same road (-50 gradient) -To identify the regenerative capabilities.
The data from wheel rpm sensor is used to calculate the cruise speed of the bicycle and it was displayed on an odometer which was placed at the stem of the bicycle. According to the test protocol, the rider had to keep the cruising speed at 10 km/h constant level (with ±1 km/h tolerance).
The variation of gradient of the road, cadence, wheel rpm and pulse rate with time is acquired via the above experiment. The gathered results (omitted for brevity) successfully verified the values considered from the literature in the context of an application in a tropical climate.

EPAC Design
The EPAC proposed by the authors have been designed for use in tropical climates to provide effective power assist while maintaining rider comfort. The major design criteria are as follows: (i) a conventional bicycle with standard manual derailleur mechanism is used as  (Walpole et al., 2012).
(vi) provide manual, fully-electric and hybrid drive with power assist drive capabilities.

Mechanical Design
Based on the design criteria, total power requirement was calculated as 570 W for a mountain bicycle tire on asphalt road (Engineering ToolBox, 2008). The power capacity of the rider was approximated as 225 W following the work of Coggan (2008) and the required motor output power was estimated as 350 W. To reduce controller cost and wiring complexity the peak current was limited to 10 A. Therefore, a 350 W BLDC of 36 V was selected as the power assisting device (Chan et al., 1999;Park et al., 2011).
The other major components of the EPAC are, the motor controller, hub transmission unit and sensor array. The motor and pedal crank is connected by two freewheels, one at the pedal crank and one at the motor output shaft, as shown in Fig. 2. When only one of the two power sources are being used, the other is freewheeling. The torque addition will be taken place only when the two rpms (i.e., pedal and motor) are equal. This combined torque is then transmitted to the rear hub via a chain drive. The transmission ratio will be chosen upon the desired speed and calculated required torque to reach the desired speed. The chosen transmission ratio will be shown on a handle mounted display, so that the rider can shift to the selection. The rider can use a hand throttle in case of an instantaneous power demand. There is an electrical connection between the brake levers and the controller, so that the motor will be disconnected when the brake lever is pulled.
Traditional derailleur/multi sprocket mechanism is replaced by a cable-actuated hub transmission unit installed on the rear hub (Fig. 3).

Sensing System
A 6-axis motion tracking system (MPU 6050, InvenSense TDK) was used to provide road gradient and linear acceleration. The captured signal was conditioned using a Kalman filter to eliminate the noise. The cadence was measured by an encoder placed near the pedal crank. The encoder uses hall sensor and magnet embedded encoder wheel. A 12-magnet encoder wheel was used to obtain a resolution of 5 rpm. A similar encoder was installed between the bicycle fork arm and a spoke to act as the wheel speed sensor. To measure the rider's pulse rate, photoplethysmograph based pulse sensor (Tamura et al., 2014) was installed on the throttle to be in continuous contact with the rider's index finger. A current sensor was installed with the battery pack to observe and control the battery temperature via current control. A display unit was mounted on the handle to display the following to the rider: (i) cadence, (ii) speed of the bicycle, (iii) state of charge of the battery pack, (iv) pulse rate, (v) ride mode and (vi) the selected transmission ratio. The layout of these sensors together with other components are displayed in Fig. 4.

Battery Pack
Li-ion was selected for the battery pack design, due to its higher energy density. Among the various Li-ion battery chemistries available (Nitta et al., 2015), Lithium Nickel Manganese Cobalt Oxide (LiNiMnCoO2 or NMC) was selected due to its higher maximum continuous discharge current (C-rate) and good cycle life (~800 cycles) at a lower cost compared to LiFeO4, LiNiCoAlO2 and LiTiO2. INR18650-29E (Samsung) with a nominal voltage of 3.6 V and 2850 mAh capacity was selected as the battery cell. To obtain 36V at peak current of 10A 10 cells were connected in series and a similar stack was put in parallel, with a total of 20 cells. The available capacity from this battery pack is 5.7 Ah. This is a 14% increase in capacity over most commercial battery packs rated at 5 Ah. The expected range from this 5.7 Ah pack is 16.4 km.

Battery Management System
To improve the safety and life cycle of battery, a Battery Management System (BMS) is introduced. The main function of battery management system is protecting battery cell when overcharging and discharging. Other than that, temperature monitoring and temperature management is also done by BMS to prevent a possible explosion at elevated temperatures. BMS is integrated with active cell balancing to improve the efficiency of the battery pack and extend the lifecycle of battery cells.
The complete EPAC design is shown in Fig. 5 comprising the drive system, battery pack, BMS and sensor array.

EPAC Controller Design
The major advancement of this research is to incorporate an intelligent control system capable of increasing range by improving the energy utilization while maintaining rider comfort. The proposed controller design to allow four ride modes which the rider can switch between at his convenience via a toggle switch. The four ride modes are, (a) no assistance-manual mode (b) fully electric mode (c) motor assistance during traction and (d) pedaling regeneration. Regeneration capability is considered but is not discussed in this study.

iControl
The above control strategies are implemented alongside full EPAC system control using a control defined as iControl. This technology ensures the rider's physical comfort and a proper battery energy utilization on a ride. The rider's physical comfort is maintained by monitoring the cadence and pulse rate of the rider and control the motor rpm accordingly. Battery energy utilization is achieved by controlling the Pulse Width Modulation (PWM) to maintain the desired speed of rider.
Establishing a direct control relationship between cadence, pulse rate and motor speed is difficult as comfortable cadence and pulse rate varies depending on the rider. Therefore, a fuzzy controller is developed to establish an effective controller. The main components in building the fuzzy controller is the development of Membership Functions (MF). Three membership function are created for pulse rate, cadence and motor speed. Pulse rate MF is designed based on the Borg RPE scale which measure exertion during human work (Borg, 1998). The pulse rate MF is developed with the lower limit at 60-70, upper limit at 120 and very high between 140-170 bpm. Least O2 consumption occurs when the cadence is at 55-65 rpm (Hull and Jorge, 1985) and endurance limit is set to 100 rpm. Therefore, the cadence MF is set to easy 60-65 rpm, hard 90 rpm and very hard 115-120 rpm. The member function for the motor is developed based on the power curve of the motor. The speed of the motor is inversely proportional to the motor torque, assuming the motor power is constant. Therefore, higher the motor speed, lesser the torque provided by the motor. iControl ensures the motor is operating in its optimum operating range, which ultimately contributes to the power efficiency. Low speed is set to 180 rpm, moderate speed between 240-280 rpm and high speed to 340 rpm. The defined MFs are depicted in Fig. 6.

Fuzzy Rules
The pulse rate is a measurement of physical comfort, so that increasing the pulse rate will result in rider's discomfort. Therefore, if the pulse rate increases, the motor speed should also be increased. Also, when riding at a higher cadence the rider feels discomfort the motor speed should again be increased. The conditions selected to implement the fuzzy controller is given in Table 2.
The iControl algorithm works based on the following sensory data; Tilt angle, Speed of the bicycle, Cadence of the bicycle, Heat rate of the rider, Throttle position, Brake position, Battery current and Battery SOC. The control flow chart of the iControl algorithm is shown in Fig. 8.

Results
The control algorithm was simulated using the MATLAB using a simulated dataset. The fuzzy toolbox in MALAB was utilized in the development of the control system simulation. A simulated ride pattern was generated and input to the simulation. The simulated controller output of the MATLAB simulation is depicted as a 3D graph between cadence, heart rate and motor speed in Fig. 7. Data collected from an experimental ride using the same volunteer rider, as in the previous experiment, is given in Fig. 9. Figure 7 verifies the expected operation of the iControl system, such that, during most of the Times, the motor speed lies in step 2 mode (middle plane: The cyan region in Fig. 7), where the motor is in its highest efficiency region. Therefore, a maximum energy utilization can be expected from the motor within a wider operating range. Figure 8 shows that; the peak states of motor speed and cadence do not occur at the same time. This ensures a better energy utilization. Also, when the peak state of the pulse rate occurs, the motor speed retains at a maximum level, which assists in improving the rider's physical comfort. Step 1 Easy Hard

Discussion
Step 2 Easy Very hard Step 2 Hard Very hard Step 2 Very hard Very hard Step 3

Conclusion
This research presents an intelligent control system for an Electrically Power Assisted Cycle (EPAC) capable of increasing the electric range by improving the energy utilization while maintaining the rider comfort. A prototype EPAC is built using a conventional bicycle and integrating a motor drive, rear hub transmission, an array of sensors including those for cadence, pulse rate and wheel speed, a novel battery pack and an intelligent battery management system (BMS). This EPAC controlled by a novel 'iControl' algorithm. Experimental results show that the system can effectively assist the rider while improving energy utilization and maintain rider comfort.
The control system is to be further developed by introducing a learning function to adapt to different rider's characteristics. Inclusion of the regenerative system with a high-power density secondary storage system is the next stage in the EPAC development.