Skip to main content

Transistor Database

Project description

.. sectnum::

########################### Why the transistordatabase? ###########################

When developing electronics, you need to calculate and simulate your schematic before building up the hardware. When it comes to the point of choosing a transistor, there is typically a lot of trouble with different programs. In typical cases, you use more than one program for your calculation, e.g. a self-written program for a first guess, and a schematic simulator to verify your results. Your colleague is working on another electronics topology, may using two other programs. Both of you have stored a few transistor-files on your computers. But due to other programs and another way of using them in a self-written program, your transistors will never be compatible with your colleagures program. If he want's to use your transistors, he needs to generate them compleatly new from the datasheets to be compatible with his programs. Sharing programs and transistors will result in frustraction. This happens also in the same office (university / company / students).

The transistordatabase counteracts this problem. By a defined file format, you can handle these objects, export it to some propretery simulation software and share it by a .json-file to your colleagues or share it with the world by using the transistor database file exchange git repository <>__.

.. image:: :align: center :alt: Why transistor database?

Functionality overview

.. image:: :align: center :alt: Workflow

Functionality examples:

* digitize transistor datasheet parameters and graphs and save it to the TDB
* use this data for calculations in python (e.g. some loss calulations for a boost-converter)
* export this data to matlab for calculations in matlab
* export transistors to GeckoCIRCUITS simulation program
* export transistors to Simulink simulation program
* export transistors to PLECS simulation program

.. note:: Development status: Alpha

Complete documentation

The complete documentation can be found here <>__.

############ Installation ############


Install Mongodb

For the first usage, you need to install mongodb. Install with standard settings. Use the MongoDB community server, as platform, choose windows Link <>__.

Install git

Git Installation file <>_. If you already have git installed, make sure you are using the latest version.

.. note:: During installation, you will be asked 'Which editor would you like Git to use?'. Default is 'Vim', but it is one of the most complex one for beginners. Switch to 'Notepad++', 'Nano' or another one.

Install Python

Install latest Python version: Link <>__.

Install Pycharm

Installation file <>_.


Archlinux / Manjaro

Enable Arch-User-Repository (AUR) <>_.

.. code-block::

sudo pacman -Syu mongodb-bin git pycharm


.. code-block::

sudo apt install python3 python3-pip git

.. note:: Install pycharm from Snapstore

All Operating systems: Install the transistor database

Inside pycharm, create a new project. Select 'new environment using' -> 'Virtualenv'. |br| As a base interpreter, select 'C:\Users\xxxxxx\AppData\Local\Programs\Python\Python39\Python.exe'. Click on create. |br| Navigate to file -> settings -> Project -> Python Interpreter -> '+' -> search for 'transistordatabase' -> 'Install Package' |br|

Complete minimal python example

Copy this example to a new pycharm project.

.. code-block::

# load the python package
import transistordatabase as tdb

# update the database from the online git-repository

# print the database

# load a transistor from the database
transistor_loaded = tdb.load('CREE_C3M0016120K')

# export a virtual datasheet

On the output line, you should see a message which links to the datasheet file. Click on it to view the datasheet in your browser. If this works, you have set up the transistor database correctly.

########################## transistordatabase's usage ##########################

Import transistordatabase to your python program

.. code-block::

import transistordatabase as tdb

Generate a new transistor

Transistor object basics

Transistor |br| | |br| +-Metadata |br| | |br| +-Switch |br| | +-Switch Metadata |br| | +-Channel Data |br| | +-Switching Data |br| | |br| +-Diode |br| | +-Diode Metadata |br| | +-Channel Data |br| | +-Switching Data |br| | |br| +-wp (temporary storage for further calculations) |br|

Reading curves from the datasheet

For reading datasheet curves, use the tool WebPlotDigitizer <>_. There is a online-version available. Also you can download it for Linux, Mac and Windows. WebPlotDigitizer is open source software.

Channel data for switch and diode always needs to be positive. Some Manufacturers give diode data in the 3rd quadrant. Here is an example how to set the axes and export the data inside WebPlotDigitizer:

.. image:: :align: center :alt: diode channel data negative

