main
John Lauer ECAS vs MLCC: a study of moving the buck to polymer capacitors, with its section card 531f515
#!/usr/bin/env python3
"""Cycle-by-cycle check of the as-built output at its worst corner (C x 0.68: -20 % tolerance, X5R at 85 C)
with Cff 68 pF (as built) and 47 pF, at VIN 9 V. Run: python3 corner_switch.py -> ../results/corner_switch.json"""
import json, sys
import variants as V
base = V.LIB['x5r22_0805']['model']
V.LIB['x5r22_0805']['model'] = lambda v: dict(base(v), C=base(v)["C"] * 0.68)
cff = int(sys.argv[1])
r = V.switching(f"corner68_cff{cff}", {"vin": ["alu47", "x7r10_1206", "x7r10_1206", "c100n"], "vout": ["x5r22_0805"] * 3}, cff, vin=9.0)
print(json.dumps(r))
json.dump(r, open(f"../results/corner_switch_cff{cff}.json", "w"), indent=1)