SYmbolic Circuit ANalysis
Project description
SYCAN
SYCAN (SYmbolic Circuit ANalysis) is a Python package for symbolic circuit simulation built on SymPy. It provides closed-form DC, AC, noise, transfer-function, pole–zero, and sensitivity analyses, plus automatic schematic drawing and an in-browser REPL.
Install
Requires Python ≥ 3.11.
pip install sycan
Or with uv:
uv add sycan
For a faster CAS backend (optional):
pip install "sycan[symengine]"
Then opt in by setting SYCAN_CAS_BACKEND=symengine before importing
sycan. The symengine backend covers ~95 % of the test suite (10 tests
skipped on representation / API divergences) and is 7–8× faster than
SymPy on AC and noise solves and ~30 % faster on headroom analysis — see
docs/BE_BENCHMARK.md and
docs/BE_PORT_STATUS.md.
Quick start
from sycan import cas, Circuit, solve_ac
from sycan.components.basic import Resistor, Capacitor, VoltageSource
R, C = cas.symbols("R C", positive=True)
Vin = cas.Symbol("Vin")
c = Circuit("RC low-pass")
c.add(VoltageSource("V1", "in", "0", value=0, ac_value=Vin))
c.add(Resistor("R1", "in", "out", R))
c.add(Capacitor("C1", "out", "0", C))
sol = solve_ac(c)
H = sol[cas.Symbol("V(out)")] / Vin
print(cas.simplify(H)) # 1 / (C*R*s + 1)
Try it without installing
The live REPL runs SYCAN entirely in the browser via Pyodide — no install needed. The page ships preset examples for filters, amplifiers, voltage references, and S-parameter transmission lines.
Documentation
Full docs (API reference, tutorial, autodraw pipeline) live at https://al-255.github.io/sycan/.
Analysis modes
| Solver | Purpose |
|---|---|
solve_dc / solve_dc_sweep |
DC operating point, parameter sweeps |
solve_ac |
Small-signal frequency response |
solve_tf |
Transfer functions between arbitrary nodes |
solve_impedance |
Port impedance with auto termination |
solve_noise |
Output-referred noise PSD with per-source breakdown |
solve_pz |
Pole–zero extraction |
solve_sensitivity |
Component-level sensitivity analysis |
solve_headroom |
DC headroom analysis |
autodraw |
Automatic schematic SVG rendering |
Development
git clone https://github.com/AL-255/sycan
cd sycan
uv sync --dev
./run_tests.sh
License
GPL v2 — see LICENSE.
Credits
The project heavily references the work of ahkab and ngSpice. Kudos to them for their contributions.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file sycan-0.1.8.tar.gz.
File metadata
- Download URL: sycan-0.1.8.tar.gz
- Upload date:
- Size: 157.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9fad557b0f444ef2f806042d627e47129752f3601dc1c29ba1d380075974cf06
|
|
| MD5 |
b89dc032aa98787164fe2e1a2e7ca0eb
|
|
| BLAKE2b-256 |
a5e2f5299a3059b64b1fa37a55e0e2ac9e3a88ad5a2107a3b6223765c5708285
|
File details
Details for the file sycan-0.1.8-py3-none-any.whl.
File metadata
- Download URL: sycan-0.1.8-py3-none-any.whl
- Upload date:
- Size: 193.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
548115637d29d246fea4d012fa801ddb80c99cd19310aca275a480630ee33485
|
|
| MD5 |
8adb52b66ca9438ebf28e547b4ac9191
|
|
| BLAKE2b-256 |
f8bfca7e2f1343243b7fe189faa132cd943f4e062eb88d085424ed89bbcae7cc
|