Skip to content

Battery management system

Select the source of the battery state of charge (SOC) for the controller: an estimate from the battery voltage, an analog signal from the BMS, or data that the controller receives from the BMS over the network.

Prerequisites

Prerequisites

  • Rated limits are set.
  • For Analog 0-10V (ABMS): the BMS analog output is connected to the ABMS input. Refer to Pinout specifications.
  • For Remote: the BMS is connected to the controller over the network, and the communication operates correctly.

When to use this

You can use SOC data to:

  1. Decrease the power to the motor when the SOC is low. This increases the range, but decreases performance. Refer to Battery foldbacks.
  2. Show the SOC on a display, so that the rider knows the remaining capacity.
  3. Override the low and high voltage behaviour of an external BMS.

How it works

The battery voltage is not a linear measure of the remaining capacity. The graph that follows shows the usual cell voltage against capacity.

Graph of typical cell voltage vs capacity showing non-linear relationship

Typical cell voltage against capacity

For some battery chemistries, this problem is much larger. Lithium iron phosphate (LFP) cells keep an almost constant voltage over most of their capacity. An example is a 51.2 V, 105 Ah LFP battery with EVE cells. For these batteries, an SOC value from the BMS gives much better information than the voltage.

The controller shows the SOC that it uses in battery state of charge.

Configure the battery management system

  1. Set Battery management interface type to the source of SOC information for your battery.
  2. Do the steps for that type, in the tabs that follow.
  3. Save the parameters to flash.

The SOC is always 100%. Configure the battery voltage foldbacks to protect the battery. Refer to Battery foldbacks.

The controller calculates an estimate of the SOC from the battery voltage. A fully charged battery is 100%, and an empty battery is 0%.

SOC gain and offset

The controller calculates the SOC with this formula. The result is limited to the range 0% to 100%:

SOC = ((battery voltage / Rated system voltage) * Voltage model battery state of charge gain) + Voltage model battery state of charge offset

Get three values from your battery datasheet: the full charge voltage, the cutoff voltage (0% SOC), and the nominal voltage (Rated system voltage).

  1. Set Voltage model battery state of charge gain to:

    gain = 100 / ((full charge voltage − cutoff voltage) / nominal voltage)

  2. Set Voltage model battery state of charge offset to:

    offset = −(cutoff voltage × gain) / nominal voltage

  3. Save the parameters to flash.

Example

A 48 V NMC battery with 13 cells in series charges to 54.6 V (4.2 V per cell) and is cut off at 39 V (3.0 V per cell).

  • gain = 100 / ((54.6 V − 39 V) / 48 V) = 307.7%
  • offset = −(39 V × 307.7%) / 48 V = −250%

Result: at 54.6 V, SOC = (54.6 / 48 × 307.7%) − 250% = 100%. At 39 V, SOC = 0%.

Battery resistance

Battery resistance lets the voltage model compensate for the voltage drop in the battery and its connections at high currents. To measure the battery resistance:

  1. Read the no-load battery voltage. If possible, use a fully charged battery.
  2. Apply a high load. If possible, apply full load (for example, on a bike trainer or during a ride). Read battery current and battery voltage at the same time.
  3. Calculate Battery resistance = (no-load battery voltage - full-load battery voltage) / full-load battery current.
  4. Enter the result in Battery resistance, in milliohms.

The table that follows gives usual starting values for three common 48 V batteries. These values are estimates from cell datasheet values, with an allowance for the BMS, the connections, and the wiring. Always measure your battery. The real resistance depends on the cells, the cell connections, the BMS, and the cables. It also increases when the battery is cold, discharged, or old.

