OpenPELS / README.md
minjiechen's picture Elvis0001's picture
Add qualified 2:1 SI2, SP2, RSC2, and Buck_Stacked workflows (#1)
0a53b5b
|
Raw History Blame Contribute Delete
6.44 kB
---
title: OpenPELS
emoji: ⚡
colorFrom: red
colorTo: gray
sdk: docker
app_port: 7860
pinned: false
license: agpl-3.0
---
# OpenPELS: Open Source Power Electronics Librarian Systems
Browse supported power-electronics topologies as a gallery, filter by conversion
ratio, then select a circuit for detailed analysis and single-topology simulation.
Selection and output voltage/current carry through the workflow.
The Gallery includes the 2:1 series-parallel and resonant switched-capacitor
converters (`sp2` and `rsc2`) and coupled-magnetic references at 2:1 and 4:1.
Ratios 6:1, 8:1 and 16:1 show their current unvalidated state. The local
NGSpice workspace offers XFLY6S, XFLY8S and C3L at 4:1 and the
`sp2` and `rsc2` presets at 2:1. Results include waveforms and downloadable executed
decks, measurements and CSV data.
The native schematic editor retains portable project import/export, undo,
SVG and SPICE design-netlist exports for its supplied starters. Selecting a
gallery card does not overwrite an edited project.
The integrated runtime has no foundry PDK. Generic
MOSFET starters describe connectivity; the scoreboard is a reference model,
not a simulation or an inferred model of arbitrary edited circuits.
Adapted from [Analog Canvas](https://github.com/cascode-ai/analog-canvas),
upstream commit df9afb17d88a6925cdbf8a6f87e68175029e8280, under AGPL-3.0-only.
Copyright notices are retained. Complete corresponding source, the dependency
lockfile and reproduction instructions are available through the application's
**Download complete source** footer link (`static/openpels-source.zip`).
## Topology development and validation
Start with the [validated 2:1 baseline](docs/topology/baselines/validated-2to1-v1.0/README.md),
then follow the [standard development workflow](docs/topology/topology_addition_workflow.md).
The [next-topology guide](docs/topology/next_topology.md) links the reusable checklist,
technical report template and regression registry.
## Run locally on macOS
From the checkout, install the runtime and restore the public release assets:
```sh
brew install python@3.12 ngspice
python3.12 -m venv .venv
.venv/bin/python -m pip install -r requirements-simulator.txt
.venv/bin/python restore-local-assets.py
./run-local.sh
```
Open [OpenPELS in Chrome](http://127.0.0.1:8765). Stop a foreground server
with **Control-C**. Set `PORT=8766` before `./run-local.sh` to use a different
port. The launcher serves the existing frontend and pins the simulator engine
to the bundled revision. The asset restore command replaces Git LFS pointers
with checksum-verified bytes from the matching public Hugging Face revision.
Git may show these files as modified in a checkout without Git LFS filters.
Gallery, analysis, editing and NGSpice use bundled circuit resources. The UI
requests Google Fonts and has fallback fonts. Browser recovery uses local
browser storage. NGSpice writes runs and logs to `.openpels-runtime/`.
The optional **Upload a topology** feature sends the submitted image and token
directly to Hugging Face Inference Providers. To use it, enter your own token
with Inference Providers permission under **Vision connection**. The default
model is `Qwen/Qwen2.5-VL-72B-Instruct`. The local simulator uses the included
generic SPICE models. There is no database, external storage, or foundry PDK
required for the local workbench.
For `sp2`, select **2:1** in Gallery, open **2:1 series-parallel SC**, and
choose **Edit schematic** or **Simulate**. The Analysis page reports the
delivered-voltage efficiency estimate and equal device allocation. The
Simulator defaults to 3 V. Edit multiple numerical settings together and
optionally sweep an input over a custom range. Each run checks steady state,
energy balance, and numerical convergence. The application reports delivered output
separately from the 1.5 V ideal conversion reference.
[Local integration and validation](docs/topology/2to1_switching_capacitors/local_integration.md)
For the **2:1 resonant SC** converter, select **2:1** in Gallery and open its card.
Analysis sizes the eight switches for the entered series-RLC tanks. **Edit schematic**
opens the local circuit and its two state views. **Simulate** opens the generic
NGSpice preset with editable tank settings and custom sweeps.
[Derivation and local validation](docs/topology/2to1_resonant/README.md)
For the **2:1 switched inductor** converter, select **2:1** in Gallery. Analysis
solves duty from Vin and an output-voltage target, or predicts loaded output
from Vin and a duty command. It sizes the four MOSFETs and reports power-loss
resistance separately from voltage droop. The editable starter
includes eight switching drawings. The NGSpice preset exposes continuous
voltage and duty modes, inverse coupling, parasitics, waveforms and custom sweeps.
[Derivation and local validation](docs/topology/2to1_switched_inductor/README.md) · [Operating Conditions Interface](docs/topology/operating_conditions.md)
For **2:1 Buck_Stacked**, the Gallery opens the eight-switch design, editable
right-hand starter, and ideal positive-current CCM Simulator. Analysis and
Simulator support duty and loaded-output commands. A blank Coss value reports
a subtotal with the unknown loss excluded. [Qualification and release scope](docs/topology/2to1_buck_stacked/qualification.md)
## Rebuild the frontend
The release contains the built UI in `static/`. The source archive includes the
editable frontend and reference analysis as sibling directories. To rebuild,
use Node.js 24 or newer and the archived pnpm version:
```sh
# Extract into a fresh directory so earlier source contents are not reused.
source_dir=$(mktemp -d /tmp/openpels-source.XXXXXX)
unzip -q static/openpels-source.zip -d "$source_dir"
npm install --prefix .openpels-runtime/toolchain pnpm@11.16.0
export PATH="$PWD/.openpels-runtime/toolchain/node_modules/.bin:$PWD/.venv/bin:$PATH"
pnpm --dir "$source_dir/openpels" install --frozen-lockfile
pnpm --dir "$source_dir/openpels" build
.venv/bin/python "$source_dir/openpels/scripts/openpels/build.py"
PORT=8766 OPENPELS_STATIC_DIR="$source_dir/openpels/apps/editor/dist-pe" \
OPENPELS_RUN_DIR="$PWD/.openpels-runtime/rebuilt" ./run-local.sh
```
Open [the rebuilt workbench](http://127.0.0.1:8766) while the release build runs
on port 8765. The source archive also contains the frontend build guide at
`local-source/openpels/scripts/openpels/README.md`.