BMS demo: real-time control with simulated cells
BatteryInternal demonstration

BMS demo: real-time control with simulated cells

Posted: 29 Apr, 2026

Challenge

Testing a battery management system on real cells is slow, expensive, and dangerous — but skipping it pushes algorithm validation late into bench-testing where bugs cost the most.

Solution

A demo bench that simulates a 14-cell pack using a bi-directional Itech M3412 power supply, measures the simulated voltages with an LTC6812 IC, streams them over CAN through a SparkBit industrial computer, and runs the full BMS control model in MACS — thermal, SOC, and protection logic all closing the loop in real time.

Results

Full BMS algorithm validation against a fully controllable virtual pack. The same MACS model runs unchanged when the bench is later swapped for real cells.

Why simulate cells

A real BMS has to handle thermal runaway protection, state-of-charge estimation, cell-balancing, and overvoltage / overcurrent shutoff — and it needs to handle them correctly long before any real cells are connected. Validating those behaviours on actual lithium cells is slow, hardware-destructive when things go wrong, and impossible to repeat exactly across test runs.

This demo replaces the cells with a controllable bi-directional power supply. Every "cell voltage" is now a software-controlled variable. Every fault scenario — undervoltage, overtemperature, runaway charge — can be triggered on demand, repeatedly, without risk.

The hardware

LTC6812 cell measurement PCB — Linear Technology's standard battery monitoring IC. Reads up to 15 cell voltages plus temperature inputs, supports passive cell balancing, and daisy-chains over IsoSPI for stacking longer packs.

SparkBit — a Tech42 industrial computer based on the Texas Instruments AM625. Linux, 3× CAN, SPI/I2C/UART, and an IsoSPI transceiver to talk to the LTC6812 directly. Reads the measurements off the LTC6812 and republishes them on CAN.

Itech M3412 — a bi-directional bench power supply controllable over CANopen. In this setup it doesn't supply real battery power; it generates the voltages each "cell" should be at. Driving its setpoint from MACS lets us simulate charge, discharge, drift, and fault conditions against the same harness a real pack would use.

How it fits together

The signal path is: Itech M3412 → simulated cells → LTC6812 → IsoSPI → SparkBit → CAN → MACS → Voltage Setpoint → Itech M3412. The loop closes back through MACS, which is where the actual battery control logic lives.

MACS BMS architecture: cell voltages flow from SparkBit into a MACS model containing thermal mass, SOC calculation, voltage setpoint and protection blocks. Voltage setpoint flows back to the Itech inverter.

The MACS model contains:

  • Thermal mass — tracks heat generation and dissipation per cell
  • SOC calculation — coulomb-counting plus voltage-based correction
  • Voltage setpoint — what the Itech should drive each cell to next
  • Protection — temperature, overvoltage, and overcurrent limits with shutdown logic

Each block is a node in the MACS visual designer, so individual algorithms can be swapped or tuned without touching the rest of the pipeline. Add a Kalman-filter SOC estimator, swap the protection logic, plug in a Python node for an ML-based capacity estimator — all live, without recompiling.

MACS visual function-block model running the SOC and Thermal logic for the BMS demo. State of Charge is computed via OCV-initialized coulomb counting, blended 0.1×OCV + 0.5×CC. The thermal model tracks I²R heat against a cooling term integrated against ambient.

The screenshot above shows the SOC + Thermal subsheet running in simulation — 35 blocks, 35 connections, simulating at 10 Hz. Constants like cell capacity, thermal mass, and ambient temperature are live-editable from the Block Properties panel. The same sheet can be deployed to the SparkBit running on the bench, or to a production controller, without modification.

Why this matters

The same MACS configuration that runs against the simulated bench runs unchanged when the Itech is replaced with a real pack. The control software doesn't know — and doesn't need to know — whether the voltages it's reading came from cells or from a power supply pretending to be cells. That's the point of the architecture: validate your algorithms in a safe, repeatable, fully-instrumented environment, then deploy the exact same model to production hardware.

For BMS development teams, this collapses the painful gap between simulation and real-hardware testing into a single workflow.

Got a similar challenge?

Get in touch for a demo or quote.