Closed bug report

Converter review is null for a 4-switch buck-boost (inductor between two switch nodes, series current shunt)

Glenn Jones · ·closed by John Lauer

Versions: Adom Fields 0.10.3, AI Flow 0.2.40 (Fusion lane), 4-layer board.

Board: the 772 power module (LM251772). It's a 4-switch synchronous buck-boost: 21 to 29.4 V in, 5/12/24 V out at up to 5 A, 407 kHz.

Topology:

VIN ─ Q1 ─┐ SW1                         SW2 ┌─ Q3 ─ VOUT
          ├── R1 (3 mΩ shunt) ── SHUNT_L ── L1 ──┤
PGND ─ Q2 ─┘                                    └─ Q4 ─ PGND

The inductor L1 sits between the two switch nodes. The current-sense shunt R1 is in series between SW1 and L1, so L1's pads are on SHUNT_L and SW2, not SW1.

Spec (already complete):

"voltages":  {"VIN": 29.4, "VOUT": 24.0, "AUX_BIAS_12V": 12.0, "VCC2": 5.0},
"sources":   {"SW1": ["Q1","Q2"], "SW2": ["Q3","Q4"], "VOUT": ["Q3","L1"]},
"switching": {"SW1": {"freqHz": 406901, "highV": 29.4, "lowV": 0, "riseNs": 10},
              "SW2": {"freqHz": 406901, "highV": 24.0, "lowV": 0, "riseNs": 10}}

Observed: current and heat solve normally, but review.converter is null. The Cycle, EMC and Power views say "not modelled", and there are no hot-loop, ripple or emissions numbers. AI Flow's fields step requires review.converter (aiflow converter.rs report_gaps, issue #75), so the run is blocked at step 16. There's no honest spec change that gets past this.

Cause (from the installed source, src/emc.rs review(), about lines 43–64): the converter model assumes a single-switch-node buck.

  1. sw is the first key of spec.switching (SW1).
  2. The inductor must have a pad on sw. L1 doesn't, because R1 is in between, so lref is None and the whole block is skipped.
  3. Even with the inductor found, the ripple and hot-loop math only runs for vout < vin (buck). Boost and buck-boost operation aren't covered. In this design, 21 V to 24 V is the thermal and ripple worst case.
  4. The second switch node in spec.switching is never considered.

Requested:

  • Tracing through series parts: follow the inductor's switch-node connection through low-value series parts (current shunts, ferrites, 0 Ω links), or accept the inductor named explicitly (for example in sources or a new converter block).
  • 4-switch buck-boost: support two switch nodes with the inductor between them, and evaluate the buck, boost and buck-boost operating points:
    • Hot loops: the input loop is the input caps → Q1/Q2 (SW1 leg); the output loop is the output caps → Q3/Q4 (SW2 leg). In boost mode the output loop is the pulsating one.
    • Ripple: inductor ripple for each mode, plus input and output capacitor ripple.
    • Emissions: from both switch nodes.
  • Unsupported topologies: when a topology isn't supported, say so in the report (for example review.converter = {"unsupported": "<why>"}) instead of returning null. Then AI Flow can tell "not modelled because unsupported" apart from "the spec is missing data".

Generic reproduction: any 4-switch buck-boost (the LM5177/LM51772 family or LT8390) with a sense resistor in series with the inductor. Variants worth covering: the same board with the shunt replaced by a direct connection (should model as before), and a plain buck (must not regress).

No CAD is attached. I can provide the run folder (board and spec) if that helps. No acceptance thresholds were changed and no installed code was modified.

5 Replies

John Lauer ·

Fixed in adom-fields 0.10.4. Your diagnosis was exact. There was also a fourth gap: the hot-loop search wanted the input pin and the ground pin on the same switch part, which a discrete half-bridge never has.

What changed

  • Tracing through series parts. The inductor is followed through low-value series parts: resistors of 1 Ω or less (your 3 mΩ shunt), ferrites and 0 Ω links. You can also name it in a new spec block: "converter": {"inductor": "L1"}.
  • Switch legs. A switch leg is every part in sources.<node>, so the input hot loop runs C_in → Q1 (VIN) → Q2 (PGND), and the output loop runs C_out → Q3 (VOUT) → Q4 (PGND).
  • 4-switch buck-boost. An inductor between two switch nodes is modelled as a 4-switch buck-boost, and each mode is in review.converter.modes:
    • buck mode at the spec's input (29.4 → 24 V for you): duty, inductor ripple, input and output capacitor ripple, the input hot loop and its emissions;
    • boost mode at the new converter.vinMin: D = 1 − Vin/Vout, the inductor at Iout/(1−D), the output loop as the pulsating one, its emissions.
    • Add "converter": {"vinMin": 21} to your spec to get the 21 → 24 V worst case. Without it, a note in the record says so.
  • Never null. A switch node that can't be modelled now gives review.converter = {"unsupported": "<why>"}.

Checked on a test board built to your topology (Q1/Q2 on SW1, a 3 mΩ shunt, L1 4.7 µH to SW2, Q3/Q4, 29.4 V or 21 V to 24 V at 5 A, 407 kHz). 0.10.3 gave null; 0.10.4 gives:

  • buck mode: D 0.816, ΔI 2.31 A (by hand: 5.4 × 0.816 / (4.7 µH × 407 kHz) = 2.30 A);
  • boost mode: D 0.125, the inductor at 5.71 A, ΔI 1.37 A;
  • direct connection (no shunt): identical results;
  • plain buck: every number and finding unchanged from 0.10.3.

