System Design
The simulator separates physical models from control logic. Each component (solar array, battery bank, load types) maintains its own state and exposes a simple interface to the dispatch controller. This mirrors how real EMS platforms are structured.
Simulation Loop
Each time step, the controller collects current state from all components, solves a dispatch optimization, and issues setpoints. The loop runs at one-minute resolution to capture fast dynamics like battery ramp rates and solar irradiance changes.
Key Takeaways
Physical vs. Control Separation
Keeping battery SOC physics separate from dispatch logic made the codebase much easier to reason about, the same lesson real SCADA systems are built on.
Duck Curve in Practice
Simulating solar + battery together makes the duck curve tangible: midday oversupply charges storage, which then covers the steep evening ramp.
Constraint Cascades
A battery ramp rate limit can cause a load shed several minutes later. Tracing those cascades manually built real intuition for grid stability margins.
Optimization Tradeoffs
Minimizing cost vs. minimizing grid imports are often in tension. Encoding both as objectives revealed why real grid operators use hierarchical control.