PESLite
Documentation · PyPI · Releases
PESLite is an open-source, lightweight, multirate, and extensible power electronics simulator in Python. It is designed for time-domain studies of power-electronic converters and converter-based systems, combining switching and averaged models, digital control timing, event-driven operation, and flexible numerical integration across multiple time scales in readable YAML simulation files and a Python API.
Features
- Converter networks with buses, branches, grid sources, R-L loads and multiple independently named converter units.
- Grid-following and grid-forming controllers assembled from typed control loops.
- Per-converter
switching, PWM-period-averaged and ideal continuously averaged bridge models. - ADC sampling windows, controller interrupts, computation time, PWM shadow/active registers, startup sequencing and unit-owned protection.
- Fixed-step, adaptive and multirate integration with exact event boundaries.
- Connect, disconnect and validated parameter-change events, plus continuation from saved states.
- Streamed CSV output, energy accounting, port-Hamiltonian structure reporting and a lazy Python result API.
- Registration APIs for custom control loops, circuit elements, events and solvers.
- Export as a parameter-specialized, standalone C++17 simulator with no third-party C++ runtime dependencies.
Plant quantities use SI units. Controller quantities ending in _pu use each converter's own
per-unit base.
Install
pip install peslite
PESLite requires Python 3.10 or newer.
Quick start
Run a bundled case:
peslite gfl-example
Run a simulation file and override any parameter by dotted path:
peslite case.pes --set simulation.t_end=1.0 --out output/test
Results are written to output/<name>/. Bridge/solver presets are available through
--switching, --pwm-averaging and --averaging; use peslite --help for the full interface.
The same workflow is available from Python:
import peslite
params = peslite.load("case.pes")
result = peslite.Simulation(params).run()
print(result.summary)
print(result.final_states())
C++ export
Select the parameters that should remain variable in the compiled simulator, or use all:
peslite-convert case.pes all
c++ -O3 -DNDEBUG -std=c++17 export/case/peslite.cpp -o export/case/peslite
The generated executable uses the same parameter-override and output conventions as PESLite and writes the same result structure. See the C++ Export guide for compilation, runtime configuration and current backend limits.
Documentation
- Getting Started
- Simulation Files
- Converter and Bridge Models
- Control and PWM Timing
- Solvers
- Multirate Simulation
- Events and Restart
- Output and Results
- Extending PESLite
- Architecture
- CLI Reference
The Wiki documents the current main branch. Releases and the changelog record versioned changes.
Development
python -m pytest
License
GNU Affero General Public License v3.0 only (AGPL-3.0-only). See LICENSE.
Metadata
Release files for peslite 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| peslite-0.2.2.tar.gz | 214.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| peslite-0.2.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 412.5 kB
Release files / peslite-0.2.2.tar.gz
| Download URL | peslite-0.2.2.tar.gz |
|---|---|
| Size | 214.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c40af3ef8253ca0199c6ecfa8cd98ce520bcfb3e97beb9978bf98224fb7cbefd
|
|
BLAKE2b-256 checksum How to use checksums |
310f5b1e72a1d597f8c03dfbf4e090dba7e33cf4b741f2f0ff43fe87e4fdc176
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.
Transparency logRelease files / peslite-0.2.2-py3-none-any.whl
| Download URL | peslite-0.2.2-py3-none-any.whl |
|---|---|
| Size | 198.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6b456bf8819f160c0972b254dc60007a29b7ae8d0127c6093ec1de039d83c97
|
|
BLAKE2b-256 checksum How to use checksums |
2b8412ea353b5f49894ac8db8091a785ebe356b8e08072b1f8dcd1ad32abda5e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.
Transparency log