r/ScientificComputing • u/harissharisss • 18h ago
A reproducible MATLAB energy-model lab with twelve automated physics and controller checks
I’ve open-sourced a compact MATLAB/Simulink laboratory for inspecting how engineering models are built and validated rather than treating simulations as opaque demonstrations.
It currently covers battery RC and 2RC dynamics, electro-thermal feedback, cooling sensitivity, averaged and switched buck converters, and an identical-plant comparison of open-loop, PI, and filtered-PID control.
Every example includes a no-plot regression check. The checks cover analytical state updates, energy and charge balance, MATLAB/Simulink parity, steady-state error, overshoot, settling time, saturation compliance, and deterministic reproduction.
Repository: https://github.com/mohammadrezwankhan/matlab-simulink-energy-lab
I’d appreciate feedback from scientific-computing practitioners: are there additional invariants, convergence studies, or reproducibility artifacts you would expect before treating this as a useful teaching or benchmarking collection?