Open model laboratory · MATLAB/Simulink
MATLAB Simulink Energy Lab.
Run compact battery, thermal, state-estimation, converter, and unified BESS control models whose assumptions stay visible from equation to validation result.
53d49b00089532e35a9c12cf60e83b0934ed4d19.
Successful hosted check 42625040387 ran on 2026-11-09 against ef53d73b066bf1913e2bb7080f9c86ff52ea22ed; this is distinct from the release tag and the Atlas documentation snapshot.
Two-RC fit with separate synthetic held-out validation
MATLAB R2026a · MIT license
Open source repository
Review v1.12.0 release
Run the two-RC example
Open in MATLAB Online
First reproducible result
Fit one synthetic pulse record, then test another.
The two-RC example fits battery parameters on a calibration record and evaluates a separate held-out record. Run these commands from a new checkout; they pin the demonstrated source rather than following a changing branch.
git clone https://github.com/mohammadrezwankhan/matlab-simulink-energy-lab.git
cd matlab-simulink-energy-lab
git checkout --detach e1aa01571fbb2b6cbe378f72ac9335374f19fc2e
matlab -batch "run('examples/battery-2rc-model/check_battery_2rc_fit.m')"
matlab -batch "run('examples/battery-2rc-model/run_battery_2rc_fit.m'); exportgraphics(gcf,'two-rc-fit-held-out.png')"
The second command writes two-rc-fit-held-out.png in the checkout folder. Open that file after MATLAB exits to inspect the four-panel fit and held-out plot.
On MATLAB R2026a, the successful exact-source hosted check reports 0.401 mV calibration RMSE and 0.440 mV held-out RMSE. These deterministic synthetic results demonstrate the example's numerical behavior; measured-cell accuracy and hardware qualification require separate evidence.
Engineering question
How can battery, thermal, converter, and supervisory-control assumptions become small executable models with deterministic evidence?
Battery, power-electronics, and BESS engineers can use the lab to inspect interfaces and numerical behavior before replacing its illustrative parameters with measured, project-specific evidence.
Laboratory system map
Follow electrical state into thermal, converter, control, and evidence paths.
The released examples remain small enough to inspect independently, while this map makes the interfaces between model families explicit.
Battery and energy-system evidence flow
- 01Battery electrical states1RC, 2RC, pulse response, parameter fit, and OCV hysteresis
- 02SOC estimationNoisy current and voltage correct a biased two-state EKF
- 03Electro-thermal responseLoss, entropic heat, resistance feedback, limits, and cooling sensitivity
- 04Module and pouch behaviorCoolant-path nonuniformity and through-thickness gradients
- 05Power conversionAverage, switching, closed-loop, controller-comparison, and Simulink references
- 06Unified BESS controlFollowing, forming, islanding, synchronization, limits, faults, and recovery
- 07Automated evidenceSource-pinned checks, model boundaries, traceability, and release artifacts

