E-Bike Systems

Controller

An e-bike controller is the electronic power-control unit that converts battery energy into the precisely timed electrical currents required by the motor. It interprets rider commands, sensor data, assist settings, and system limits to control motor torque, speed, engagement, and protection.

The controller is a major contributor to ride feel, but it is not necessarily the e-bike’s only “brain.” Battery protection, display functions, charging, connectivity, and vehicle-level logic may be divided among the motor controller, battery-management system, display, and other networked modules.

Key Facts

Category: Technology / E-Bike System
Also known as: Motor controller, inverter, electronic speed controller, drive controller
Primary function: Control motor commutation and phase current
Common motor types: Three-phase BLDC and permanent-magnet synchronous motors
Control methods: Six-step commutation, sinusoidal control, field-oriented control
Typical inputs: Torque, cadence, speed, throttle, brake, motor position, current, voltage, and temperature
Typical outputs: Motor phase currents and system-control signals
Locations: Inside a drive unit, battery cradle, frame enclosure, or external controller box
Works with: Motor, battery, BMS, sensors, display, controls, and firmware
Configured through: Factory programming, approved apps, or dealer diagnostic software

Overview

The battery supplies direct-current electricity, but a modern brushless e-bike motor requires controlled current through multiple motor phases. The controller performs this conversion by switching power transistors in a carefully timed sequence.

It determines:

  • When assistance begins
  • How quickly power ramps up
  • How motor output follows rider effort
  • How much current the system can draw
  • When assistance must be reduced
  • When a fault requires shutdown

Some controllers respond primarily to a cadence sensor or throttle. Others combine torque, cadence, speed, motor-position, temperature and battery data. Hardware, firmware and the quality of their integration determine the result.

A powerful motor connected to a poorly matched controller may feel abrupt, noisy, inefficient, or weak. Conversely, a carefully tuned controller can make modest hardware feel responsive and controlled. Motor construction, sensor quality, gearing, battery performance, and frame integration still matter, so ride feel should not be attributed to the controller alone.

How It Works

Two-panel controller schematic. Rider inputs and sensors feed the processor, gate drivers and power stage; current and rotor-position feedback returns to the processor. A separate power diagram shows six switch positions in three half-bridges between battery positive and negative, with A, B and C motor phase terminals.
The control loop calculates and corrects motor output. The power bridge switches battery energy into three motor phases. Open-contact symbols represent semiconductor switch positions; this is a functional schematic, not a wiring diagram or operating sequence.

Input Processing

The controller receives information from sensors and other electronic modules. Depending on the system, inputs may include:

  • Torque: Rider-applied turning effort at the cranks
  • Cadence: Crank rotational speed
  • Wheel speed: Bicycle speed and speed-limit information
  • Throttle position: Requested motor output on throttle-equipped bikes
  • Brake signal: Command to stop assistance
  • Rotor position: Motor-shaft position from Hall sensors, encoders, or electrical estimation
  • Current and voltage: Electrical load and battery condition
  • Temperature: Motor, controller, or battery heat
  • Gear position: Used by some electronically integrated drivetrains
  • Bicycle attitude: Pitch or acceleration data on certain advanced systems

Not every controller receives every input. A basic cadence-sensing hub system may use only pedal rotation, wheel speed, throttle, and brake cutoffs. An integrated performance system may process torque, cadence, gear position, temperature, and bicycle attitude simultaneously.

Assist Calculation

Firmware compares the sensor information with the selected assist mode and programmed limits. It then calculates a requested motor torque or current.

This calculation can include:

  • Assist ratio
  • Starting-current ramp
  • Maximum battery current
  • Maximum motor phase current
  • Speed limit
  • Cadence-dependent output
  • Torque-sensor filtering
  • Traction-management logic
  • Thermal derating
  • Shift-related power reduction

If the rider pushes harder, a torque-sensing system may increase assistance proportionally. If the controller detects excessive temperature, low battery voltage, or a speed above the assistance threshold, it can reduce or stop motor output.

Power Stage

The power stage typically has three half-bridges: one high-side and one low-side switch position per motor phase. Each position may contain one MOSFET or several in parallel, so six switch positions need not mean six physical transistors. The gate drivers control switching, keeping opposite switches in a leg from conducting together.

