symbench / electric-circuits

Electric Circuits Domain for webGME
https://webgme.symbench.org
Apache License 2.0
12 stars 3 forks source link

Device Model Pointer #64

Open umesh-timalsina opened 3 years ago

umesh-timalsina commented 3 years ago

It might be nice to integrate DeviceModel Pointer for each component that can represent a standard SPICE Model associated with it. This will be more helpful for running simulations with SPICE simulator of choice while generating the netlist.

umesh-timalsina commented 3 years ago

https://github.com/FOSSEE/eSim/tree/master/library/deviceModelLibrary/Templates has some templates to create DeviceModels. However, it doesn't have any description associated with it the parameters as well as no way of discerning what these parameters actually mean.

umesh-timalsina commented 3 years ago

https://github.com/chezou/tabula-py is a project I found for extracting tables out of a pdf file. Currently, I have been doing manual conversion of tables in http://ngspice.sourceforge.net/docs/ngspice-34-manual.pdf, line by line which gets messy/complicated. I tried it with the manual and I could get nice dataframes:

>>> df = tabula.read_pdf("http://ngspice.sourceforge.net/docs/ngspice-34-manual.pdf", pages='124')
>>> df
[        Name                                 Parameter Units  Default  Example
0    IS (JS)                        Saturation current     A  1.0e-14  1.0e-16
1        JSW               Sidewall saturation current     A      0.0  1.0e-15
2          N                      Emission coefficient     -        1      1.5
3         RS                          Ohmic resistance     Ω      0.0      100
4         BV                 Reverse breakdown voltage     V        ∞       40
5        IBV              Current at breakdown voltage     A   1.0e-3   1.0e-4
6        NBV            Breakdown Emission Coefficient     -        N      1.2
7   IKF (IK)                      Forward knee current     A      0.0   1.0e-3
8        IKR                      Reverse knee current     A      0.0   1.0e-3
9       JTUN              Tunneling saturation current     A      0.0      NaN
10    JTUNSW     Tunneling sidewall saturation current     A      0.0      NaN
11      NTUN            Tunneling emission coefficient     -       30      NaN
12    XTITUN  Tunneling saturation current exponential     -        3      NaN
13       KEG        EG correction factor for tunneling     -      1.0      NaN
14       ISR          Recombination saturation current     A    1e-14      1pA]
>>> df = tabula.read_pdf("http://ngspice.sourceforge.net/docs/ngspice-34-manual.pdf", pages='125')
>>> df
[Empty DataFrame
Columns: [Name, Parameter, Units, Default, Example, Scalefactor]
Index: [],   CJP (CJSW)           Zero-bias junction sidewall\rcapacitance    F   0.0   .1pF  perimeter
0         FC  Coefficient for forward-bias\rdepletion bottom...    -  0.50      -        NaN
1        FCS  Coefficient for forward-bias\rdepletion sidewa...    -  0.50      -        NaN
2     M (MJ)                  Area junction grading coefficient    -  0.50    0.5        NaN
3       MJSW            Periphery junction grading\rcoefficient    -  0.33    0.5        NaN
4    VJ (PB)                                 Junction potential    V  1.00    0.6        NaN
5        PHP                       Periphery junction potential    V  1.00    0.6        NaN
6         TT                                       Transit-time  sec  0.00  0.1ns        NaN, Empty DataFrame
Columns: [Name, Parameter, Units, Default, Example]
Index: [],             TM1                      1st order tempco for MJ   1/◦C   0.0              -
0           TM2                      2nd order tempco for MJ  1/◦C2   0.0              -
1   TNOM (TREF)            Parameter measurement temperature     ◦C  27.0             50
2    TRS1 (TRS)                      1st order tempco for RS   1/◦C   0.0              -
3          TRS2                      2nd order tempco for RS  1/◦C2   0.0              -
4           TM1                      1st order tempco for MJ   1/◦C   0.0              -
5           TM2                      2nd order tempco for MJ  1/◦C2   0.0              -
6          TTT1                      1st order tempco for TT   1/◦C   0.0              -
7          TTT2                      2nd order tempco for TT  1/◦C2   0.0              -
8           XTI      Saturation current temperature exponent      -   3.0  3.0pn\r2.0Sbd
9          TLEV          Diode temperature equation selector      -   0.0            NaN
10        TLEVC    Diode capac.temperature equation selector      -   0.0            NaN
11    CTA (CTC)       Area junct.cap.temperature coefficient   1/◦C   0.0              -
12          CTP  Perimeter junct.cap.temperature coefficient   1/◦C   0.0              -]