Validated thermal result
The finite-volume model resolves surface temperatures, an internal hot spot, through-thickness gradients, and asymmetric boundary heat removal.
Open full-size figureMultiphysics thermal modeling
Resolve the internal hot spot across a pouch cell.
The one-dimensional finite-volume model represents layered through-thickness conduction with unequal convection at the two broad faces. Its validation case reaches a 43.83 °C peak at 5.60 mm and 1800 s, with a 3.09 °C peak spatial spread.
A symmetric-boundary benchmark agrees with the analytical steady solution within 0.003 °C, while the medium-to-fine grid difference is 0.0024 °C.
Inspect equations, assumptions, and checksModel catalogue
Move from electrical dynamics to thermal and control evidence.
Battery dynamics
First-order, two-RC, and OCV-hysteresis models expose SOC, terminal voltage, polarization, pulse recovery, and charge/discharge voltage history.
Inspect the hysteresis modelReal-time SOC estimation
A two-state extended Kalman filter corrects a biased SOC prior using noisy current and terminal-voltage measurements.
Inspect the SOC EKFBattery thermal management
Cell, module, and pouch-cell models expose heat generation, cooling sensitivity, thermal-limit exposure, coolant-path nonuniformity, and spatial gradients.
Inspect the pouch-cell thermal modelPower converters
Average-value, switching, closed-loop, and native Simulink references connect duty cycle and controller choices to voltage, current, ripple, and settling metrics.
Inspect controller comparisonsUnified BESS control
A generated Simulink reference covers grid following, grid forming, island support, synchronization, reconnection, limits, measurement faults, and recovery.
Review the BESS control evidenceRepository-generated results
Model families retain their own evidence and assumptions.
These figures are copied byte-for-byte from v0.9.0 and delivered as optimized WebP while the source PNG remains downloadable.
Two-RC fit and held-out voltage response
Toolbox-free positive-parameter identification is evaluated on a separate pulse profile; the released check requires sub-1.5 mV held-out RMSE.
- Source
- v0.9.0 · a77d8cda9920 ·
run_battery_2rc_fit
SOC-EKF correction from a biased prior
The two-state Joseph-form EKF uses noisy current and voltage in a deterministic scenario that begins with a 20-point SOC bias.
- Source
- v0.9.0 · a77d8cda9920 ·
run_battery_soc_ekf
Serial coolant warming and cell-to-cell spread
Six lumped cell states resolve nonuniform heat generation, nearest-neighbor conduction, coolant-segment warming, and module energy-balance diagnostics.
- Source
- v0.9.0 · a77d8cda9920 ·
run_battery_module_cooling_network
Synchronization and reconnection evidence
The breaker remains open until voltage, frequency, phase, validity, and readiness gates pass, then the supervisor returns to grid-following control.
- Source
- v0.9.0 · a77d8cda9920 ·
generate_bess_validation_evidence
Verification path
Run every check from one command.
Browser entry point
Open the repository in MATLAB Online and run addpath('examples'); run_all_checks from the project root.
Deterministic evidence
Each check asserts physical, numerical, dimensional, or cross-model invariants without relying on plot inspection.
Continuous validation
GitHub Actions runs the executable model checks whenever MATLAB or Simulink implementation files change.
Review validation runsCitable release
Versioned releases, citation metadata, an ORCID-linked author record, and an MIT license keep reuse and attribution explicit.
Review the latest releaseReproduce and inspect
Reproduce the historical August CI snapshot.
The portfolio audit last verified this historical snapshot on . That audit date applies to the older evidence below; the newer release and two-RC result above have their own records.
git clone https://github.com/mohammadrezwankhan/matlab-simulink-energy-lab.git
cd matlab-simulink-energy-lab
git checkout --detach ebf2a0caa026196c2c13f9822fc8494dff78680e
matlab -batch "addpath('examples'); run_all_checks"
Documentation map
Go directly to the release, models, checks, citation, and reuse terms.
- v0.10.0 release
- Pinned examples index
- Modeling standards
- Complete check entry point
- MATLAB validation workflow
- Historical CI validation run
- Citation metadata
- Contributing guide
- MIT license
These checks describe the historical ebf2a0caa026 snapshot, not today's main branch. Its 20 Base MATLAB checks, 25 general entry points plus one unified-BESS entry point (26 total), and 31 focused BESS results retain that source boundary. Release v1.12.0 and the e1aa015 two-RC check above are separate, newer records.
Engineering boundary
Use transparent baselines before qualified design models.
The examples are educational references, not calibrated design authorities. They omit selected electrochemical, ageing, multidimensional, switching-loss, tolerance, and safety effects by design. Replace illustrative parameters with measured data, select the fidelity required by the decision, and revalidate every extension before applying it to a real battery, converter, vehicle, or grid-storage system.
Direct questions
What should a new user know?
What is the MATLAB Simulink Energy Lab?
An open collection of inspectable battery and power-electronics models with visible assumptions, units, sign conventions, checks, and limits.
Which battery models are included?
First-order and two-RC electrical models, an OCV-hysteresis model, an SOC extended Kalman filter, coupled cell and module thermal models, and a pouch-cell through-thickness finite-volume model.
How is the lab validated?
Release v1.12.0 was published on 21 October 2026. Successful hosted run 39686678787 tested source e1aa01571fbb2b6cbe378f72ac9335374f19fc2e. Its two-RC synthetic benchmark reports 0.401 mV calibration RMSE and 0.440 mV held-out RMSE. The older ebf2a0c check counts on this page remain historical evidence; these numerical checks do not qualify hardware.
Can the models qualify hardware?
No. They are transparent starting points. Cell-specific calibration, measured validation, safety analysis, tolerances, and project qualification remain necessary.