Development of a Control Unit for Electric Bicycle

Download Full-Text PDF Cite this Publication

Text Only Version

Development of a Control Unit for Electric Bicycle

Aldrino Shaju

UG Student

Department of Electrical and Electronics Engineering Amal Jyothi College of Engineering,

Kottayam, Kerala, India

Ashish Sunny

UG Student

Department of Electrical and Electronics Engineering Amal Jyothi College of Engineering,

Kottayam, Kerala, India

Keerthy S

UG Student

Department of Electrical and Electronics Engineering Amal Jyothi College of Engineering,

Kottayam, Kerala, India

Yadukrishnan S

UG Student

Department of Electrical and Electronics Engineering Amal Jyothi College of Engineering,

Kottayam, Kerala, India

Mr. Vinu Sankar

Assistant Professor

Department of Electrical and Electronics Engineering Amal Jyothi College of Engineering,

Kottayam, Kerala, India

Mr. Rohith Rajan Eapen

Assistant Professor

Department of Electrical and Electronics Engineering Amal Jyothi College of Engineering,

Kottayam, Kerala, India

AbstractBicycle being the greenest mode of transportation comes with a drawback that cannot be ignored in this fast paced world. Transportation is now greeted as time saving process. So, this is where electric bicycle mainly came into picture. People need a green, health preserving, fast mode of transportation and E-bicycle gave it all. More than just being these things electric bicycle are also able to generate back electric power by use of pedal power and free rotation of motor through regenerative mode. There are many uses of an Electric bicycle, like it is now also being used in Heart rehabilitation centers for patients having heart,lung problem. Our aim is to design a control unit for an electric bicycle using Field Programmable Gate Array (FPGA), which has regenerative power control circuit. Details of the motor and the electronic converter are given. The regenerative power control for electric bicycle method is a simple and a low-cost solution. A Battery Management System (BMS) is applied in order to monitor and to protect the battery from the abnormal conditions. Control unit is simulated in MATLAB/SIMULINK and in proteus with the required parameters and results are provided for reference.

