Solar and storage systems combine slow sources and fast switching: a PV array that moves with the sun, a battery with its state of charge, and a grid that sets the rules for the current you inject. Voltecx models both time scales in one circuit.
Sources and storage
- Solar modules with their I-V curve, in series and parallel strings.
- Batteries with state of charge, supercapacitors and fuel cells that follow a polarisation curve.
- Three-phase grid source, line impedance, breakers and faults.
- Wind turbines with a doubly fed induction generator or a direct-drive PM generator.
Examples to start from
| What | Example |
|---|---|
| PV charger with perturb-and-observe MPPT, boost into a 104 V battery | pvMppt |
| Single-phase grid-tie inverter: LCL filter, PLL, resonant current control | gridTieInverter |
| Three-phase active front end, unity power factor, 700 V link | afe3Phase |
| Three-level NPC inverter on an 800 V split link | npcInverter |
| CC-CV charger for a four-cell lithium-ion pack | batteryCharger |
| Four-cell pack with passive (bleed-resistor) balancing | passiveBalancing4s |
| Four-cell pack with active (switched-capacitor) balancing | activeBalancing4s |
| Four-cell pack with active (inductor) balancing | inductorBalancing4s |
| Four-cell pack with a cell thermal model (core and can) | packThermal4s |
| Four-cell aged pack: the weakest cell sets the usable charge | agedPack4s |
| Wind turbines | windDfig, windPmsg |
All example values are illustrative.
What to check
- Harmonics and THD of the injected current with
analysis.fftand the scope's THD measurement; power and power factor on the scope. - Losses per device and junction temperatures through thermal networks, with a multi-rate thermal step for long runs.
- Long runs: variable-step simulation lands exactly on switching events, and older results are parked on disk so memory stays bounded.
- Load traces: replay a measured logger or PMBus trace as a load profile with
circuit.importLoadTrace.
Control to code
Build PLLs, dq transforms, PI and resonant controllers from blocks, then generate C99 for the sampled ones, with set-up code for STM32G474 or TI F28379D.
Know the limits
Grid-code compliance is not checked, and design.auto does not design inverters or PFC stages yet. Battery, PV and fuel-cell parameters have no defaults that stand for a product: take them from your data sheet or measurement. No result has been compared with field data.
Related: Analyses · Code generation · MOSFET loss and thermal estimation