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, sampled control, 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.
  • Sampled control, 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

PESLite requires Python 3.10.1 or newer.

Quick start

Run a bundled example:

peslite gfl-example

Run case.pes from the current directory:

peslite case.pes

Results are written to output/<case-name>/ by default.

Override a parameter by dotted path when needed:

peslite case.pes --set simulation.t_end=1.0 --out output/test

Bridge and solver presets are available through three run modes:

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

See Bridge and PWM for bridge models, control periods 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 export 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

Development

Fork PESLite on GitHub, then clone your fork and install it with the development dependencies:

git clone https://github.com/<your-username>/PESLite.git
cd PESLite
python -m pip install -e ".[test]"

Run the fast test suite from the repository root:

python -m pytest

Use python -m pytest --run-full to include compiler, external-reference and long numerical tests.

License

GNU Affero General Public License v3.0 only (AGPL-3.0-only). See LICENSE.

Metadata

Release files for peslite-core 0.5.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-core 0.5.0
File Size Uploaded Provenance Actions
peslite_core-0.5.0.tar.gz 438.3 kB With provenance Details for peslite_core-0.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 898.9 kB

Release files / peslite_core-0.5.0.tar.gz

Download URL peslite_core-0.5.0.tar.gz
Size 438.3 kB
Tags Source
SHA-256 checksum
How to use checksums
0dc231e611d28b7b1f4ff60342553cc639f62daed3caf07b269a488d43f10568
BLAKE2b-256 checksum
How to use checksums
274f5ac09f34d0f6ad49f527a124a0512ca03fad5d16ae59770c94274566d61e
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 4, 2026.

Transparency log

Release files / peslite_core-0.5.0-py3-none-any.whl

Download URL peslite_core-0.5.0-py3-none-any.whl
Size 460.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
790569fdac83297dedd717cde38fb8d52477caf5ce28e84566617ee7a1a570d2
BLAKE2b-256 checksum
How to use checksums
f61cbdf50721bea8c83fa9a0a2c08451045abfd744225fbcfc8ce88b4e210efb
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 4, 2026.

Transparency log

Security for peslite-core 0.5.0

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

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for peslite_core-0.5.0.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 4, 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.

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files Full provenance

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