Skip to main content

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.
  • Optional IEEE/LaTeX-style vector PDF plots from completed CSV results.
  • Optional project-local extensibility through a PESaddons/ directory beside a simulation file, plus 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

Use pip install "peslite[all]" to include every optional runtime add-on.

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

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.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for peslite 0.3.0
File Size Uploaded
peslite-0.3.0.tar.gz 240.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for peslite 0.3.0
File Interpreter ABI Platform
peslite-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 463.5 kB

Release files / peslite-0.3.0.tar.gz

Download URL peslite-0.3.0.tar.gz
Size 240.8 kB
Tags Source
SHA-256 checksum
How to use checksums
01e62dcc029482abfd61883a86c945fcde0864b506cd00a7b6eda694eee18024
BLAKE2b-256 checksum
How to use checksums
10c3d3fb08738677c17ee3d02e6315b4ab20b388bb346cbc4b823a7bcec94900
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 3, 2026.

Transparency log

Release files / peslite-0.3.0-py3-none-any.whl

Download URL peslite-0.3.0-py3-none-any.whl
Size 222.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a3721cba9dcaf02b31939b0a61cded2b899e88ed64dd534dca834034b8d786b7
BLAKE2b-256 checksum
How to use checksums
c85c5050da01510ba4d365831aaacd3551416b827c6d81de3e01f30e8653f6e8
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 3, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page