Battery Example build Datasheet resistance Typical Battery resistance
48 V NMC e-bike battery 13S4P, 18650 cells such as Samsung 35E (about 14 Ah) Up to 35 mΩ per cell (AC, 1 kHz) About 150 mΩ to 250 mΩ
48 V LFP golf cart battery (51.2 V nominal) 16S1P, 105 Ah prismatic cells such as EVE LF105 Up to 0.5 mΩ per cell (AC, 1 kHz) About 15 mΩ to 30 mΩ
48 V lead-acid golf cart battery Six 8 V, 170 Ah to 190 Ah deep-cycle batteries in series About 2 mΩ to 3 mΩ per 8 V battery About 20 mΩ to 40 mΩ

Typical battery resistance by battery type

Cell datasheets give the AC resistance at 1 kHz. This value is lower than the resistance that the controller measures during a continuous load. Thus, the usual pack values are higher than the sum of the cell resistances in series.

The BMS sends the SOC as a 0 V to 10 V signal on the ABMS input. 0 V sets the SOC to 0%, and 10 V sets it to 100%. Between these values, the relation is linear. The controller shows the filtered input voltage in abms voltage.

The controller receives battery information from a remote BMS over the network. The BMS can write these parameters to the controller:

  • Remote battery SOC
  • Remote battery temperature
  • battery current
  • remote maximum battery current limit: the maximum discharge current the battery allows, in amperes.
  • remote maximum regen battery current limit: the maximum charge (regen) current the battery allows, in amperes.

The controller does not receive the battery voltage this way. It always measures the battery voltage itself.

Use these types with Vanguard batteries. The controller uses the charge and discharge limits that the battery broadcasts. The two types use different limits:

  • 7: Vanguard (Life) uses the limits that the battery broadcasts for maximum cycle life.
  • 8: Vanguard (Max) uses the maximum capability limits of the battery. This gives more performance in the limits that the battery permits without a fault. But it can decrease the cycle life of the battery.

Firmware

Available in firmware 6.027 and later, on CAN firmware variants and controllers with CAN hardware. To use a KM5S display together with a Phyllion battery, use firmware variant 004 (Ebike CAN Extended).

The controller reads the battery data from a Phyllion battery over CAN:

  • battery state of charge shows the SOC that the battery reports.
  • remote maximum battery current limit and remote maximum regen battery current limit show the maximum peak current and the maximum charge current that the battery reports.
  • battery current shows the current that the battery reports, not the estimate of the controller.
  • When the charger is connected, or the battery turns off its discharge output, the controller sets the Cut out bit of Remote Digital Commands.
  • When the battery reports a fault or a protection, the controller shows the Remote CAN fault.

The battery stays on while the controller sends a keep-alive message. When you set Key-in to OFF, the battery turns off after approximately 5 s.

  1. Set the CAN bit rate to 250 kbps. Refer to CANopen.
  2. Set Battery management interface type to 13 (Phyllion).
  3. Set one TPDO to send the keep-alive message, as given in the table that follows. You can use any TPDO. If you use TPDO1 to TPDO4, disable Communications Configuration Vector bit 5 Autoset CANopen COBID for TPDOs.

    TPDO parameter Value
    COBID (high word) 38FE (hex)
    COBID (low word) 01EF (hex)
    size (words) 4
    event time 200 ms
    transmission type 0
    map1 index 0080 (hex)
    map1 sub index and size 00CC (hex)
    map2 index, map3 index, map4 index 0000 (hex)
    map2 sub index and size, map3 sub index and size, map4 sub index and size 00CC (hex)

    Keep-alive TPDO settings for a Phyllion battery

  4. If the battery firmware does not broadcast PGNs 65282 (FF02h), 65290 (FF0Ah) and 65291 (FF0Bh), set one more TPDO for each of these PGNs. Each TPDO sends a request for its PGN. Use these settings, with map1 index set to the PGN (FF02, FF0A or FF0B):

    TPDO parameter Value
    COBID (high word) 38EA (hex)
    COBID (low word) F4EF (hex)
    size (words) 2
    event time 250 ms
    transmission type 0
    map1 index FF02, FF0A or FF0B (hex)
    map1 sub index and size 00CC (hex)
    map2 index FF00 (hex)
    map2 sub index and size 00CC (hex)
    map3 and map4 parameters 0000 (hex)

    PGN request TPDO settings for older Phyllion battery firmware

    Older battery firmware does not send the protection PGN 65293. With this firmware, the controller cannot report battery protections.

  5. Save the parameters to flash, and restart the controller.

