Extensive parametric search of MOSFETs for DC-DC converters

This toolset tries to help you with designing a DC/DC converter.
It basically consists of three parts:
- FET data sheet parsing (download, normalisation, validation)
- Magnetic materials library and tools for DC-biased inductor design
- Power loss modeling of switching, inductor, capacitors
What it does:
- Read search results from part suppliers
- Download parts PDF datasheets
- Extract specification values from the PDF files
- Store gathered parts specifications in a database or CSV file
- Compute power Loss modeling for a given DC-DC converter load point
Switch Loss Intro
You can start by defining your DC/DC load parameters, DcDcLoadParams, currently synchronous buck converter only:
- Input voltage (Vin)
- Output voltage (Vout)
- Output current (Iout)
- switching frequency
- Ripple current (peak-to-peak) OR ripple factor OR DC-biased inductivity
- Gate Drive
- Gate drive voltage
- Gate drive resistor
It will then start to discover mosfets directly from manufacturers websites (current implemented: TI, Infineon, Toshiba,
ST, onsemi, vishay, nexperia/nxp, huayi, Alpha&Omega, TaiwanSemi, Qorvo) or Digikey search results.
After pre-selecting for breakdown voltage and drain current, it'll start downloading the data sheets.
Once this is done, it processes the data sheets with different methods (see below TODO) and generates a normalised data
sheet object. Out of this data sheet object we create the MOSFET specifications, which describes the parts Rds_on, gate
charge curve and other parameters:
Qgs, Qgd, Qgs2, Qg_th, Q_sw
V_pl (miller plateau voltage)
C_oss
Qrr
- rise and fall times
With the given DC/DC load parameters and gate drive parameters mentioned earlier, we compute gate charge
curve for the high-side (HS) and low-side (LS) switch. With the gate charge we estimate power loss during (dis-)charge
of the gate-source and miller capacitance. We also consider revers recovery losses of the synchronous rectifier (buck:
LS) body diode.
This way we can rank all mosfets by their power loss in the HS or LS slot. This is expected to be much mure accurate
than
using the Figure-of-Merit Rds_ON*Qg.
The model was used during the design process of a 1 kW MPPT tracker (Fugu2) and we fed back real-life experience into
the model. Proper verification still needs to be done (measuring real gate drive curve, reverse recovery effect).
The power loss computation currently lacks a temperature rise model.
References:
- Fundamentals of Power Electronics
- Discover.ee
- TI AN
- Infineon AN
- Rohm AN
How to use
git clone --recurse-submodules https://github.com/fl4p/fetlib
cd fetlib
python3 -m venv venv
. ./venv/bin/activate
pip install -r requirements.txt
# fetch a set of data-sheets (mostly 80-200V power mosfets):
git clone https://github.com/open-pe/fet-datasheets datasheets
# additional dependencies:
- `gs` (Ghostscript)
- qpdf
- sips
- CUPS_PDF (www.cups-pdf.de/)
- Tabula
- FontForge
acquire a parts list from Digikey. go
to digikey.com
narrow down the search filters so your have 500 or less results.
download the CSV file (click Download Table / First 500 Results)
save the CSV file under parts-lists/digikey/ folder
Open main.py and adjust adjust the DCDC operating point:
# buck converter
dcdc = DcDcSpecs(vi=62, vo=27, pin=800, f=40e3, Vgs=12, ripple_factor=0.3, tDead=500e-9)
vi input voltage
vo output voltage
pin input power, alternatively you can set `io` (I_out) or `ii` (I_in).
f switching frequency
Vgs gate drive voltage for both HS and LS
ripple_factor peak-to-peak coil current divided by mean coil current (assuming CCM)
tDead gate driver dead-time (happens 2 times per period)
Run python3 main.py --config-file apps/proj/buck.yaml and it will download all datasheets (if not already found), extract values and compose a CSV
file with loss estimations for the given DC-DC converter.
The process will finish with an output like this:
written fets-buck-62V-27V-30A-40kHz.csv
stored 1259 parts
The CSV file includes these power loss values (see Power Loss Model for details):
P_on HS conduction loss ~ (D * I² * Rds)
P_on_ls LS conduction loss ~ ((1 - D) * I² * Rds)
P_sw HS switching loss ~ max(tRise + tOff, 2 * Qsw / (Vgs / rg) )
P_rr reverse recovery loss when used as LS (sync fet) ~ Qrr
P_dt_ls LS dead time loss ~ (tDead * Vsd)
And these aggregated power values for the 2 slots HS, LS and for the 2p case each:
P_hs total loss caused by HS switch
P_2hs total HS loss with 2 parallel switches
P_ls total loss in LS switch
P_2ls total LS loss with 2 parallel switches
If a input value for power computation is missing the power values will be float('nan') (empty CSV cell).
Vsd (body diode forward voltage) defaults to 1 V if not available. V_plateau (miller plateau voltage) defaults to
4.5V.
See the equations in powerloss.py.
Outputs
We pick a set of switches for LS and HS, inductor and capacitors. Then we compute loss for different output currents and
plot the results like this (the plot includes loss in switches, inductor, capacitors):