Pulse-width modulation (PWM) changes how long the switches conduct, controlling the applied voltage over each switching period. Winding inductance, motor speed and back-EMF affect the resulting current. Current feedback and rotor-position information let the controller adjust switching to produce the requested torque. PWM is used with both six-step control and FOC.

At low motor speed, motor phase current can exceed the average current drawn from the battery. The controller switches and recirculates winding current; it does not create extra energy. Battery-current and phase-current limits protect different parts of the system. A quoted amperage is incomplete unless its location and measurement basis are known.

Motor-Control Methods

Six-Step or Trapezoidal Control

Six-step control changes the phase-energizing pattern every 60 electrical degrees, commonly driving two phases while the third is undriven. Hall sensors can provide position information. Back-EMF-based sensorless control needs a starting strategy because back-EMF is unavailable at standstill.

Characteristics include:

  • Relatively simple electronics and firmware
  • Low production cost
  • Good compatibility with basic hub motors
  • More torque ripple
  • Greater potential for audible electrical noise
  • Less refined low-speed control

Six-step control remains common in conversion kits and cost-sensitive e-bikes.

Sinusoidal and Field-Oriented Control

Sinusoidal commutation aims for smooth phase currents. FOC is a specific control method, not simply another name for a sine-wave output. It transforms measured phase currents into components referenced to the rotor’s magnetic field and regulates them to control torque and flux. Its commands are then implemented through the switching power stage.

Potential benefits include:

  • Smoother low-speed response
  • Reduced torque ripple
  • Lower audible motor noise
  • More accurate current control
  • Improved efficiency under appropriate conditions
  • Better control during rapid acceleration

FOC needs current feedback, suitable motor parameters and a usable rotor-position estimate. Sensors or electrical estimation can supply that estimate; smooth starting is implementation-dependent. Microchip’s e-bike reference design supports Hall-sensor and sensorless feedback.

MethodWhat it controls
Six-stepChanges the energized phase pair in six sectors per electrical cycle. Relatively simple; torque ripple and sound depend on the motor and tuning.
Sinusoidal commutationCommands smoothly varying phase currents. A sine-wave description alone does not establish the control algorithm.
Field-oriented controlRegulates rotor-referenced current components using feedback. More computation; potentially smoother torque and stronger dynamic control.

Controller type alone does not guarantee quality. Poorly tuned FOC can perform worse than a properly matched six-step controller.

Controller Hardware

Independent current examples. At the battery, an actual 48 volts and 10 amps give 480 watts of electrical input. At the motor, three balanced sinusoidal phase currents are separated by 120 electrical degrees. Each has a 30 amp peak, equivalent to about 21.2 amps RMS. The examples do not imply a battery-to-phase current conversion ratio.
Independent examples: 48 V × 10 A is 480 W of battery-side electrical input. A balanced sinusoidal phase current with a 30 A peak is about 21.2 A RMS. These are different measurement locations and bases, not a battery-to-phase conversion formula.

A typical controller includes:

Microcontroller

The microcontroller runs the firmware, reads sensors, calculates motor commands, manages communications, and responds to faults.

Gate Driver

The gate driver amplifies low-power commands from the microcontroller so they can switch the power transistors accurately.

MOSFET Power Stage

MOSFETs switch battery current into the motor phases. Their voltage rating, current capacity, cooling, and circuit layout determine how much electrical and thermal load the controller can withstand.

Current Sensors

Shunt resistors or magnetic sensors measure battery or phase current. This feedback allows torque regulation and overcurrent protection.

Position Feedback

Motor position may come from Hall sensors, an encoder, or sensorless calculations. Incorrect position information can cause rough running, cogging, weak output, or failure to start.

Capacitors

Capacitors stabilize the controller’s DC input and absorb switching transients. They can remain charged temporarily after the battery is disconnected.

Communication Interface

Integrated systems communicate with batteries, displays, sensors, chargers, and diagnostic tools through a digital network. Physical connector compatibility does not guarantee communication compatibility.

Integrated and External Controllers

Integrated Controllers