KeywordsElectric two wheeler, Brushless DC (BLDC) motor, Regenerative Braking, Battery, FPGA, BLDC Inverter


    RECENTLY, because environmental pollution and the energy crisis are rising globally, most industrialized countries have been attempting to reduce their dependence on oil as a source of energy. Therefore, Electric Vehicles (EVs) are promising instead of traditional vehicles. Most EVs, including electric cars, electric scooters, electric bicycles, electric wheelchairs, etc. In Electric bicycles the main cost factor is the building cost and the running cost is the charging of the battery. Electric / Hybrid bicycle uses electrical energy to drive a motor These types of bicycles are capable of being driven on all types of terrain with greater case and speed. All

    components are same as per a normal bicycle except the design changes are made according to the additional components present like motor, controller and the type of batteries installed. There are many types of motors which can be used in hybrid bicycle and also there are many possibilities to mount them on different places in bicycle. The motor mainly helps the rider by providing assistance in pedaling with less pedal power required. An E-bicycle contains rechargeable batteries.

    There are many types of Electric Bicycles, some are mentioned below:

    • Class 1: Pedal Assist / Pedelec

      It is the most common type of electric bicycle. The rider pedals the bike normally while a motor provides assistance, increasing the power transmitted to the rear wheel and also eases out physical work required. The pedaling takes far less effort than it normally would, which allows for higher speeds and effortless climbing over steep hills. Controller and the settings set up can control the amount of assistance the rider desires, but not above 25 kilometer per hour (kph) or approximately 15 miles per hour which is the maximum speed for this class.

    • Class 2: Throttle

      Much like a motorcycle or scooter, a throttle operated electric-bicycle propels the bike forward without any pedaling required from the rider. Most can provide a variable amount of power depending how on throttle push. These are much less common than their pedal assist counterparts as many countries have laws that prohibit them entirely.

    • Class 3: Speed Pedelec

    The design of this vehicle is similar to a standard pedelec but, they allow for a higher maximum speed of 45 kph or approximately 28 mph. In many areas this class of e-bicycle is considered a motor vehicle requires its riders to be licensed.


    .The project is mainly intended to design, model and implement a BLDC motor controller to control the speed of the motor and enable regenerative mode of operation for electric bicycle application by using an FPGA.


    -Un-Noor, Fuad, et al (2017)[1] said that the objective of this paper is on reviewing all the useful data available on EV configurations, battery energy sources, electrical machines, charging techniques, optimization techniques, impacts, trends, and possible directions of future developments and also to provide an overall picture of the current EV technology and ways of future development to assist in future researches in this sector. Different types of motors and batteries used for EV application and about their advantages and disadvantages.

    -Shubham V. Nandurkar, Suraj U. Hajare, Vivek S. Rakhade, B. S. Dani, R.P.Argelwar (2017)[2] presented a hardware design of voltage source inverter fed BLDC motor. Voltage Source Inverter fed brushless DC motor are widely used because of its better performance at low speed. The output drawn by the conventional Diode Rectifier is given to Voltage Source Inverter and by controlling firing of power Metal Oxide Field Effect Transistor (MOSFET) input to BLDC motor can be control. Most of the electrical systems today required higher performance on efficiency and lower carbon dioxide consumption. BLDC motors can achieve these specifications because the high efficiency in comparison with traditional AC induction motor, and purely powered by electricity.

    -A. Sathyan, N. Milivojevic, Y.-J. Lee, M. Krishnamurthy, and A. Emadi (2009)[3] said that this paper lays the groundwork for the development of a new low-cost IC for control of BLDC motors. A simple novel digital pulse width modulation control has been implemented for a trapezoidal BLDC motor drive system. Due to the simplistic nature of this control, it has the potential to be implemented in a low-cost application-specific integrated circuit.

    -F. Naseri, E. Farjah, and T. Ghanbari (2017)[4] said that in this paper, a new Regenerative Braking System (RBS) is proposed for EVs with Hybrid Energy Storage System (HESS) and driven by BLDC motor. During regenerative braking, the BLDC acts as a generator. Hence, using appropriate switching algorithm, the DC-link voltage is boosted and the energy is transferred to the super-capacitor or the battery through the inverter. The harvested energy can be utilized to improve the vehicle acceleration and/or keep the battery pack from deep discharging during driving uphill.


    With increasing in air pollution in urban areas and scarcity of fuels, electric vehicles is in great demand but suffer from the main problem as short driving rage. Hence, how to use the batterys energy efficiently is an important issue for developing EV


    1. BLDC Motor

      Brushless DC motors are common in industrial applications across the world. A BLDC motor is an electronically commuted DC motor which does not have

      brushes. The controller provides pulses of current to the motor winding which control the speed and torque of the synchronous motor. These types of motors are highly efficient in producing a large amount of torque over a vast speed range. In brush-less motors, permanent magnets rotate around a fixed armature and overcome the problem of connecting current to the armature. Commutation with electronics has a large scope of capabilities and flexibility. They are known for smooth operation and holding torque when stationary . BLDC motor has only two basic parts: rotor and the stator. The rotor is the rotating part and has rotor magnets whereas stator is the stationary part and contains stator winding. In BLDC permanent magnets are attached in the rotor and move the electromagnets to the stator. The high power transistors are used to activate electromagnets for the shaft turns. The controller performs power distribution by using a solid-state circuit. As there are no winding in the rotor, there is no rotor copper loss, which makes it more efficient than induction motors [1]. The specification of the motor obtained is shown in the table below.


      Electrical Parameters

      Rated Voltage(DC)


      Rated Power


      Peak Power


      Continuous Current


      Load Current






      Reverse Operation


      Max Torque


    2. FPGA Controller

      The FPGA is Field Programmable Gate Array. It is a type of device that is widely used in electronic circuits. FPGAs are semiconductor devices which contain programmable logic blocks and interconnection circuits. It can be programmed or reprogrammed to the required functionality after manufacturing. In FPGAs, there is no processor to run the software it can be configured as simple as an AND gate or a complex as the multi-core processor. To create a design we write Hardware Description Language (HDL), which is of two types Verilog and Very High-Speed Integrated Circuit (VHSIC) Hardware Description Language (VHDL) [5].

      The Cyclone 3 FPGA is used for this project. The architecture consists of up to 120K vertically arranged logic elements (LEs), 4 Mbits of embedded memory arranged as 9-Kbit (M9K) blocks, and 200 18×18 embedded multipliers. It also includes highly efficient interconnect and low-skew clock networks, providing connectivity between logic structures for clock and data signals. Cyclone III FPGAs take advantage of the benefits of 65-nm technology (small die size, high density and low cost) with up to three speed grades higher performance than competing low-cost FPGAs. Cyclone III

      FPGAs are pad limited. A pad-limited die means the I/O structure is as small as possible, and therefore the die cost is at its lowest. In addition, the Cyclone III FPGAs offer staggered I/O pads, meaning that two rows of I/O pads are interleaved, increasing the number of available I/O pads [6].

    3. Speed Throttle

      The maximum speed of this bicycle is 30kmph. Depending on the external parameters like type of terrain, traffic and others . It is required to provide the rider a way to vary speed. This is where a throttle or accelerator is necessary. If the pedal power changes then it helps the throttle power, but the speed is always restricted to maximum as described. A throttle allows to drive a vehicle from zero to rated or full speed. It is tilted on the right handle bar and is connected to the controller. The throttle converts DC voltage received from the buttery to alternating voltage as per the shift in the position. This alternating voltage with variable frequency and amplitude drives the Front hub motor at different speeds. It is also technically referred to as a Hall Effect type.

    4. Electric brake

      It will actuate the controller to apply resistive force in terms of electric energy to motor at the time of braking. This is most important part when the controller is supporting a regenerative mode of working. On application it triggers the controller to cut-off the power to the motor and start the regenerative mode. While placing this brake is easy but balancing of overall load of the e-bike is also necessary. Any type of uneven loading will make the effect of braking more either on the front or rear side. Due to moisture shorting of internal wires can take place which as a result can cause the throttle to be stuck in a wide open throttle position. The electric brake safeguards the speed and also releases the throttle position.

    5. Lithium ion Battery

    The batteries have a high energy density, and low self-discharge rate. There, can however be a safety hazard since they contain a flammable electrolyte, and if damaged or incorrectly charged can lead to explosions and fires. The advantages are good performance at high temperature, recyclable ,high specific power ,high specific energy ,long battery life. The disadvantages are high cost , longer charging time. This battery which is best suited for electric bicycle applications [1].

    The rating of the battery used is 48V 6Ah. It consist of 16 Li-ion cells connected in series each of 3.2v and a capacity of 6000mAh. Each cell is 1C rated. The BMS is 16S 48V 18A. Low voltage is 44.8V and high voltage is 56 V. It has short circuit, high voltage, low voltage and over-current protection. It is IP66 rated protection from dust and water.


    The inverter is designed and simulated in proteus as shown in Fig .1. Here IR2112 High side low side driver is used to control MOSFETs in each branch. Both the high-side as well as the low-side driver circuits are simulated individually to verify their performances, and then combined to form the complete driver circuit. Initially the driver circuit is simulated considering 100 resistor as load. The gate drive circuit requirement for high-side gate voltage must be greater than (

    Drain-Source Voltage, VDS + Threshold Voltage, Vth). A low-side switch is a MOSFET that is connected to the ground-referenced and is not floating [7].

    Fig. 1. MOSFET High side Low side Driver Circuit

    The design of high side and low side drive circuit consist a level shifter. The level shifter components mainly consist of C1, C2 and D1. The function of the level shifter is to add-up the previously stored voltage across C1 with the supply (+Vcc) voltage. This has to be achieved in order to successfully turn-on the MOSFET. The MOSFET used is IRF250 since it has a VDS of 200V, continuous drain current (ID) of 30A and Drain-Source resistance (RDS) of 0.085 when gate-source voltage is 10V. When +5V is applied to pin 10 of IR2112 driver the output pin 7 connected to high side MOSFET turns on. This same applies to pin 12 which turns on low side MOSFET connected to pin 1.

    However the above circuit is simulated for single leg of the three phase inverter, the complete circuit is shown in Fig


    Fig. 2. 3 phase BLDC inverter

    The driver circuit is built using discrete components such as resistors, bootstrap capacitor, diodes and MOSFETS. The resistor values are selected as per the designing of the driver circuit. The bootstrap capacitor capacitance value of 47F is used in the circuit. Six Schottkey diodes 1N4148 are used in the circuit so it allow the MOSFET to turn off quicker. 10k resistor is connected tosource and gate of each MOSFET to

    protect it from false turn on. Arduino UNO is used to simulate the circuit in proteus [2].

    Fig. 3. Simulated Output waveform of 3 phase BLDC inverter.

    Fig .3 shows the output obtained from the proteus simulation. Each phase are shown in different colour.


    B. Regenerative Braking

    In Fig .4 the Hybrid Energy Storage System (HESS) is utilized to supply the BLDC motor via the three phase inverter. In normal conditions, the battery is solely used to supply the BLDC motor. In peak power demand occasions such as vehicle acceleration or driving uphill, the super-capacitor module assists the battery pack through the buck converter. The power converter is controlled to keep voltage of the super-capacitor module higher than the battery pack voltage and hence, the diode is usually reverse biased. During the vehicle braking, the BLDC machine acts as a generator. Consequently, by utilizing the MOSFETs in the three-phase inverter as well as the motor inductance and adopting a suitable switching pattern, a boost chopper can be formed. Accordingly, during the regenerative braking process, the DC-link voltage is boosted and the diode is forward biased. Hence, the braking energy can be efficiently harvested by the super-capacitor module [4].

    A. Motoring

    Basic speed control system of BLDC motor consists of four blocks as controller, inverter, BLDC motor and speed measurement unit. Speed is measured using hall sensors which are embedded on stator. Measured and reference speed are given to controller where difference between speeds is taken as an error. Controller works on that error and gives output to inverter block which decides which winding of BLDC motor is getting on. As per sequence of inverter gates winding of BLDC motor are getting on or off and hence field changes takes place and according to that rotor position will change. In this way speed can be controlled. A voltage source Inverter is used to convert the DC voltage to the controlled AC voltage. The output of Inverter is fed to BLDC motor. VHDL program is used in Altera software to generate the controlled Pulse Width Modulation (PWM) pulses at different duty ratio for inverter to drive the BLDC at different speed. PWM signals are generated from the Cyclone 3 FPGA processor by writing VHDL program to control the inverter switches. The switching signal parameters namely switching frequency, the duty ratio and the number of pulses are easily controlled via VHDL programming language. The below Tabular column shows the switching sequence of MOSFETs and the Hall Sensor Outputs [3].


    Fig. 4. Regeneration using super-capacitor circuit diagram [4]

    The three-phase Back-EMFs, three-phase armature currents, Hall Effect signals and the relevant switching patterns are shown in Fig .5. In the regenerative braking mode, there are six commutation intervals and only one of the inverter switches is turned on and off during each interval [11].

    Fig. 5. The waveform of the Back-EMFs, armature currents, Hall Effect sensors, and the switching template. (a) Waveform in the motoring condition.

    (b) Waveform in the regenerative braking mode[4]


    The PWM control codes for BLDC motor control is done and to verify the working of FPGA it is simulated in ModelSim. The Fig .6 shows the simulation output for the FPGA based BLDC motor control during motoring and regenerative braking. The PWM pulses is shown during motoring and regenerative braking.

    Fig. 6. ModelSim Simulation of Switching Sequence


    Fig .7 shows the main model of the three phases BLDC motor which is designed in Matlab/Simulink environment. This Model consists of three sub-blocks named as commutation logic, sensor and Inverter block. The hall sensor signals are given to the sensor block which decides the next trigger sequence. This trigger sequence is done by the commutation logic block which triggers the MOSFETs in the inverter block.

    Fig. 7. SIMULINK Model of BLDC Motor Drive

    The load torque is applied at different instants and the performance variables are observed. The load torque is varied and the response of the machine is observed, as it operates in all the four quadrants. The simulation is carried out for a time of 2s and the discrete power GUI mode is adopted. Load torque at different instant is shown in the Fig.8.

    Fig. 8. Motor Torque vs Time Graph

    The motor is at standstill from 0 to 0.3s and then run normally from the 0.3s to 1s then brake signal is passed for 1 to 2s. The various results are obtained and described below. The motor during application of brake goes into generator mode

    Fig. 9. Stator Voltage of all phases

    In fig3.6 the BLDC motor stator voltages are shown. It can be seen that the voltage is 0 during standstill and the trapezoidal waveform is present in motoring and regeneration mode. After 1s the voltage is higher showing the regeneration mode.

    In fig3.7 the BLDC motor stator current are shown. A spike in current waveform is seen during starting.

    Fig. 10. Stator Current of all phases

    Fig3.8 shows the triggering sequence given to the MOSFETs. Triggering sequence is given to MOSFETs during motoring only.

    Fig. 11. Trigger pulses to MOSFETs

    In Fig3.9 shows the battery percentage during standstill, motoring and regeneration mode of the BLDC motor. The battery percentage is set to 80% during start of the simulation. We can see that the battery percentage decreases during motoring and lost energy is recovered during regeneration.

    Fig. 12. SOC of battery vs Time Graph

    Fig.3.10 battery voltage with respect to time indicating discharging and charging.

    Fig. 13. Battery Voltage vs Time Graph


    Fig. 14. BLDC Voltage Source 3 phase Inverter

    The entire 3 phase inverter circuit design for experiment is shown in Fig .14. The components used for this setup is shown in tabular column below.






    MOSFET driver


    Electrolytic Capacitor

    470F 63V(x1), 47F 63V(x3)

    Electrostatic Capacitor

    100nF (x3)

    Schottkey Diode





    1k(x6), 10k(x6)

    The system setup developed using Arduino UNO for testing purpose. Hall sensor signals are simulated and the arduino provides the required gate triggering output to the drivers present in the inverter. The MOSFET driver turns on the MOSFET accordingly. A 3-phase delta connected resistive load is provide at the output side of the inverter. The output waveform of 2 phases is shown in Fig .15 and analyzed using a Digital Storage Oscilloscope (DSO).

    Fig. 15. Output of Voltage Source3 phase BLDC inverter

    The output waveform obtained is similar to that of the proteus simulation.


    Fig. 16. Placement of motor and control unit on bicycle.

    In Fig .16 the BLDC Hub motor is front mount as the advantages are perfectly matched with a city terrain. Also front mounting gives more load balancing, easy to repair and also simplifies design parameters. The control unit with battery is placed under the seat.

    Fig. 17. Components in the control unit

    Fig .17 shows the component present in the control unit. The body of the control unit is made of aluminium with heat sink design to radiate heat produced by the controller and battery. The control unit consist of the BLDC motor controller and Lithium ion battery. The MOSFETs in controller and battery surface is in contact with he body of the control unit. The control unit has a 3 phase output which is connected to the motor and hall sensor input from the BLDC hub motor.