Acquiring parts list
A good starting point to discovery suitable switches is the DigiKey parametric search (see above how to import CSVs).
To include the latest and greatest products, you need to go to the manufacturers' website.
We implemented automated discovery of new products for Infineon, Toshiba and TI,
see dslib/parts_discovery.py.
Acquiring part specifications
The program collects part specification values from different sources:
- Values from search-results / parts-lists on supplier website or manufacturer website (Rds_on, Qg, Vds)
- Manual fields from
dslib/manual_fields.py
- Nexar API
- PDF Datasheet
- Text regex
- Tabula
- Table header aware iteration
- Row regex iteration
- LLMs (TODO)
- OpenAI´s ChatGPT
- Anthropic´s Claude 3.5 Sonnet
- flux.ai (TODO)
Values for Rds_on and Qgd are usually shown in the search results (Digikey, LCSC).
Nexar API doesn't show the Qrr, and (tRise+tFall) only for some parts (especially values for newer chips are missing
here). So we need to extract characteristics for the power loss model from the Datasheet.
We use 3 techniques:
- Convert the PDF to txt and find the values with regular expressions. this can be tedious work, as table structure is
not homogenous across manufacturers and some manufacturers use different formats across product series and release
date. each extracted field usually requires its own regex since tables include testing conditions or design notes.
- use tabula (or another pdf2table program) to read the tables from the PDF. there is a python binding available that
produces pandas DataFrames. find values by iterating the rows.
- LLM Apis https://github.com/piotrdelikat/fet-data-extractor
Field priority
Priority = insertion order (first non-NaN value per stat wins; later stages fill gaps):
- manual fields (
ref)
- pdf2txt + regex (
text) — runs first, both to win and to shrink the remaining need_symbols
- spatial query (
read_sheet, + read_charts for Vpl) — unconditional
- tabula + regex (
tabular) — expensive, so runs last and is skipped/narrowed once text+read_sheet cover the needed symbols
- discovery/vendor specs, then GaN fallback specs
For the power loss compution we need a single discrete value of relevant fields (e.g. Rds_on, Qsw, Qrr).
Datasheet specify min./max/typ values and sometimes there are multiple rows for a single value under different
testing conditions e.g. temperature, Vdd, Id, and transients di/dt and dv/dt.
|
|
|
|
| Rds_on |
Vg=10V |
max |
|
| Qg |
|
|
|
| tRise/Fall |
|
typ,max,min |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Benchmarking pipelines
- only take those sybmols relevant for power loss model
- Score Funcs
- count fields: count symbol with any min/typ/max value
- rmse:
- define a reference Datasheet
- for each relevant symbol -> Sym
- for each (min, typ, max) -> Stat
- Count += abs((A[Sym][Stat] - B[Sym][Stat]) / B[Sym][Stat]) < ErrThres
Datasheet download
Downloads for some datasheet are protected by anti-robot mechanism.
To avoid this, we use pyppeteer (Python port of puppeteer) with Chromium to simulate human user interaction.
This will handle JS challenges, redirects and if the link points to a PDF-Preview page, we look for a download button
and
click it.
Chromiums PDF must be disabled, because we cannot access it through pupeteer.
chromiumUserDataPath/Default/Preferences:
"plugins": {"always_open_pdf_externally": true},
Troubleshooting
- Tabula on macos: I had some issues getting java running on Mac M2, use zulu JDK
Power Loss Model
TODO:
The power loss model for a DC-DC buck is based on
the application
notes rOHM: Calculation of Power Loss (Synchronous)
and TI: Power Loss Calculation With Common Source Inductance Consideration for Synchronous Buck Converters.
We assume CCM mode, coil current never touches zero.
Note that loss from LS reverse recovery P_rr is dissipated in HS.
In other words, poor performance of LS heats up the HS.
The generated CSV file includes the estimated losses caused by a transistor when placed in the HS or LS slot (not their
power dissipation).
Mosfet Key Parameters for synchronous converters (src):
HS (Fast switching):
- Low Q_sw
- Low r_g
- Low Rds_on
LS (Body Diode Properties, self turn-on prone):
- Low Rds_on
- Low Q_rr
- Low Qgd/Qgs ratio (self turn-on)
- Optimized Vth (self turn-on)
- Low r_g
- Low Vsd
Note that LS losses in the body diode depend on Vsd and the driver dead time.
Consider placing a Schottky diode parallel to the LS. This can reduce voltage drop and the reverse recovery effect.
Take care about parasitic inductances between the LS and the Schottky diode.
This might even lower reverse recovery loss, because the LS body diode never powers up.
See Toshiba Product Guide 2009
on page 18.
Notes about Qrr
Qrr can be defined by design and values from the data-sheet are not subject to production test.
Qrr depends on temperature, reverse voltage V_R, forward current I_F and forward current transient dif/dt.
Most datasheets only specify a single value under some given conditions.
DS of IQD016N08NM5 includes one for dif/dt=100A/us and dif/dt=1000A/us.
Some datasheets (infineon, 400V fets) specify Qfr mosfet forward recovery, which is the same as body diode reverse
recovery. (TODO verify)
Acquiring Parts Lists from Suppliers (Search Results)