Hybrid powertrain simulator

Watch a dynamic drive, explore the controller, or replay Simulink recordings.

Manual controller · JavaScript

STANDSTILL

System at rest

Motor
OFF
Generator
OFF
Engine
OFF
Battery state of charge40.0 %
0100%
Power demand+0.0 kW
−40−20020406080
Controller test presets

Input controls

Applied
Operating point inputs

Instruments show the applied values.

0.1 s per sample
ManualStep 0

Synthetic drive · live controller decisions. Play starts a new session.

0 samples
Speed km/h—
Engine speed rpm—
Power demand kW—
Battery charge %—

Using the simulator

  1. Set the inputs. Adjust speed, engine RPM, power demand, and battery charge. Negative power demand represents braking.
  2. Apply a step. The controller evaluates one state transition. The instruments show the last applied inputs; edits remain pending until applied.
  3. Watch the dynamic demo. A 90-second synthetic drive varies speed and load through city driving, an overtake, and braking. The JavaScript supervisor evaluates every input to calculate the mode and enable commands. Speed, RPM, demand, and SOC follow a script; they are illustrative inputs rather than simulated vehicle dynamics or energy consumption.
  4. Test or replay. Presets are manual test inputs that reach a mode from standstill. UrbanCycle1 and UrbanCycle2 replay synchronized inputs, modes, and enable commands exported from the full Simulink/Simscape model every 0.1 s. Both demo and model playback start a fresh session; pause, resume, or choose 1×, 4×, or 10× speed without dropping samples.
  5. Inspect the results. CSV saves up to 6,000 samples with full input precision, SOC as a fraction, cycle time, and source. Demo rows are marked separately from model recordings. The display rounds values for readability. Clear data keeps the current mode; Reset restores the initial state. A manual step after playback evaluates the JS controller from the displayed mode.

Engine RPM is an input to the supervisor. In a recording it comes from the vehicle model; in the demo it is scripted; in a preset you supply it. EV mode does not require zero RPM. The model starts with a rotating engine, and an OFF enable command does not force that shaft to stop.

Playback preserves the model's recorded decisions. Re-evaluating these inputs with fixed-point C/JavaScript produces some different decisions near thresholds, so those results are checked separately. The browser runs no C or live vehicle dynamics. See the recording provenance and comparison results. Enable indicators are commands, not energy-flow measurements.

Original browser simulator by Danilo Varini. Continued development by Gustavo Igor da Silva; full contribution record.