Use the template to generate a new transistor object

After digitizing the curves, you can use a template to generate a new transistor object and store it to the database. For this, see the template </template_example/>_.

Some values need to follow some rules, e.g. due to different spelling versions, the manufacturers name or housing types must be written as in the lists below. Some general hints to fill the template:

* `List of manufacturers <>`_
* `List of housing types <>`_
* `Fuji housing overview <>`_

In many cases, two capacity curves are specified in the data sheets. One curve for the full voltage range, and one with zoom to a small voltage range. To represent the stored curves in the best possible way, both curves can be read in and then merged.

.. code-block::

c_rss_normal = csv2array('transistor_c_rss.csv', first_x_to_0=True)
c_rss_detail = csv2array('transistor_c_rss_detail.csv', first_x_to_0=True)

transistor_args = {
               'c_rss': {"t_j": 25, "graph_v_c": c_rss_merged},

Update and load and share transistors

Update transistors from file exchange

There is a file exchange to share transistor objects. The repository can be found here <>__. To update your local transistordatabase type in to your python code

.. code-block::


After this, you can find new or updated transistor files in your local transistordatabase.

Search the database

Print all transistors inside the database

.. code-block::


If you want to store the transistor list, this function returns the names in a variable. Next option is the usage of filters, e.g. print the housing type and the hyperlink to the datasheet. All database entries can be used as filter.

.. code-block::


Load a transistor from the database

.. code-block::

transistor_loaded = tdb.load({'name': 'CREE_C3M0016120K'})

Share your transistors with the world

Use your local generated transistor, load it into your workspace and export it, e.g.

.. code-block::

transistor_loaded = load('CREE_C3M0016120K')

You can upload this file to the transistor database file exchange git repository <>__ by generating a pull request.

if you don't want to create a github account, you can also send the .json file to this :email:email address <>.

Usage of Transistor.wp. in your programs

There is a subclass .wp where you can fill for further program calculations.

Full-automated example

Use the quickstart method to fill in the wp-class

There is a search function, that chooses the closes operating point. In the full-automated method, there are some predefined values

* Chooses transistor.switch.t_j_max - 25°C as operating temperature to start search
* Chooses transistor.i_abs_max/2 as operating current to start search
* Chooses v_g = 15V as gate voltage to start search

.. code-block::


Half-automated example

Fill in the wp-class by a search-method to find the closes working point to your methods

Insert a working point of interest. The algorithm will find the closest working point and fills out the Transistor.wp.-class .. code-block::

transistor.update_wp(125, 15, 50)

Non-automated example

Fill in the wp-class manually

Look for all operating points manually. This will result in an error in case of no match. .. code-block::

transistor_loaded.wp.e_oss = transistor_loaded.calc_v_eoss()
transistor_loaded.wp.q_oss = transistor_loaded.calc_v_qoss()

# switch, linearize channel and search for losscurves
transistor_loaded.wp.switch_v_channel, transistor_loaded.wp.switch_r_channel = transistor_loaded.calc_lin_channel(25, 15, 150, 'switch')
transistor_loaded.wp.e_on = transistor_loaded.get_object_i_e('e_on', 25, 15, 600, 2.5).graph_i_e
transistor_loaded.wp.e_off = transistor_loaded.get_object_i_e('e_off', 25, -4, 600, 2.5).graph_i_e

# diode, linearize channel and search for losscurves
transistor_loaded.wp.diode_v_channel, transistor_loaded.wp.diode_r_channel = transistor_loaded.calc_lin_channel(25, -4, 150, 'diode')

Calculations with transistor objects

Parallel transistors

To parallel transistors use the function.

  • In case of no parameter paralleling is for 2 transistors
  • In case of parameter, paralleling is for x transistors. Example here is for three transistors.

.. code-block::

transistor = load('Infineon_FF200R12KE3')
parallel_transistorobject = transistor.parallel_transistors(3)

After this, you can work with the transistor object as usual, e.g. fill in the .wp-workspace or export the device to Matlab, Simulink or GeckoCIRCUITS.

######################### Export transistor objects #########################

Using transistors within pyhton you have already seen. Now we want to take a closer look at exporting the transistors to other programs. These exporters are currently working. Some others are planned for the future.

Export a Virtual datasheet

This function exports a virtual datasheet to see stored data in the database. Function display the output path of .html-file, which can be opened in your preferred browser.

.. code-block::

transistor = tdb.load('Fuji_2MBI100XAA120-50')

.. image:: :align: center :alt: Generated virtual datasheet example

Export to GeckoCIRCUITS

GeckoCIRCUITS is an open source multi platform schematic simulator. Java required. Direct download link <>_. At the moment you need to know the exporting parameters like gate resistor, gate-voltage and switching voltage. This will be simplified in the near future.

.. code-block::

transistor = tdb.load('Fuji_2MBI100XAA120-50')
transistor.export_geckocircuits(600, 15, -4, 2.5, 2.5)

From now on, you can load the model into your GeckoCIRCUITS schematic.

.. image:: :align: center :alt: GeckoExporter usage example

.. hint:: It is also possible to control GeckoCIRCUITS from python, e.g. to sweep transistors. In this case, linux users should consider to run this <>_ Version of GeckoCIRCUITS instead the above one (port to OpenJDK).

Export to PLECS

For a thermal and loss simulation using PLECS simulation tool, it requires the transistor loss and characteristic curves to be loaded in XML(Version 1.1) file format. More information on how to load the XML data can be found from here. To export the transistor object from your database to plecs required xml file format, following lines need to be executed starting with loading the required datasheet.

.. code-block::

transistor = tdb.load('Fuji_2MBI200XAA065-50')

Outputs are xml files - one for switch and one for diode (if available), which can be then loaded into your schematic following the instructions as mentioned here <>__. Note that if channel curves for the default gate-voltage are found missing then the xml files could not be possible to generate and a respective warning message is issued to the user. The user can change the default gate-voltage and switching voltage by providing an extra list argument as follows:

.. code-block::

transistor = tdb.load('Fuji_2MBI200XAA065-50')
transistor.export_plecs([15, -15, 15, 0])

Note that all the four parameters (Vg_on, Vg_off) for IGBTs/Mosfets and (Vd_on, Vd_off) for reverse/body diodes are necessary to select the required curves that needs to be exported to switch and diode XMLs respectively.

.. image:: :align: center :alt: PLECS thermal exporter usage example

Export to Simulink

For a loss simulation in simulink, there is a IGBT model available, which can be found in this simulink model <>_ . Copy the model to you schematic and fill the parameters as shown in the figure. Export a transistor object from your database by using the following command. Example for a Infineon transistor. .. code-block::

transistor = tdb.load('Infineon_FF200R12KE3')

Output is a .mat-file, you can load in your matlab program to simulate. Now, you are able to sweep transistors within your simulation. E.g. some matlab-code:

.. code-block::

load Infineon_FF200R12KE3_Simulink_lossmodel.mat;
load Infineon_FF300R12KE3_Simulink_lossmodel.mat;
load Fuji_2MBI200XBE120-50_Simulink_lossmodel.mat;
load Fuji_2MBI300XBE120-50_Simulink_lossmodel.mat;
Transistor_array = [Infineon_FF200R12KE3 Infineon_FF300R12KE3 Fuji_2MBI200XBE120-50 Fuji_2MBI300XBE120-50];
for i_Transistor = 1:length(Transistor_array)
    Transistor = Transistor_array(i_Transistor);
    out = sim('YourSimulinkSimulationHere');

.. image:: :align: center :alt: Simulink exporter usage example

Export to Matlab/Octave

Python dictionary can be exported to Matlab, see the following example:

.. code-block::

transistor = tdb.load('Fuji_2MBI100XAA120-50')

A .mat-file is generated, the exporting path will be displayed in the python console. You can load this file into matlab or octave.

.. image:: :align: center :alt: Matlab .mat exporter usage example

####### Others #######


Planned features in 2021

* show a virtual datasheet of a transistor
* exporters to a few programs, e.g. Simulink, GeckoCIRCUITS, PLECs, ...
* save measurement data from double pulse measurements in the transistor database
* compare resistors within the database (e.g. compare measurements wit datasheet values, or compare datasheet values for transistor A with transistor B)
* provide a pip package


Bug Reports

Please use the issues report button within github to report bugs.


Find the changelog here <>__.


Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. For contributing, please refer to this section <>_.


History and project status

This project started in 2020 as a side project and was initially written in matlab. It quickly became clear that the project was no longer a side project. The project should be completely rewritten, because many new complex levels have been added. To place the project in the open source world, the programming language python is used.

In January 2021 a very early alpha status is reached. First pip package is provided in may 2021.

Authors and contributors

Actual developers

* Nikolas Förster
* Henning Steinhagen
* Mohan Nagella

Project leading

* Nikolas Förster
* Philipp Rehlaender

Developers in the past

* Manuel Klädtke


Licensed under GPLv3 <>_

.. |br| raw:: html



All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

0.3.1 - 2021-12-15


  • #68: Improved user warning in case of no mongodb installed
  • #70: Save .json-files in multiple lines, to avoid that a small change is very difficult to see in version control
  • #71, #72: fix get_object_i/r_e_simplified

0.3.0 - 2021-12-09


  • NEW: Option to add own measurements to the database
  • Add function export_all_datasheets()
  • #61: Add Keys to add R_DS,ON vs. junction temperature
  • #62: Add Keys for Gate Charge Curve
  • #63: Add Keys for Safe-Operating-Area


  • #59: simplify the usage of tdb.load('transistorname') instead of tdb.load({'name': 'transistorname'})


  • #51: Mutable List in export_plecs
  • #58: Fix some units displayed in virtual datasheet
  • #66: Cannot get the corresponding datasheet according to the procedures in the tutorial
  • #67: Problem when exporting all transistors from the database to virtual datasheet

0.2.14 - 2021-11-02


  • Helper function 'collect_i_e_and_r_e_combination' to find and associate i_e and r_e based SwitchEnergyData objects for usage in gecko exporter
  • Helper function 'check_keys' to validate the arguments provided to gecko exporter
  • dictates the default gate voltages for switch and diodes types based on the module type
  • #50: Introduce new transitsor keys: r_g_on_recommended and r_g_off_recommended


  • Docstrings
  • updated calc_thermal_params function to normalize the limit selections for curve fitting
  • update to module manufacturers list and housing type list
  • #27: Update gecko exporter according to latest working
  • remodelled gecko exporter with added feature to find the nearest neighbours to the given v_supply, v_g, r_g if the exact curves doestn't exists
  • remodelled gecko exporter with added feature to re-estimate the loss curves at given gate resistor
  • Added case to handle gecko exporter request to find nearest neighbours in find_next_gate_voltage method
  • update find_next_gate_voltage method to include the check_specific_curves parameter which now skips the curves while finding out nearest neighbours


  • fix #48: export_datasheet fails when exporting a SiC-MOSFET
  • fix #49: Print housing_list and manufacturer_list in case of not maching housings/manufacturers when creating a transistor

0.2.13 - 2021-09-30


  • #37: Function to calculate thermal parameters from given thermal curve
  • scipy curve fitting method is utilized to extract thermal parameters


  • Docstrings
  • added calc_thermal_params function call to init block of transistor object to calculate the missing thermal parameters


  • #19: Problems in Windows when removing cloned repo

0.2.12 - 2021-09-15


  • Transistor method 'compare_channel_linearized()' to compare channel data with linearized data
  • Sphinx documentation, see here


  • Docstrings


  • #44: Choose another linearisation default current for quickstart_wp()
  • #48: Crash when exporting virtual datasheet

0.2.11 - 2021-08-07


  • #40 Read two curves for parasitic capacitance

Small Improvements

  • #35 Add Datasheet Hyperlink to Simulink loss model exporter
  • #34, #36 Display all exported file folders clickable
  • Datasheet link (.export_datasheet()) is also clickable and opens the browser to display the datasheet
  • #38 Update template with new examples
  • Small changes on datasheet displaying


  • fix #43: Problem when paralleling transistors with no r-th-curve given
  • fix #39: Problem when exporting datasheet with not r_th_vector and tau_vector variables

0.2.10 - 2021-07-27


  • #14 Virtual datasheet for IGBT and MOSFET types which collects all the plot and data of transistor switch and diode and presents a HTMl file. Use 'transistor.export_datasheet()'


  • fix #32: incorrect template paths in PLECS exporter

0.2.9 - 2021-07-14


  • fix #30: Bad package dependency in

0.2.8 - 2021-07-14


  • #25 Allows only positive channel data to be stored or created for both switch and diode types, added mirror_xy_data attribute in csv2array function to do so.
  • #28 Integrated calculating curve characteristics at different r_g values into simuliunk exporter and added exception handlers
  • #29 Code cleanup and added recheck functionality for plecs exporter to find new gate voltage
  • #29 Added plecs exporter for MOSFET and IGBT modules (outputs separate switch type and diode type xmls)


  • #22 Moved exporter functions to transistor classes and removed

0.2.7 - 2021-06-28


  • Module manufacturers, fix compatibility problem in 0.2.6

0.2.6 - 2021-06-27


  • #3, #8 : fixes to avoid typo errors in manufacturer and housing types along with comment line additions


  • method 'parallel_transistors()' to parallel transistors object of same type


  • rewrite export_to_matlab() function


  • remove dependency from matlab-pip-package

0.2.5 - 2021-06-10


  • export_simulink_loss_model using new functions to search transistor elements (incl. fix #17)


  • export_simulink_v1 (outdated)

0.2.4 - 2021-05-28


  • #13: GeckoCircuits Exporter exports mirrowed conducting characterisitc for negative currents


  • #11, #12: Path displays when export to gecko (.scl) or to .json

0.2.3 - 2021-05-21


  • Simple calculation method for mosfet gate resistor (Paper PCIM 2006: D.Kübrich 'Invetsigation of Turn-Off Behaviour under the Assumption of Linear Capacitances')


  • bug #7: was not fully fixed. Fixed now.
  • bug #9: in case of no err-data, fill working point with object instead of list

0.2.2 - 2021-05-11


  • print_TDB() returns a list with transistor names
  • add some CREE power module housing types


  • fix #6: Avoid KeyError when using devices without err-losscurves
  • fix #7: wrong fill of wp.xxx_r_channel/xxx_v_channel when using transistor.update_wp() or transistor.quickstart_wp()

0.2.1 - 2021-05-06


  • Problem when reading .csv-files generated by english-language systems

0.2.0 - 2021-05-04


  • Example template to generate a transistor object
  • transistor method: linearize_switch_ui_graph
  • transistor.switch methods: print_all_channel_data, print_channel_data_vge, print_channel_data_temp
  • New class LinearizedModel: Contains data for a linearized Switch/Diode depending on given operating point.
  • New class to store c_iss, c_oss, c_rss in Transistor.
  • New Transistor attribute: e_coss
  • Documentation drawing
  • Exporter: GeckoCIRCUITS
  • calc_object_i_e to calculate loss loss curves for other gate resistors/voltage levels
  • New class 'wp' to store local calculation parameters to use in your program
  • automatically fill 'wp' objects when using functions like find_approx_wp()
  • added a quick start to fill in 'wp' values quick and easy
  • New housing types
  • .json exporter


  • Removed Metadata class. Added its attributes to Transistor class instead


  • Restructured foster thermal model argument handover
  • Rename package to transistordatabase (instead of transistor_database) due to pip package rules
  • csv2array callable with options
  • move some functionality out of transistor class (tdb.Transistor. -> tdb.)

0.1.0 - 2021-02-04


  • Construct a Transistor-object and save relevant data in its attributes and subclasses
  • Class structure documented in a class UML diagram
  • Save Transistor-object in an object database created with mongodb
  • Mandatory attributes and restricted types/values to guarantee only valid and functional Transistors can be added to the database
  • Matlab-Exporter

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for transistordatabase, version 0.3.1
Filename, size File type Python version Upload date Hashes
Filename, size transistordatabase-0.3.1-py3-none-any.whl (111.4 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page