Djinious
MicrogridsEnergy

Microgrid

Solar PV + wind + battery + grid-tie serving a load as one system under an energy-management controller — composed on a DC bus and run over a day: dispatch, self-sufficiency, peak-shaving, sizing, and islanded stability.

DjiniousLab
A stacked-area dispatch chart over a day — PV, wind, battery and grid combining to exactly meet the load demand
self-sufficiency
91.6%self-sufficiency
power-balance residual (kW)
4.4e-16power-balance residual (kW)
evening peak shaved
48.6%evening peak shaved
islanded droop dip (1.2 s)
0.3 Hzislanded droop dip (1.2 s)
design notebooks
10design notebooks
.djl composition
1.djl composition

Whole energy systems, composed and run.

A microgrid isn't one component — it's a system: solar, wind, a battery, a grid connection and a load, all decided together, minute by minute, by an energy-management controller. This is the program that composes them. It models each source, wires them onto a shared bus, runs the dispatch over a day, and answers what an installer actually asks — how self-sufficient, how much peak shaved, what to size, and does it stay stable when it islands.

Five subsystems, one system.

The microgrid is the clearest demonstration of designing a complete system from parts. Each subsystem carries its own physics — a single-diode PV array with its maximum-power point, a wind turbine power curve, an equivalent-circuit battery, a load profile, a grid tie — and they're wired onto one shared DC bus and solved together as a single acausal electrical network. On top of that bus sits the energy-management strategy that decides, every minute, where each kilowatt comes from and goes: PV to the load first, surplus to the battery, then the grid, then curtail; deficit from the battery, then import.

DjiniousLab
Solar PV single-diode I-V and P-V curves, the power curve peaking at the maximum-power point
One subsystem, modelled properly: the solar array's I-V and P-V curves from a single-diode model, with the maximum-power point the tracker chases. Each source in the microgrid carries this kind of physics — not a constant block — which is what makes the composed system's numbers real.
DjiniousLab
A stacked-area dispatch over 24 hours: PV, wind, battery discharge and grid import stacking up to exactly meet the load
The dispatch over a day: PV (orange) carries midday, the battery (purple) covers the night and the evening peak, wind (green) and a little grid import (red) fill the gaps — and the stack sums to the load at every step, with the power balance held to 4×10⁻¹⁶ kW. The energy-management strategy in one picture.
DjiniousLab
The net-load duck curve — load minus renewables — with a deep midday belly and a steep evening ramp as PV penetration rises
The duck curve: subtract solar from the load and the midday belly deepens while the evening ramp steepens as PV grows. It's the defining challenge of a renewable grid — over-generation at noon, a scramble at dusk — and it's exactly what the battery is there to absorb.

From half off-grid to almost off-grid.

A battery turns a solar system from a daytime helper into a round-the-clock supply. Adding storage lifts self-sufficiency from 50% to 92% — the home draws from the grid only on the dullest mornings — and it shaves the evening import peak nearly in half, soaking up midday surplus and releasing it after sunset. The sizing study maps where that value saturates: the first few kilowatt-hours of storage buy the biggest jump, and there's a clear knee past which more battery barely moves the needle.

DjiniousLab
Grid import over a day with and without the battery — the battery flattening the evening import peak
Peak-shaving: without storage the evening ramp hits the grid hard; with it, the battery discharges into the peak and flattens import by nearly half. The same asset that lifts self-sufficiency also cuts the demand charge.
DjiniousLab
A heatmap of self-sufficiency over PV size and battery size, with a clear knee of diminishing returns
Sizing the system: self-sufficiency over PV and battery size. The bright climb shows where each added panel or kilowatt-hour earns its keep; the flattening top-right is the knee where more hardware stops paying back — the chart that turns 'bigger is better' into a number.

Holding the grid up alone.

Cut the utility connection and the microgrid has to set its own frequency. With droop control, each source contributes in proportion to its rating with no communication between them: a sudden load step drops the frequency, the sources pick it up in exact proportion to their droop slopes, and the frequency settles to a small, bounded offset within a second. It's the primary-control mechanism that keeps an islanded system standing — modelled here, droop slopes and all.

Every number is one you can re-run.

The sign-off notebook re-derives each requirement from the same dispatch the program runs; the composition .djl is confirmed solving through the canvas engine.

Result

  • Self-sufficiency (with storage): 91.6%
  • Power-balance residual: 4.4e-16 kW
  • Self-sufficiency lift from storage: 50.5 → 91.6%
  • Evening-peak import cut: 48.6%
  • Requirements verified: 5 / 5

Requirement

  • Self-sufficiency (with storage): R-01
  • Power-balance residual: every step
  • Self-sufficiency lift from storage: R-03
  • Evening-peak import cut: R-04
  • Requirements verified: PASS

Quasi-static dispatch, design-grade.

The dispatch is a quasi-static power balance, not an electromagnetic-transient grid simulation; the energy management is a transparent rule-based strategy, not an optimal/MPC dispatch; the islanded-stability notebook uses averaged primary droop (secondary frequency restoration is noted as future work); the daily profiles are synthetic and the economics indicative. That is exactly the fidelity microgrid concept and sizing need first — choosing PV, wind and battery sizes, designing the dispatch, quantifying self-sufficiency and peak-shaving, and checking islanded stability — on your own load and resource data, before a detailed EMT or optimal-dispatch study. And the DC-bus .djl shows the same system composed on a canvas.