Skip to main content

PESLite

Documentation · PyPI · Releases

PESLite is an open-source, lightweight, multirate, and extensible power electronics simulator in Python. It provides time-domain simulation for power-electronic converters and converter-based systems—combining switching and averaged models, digital control timing, event-driven operation, and flexible multi-time-scale numerical integration via readable YAML files and a Python API—designed as a deterministic simulation backend for LLM reasoning and verification.

Features

  • AC and DC converter networks, including grid-connected and wireless-power-transfer systems.
  • Configurable grid-following, grid-forming and DC converter control.
  • Switching, PWM-period-averaged and continuously averaged models.
  • Digital control timing, sensing and converter protection.
  • Fixed-step, adaptive and multirate integration with exact event boundaries.
  • Simulation events and continuation from saved states.
  • Streamed waveform output, optional plotting and energy accounting.
  • Custom control loops, circuit elements, events and solvers through the Python extension API.
  • Standalone C++17 export with no third-party C++ runtime dependencies.

Install

pip install peslite

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

PESLite requires Python 3.10.1 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 three run modes:

peslite case.pes --switching
peslite case.pes --pwm-averaging
peslite case.pes --averaging

See Converter and Bridge Models for model fidelity, control timing and solver presets.

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 common:

peslite-convert case.pes common
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.4.0.post1

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.4.0.post1
File Size Uploaded Provenance Actions
peslite-0.4.0.post1.tar.gz 493.9 kB With provenance Details for peslite-0.4.0.post1.tar.gz

Built distribution (wheel)

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

Total release size: 859.2 kB

Release files / peslite-0.4.0.post1.tar.gz

Download URL peslite-0.4.0.post1.tar.gz
Size 493.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3ff8f876d74cbc28508de3ec0d413e932361a43b69f550d33e4a03bba23e3b85
BLAKE2b-256 checksum
How to use checksums
5a52e9be8a5c40cc73f06cdd4c3ba23ad47ec57641eabe2d475311af92fa0f8e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 3, 2026.

Transparency log

Release files / peslite-0.4.0.post1-py3-none-any.whl

Download URL peslite-0.4.0.post1-py3-none-any.whl
Size 365.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
caf367010f32c3f7f11137cb2086ba888ad8174317b9bc9156707e56e7f3d019
BLAKE2b-256 checksum
How to use checksums
b6eb37428bc2adba09b9b46df2b4432b56db30fafb1da84a274904b449b15660
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 3, 2026.

Transparency log

Security for peslite 0.4.0.post1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for peslite-0.4.0.post1.tar.gz

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 Nov 3, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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