How do electric bike motor algorithms work?
📞 Need help or a pro for installation?

Electric bike motors work thanks to sophisticated algorithms that regulate the electrical power delivered to the bike’s wheels. These algorithms guarantee efficient battery operation and optimum electrical assistance for the cyclist. In this article, we’ll explore the basics of electric bike motors, the different types of motors, key components, control algorithms, sensors used and future prospects for this exciting technology.
Key takeaways
- An e-bike motor is a brushless motor driven by a controller. The controller reads sensors many times per second and decides how much current to send to the motor.
- With a cadence sensor, the motor switches on as soon as the cranks turn and gives a fixed power per assistance level. With a torque sensor, it measures how hard you push and adds power in proportion to your effort, which feels like natural pedalling.
- The law sets the frame the algorithm must follow: assistance only while pedalling, cut off at 25 km/h, 250 W rated power (EN 15194). Good controllers reduce assistance gradually as you approach 25 km/h.
- FOC (field-oriented control) is the method most modern controllers use to drive the motor’s three phases smoothly: it gives quieter operation, better efficiency and better torque at low speed.
- The same controller protects the battery and motor: it limits current when the battery is low or the motor gets hot.
Electric bike motor basics
Electric bike motors are powered by a battery which, depending on the electrical assistance required, supplies energy to the motor. Motors can be installed on the front wheel, rear wheel or in the crankset (at Syklo we offer both: crankset motors on our Z8 kits and a rear hub motor on the RoadDrive 45). Modern electric bike motors are equipped with speed, cadence, torque and power sensors that provide the information needed for the control algorithms to function correctly.
The different types of motors
Almost all e-bike motors are brushless. What differs is where they sit: in the front hub, the rear hub, or at the bottom bracket (mid-drive): see our hub motor vs mid-drive comparison. Brushless and DC motors are the most common and are equipped with sensors that provide speed, cadence and (sometimes) torque information to regulate the amount of electrical energy supplied to the bike’s wheels. Motors integrated into the wheel hub have the advantage of being discreet, but can be more difficult to replace or repair in the event of a problem.
Brushless motors are often considered the best motors for electric bikes. They are quieter, lighter and more energy-efficient than DC motors. Brushless motors are also more reliable and last longer than DC motors.
Motors integrated into the wheel hub are often used for electric folding bikes and electric city bikes. These motors are discreet and do not alter the appearance of the bike. However, they can be more difficult to replace or repair in the event of a problem.
Key components of an electric motor
Electric bike motors are made up of several key components, including a stator, a rotor, a housing and a series of coils. The controller energises the stator coils in sequence to create a rotating magnetic field that pulls the magnets of the rotor round. The housing holds the motor assembly in place and is designed to prevent damage from weathering and wear.
Stator coils are often made of copper, as copper is an excellent conductor of electricity. The rotor’s magnetic poles are often made of neodymium, as neodymium is a very powerful permanent magnet. Permanent magnets are used in electric motors because they are more efficient than electromagnets, which require energy to create a magnetic field.
The importance of the algorithm in engine operation
Control algorithms are essential for the operation of electric bike motors. These algorithms regulate the amount of electrical energy supplied to the motor according to the data provided by the sensors. Control algorithms ensure that the battery is working properly and optimize the efficiency of electric assistance for the cyclist.
Control algorithms can (sometimes) be customized to suit the rider’s preferences. For example, some cyclists prefer a stronger electric assistance for uphill riding, while others prefer a weaker assistance for more intense training. With our bike electrification kits, the control algorithms can be adjusted to suit these individual preferences.
Control algorithms can also be used to monitor battery condition and prevent overcharging or overdischarging. Control algorithms can adjust the amount of electrical energy supplied to the motor according to the battery charge, to ensure maximum battery life. All these components and more are available through the Open Source Firmware we use at Syklo.
Engine control algorithms (or FOC for the experts)
The electric motor control algorithms are designed to provide the optimum electric assistance for the rider. The control algorithms are responsible for regulating speed, managing electric assistance and optimizing battery autonomy.
Electric motor control algorithms are becoming increasingly sophisticated and are designed to provide a more pleasant and safer riding experience for the cyclist. Control algorithms are regularly updated to improve the performance and efficiency of electric assistance.
Speed control
Speed control is essential for cyclist safety. Control algorithms regulate motor speed according to rider speed and driving conditions. Control algorithms ensure that the electric motor does not exceedlegal speed limits (25 km/h in France), and provide optimum assistance for the cyclist.
Speed control is particularly important in urban areas where traffic is dense and the risk of accidents is high. The control algorithms are designed to detect sudden changes in speed and adjust the electric assistance accordingly.
Managing electric assistance
Control algorithms also regulate the amount of electric assistance provided by the motor. The control algorithms take into account the power required to climb a hill, to drive on flat ground or to descend a slope. The control algorithms provide optimum electrical assistance for the rider according to his or her needs.
Electric assistance management is essential for cyclists who use their electric bikes for daily commuting. Control algorithms are designed to detect changes in terrain and adjust electric assistance accordingly. This allows cyclists to cover longer distances without tiring.
Optimizing battery life
Control algorithms are also designed to optimize battery autonomy for longer life. Control algorithms regulate the amount of electrical energy supplied to the motor to ensure that the battery does not discharge too quickly. Control algorithms guarantee sufficient battery life for the cyclist’s needs.
Optimizing battery life is particularly important for cyclists who use their electric bikes for long-distance journeys. Control algorithms are designed to detect battery charge levels and adjust electric assistance accordingly. This allows cyclists to cover longer distances without having to recharge their batteries as often.
Sensors and data used by algorithms
The control algorithms depend on the data supplied by the motor sensors to function correctly. Sensors track speed, cadence, torque and power to regulate the amount of electrical energy delivered to the bike’s wheels.
Swipe the table left to see all columns →
| Cadence sensor | Torque sensor | |
|---|---|---|
| What it measures | Whether the cranks turn, and how fast | The force on the pedals, plus cadence |
| How assistance is set | Fixed power per level once you pedal | Your pedalling power × the assistance factor of the level |
| Riding feel | On / off, slight delay at start and stop | Natural, follows your effort instantly |
| Battery use | Higher: full assistance even when you pedal lightly | Lower: little assistance when you push little |
| Typical use | Entry-level e-bikes and kits | Mid-range and premium e-bikes, Syklo Z8 and RoadDrive 45 kits |
Speed and cadence sensors
Speed and cadence sensors measure crankset rotation speed and pedaling cadence to regulate the amount of electrical energy supplied by the motor. These sensors are essential to guarantee optimum electrical assistance for the cyclist.
What’s more, these sensors can be used to track the cyclist’s progress over time. Speed and cadence data can be recorded and analyzed to help the cyclist improve performance.
Torque and power transducers
Torque and power sensors provide information on the amount of force exerted on the pedals and the amount of power generated to turn the engine. This data is used to regulate the electrical assistance provided by the motor, for a more efficient and personalized ride.
These sensors can also be used to monitor the rider’s progress in terms of strength and power. Torque and power data can be recorded and analyzed to help the rider improve strength and power.
Integration of GPS and environmental data
Speed and cadence sensors can also be integrated with GPS data for more personalized electric assistance. The integration of environmental data, such as temperature and humidity, can also optimize electric assistance for a more pleasant riding experience.
In addition, the integration of environmental data can help cyclists adapt to changing weather conditions.
Now you know how an e-bike motor turns your pedalling into assistance. Our UrbanExplorer Z8 and PowerTrail Z8 kits (TSDZ8 mid-drive motor) and our RoadDrive 45 (rear hub motor) all use a torque sensor. To compare them, see all our kits!
Frequently asked questions
How does an electric bike motor work?
A brushless electric motor, powered by the battery, is driven by a controller. The controller reads the pedalling sensors and the speed many times per second and sends the right current to the motor, so it assists you only while you pedal and stops at 25 km/h.
What is the difference between a cadence sensor and a torque sensor?
A cadence sensor only detects that the cranks turn, so the motor gives a fixed power per assistance level. A torque sensor measures how hard you push and assists in proportion to your effort, which feels more natural and saves battery.
What is FOC on an e-bike controller?
Field-oriented control is a way of driving the three phases of a brushless motor that keeps the magnetic field at the best angle at all times. It makes the motor quieter and more efficient, with better torque at low speed.
Can I change how my e-bike assistance behaves?
On many e-bikes you can only choose between preset levels. On some kits, settings such as assistance levels, start-up boost or responsiveness can be adjusted by the seller or through the display. The speed cut-off must stay at 25 km/h to remain legal.









