Spaces:
Running
Running
File size: 18,780 Bytes
8966558 3bb2683 8966558 3bb2683 8966558 3bb2683 96a7f6a 2f04bef fb4c97d 3bb2683 424d972 3bb2683 2f04bef cec7da7 3bb2683 25393d1 a03a05a cec7da7 4fe5203 96a7f6a 4fe5203 96a7f6a 522393f 89206e4 1ea609a 9d13f9d ecaa5fe f3d6723 3f7f105 17f4b23 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 | ---
title: ThinkPower
emoji: ⚡
colorFrom: green
colorTo: gray
sdk: static
app_file: static/index.html
pinned: false
---
# ThinkPower
The inspection workbench pairs each selected converter schematic with an averaged DC
transformer and coefficient-weighted switch, capacitor-ESR and winding resistances
grouped as RFSL, plus a separate charging-loss contribution. The transformer
label gives the nominal voltage conversion ratio; it does not imply physical
isolation. Normalized weights, the resistance sweep and model details are
collapsed to keep the comparison simple. Upload review is available in a dialog.
Compare hybrid power converters through traceable equations, device-area allocation,
conduction resistance, and interphase balancing. The existing NGSpice application
remains at https://huggingface.co/spaces/minjiechen/XFLY with its original decks and assets.
## Run
Serve the repository root using `python -m http.server 8080`, then open
`http://localhost:8080/static/index.html`. The published Space serves the same
entry page. Analytical calculations run in the browser; no paid hosting runtime
is required. `models.py` and its Python tests provide the independent reference.
The local working folder also retains the optional Docker application and simulation sources; these are not required by the static site.
## Per-unit comparison
The comparison uses **Rs as its common base**. No absolute resistance, load
current or output power is assigned. Inputs are rho_C=Rc/Rs, rho_L=Rl/Rs and
rho_Q=1/(Cf fs Rs), with defaults 1, 1 and 20. The defaults preserve the relative
loss scales of the original paper example without assigning any ohmic values.
Table columns are intrinsic dimensionless coefficients:
`kFET=RFET/Rs`, `kCAP=RCAP/Rc`, `kIND=RIND/Rl`, `kSSL=RSSL Cf fs`.
They have different bases and are not directly additive. Weighted charts use:
`rout = kIND*rho_L + hypot(kFET + kCAP*rho_C, kSSL*rho_Q)`.
The state-table editor also returns kFET, kCAP and kIND, using currents normalized
to Iout and areas normalized to A0. The balancing/control tab remains a separately
labeled dimensional verification example.
## What is implemented
- The paper's five numerical comparison modes: XFLY2P, XFLY4P, 3LBUCK, 2SBUCK,
and two-phase stacked BUCK. XFLY6S and XFLY8S are catalogued with the precise
reference realization and area-normalization caveats.
- Interactive resistance sweep and component table, SVG/CSV/JSON exports,
device-area diagrams, and XFLY6S balancing/voltage-loop frequency responses.
- 2:1, 4:1, 6:1, 8:1, and 16:1 operating-point presets. These vary the supported
duty model, not the graph's number of levels. Invalid domains are omitted.
- XFLY-Boost and XFLY-NS topology entries, without invented loss coefficients.
- Schematic uploads and a vision-assisted JSON circuit graph review. A user must
explicitly verify the graph and modulation before applying a catalog model.
- A generic reviewed state-table evaluator: periodic capacitor charge-balance
checks, normalized RMS currents, FSL coefficients, and optimal device areas.
It does not establish KCL or volt-second balance from an arbitrary drawing.
## Vision setup
Enter a Hugging Face inference-enabled token in the app for each request. The
browser calls `https://router.huggingface.co/v1/chat/completions` directly.
There is no shared server credential in this static deployment. Tokens and
images are not written to localStorage or application logs. The inference
provider receives the image; its model availability and account quota apply.
Default model: `Qwen/Qwen2.5-VL-72B-Instruct` (editable, availability varies).
Without a token, the app explicitly reports that recognition was not performed.
All deterministic comparisons and the state-table editor remain functional.
## Method
Models are transcribed from the current XFLY-IEEE working manuscript, Section V-F,
Table I, Figures 18–20, and its analytical verification scripts. This repository
includes selected schematic assets, not the full manuscript.
`Rout_est = RIND + hypot(RFET + RCAP, RSSL)`.
FSL and SSL represent limits of the same charging process. They are not summed.
The series charging-loss increment is
`RSSL,add = hypot(RFET + RCAP, RSSL) - (RFET + RCAP)`, so
`Req = RFSL + RSSL,add`. The orange inset retains the raw RSSL asymptote.
Separate ideal-secondary accounting shunts represent gate and Coss losses:
`Rg = Vx^2/Pg`, `Ross = Vx^2/Poss`, with `Vx = M Vin`. These do not change the
per-unit Req sweep. The technology example quantifies gate loss; Coss energy
needs device-transition data. Gate supply demand is tracked separately.
The reference model assumes two matched flat winding currents, a common 12 A0
transistor-area budget, fixed 4:1 allocations, identical device technology, zero
clamp ESR, and equal main/clamp capacitance in 2SBUCK. Switching, gate-drive,
core, dead-time, interconnect and ripple losses are excluded. Conduction-efficiency
estimates are not measured or total efficiencies.
The XFLY2P reference coefficients use the paper's effective six-switch current
model and physical split-middle area allocation. A true six-device area budget
requires a separate derivation. The XFLY4P coefficients apply only to the stated
four-pulse sequence and omit additional clamp recharge.
## Extend
`models.py` defines the catalog and equation registry. Add a graph, gate schedule,
state-current derivation, supported duty domain, device technology/rating budget,
and regression cases before assigning numerical coefficients to another topology.
The state-table editor supports arbitrary component counts and up to 64 states.
RMS-based optimum sizing is conditional on the supplied state currents; resizing
may alter current sharing, which must be recomputed in the switched model.
## Verify and publish
`python -m unittest discover -p 'test_*.py' -v`
`python deploy.py --check` verifies the saved Hugging Face login and current Space.
`python deploy.py` uploads only the explicit application allowlist, checks the
remote parent revision, and leaves the separate XFLY Space and its storage unchanged.
No deployment credentials are embedded in the source or Docker image.
Individual device resistance labels are generated with `python annotate_schematics.py`.
The five comparison drawings use the fixed 4:1 area allocations. XFLY2P labels
the combined middle switch as 2Rs; each main capacitor has ESR Rc and each
winding has resistance Rl. Clamp ESR is zero in the model; Cin/Cout ESR is
omitted, not asserted physically zero. Boost/NS have no assigned device sizing.
Each modeled topology is paired with a proportional two-column die-area map.
S/Q device numbering follows the annotated schematic. The six-switch XFLY2P
map explicitly shows S2a/S2b (and Q2a/Q2b), the series physical split represented
by its combined middle-switch symbol. Allocations stay fixed at the 4:1 reference.
## Supplied 180 nm technology example
Source: user's `XFLY_Power_Analysis.md`, read November 16, 2026. The supplied
180 nm reference is Ron=.602 ohm, Qg=2.51 pC, Qoss=1.12 pC at W=1 mm,
L=.18 um. These are user-supplied example values, not independently verified
TSMC PDK specifications. No voltage-rating/PVT assertion is made.
`FOMg = 1.51102e-12 ohm C`, `FOMoss = .67424e-12 ohm C`.
`Rparallel = .602/Wtotal_mm`, `Rs = 12 Rparallel`.
`Pg = VGS fs ng FOMg / Rparallel`, `Rg = (M Vin)^2/Pg`.
At Wtotal=360 mm, VGS=3.3 V, fs=10 MHz and ng=1, Pg=29.8188 mW.
FET widths follow the existing fixed 4:1 optimum; they are not resized at
other ratios or rederived by the document's proposed charging-duty rule.
The independent physical example uses Vin=3.3 V, Iout=2 A, flying/clamp
capacitance budget=4 uF, main-cap ESR=20 mOhm and winding DCR=38 mOhm.
Equal main capacitors are adopted; four-cap cells reserve equal main/clamp
capacitances. Cin/Cout are outside this budget. This allocation is an assumption.
Qoss is not treated as switching energy. Optional effective Eoss input is pJ
per mm of total width per period, averaged across actual voltage swings and
energy recovery. No default Eoss or total efficiency is fabricated.
`technology.js` also derives an independent, single linear RC event model:
`Revent = a^2/(2 C fs) coth[d/(2 fs Rpath C)]` for `q = a Iout/fs`.
Its limits are `RSSL=a^2/(2 C fs)` and `RFSL=a^2 Rpath/d`.
It is not silently substituted for a whole converter's unknown periodic RC
solution. The existing paper interpolation remains labeled as an estimate.
No Analog Canvas project or exports are claimed; the attached Markdown was
used as analysis guidance for the existing website, not as an instruction to
modify a separate schematic application or create a formal report.
## Added 2:1 family
The 2:1 preset selects the added BUCK2Φ and SP-SC entries. Existing stacked
BUCK is retained as a distinct eight-device benchmark; BUCK2Φ is a conventional
four-device synchronous buck with two inverse-coupled windings, sized equally at 2:1.
Both additions use the common 12 A0 / total-width budget, sized at 2:1 rather
than the original paper cells' 4:1 reference. Widths stay fixed afterward.
BUCK2Φ: M=Db, RFET=Rs/6, RCAP=0, RIND=Rl/2, RSSL=0, matched flat CCM currents.
SP-SC: two interleaved four-switch cells, two equal flying capacitors, no power
inductor, 50% clocks. Ron=2Rs/3 for each of eight equal devices. Each phase
alternates CF between (Vin,Vout) and (Vout,ground). At ideal M=1/2:
RFET=2Rs/3, RCAP=Rc/2, RIND=0, RSSL=1/(8 Cf fs), Cf per phase.
Req=RSSL*coth(RSSL/RFSL), with RFSL=2Rs/3+Rc/2. Its exact linear-periodic RC
increment is Req-RFSL. This is not added to another RMS charging-loss term.
The physical capacitor budget is split equally between its two flying caps.
Only the fixed M=.5 point is shown in the conversion-ratio sweep.
For one phase, q=Iout/(4fs) per half cycle. The linear RC integral gives
q²/(2Cf)*coth[1/(4fs Rpath Cf)] per event, Rpath=2Ron+Rc. Four events across
two phases per period give the stated two-phase Req. Stiff ports, matched
cells, constant Ron/ESR and no dead time are assumed. The source relation
for one cell is also in Berkeley EECS-2021-236, Eq. (3.13):
https://www2.eecs.berkeley.edu/Pubs/TechRpts/2021/Archive/EECS-2021-236.pdf
`test_two_to_one.py` independently checks event integrals and FSL/SSL limits.
`build_family_schematics.py` reuses the manuscript's MOSFET and coil glyphs to
build only the website's new SVGs; it does not edit or rebuild the manuscript.
## Recommendation-first interface
The main view starts with 2:1 / 4:1 / 6:1 / 8:1 / 16:1 design spaces, followed
by silicon and passive constraints, a ranked analytical starting point, and a
shortlist with explicit exclusions. Schematics, per-unit models, die maps and
derivations live in the inspection workbench. The two-phase buck uses an
inverse-coupled inductor; its flat-current DCR model is unchanged.
`recommend.js` screens verified operating ranges, winding/capacitor counts,
positive flying-capacitance budgets and estimated nominal open-loop droop.
It searches total FET width within the silicon budget, holding each model's
relative allocation fixed, to minimize modeled conduction + gate power.
Priority can instead minimize capacitor or winding count first. A die budget
is a maximum; the tool may use less than the available transistor area.
Area mode: Rparallel = RonArea / (die_mm2 * usable_fraction).
The editable default RonArea is **1 mOhm mm2**, explicitly an illustrative
layout assumption authorized by the user, not a verified TSMC PDK/layout value.
Effective width = .602 ohm mm / Rparallel. RonQg is from the supplied 180 nm
example. Both area mode and direct total-width mode are supported. Drivers,
Cin/Cout and capacitor layout area are outside the FET budget; the user sets
the usable fraction to reserve die for other functions. Flying/clamp caps
share a separate capacitance budget under the existing equal-cap assumptions.
Shortlist per-unit Req uses the common full-budget Rs=12 Rparallel, even when
less transistor width is used. Inspecting a candidate loads the actual sized
Rs and its physical passive ratios into the per-unit diagrams; this different
reference is stated in the inspection context. Design JSON exports all inputs,
scope, optimized widths, component terms, exclusions and ranked candidates.
This is not a complete design optimizer: no magnetic L/ripple/saturation/volume,
Coss energy, device stress/PVT, control/headroom, interconnect or startup
qualification is inferred. Gate ranking assumes one charge event per physical
FET per period; four-pulse counts and clamp recharge remain model limitations.
No native 6:1/8:1/16:1 higher-order loss model has yet been derived. Those spaces
clearly show off-reference evaluations of existing models rather than invented
native topology models. Ratio grouping denotes sizing/design reference, not
proof of universal optimality.
`test_recommendation.py` checks the independent closed-form buck width optimum,
area calibration/units, hard constraints, width caps, droop-constrained resizing,
priority order and honest no-model/no-fit behavior.
Topology shortlist entries are visual panels with control-free SVG previews,
normalized device resistance labels (Rs, Rc, Rl), modeled losses, budgets and
inspection links. Excluded modeled candidates also have panels. Detailed
control sequences remain available in the inspection schematics. Candidate
assets are generated by `annotate_schematics.py` from the current schematic
sources; these are intentional presentation views, not revision backups.
## Coupled-inductor cancellation-point policy
Recommendations and visible inspection choices now list only supported
cancellation-point families, not every cell that can reach the nominal ratio.
2:1 lists coupled BUCK2Phi and stacked BUCK. 4:1 lists XFLY2P, XFLY4P,
3LBUCK and 2SBUCK under their specified balanced complementary sequences.
The stacked buck still uses its existing 4:1 device-size allocation; grouping
at 2:1 refers to electrical excitation rather than allocation optimality.
Pure SC and off-duty buck comparisons are omitted. 6:1/8:1/16:1 have no verified
cancellation-point model yet, so their visible candidate lists are empty.
First-order symmetric magnetic model: Lself=Lk+Lm, M=-Lm,
Ldm=Lk+2Lm. With complementary 50% winding inputs at levels 0/Vstep,
phase-current ripple pp = Vstep/(4 feff Ldm). Vstep=Vin for buck cells and
Vin/2 for these hybrid cells; feff=fs for two-command sequences and 2fs for
the specified four-pulse / 3L sequence. Ripple percentage uses Iout/2 as base.
Default Lk=50 nH, Lm=1 uH and maximum pp ripple=5% are editable illustrative
inputs, not characterized TSMC magnetics. The threshold is a hard screen.
The ideal summed switching ripple cancels; phase ripple is finite for finite Ldm.
No measured zero-ripple result is claimed. Capacitor ripple, timing/mismatch,
resistive drops and regulation-duty correction can invalidate this ideal estimate.
Loss ranking retains flat-current terms and excludes ripple-loss corrections.
## Output-voltage and load inputs
The requested output voltage is editable independently of Vin. Output load may
be entered as current (A) or power (W). Rload = Vout/Iout = Vout^2/Pout at the
requested design point. The tool displays output current and output power,
load resistance in ohms, and converter output resistance Rout in mOhms for
each candidate. Rout aliases the existing output-referred series loss Req;
Rout/Rload is shown separately. Gate/Coss shunts are not added to this series
resistance. Per-unit values use the existing common full-budget Rs reference.
Choosing a ratio seeds the output-voltage field with Vin/ratio. It stays
editable; an explicit mismatch is not silently corrected. A match button is
available. A mismatch excludes a cancellation-point recommendation, since
adjusting duty away from that point needs a new ripple/control assessment.
Matching Vout to the ideal ratio is not proof of loaded regulation: the
constant-current open-loop estimate is Vin/ratio - Iout Rout. Rload is the
requested operating-point load value; the model does not silently replace
specified current with a solved resistive-load equilibrium.
The main comparison no longer features a single winning topology. All qualifying
candidates appear as equally styled drawing panels beside the design inputs,
with the existing priority sort, numerical results and exclusion details.
The GUI operating point now has only output voltage and output power inputs.
Vin is derived as selected_ratio * Vout; Iout = Pout/Vout and
Rload = Vout²/Pout. Changing ratio preserves output voltage/power. The separate
device-reference panel also consumes this derived operating point instead of
exposing competing Vin/Iout fields. Resource and technology constraints remain
editable. The numerical API retains its legacy explicit-Vin mode for previous
verification cases; the GUI uses voltage_mode=output_ratio and load_mode=power.
Current GUI operating-point inputs are output voltage and output current.
Power is derived as Vout*Iout, Rload=Vout/Iout, and Vin=ratio*Vout.
Ratio changes preserve Vout and Iout. The numerical API still supports power
input for compatibility; the GUI uses load_mode=current.
3LBUCK is listed at both 2:1 and 4:1. At 2:1, a balanced flying capacitor
and 50% gate duty give an ideal constant Vin/2 winding input, so the ideal
winding ripple is zero even without magnetic coupling. The schematic retains
coupled windings. This is distinct from complementary-excitation cancellation
at 4:1. The 2:1 estimate explicitly leaves capacitor-ripple, mismatch and timing
residuals unquantified; it is not a measured zero-ripple claim. The existing
4:1 device allocation is retained in the loss comparison. TI SLYT807 documents
the ideal D=.5 zero-inductor-voltage point.
## Loss scoreboard
The default comparison is a FIFA-inspired lineup of equal circuit columns.
Switch conduction, capacitor ESR, winding DCR, incremental charging and gate
power are aligned as five attributes, each with physical mW values and relative
0–99 ratings. 99 is the lowest loss in that mechanism among displayed circuits;
0 is highest, ties get 99, and a single candidate has no relative rating.
These are not efficiencies or absolute technology benchmarks. Composition
strips show actual fractions of the modeled total; these five terms sum to it.
Charging uses Iout²(Req−RFSL), not raw RSSL. Unknown Coss/core/ripple losses are
shown as unquantified rather than assigned a zero loss or score.
Pros/tradeoffs highlight the largest mW difference from other candidates' mean.
Circuit-card view remains available for larger schematics and detailed numbers.
The design JSON includes the scorecard definitions, physical powers and scores.
|