Package: transistordatabase
.. sectnum::###########################
Features
###########################The key feature is the Python interface, to use the transistor data in self-written optimization routines.Python interface
Use the transistor data in you self-written optimization program, see figure:Automatic calculate your converter losses with many different transistorsSearch the database for usable transistors for your applicationFunctions provided, to search for closest operating pointFunctions provided, to linearize the transistor/diode conduction behaviourFunctions provided, to calculate the output capacitances Energy from the C_oss-curveUse own loss measurements for above features (coming soon)GUIManage, store and search the transistorsExport transistor models to programs like GeckoCIRCUITS, PLECS, Matlab/OctaveCompare transistors (interpolate switch loss data for new gate resistors and temperatures, ...).. image::https://raw.githubusercontent.com/upb-lea/transistordatabase/main/sphinx/documentation/workflow_wp.png:align: center
:alt: optimization###########################
GUI Screenshots
###########################.. image::https://raw.githubusercontent.com/upb-lea/transistordatabase/main/sphinx/images/gui_database.png:align: center
:alt: gui_database.. image::https://raw.githubusercontent.com/upb-lea/transistordatabase/main/sphinx/images/gui_comparison.png:align: center
:alt: gui_comparison.. image::https://raw.githubusercontent.com/upb-lea/transistordatabase/main/sphinx/images/gui_create_transistor.png:align: center
:alt: gui_create_transistorDownload and installation for windows(For other operating systems, scroll down)Download and installGit Installation file <https://git-scm.com/download/win>_.Download and install mongodb. Use the MongoDB community server, as platform, choose windowsLink <https://www.mongodb.com/try/download/community>_.Download and run the transistordatabasehere <https://groups.uni-paderborn.de/lea/public/downloads/transistordatabase.zip>_.###########################
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 thetransistor database file exchange git repository <https://github.com/upb-lea/transistordatabase_File_Exchange>__... image::https://raw.githubusercontent.com/upb-lea/transistordatabase/main/sphinx/images/Why_transistordatabase.png:align: center
:alt: Why transistor database?Functionality overview.. image::https://raw.githubusercontent.com/upb-lea/transistordatabase/main/sphinx/images/Workflow.png:align: center
:alt: WorkflowFunctionality examples:digitize transistor datasheet parameters and graphs and save it to the TDBuse this data for calculations in python (e.g. some loss calulations for a boost-converter)export this data to matlab for calculations in matlabexport transistors to GeckoCIRCUITS simulation programexport transistors to Simulink simulation programexport transistors to PLECS simulation program.. note::
Development status: AlphaComplete documentationThe complete documentation can be foundhere <https://upb-lea.github.io/transistordatabase/main/transistordatabase.html>__.############
Installation
############WindowsInstall MongodbFor the first usage, you need to install mongodb. Install with standard settings. Use the MongoDB community server, as platform, choose windowsLink <https://www.mongodb.com/try/download/community>__.Install gitGit Installation file <https://git-scm.com/download/win>_.
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 PythonInstall latest Python version:Link <https://www.python.org/>__.Install PycharmInstallation file <https://www.jetbrains.com/pycharm/download/download-thanks.html?platform=linux&code=PCC>_.Download and run executableDownload exe-file here:LinuxArchlinux / ManjaroEnable Arch-User-Repository(AUR) <https://aur.archlinux.org/packages/mongodb-bin/>_... code-block::sudo pacman -Syu mongodb-bin git pycharmUbuntu.. code-block::sudo apt install python3 python3-pip git.. note::
Install pycharm from SnapstoreAll Operating systems: Install the transistor databaseInside 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 exampleCopy 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
tdb.update_from_fileexchange()

# print the database
tdb.print_tdb()

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