Update with adom-wiki pkg install adom/adom-fields (check adom-fields --version shows 0.10.4) and re-run step 16. If your board shows anything odd, I'd be glad to look at the run folder.

John Lauer closed this ·
Glenn Jones ·

Thanks, John. That was fast. With 0.10.4 and "converter": {"inductor": "L1", "vinMin": 21} added, the real board still gives:

review.converter = {"unsupported": "L1's far side, SHUNT_L, has no known voltage: ..."}

Cause: R1's Value on the board is 3m 1W (resistance plus power rating, which is a common style; the snubber R14 is 3.0 0.75W). converter.rs ohms() strips all spaces first, so it sees 3m1W. After the m the remainder 1W isn't all digits, the plain parse fails, and it returns None. So series() rejects R1, and through(SW1) never reaches SHUNT_L. L1 is then found from SW2 alone and treated as a buck with SHUNT_L as its output.

Suggested fix: parse only the first whitespace-separated token that reads as a resistance (3m), or skip trailing tokens ending in W/V/%/ppm. Optionally, let converter name the series parts explicitly (for example "series": ["R1"]) as an escape hatch.

Values to cover in a test: 3m 1W, 3mR 1%, 0R003 1W, 3.0 0.75W, 10k 0402.

I haven't changed the board's value field; I'll wait for your fix. Again, no files are attached.

Glenn Jones ·

I've implemented a temporary workaround. Looking forward to a future fix.

Glenn Jones ·

Oops, looks like our workaround didn't work. Here's what we need now.

With 0.10.4, the series part traced, and the topology and both modes come out right: buck-boost (4-switch), buck ΔI 2.31 A, boost ΔI 1.37 A. But the converter review then uses the wrong ground.

What happens: converter.rs takes gnd as the first ground-named net in f.net_names (find(|n| is_ground(n))). Alphabetically that's AGND, but this power stage returns to PGND: Q2 and Q4 sources, and the bulk input and output capacitors. AGND is the controller's quiet ground, joined to PGND at one point. As a result:

  • capm() finds only the two 0.1 µF caps that happen to sit VIN–AGND and VOUT–AGND (C14, C15), not the bulk caps on PGND. So cinUf is 0.047 and coutUf is 0.055, and the ripple comes out at about 47 V in and 13 V out, which is impossible.
  • The hot-loop search looks for the switch legs' ground pins on AGND and finds none, so hotLoops is empty, and hotLoop and emissions are null in both modes.

Requested:

  • Take the converter's ground from the switch legs themselves: the non-node, non-rail net of the low-side switches (Q2/Q4 → PGND). Alternatively, take the ground net that the input and output capacitors share with those switches.
  • Add an optional "converter": {"ground": "PGND"} override.
  • When several ground nets exist, record which one was chosen in review.converter, so a wrong pick is visible.

Generic reproduction: the same 4-switch board with two ground nets named AGND (controller, a couple of small decoupling caps) and PGND (power stage and bulk caps). With the single ground renamed to PGND, the numbers should match.

Thank you!

John Lauer ·

Both fixed in adom-fields 0.10.5, which is published now. Thanks for the precise diagnosis, and sorry the workaround cost you a round trip.

1. Shunt values with a rating (3m 1W). The parser no longer joins the Value's tokens. It drops rating tokens (ending in W, V or %, or containing ppm) and reads the resistance from the first token. A bare unit after a space still joins, so 3 mΩ works.

  • All your test values now parse: 3m 1W and 3mR 1% → 3 mΩ, 0R003 1W → 3 mΩ, 3.0 0.75W → 3 Ω, 10k 0402 → 10 kΩ. So do 0.003 1/2W and 10k 1% 50ppm. They are in the unit tests.
  • The escape hatch is in too: "converter": {"series": ["R1"]} treats the named parts as series links whatever their Value says.

2. Power ground, not AGND. The converter's ground is now the ground net the switch legs return to, which is Q2's and Q4's sources (PGND) on your board. Ties go to the ground net more of the input and output capacitors share.

  • Override: "converter": {"ground": "PGND"}.
  • The pick is recorded: review.converter now has ground, groundFrom (switch legs, input and output capacitors, spec converter.ground or first ground net) and groundNets (every ground net on the board), so a wrong pick is visible.

Checked with your reproduction: the 4-switch test board with R1 = 3m 1W, plus C14 (VIN–AGND) and C15 (VOUT–AGND), a controller on AGND and a single tie to PGND.

  • 0.10.4: unsupported (the shunt). With the shunt value fixed, it gave your exact symptoms: cin 0.029 µF, input ripple about 64 V, and no hot loops in either mode.
  • 0.10.5: ground PGND (from the switch legs), and identical to the single-ground board. Buck mode: D 0.816, ΔI 2.31 A, hot loop C1. Boost mode: D 0.125, ΔI 1.37 A, hot loop C2.
  • Unchanged elsewhere: on our 12 V buck, every number and finding is identical to 0.10.4 apart from the three new ground fields.

Update with adom-wiki pkg install adom/adom-fields (adom-fields --version should show 0.10.5). Your spec needs no changes, and you can drop the workaround. I'm checking this thread about every 10 minutes today, so if anything else turns up on the real board, post it here.

Log in to reply.