Many OEM mid-drives place the controller inside the motor housing. This shortens phase wiring, protects the electronics from direct exposure and allows coordinated motor and sensor development. Heat concentration, restricted access and proprietary diagnostics complicate service. Some controllers are replaceable modules; others require authorized internal service or drive-unit replacement.

External Controllers

External controllers are common on hub-motor bikes and conversion kits. Separate housings can improve access, replacement and cooling while keeping controller heat away from the motor. The trade-off is more wiring and connectors, potential water or impact exposure, and greater responsibility for matching components. Placement and sealing still determine protection.

Controller, BMS, and Display

The controller should not be confused with the battery-management system.

The motor controller regulates motor power. The BMS monitors cells and protects the battery against conditions such as overload, excessive temperature and deep discharge; it may also balance cells and coordinate charging. The charger supplies the charging power. Bosch’s battery guide describes the BMS’s protection role.

The two modules may exchange information, but each can impose its own limits. A sudden shutdown under load may therefore be caused by:

  • Controller overcurrent protection
  • Controller overheating
  • Motor overheating
  • Battery voltage sag
  • BMS current protection
  • A loose battery connection
  • Communication failure

The display is usually an interface rather than the motor’s power controller. It sends rider selections and displays system information, while the high-current switching occurs elsewhere.

Role in Ride Feel

Controller settings strongly influence several rider-perceived characteristics.

Starting Behavior

Starting current and ramp rate determine whether assistance enters gradually or arrives as a surge. Excessive starting current can break traction, strain the chain, or make low-speed handling difficult.

Torque Response

A torque-sensing system must filter pedal-force signals without creating excessive delay. Too little filtering can make assistance nervous; too much can make it feel disconnected.

Cadence Response

Some systems reduce output at high cadence, while others maintain assistance across a wider pedaling range. This behavior is determined by motor capability and controller programming together.

Overrun and Cutoff

Controllers determine how quickly motor assistance stops after pedaling ceases or a brake cutoff activates. Excessive overrun can be unsettling in technical terrain or traffic.

Thermal Derating

When the motor or controller becomes hot, firmware may progressively reduce power. This can feel like a weak battery even when the battery remains charged.

Electrical Noise

Switching frequency, commutation method, and current waveform affect motor sound. Bearings, reduction gears, frame resonance, and motor construction also contribute.

System Integration

Advanced controllers can coordinate with other electronic components.

For example, Shimano’s integrated systems can use cadence, torque, and speed data for automatic shifting and can coordinate the drive unit with compatible Di2 components. Shimano EP6 system

Avinox systems add gear-position and bicycle-attitude data to their control strategy. Avinox system FAQ

Firmware updates can change assist curves, sensor calculations, communications, and shifting behavior without replacing hardware. Shimano’s E-Tube platform, for example, supports approved firmware updates and assist customization. Shimano E-Tube Project

Regenerative Braking

Some controllers can return electrical energy to the battery during braking, but the motor and drivetrain must support it.

Regeneration requires a mechanical path from the wheel back to the motor. Direct-drive hubs normally provide it; typical freewheeling geared hubs and most mid-drives do not. A geared hub designed without that freewheel can also regenerate. Grin explains this distinction.

The controller, battery and BMS must also accept regenerative charging. A full battery or a charge-protection limit can restrict it. Regeneration supplements the bicycle’s friction brakes; it does not replace them.

Protective Functions

Depending on the design, a controller may monitor for:

  • Excessive phase or battery current
  • High controller temperature
  • High motor temperature
  • Battery undervoltage or overvoltage
  • Invalid throttle position
  • Missing speed signal
  • Hall-sensor or rotor-position faults
  • Phase-wire faults
  • Brake-signal faults
  • Communication errors

Protection limits reduce damage risk but do not make incompatible tuning safe. Increasing current limits can exceed the capacity of the motor windings, MOSFETs, battery, BMS, wiring, connectors, or drivetrain.

Mechanic’s Perspective

Controller faults are frequently misdiagnosed. A no-assist condition does not automatically mean the controller has failed.

Before testing, record:

  • Bicycle and drive-system model
  • Controller model
  • Nominal voltage
  • Battery model
  • Motor type
  • Display and control-unit models
  • Connector type and pinout
  • Firmware version
  • Current and stored error codes
  • Circumstances under which the fault occurs