Battery fault thresholds

Firmware

Available in firmware 6.027 and later.

The controller can set a fault when the battery temperature or the battery state of charge goes outside a limit. These faults clear automatically when the value is back in the limit. A threshold of 0 disables its fault. All three thresholds are 0 by default after an update to 6.027.

Parameter Fault Fault is set when
Battery over temperature trip threshold (address 2070) Battery Overtemperature (Faults3 bit 5) The battery temperature is equal to or more than the threshold.
Battery under temperature trip threshold (address 2082) Battery Undertemperature (Faults3 bit 6) The battery temperature is equal to or less than the threshold.
Battery state of charge trip threshold (address 2094) Battery SOC Low (Faults3 bit 7) battery state of charge is equal to or less than the threshold.

Battery fault thresholds

  1. Set Battery management interface type to a type that gives the battery temperature, the state of charge, or the two. For example, 5 (Remote) gives Remote battery SOC and Remote battery temperature. 1 (Voltage SOC Model) calculates the state of charge.
  2. Set the thresholds that you use, in °C or % SOC. Leave a threshold at 0 to disable its fault.
  3. Save the parameters to flash.

Refer to Faults and warnings.

Verify

To examine the voltage SOC model, change the battery voltage and monitor battery state of charge. For example, use an adjustable power supply to change the voltage in steps between the full and empty battery voltages. After each change, wait some minutes, because the value changes slowly.

The most reliable test is to ride the vehicle with a display until the battery is empty.

For the other types, make sure that battery state of charge follows the SOC that the BMS reports.

Troubleshooting

The SOC always reads 100%

Battery management interface type is set to 0 (None). Select the type that is applicable to your battery.

The SOC drops sharply under load and recovers at rest

With the voltage SOC model, the controller reads the voltage drop under load as lost capacity. Measure Battery resistance and set it, as given in Battery resistance.

Parameters

Parameter Address Units Description
Battery resistance 59 mΩ Battery and connection resistance used by the voltage SOC model to correct for voltage sag under load.
Voltage model battery state of charge gain 197 % SOC change for a 1 pu change in battery voltage.
Voltage model battery state of charge offset 198 % SOC offset.
Battery management interface type 209 Source of SOC information. 0: None. 1: Voltage SOC Model. 2: Analog 0-10V (ABMS). 5: Remote. 7: Vanguard (Life). 8: Vanguard (Max). 13: Phyllion (firmware 6.027 and later).
battery voltage 265 V Measured battery voltage.
battery current 266 A Estimated battery current, unless provided remotely by the BMS.
battery state of charge 267 % Remaining battery capacity used by the controller.
abms voltage 275 V Filtered ABMS input voltage.
remote maximum battery current limit 360 A Maximum discharge current from a remote BMS.
remote maximum regen battery current limit 361 A Maximum charge (regen) current from a remote BMS.
Remote battery SOC 503 State of charge from a remote BMS.
Remote battery temperature 504 °C Battery temperature from a remote BMS.
CAN Battery Comm Timeout 2008 ms Communication timeout for the CTS battery protocol. At the timeout, the controller sets the Network communication timeout fault (Faults bit 8). 0 disables it. Named CTS Battery Comm Timeout in firmware 6.026 and earlier.
Battery over temperature trip threshold 2070 °C Battery temperature that sets the Battery Overtemperature fault. 0 disables the fault. Firmware 6.027 and later.
Battery under temperature trip threshold 2082 °C Battery temperature that sets the Battery Undertemperature fault. 0 disables the fault. Firmware 6.027 and later.
Battery state of charge trip threshold 2094 % SoC State of charge that sets the Battery SOC Low fault. 0 disables the fault. Firmware 6.027 and later.

Parameters used on this page