This paper presents the model construction of a brushless DC motor via MATLAB/SIMULINK, so that one can evaluate the performance of the BLDC motor control with various control schemes using MATLAB/SIMULINK. The control and PWM generation logic block then can be transferred to digital hardware circuit in VHDL hardware description language for co-simulation verification in the MATLAB/SIMULINK and ModelSim environment.The proposed system design can be implemented with a FPGA controller to provide a simple, compact, and effective solution for BLDC motor drives for various types of application. FPGAs ensure ease of design, lower development costs, more product revenue, and the opportunity to speed products to market. Building PID controllers on FPGAs improves speed, accuracy, power-efficient, compactness and cost effectiveness over other digital implementation techniques.


  1. Un-Noor, Fuad, et al. A Comprehensive Study of Key Electric Vehicle Components, Technologies, Challenges, Impacts, and Future Direction of Development. Energies10.8 (2017)

  2. Shubham V. Nandurkar, Suraj U. Hajare, Vivek S. Rakhade, B. S. Dani, R.P.Argelwar, Design of Inverter for BLDC Motor, Journal of Network Communications and Emerging Technologies (JNCET), vol. 7, Issue 2, Mar. 2017..

  3. Jisha Kuruvilla, Basil George, Deepu K, Gokul P.T, Mathew Jose, Speed Control of BLDC Motor Using FPGA, International Journal of Advanced Research in Electrical, Electronics and Instrumentation Engineering (IJAREEIE), vol 4, Issue 4, Apr 2015

  4. F. Naseri, E. Farjah, and T. Ghanbari, An Efficient Regenerative Braking System Based on Battery/Supercapacitor for Electric, Hybrid, and Plug-in Hybrid Electric Vehicles with BLDC Motor, IEEE Trans. Veh. Technol., vol. 66, no. 5, pp. 37243738, May 2017..

  5. watelectronics, Basic FPGA Architecture and its Applications,, Apr 25, 2020

  6. element14, Altera Cyclone III FPGA Architecture Overview, one-iii-fpga-architecture-overview, Apr 25, 2020

  7. Rajashekar, J.S. and Kumar, S.P. Simulation Study of MOSFET Based Drive Circuit Design of Sensorless BLDC Motor for Space Vehicle. International Journal of Current Trends in Engineering and Technology (IJCTET), vol 1, Issue 1, pp.1-6, Dec 2014

  8. G.Maruthaipandian, S.Ramkumar, Dr.M.Muruganandam, Design and Implementation of BLDC Motor Using Regenerative Braking for

    Electric Vehicle International Journal of Advanced Research in Electrical, Electronics and Instrumentation Engineering (IJAREEIE), vol 4, Issue 2, Feb 2015

  9. Shirish Vasantrao Gadewar, A. M. Jain, Modelling And Simulation Of Three Phase Bldc Motor For Electric Braking Using Matlab/Simulink WRFER-IEEEFORUM International Conference, 21st May, 2017,

    Pune, India

  10. Yang, M.J., Jhou, H.L., Ma, B.Y. and Shyu, K.K.. A Cost-Effective Method of Electric Brake with Energy Regeneration for Electric Vehicles. IEEE Transactions on Industrial Electronics, vol 56, no. 6, pp. 2203-2212, June 2009

  11. Hasanah, Rini Nur, Victor Andrean, Hadi Suyono, and R. Arief Setyawan. "Bidirectional VSI as a Regenerative-Braking Converter for BLDC MotorAn Analysis on a Plug-in Electric Vehicle Application." In 2017 10th International Conference on Electrical and Electronics Engineering (ELECO), pp. 222-226, 2017

  12. Chen, Cheng-Hu, Wen-Chun Chi, and Ming-Yang Cheng. "Regenerative Braking Control for Light Electric Vehicles." In 2011 IEEE Ninth International Conference on Power Electronics and Drive Systems, pp. 631-636. IEEE, 2011.

  13. A. Sathyan, N. Milivojevic, Y.-J. Lee, M. Krishnamurthy, and A. Emadi,An FPGA Based Novel Digital PWM Control Scheme for BLDC Motor Drives, IEEE Trans. Ind. Electron., vol. 56, no. 8, pp. 30403049, Aug. 2009.

Leave a Reply

Your email address will not be published. Required fields are marked *