Diagnostic Sequence

  1. Confirm the complaint. Determine whether the problem is no assist, reduced power, intermittent cutoff, rough running, noise, overheating, or a display fault.
  2. Read fault codes before disconnecting components. Stored information may be lost after power cycling or substitution.
  3. Check the battery first. Verify charge, mounting, connector condition, and whether voltage collapses under load.
  4. Inspect brake cutoffs. A stuck or damaged brake sensor can inhibit an otherwise functional controller.
  5. Check the speed sensor and magnet. Misalignment can disable assistance or produce incorrect speed behavior.
  6. Inspect the wiring. Look for bent pins, backed-out terminals, corrosion, melted connectors, crushed harnesses, and water ingress.
  7. Inspect motor feedback circuits. Hall-sensor, encoder, or phase-wire problems can imitate controller failure.
  8. Check temperature-related behavior. A bike that works when cold but loses power during climbing may be thermally derating.
  9. Verify firmware and component compatibility. Communication faults often appear after an incorrect display, battery, or controller has been installed.
  10. Perform a controlled load test. A repair-stand test may not reproduce battery sag, high phase current, or thermal shutdown.

Electrical Safety

Disconnect the battery before opening connectors or removing the controller. Follow the manufacturer’s specified discharge time because internal capacitors may remain energized.

Do not short phase wires or probe high-current circuits casually. Improvised testing can damage the controller, create an arc, or start the motor unexpectedly. Integrated systems should be diagnosed with the approved service tool whenever available.

Replacement Compatibility

A replacement controller must match more than nominal voltage. Confirm:

  • Maximum battery voltage
  • Battery- and phase-current ratings
  • Motor phase configuration
  • Rotor-position sensor type
  • Throttle and brake-signal format
  • Torque- or cadence-sensor compatibility
  • Display communication protocol
  • Battery communication requirements
  • Firmware and regional configuration
  • Connector pinout

Two controllers with identical plugs may be electrically incompatible.

Tuning

On configurable systems, record the original parameters before making changes. Adjust one variable at a time and test under controlled conditions.

Increasing maximum current is not the correct response to every performance complaint. Poor gearing, battery voltage sag, a damaged phase connection, incorrect wheel size, dragging brakes, or a failing torque sensor can all make a system feel weak.

Common Misconceptions

“The Controller Is the Entire E-Bike Computer”

Control may be distributed among the motor controller, BMS, display, sensors, and other modules.

“PWM Simply Changes the Voltage Going to the Motor”

PWM controls applied voltage over a switching period. Torque depends on the resulting phase current and its relationship to rotor position; FOC still uses PWM to implement its commands.

“A Higher-Amp Controller Always Makes the Bike Faster”

A higher current limit may permit more torque and acceleration if the motor and battery can use it. It does not guarantee higher speed. Battery voltage, winding, gearing, wheel size, load and programmed limits still matter.

“Any Controller With the Correct Voltage Will Work”

Motor feedback, phase arrangement, current limits, connectors, display protocol, and firmware must also match.

“Every Controller Can Be Reprogrammed”

Many OEM controllers allow only approved configuration through manufacturer software. Others are locked to the bicycle brand or complete system.

“A Controller Fault Code Proves the Controller Is Defective”

The controller reports faults elsewhere in the system. An error generated by the controller may identify a battery, sensor, motor, wiring, or communication problem.

Notable Architectures

Integrated OEM mid-drives: Bosch, Shimano, Brose, Yamaha, and Avinox generally integrate motor control into a coordinated drive system.

Bafang systems: Architecture varies from configurable conversion drives to closed, frame-integrated OEM systems.

External hub-motor controllers: Common on conversion kits, utility bikes, and cost-sensitive e-bikes.

Programmable specialist controllers: Used in custom and high-output builds where the motor, battery, wiring, and thermal limits are engineered together.

Motor Controller
Battery Management System
Torque Sensor
Cadence Sensor
Hall Sensor
Field-Oriented Control
Pulse-Width Modulation
MOSFET
Firmware
Pedal Assist System
Thermal Derating
Regenerative Braking

References

Scroll to Top