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

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)

Source distribution for peslite 0.2.2
File Size Uploaded
peslite-0.2.2.tar.gz 214.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for peslite 0.2.2
File Interpreter ABI Platform
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 log

Release 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

Release history Release notifications | RSS feed

0.3.0

2 release files

This release

0.2.2 This release

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