# export a virtual datasheet
transistor_loaded.export_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 tdbGenerate a new transistorTransistor object basicsTransistor |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 datasheetFor reading datasheet curves, use the toolWebPlotDigitizer <https://apps.automeris.io/wpd/>_. 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::https://raw.githubusercontent.com/upb-lea/transistordatabase/main/sphinx/images/Diode_channel_data_negative.png:align: center
:alt: diode channel data negativeUse the template to generate a new transistor objectAfter digitizing the curves, you can use a template to generate a new transistor object and store it to the database. For this, see thetemplate </template_example/template_example.py>_.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 <https://github.com/upb-lea/transistordatabase/blob/main/transistordatabase/module_manufacturers.txt>`_
* `List of housing types <https://github.com/upb-lea/transistordatabase/blob/main/transistordatabase/housing_types.txt>`_
* `Fuji housing overview <https://www.fujielectric.com/products/semiconductor/model/igbt/2pack.html>`_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 transistorsUpdate transistors from file exchangeThere is a file exchange to share transistor objects. The repository can be foundhere <https://github.com/upb-lea/transistordatabase_File_Exchange>__. To update your local transistordatabase type in to your python code.. code-block::tdb.update_from_fileexchange()After this, you can find new or updated transistor files in your local transistordatabase.Search the databasePrint all transistors inside the database.. code-block::tdb.print_tdb()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::tdb.print_TDB(['housing_type','datasheet_hyperlink'])Load a transistor from the database.. code-block::transistor_loaded = tdb.load({'name': 'CREE_C3M0016120K'})Share your transistors with the worldUse your local generated transistor, load it into your workspace and export it, e.g... code-block::transistor_loaded = load('CREE_C3M0016120K')
transistor_loaded.export_json()You can upload this file to thetransistor database file exchange git repository <https://github.com/upb-lea/transistordatabase_File_Exchange>__  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 <tdb@lea.upb.de>.Usage of Transistor.wp. in your programsThere is a subclass .wp where you can fill for further program calculations.Full-automated exampleUse the quickstart method to fill in the wp-classThere 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::transistor_loaded.quickstart_wp()Half-automated exampleFill in the wp-class by a search-method to find the closes working point to your methodsInsert 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 exampleFill in the wp-class manuallyLook 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 objectsParallel transistorsTo parallel transistors use the function.In case of no parameter paralleling is for 2 transistorsIn 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 datasheetThis 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')
transistor.export_datasheet().. image::https://raw.githubusercontent.com/upb-lea/transistordatabase/main/sphinx/images/Virtual_Datasheet.png:align: center
:alt: Generated virtual datasheet exampleExport to GeckoCIRCUITSGeckoCIRCUITS is an open source multi platform schematic simulator. Java required. Directdownload link <http://gecko-simulations.com/GeckoCIRCUITS/GeckoCIRCUITS.zip>_.
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::https://raw.githubusercontent.com/upb-lea/transistordatabase/main/sphinx/images/Example_Gecko_Exporter.png: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 runthis <https://github.com/tinix84/gecko/releases/tag/v1.1>_ Version of GeckoCIRCUITS instead the above one (port to OpenJDK).Export to PLECSFor 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')
transistor.export_plecs()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 mentionedhere <https://www.plexim.com/support/videos/thermal-modeling-part-1>__. 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::https://raw.githubusercontent.com/upb-lea/transistordatabase/main/sphinx/images/PLECS_thermal_editor.png:align: center
:alt: PLECS thermal exporter usage exampleExport to SimulinkFor a loss simulation in simulink, there is a IGBT model available, which can be found in thissimulink model <https://de.mathworks.com/help/physmod/sps/ug/loss-calculation-in-a-three-phase-3-level-inverter.html>_ . 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')
transistor.export_simulink_loss_model()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::https://raw.githubusercontent.com/upb-lea/transistordatabase/main/sphinx/images/Example_Simulink_Exporter.png:align: center
:alt: Simulink exporter usage exampleExport to Matlab/OctavePython dictionary can be exported to Matlab, see the following example:.. code-block::transistor = tdb.load('Fuji_2MBI100XAA120-50')
transistor.export_matlab()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::https://raw.githubusercontent.com/upb-lea/transistordatabase/main/sphinx/images/Matlab.png:align: center
:alt: Matlab .mat exporter usage example#######
Others
#######RoadmapPlanned features in 2022Focus on adding self-measured data to the databaseWorking with self-measured data in exportersUsability improvementsStable softwareOrganisationBug ReportsPlease use the issues report button within github to report bugs.ChangelogFind the changeloghere <https://github.com/upb-lea/transistordatabase/blob/main/CHANGELOG.md>__.ContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change. For contributing, please refer to thissection <https://github.com/upb-lea/transistordatabase/blob/main/Contributing.rst>_.AboutHistory and project statusThis 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 was reached. First pip package was provided in may 2021. First GUI is provided in June 2022.LicenseLicensed underGPLv3 <https://choosealicense.com/licenses/gpl-3.0/>_.. |br| raw:: html<br>ChangelogAll notable changes to this project will be documented in this file.The format is based onKeep a Changelog,
and this project adheres toSemantic Versioning.Unreleased- Date[0.4.1] - 2022-07-18AddedGeneral: Option to delete transistors from local databaseGeneral: Gecko Exporter for GaN-Transistors: mirror 1. quadrant forward characteristic to 3rd quadrantGUI: Add options to display virtual and original datasheet for selected transistor#90: Add email-workflow to add new transistor to the transistordatabase file exchange (TDB-FE)Add log(x), log(y) for adding/viewing plotsFixedFix PDF preview not working due to a workaround#93: GUI Manufacturer parameters for switch and diode must be optionalFix GUI measurement integration method when integrating own measurement.Fix some GUI data does not accept float or negative valuesFix some wrong labels: Units in C-curves0.4.0- 2022-06-20AddedNEW: Graphical User Interface: Download exe-file, - or run the file "gui.py" within the directory ".../transistordatabase/transistordatabase/gui" to start the GUIFixed#82: update_from_fileexchange() leads to failure in case of no internet connection#84: Process is still running when closing main window#85: Ignore missing-data messages at GUI startup#87: Database not visible in exe-file0.3.3- 2022-03-20Changeddo not re-assign r_th and c_th values when loading/creating a transistor object (do not run calc_thermal_params())Workaround for brocken export_datasheet(): temporary only html-files available instead of pdf-files0.3.2- 2022-02-02AddedAdd Rohm to manufacturer listChangesMethod 'print_TDB()' changes to 'print_tdb()'export_dataheet() can handle with measurement data0.3.1- 2021-12-15Bugfixes#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_simplified0.3.0- 2021-12-09AddedNEW: Option to add own measurements to the databaseAdd 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-AreaUpdated#59: simplify the usage of tdb.load('transistorname') instead of tdb.load({'name': 'transistorname'})Bugfixes#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 datasheet0.2.14- 2021-11-02AddedHelper function 'collect_i_e_and_r_e_combination' to find and associate i_e and r_e based SwitchEnergyData objects for usage in gecko exporterHelper function 'check_keys' to validate the arguments provided to gecko exporterconstants.py: 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_recommendedUpdatedDocstringsupdated calc_thermal_params function to normalize the limit selections for curve fittingupdate to module manufacturers list and housing type list#27: Update gecko exporter according to latest workingremodelled 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 existsremodelled gecko exporter with added feature to re-estimate the loss curves at given gate resistorAdded case to handle gecko exporter request to find nearest neighbours in find_next_gate_voltage methodupdate find_next_gate_voltage method to include the check_specific_curves parameter which now skips the curves while finding out nearest neighboursBugfixesfix #48: export_datasheet fails when exporting a SiC-MOSFETfix #49: Print housing_list and manufacturer_list in case of not maching housings/manufacturers when creating a transistor0.2.13- 2021-09-30Added#37: Function to calculate thermal parameters from given thermal curvescipy curve fitting method is utilized to extract thermal parametersUpdatedDocstringsadded calc_thermal_params function call to init block of transistor object to calculate the missing thermal parametersBugfixes#19: Problems in Windows when removing cloned repo0.2.12- 2021-09-15AddedTransistor method 'compare_channel_linearized()' to compare channel data with linearized dataSphinx documentation, seehereUpdatedDocstringsBugfixes#44: Choose another linearisation default current for quickstart_wp()#48: Crash when exporting virtual datasheet0.2.11- 2021-08-07Added#40 Read two curves for parasitic capacitanceSmall Improvements#35 Add Datasheet Hyperlink to Simulink loss model exporter#34, #36 Display all exported file folders clickableDatasheet link (.export_datasheet()) is also clickable and opens the browser to display the datasheet#38 Update template with new examplesSmall changes on datasheet displayingBugfixesfix #43: Problem when paralleling transistors with no r-th-curve givenfix #39: Problem when exporting datasheet with not r_th_vector and tau_vector variables0.2.10- 2021-07-27Added#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()'Bugfixesfix #32: incorrect template paths in PLECS exporter0.2.9- 2021-07-14Bugfixesfix #30: Bad package dependency in setup.py0.2.8- 2021-07-14Added#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)Changed#22 Moved exporter functions to transistor classes and removed exportFunctions.py0.2.7- 2021-06-28AddedModule manufacturers, fix compatibility problem in 0.2.60.2.6- 2021-06-27Bugfixes#3, #8 : fixes to avoid typo errors in manufacturer and housing types along with comment line additionsAddedmethod 'parallel_transistors()' to parallel transistors object of same typeChangedrewrite export_to_matlab() functionRemovedremove dependency from matlab-pip-package0.2.5- 2021-06-10Addedexport_simulink_loss_model using new functions to search transistor elements (incl. fix #17)Removedexport_simulink_v1 (outdated)0.2.4- 2021-05-28Added#13: GeckoCircuits Exporter exports mirrowed conducting characterisitc for negative currentsBugfixes#11, #12: Path displays when export to gecko (.scl) or to .json0.2.3- 2021-05-21AddedSimple calculation method for mosfet gate resistor (Paper PCIM 2006: D.Kübrich 'Invetsigation of Turn-Off Behaviour under the Assumption of Linear Capacitances')Bugfixbug #7: was not fully fixed. Fixed now.bug #9: in case of no err-data, fill working point with object instead of list0.2.2- 2021-05-11Addedprint_TDB() returns a list with transistor namesadd some CREE power module housing typesBugfixfix #6: Avoid KeyError when using devices without err-losscurvesfix #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-06BugfixProblem when reading .csv-files generated by english-language systems0.2.0- 2021-05-04AddedExample template to generate a transistor objecttransistor method: linearize_switch_ui_graphtransistor.switch methods: print_all_channel_data, print_channel_data_vge, print_channel_data_tempNew 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_cossDocumentation drawingExporter: GeckoCIRCUITScalc_object_i_e to calculate loss loss curves for other gate resistors/voltage levelsNew class 'wp' to store local calculation parameters to use in your programautomatically fill 'wp' objects when using functions like find_approx_wp()added a quick start to fill in 'wp' values quick and easyNew housing types.json exporterRemovedRemoved Metadata class. Added its attributes to Transistor class insteadChangedRestructured foster thermal model argument handoverRename package to transistordatabase (instead of transistor_database) due to pip package rulescsv2array callable with optionsmove some functionality out of transistor class (tdb.Transistor. -> tdb.)0.1.0- 2021-02-04AddedConstruct a Transistor-object and save relevant data in its attributes and subclassesClass structure documented in a class UML diagramSave Transistor-object in an object database created with mongodbMandatory attributes and restricted types/values to guarantee only valid and functional Transistors can be added to
the databaseMatlab-Exporter