### Intro

Here we describe the simulation of a hub motor on a bicycle in different situations. These different situations are: riding on a flat street, hills and various motor assistance. We create a graph that shows the efficiency versus the speed.

### Bike parameters

Before we can do calculations, the parameters for both the hub motor and the bicycle must be known. Unfortunately the hub motor parameters are seldom known. The bicycle parameters have to estimated or calculated. These are the e-bike parameters, some values were estimated:

Total mass | 90 | [kg] |

Rolling resistance Cr | 0.005 | |

Air density ρ | 1.23 | |

Drag coefficient Cw | 1 | |

Reference area | 0,5 | [m²] |

Transmission efficiency (hub motor) | 100 | [%] |

Wheel diameter | 0.688 | [m] |

### Motor parameters

Commonly, instead of motor parameters, a graph like this is included with a hub motor:

This graph is of no help because the values are plotted in relationship with the torque whereby the voltage is constant. But on a bike, because of the air drag, the load is speed dependant. The motor voltage increases with the speed.

See here how we can extract motor parameters from the graph. These are the hub motor parameters extracted from the above graph:

- R* = 0.6Ω (includes the gearbox loss)
- k = 1.57
- Friction torque Tf = 0.82Nm

Now, when we know all the parameters, the motor-bicycle combination can be simulated in Excel.

### Simulation

Here is an Excel graph of an e-bike with a hub motor, riding on a flat street from 0 to 30 kmh and 100% motor assistance.

We see that the higher the power, the higher the efficiency. At low speeds the efficiency is low. But remember that this is not dramatically because the power here is low and the loss thus of minor importance.

Note that the motor parameters are acquired on a different way here, which delivers slightly different graphs.

In this Excel sheet on GitHub you can fill in your motor and bike parameters, the slope and the amount of motor assistance. Or, if you want, use **EPACSim**.

### EPACSim

EPACSim is a free program to simulate a motor on a bicycle in different situations.

Here are some applications

- Simulation of different motors / controller / battery.
- Comparison of similar motors. Identification of damage / problems on the basis of comparative measurements.
- Deepening of practical knowledge relevant to the operation of BLDC motors.

### Simulation at 5% slope

Here we see the simulation at **5%** slope and a motor-assistance only above 100W. Know that the motor is limited to about 250W. Thus the maximum velocity is about 19 kmh although the x axis maximum is 30 kmh. The hub motor efficiency is above **75%** at almost the complete range.

### Mid drive / central drive e-bike motor simulation

In the Excel sheet on GitHub, we can also simulate a mid drive motor. Take the worksheet tab "Efficiency mid drive η(kmh)". The motor parameters are for the wheel hub motor and for the mid drive motor. In the following example we use a Cute Q-85SX hub motor. Note that this motor is not special designed to use as mid drive motor.

A mid drive motor has, as opposed to a wheel hub motor, an almost constant speed. Since a mid drive motor drives the crank, the motor speed is proportional to the cadence, which is the pedal speed. By switching between the gears, the cyclist achieves that the cadence is always optimal, for recreational cyclist this is about 80rpm. In the article "Permanent magnet DC electric motor tuning" we see that the efficiency of a motor increases with the speed. Since the speed of a mid drive motor can be high at all travel speeds, its efficiency is higher than a wheel hub motor.

In the simulation, I assume the ideal situation, that the bicycle has an infinite number of gears. So, by switching, the mid drive motor speed remains constant at all travel speeds. These values must be entered into the Excel sheet:

- Cadence. Fill in your optimal cadence.
- Mid motor drive gear ratio. This determines the motor speed.

Try different gear ratios to get the best efficiency over a wide travel speed range. These graphs show the higher efficiency of a mid drive motor:

In the next example, the cyclist pedals too; the Excel value "Assistance above" = 100W. Here, the wheel hub motor works in a range where its efficiency is higher; there is not much difference between the efficiency between both motors: