MJL3281A and MJL1302A SPICE Models

Introduction: Article Contents Reflect Some Deprecated Techniques

This article was originally written in 2006 when I just started out making SPICE models. While the contents do represent the actual procedure used for parameter extraction of the downloadable models, new developments have caused some of the information provided in the article to be somewhat dated. There are two reasons for this. The first is the normal process of trying out different tools and techniques for the job, discovering the weakness of the existing tools, and trying out new ones. The second stems from the use of Massobrio and Antognetti as a reference for determining the capabilities of the models used by existing simulators. This excellent book provides lots of detailed information about the Gummel-Poon model equations, but since it was published in 1998, simulator vendors have added extensions to the models, allowing them to better represent real-world devices. This page describes some of those extensions as well as other recent developments.

In addition, ON Semiconductor have since created new models for these devices. The data presented here are from the models that were current around October 2006. So if you use the current models to try to duplicate the manufacturer's data I've presented here, your data might not match what's presented in the article.

New Techniques And Tools Not Covered By The Article

Improved Automation of the Process

Some of the parameter extraction procedures described in the article require too much human effort. These procedures require the user to adjust parameters, then run a simulation and observe the results. If they are not close enough, parameters are adjusted again, another simulation is run, and so on. This can be very time consuming and tedious. It's better to write code that implements the same equations used internally by SPICE, then use some kind of optimization algorithm to automatically adjust parameters to minimize an aggregate measure of the error between simulated and measured data (the objective function). Real-world constraints must of course be applied to the optimization process to prevent nonsensical parameter values. Automation has been improved to some extent, first by using Visual Basic for Applications within Excel, then by using Matlab. Further development is still needed.

Better Mathematical Software for the Parameter Fitting

The method described in the article used Excel to fit simulated data of β vs. IC. The use of Excel was prompted by problems experienced with early attempts at using the Minerr() function of MathCad for this purpose. After the article was written, it was discovered that the problem with the MathCad Minerr() function was fixed in a more recent version of MathCad.

The method of using Excel in the article was also rather primitive in the sense that only formulas appropriate for inclusion into a spreadsheet cell were used. Later modeling exercises not described in the article used Visual Basic for Applications (VBA) to implement some of the Gummel-Poon equations that were too complex for computation in spreadsheet cells. This resulted in improved automation of the process, but two problems still remained.

One way of solving the problem of nested iterative procedures is by using MathCad. A technique originated by Teodoro Marinucci allowed the iterative method required to compute VBE from IC to be used within the objective function, which was then minimized using the MathCad Minerr() function. This greatly improved the automation of the process, but unfortunately Minerr() uses the Levenberg-Marquardt algorithm for minimization. That algorithm, though more well-behaved than the Excel solver, nonetheless has problems with local minima. So MathCad was not a complete solution, and more investigation was needed regarding the behavior of other optimization algorithms.

One approach that resulted in much improved parameter fitting was to use Mathematica with its various global optimization algorithms. It was observed that greatly improved matching of simulated and measured β vs. IC could be achieved, especially in the low-current region. Unfortunately, Mathematica is very quirky, and when things go wrong it's a bit of a guessing game as to how to fix the problem and have it stay fixed. My own impression of the program is that its foundation in symbolic computing gets in the way of numerical computing. I could find no way in general of getting it to revert to a purely numerical approach at all levels of the computation. The result was strange error messages concerning failed symbolic computations from deep within its algorithms. The explanation in the manual of why this occurs didn't make much sense and the recommended solution did not always work. Further, its heavy dependence on the symbolic computation approach causes it to be rather slow. I didn't want to deal with such problems, so I abandoned its use.

At present, it appears the most promising software for SPICE parameter fitting is Matlab. Global optimization algorithms are available for it, it's designed from the ground up for efficient numerical computing, and it has a robust development environment and debugging tools. Furthermore, symbolic computation is still possible with the optional Symbolic Math Toolbox. Some current modeling efforts of mine now use Matlab. Details are provided below.

Better Modeling of β vs. IC At High IC

The article states that the SPICE IKF parameter specifies the value of IC above which the log slope of IC vs. VBE becomes smaller, but that the slope itself in the high-current region is fixed. While this is true for the standard Gummel-Poon model, PSPICE added a new parameter called NK which allows for this log slope to be specified. LTspice supports NK as well, though it's not documented. Recent experimentation with NK shows it to be extremely useful, even mandatory, for getting a good match of simulated and measured β at large IC values. The models developed in the article required sacrificing accuracy of simulated β in the high-current region to get the best possible accuracy at more typical currents. This compromise is no longer necessary when NK is used.

Quasi-Saturation Support with Enhanced Gummel-Poon Model

Modern SPICE simulators such as PSPICE and LTspice support the Kull model for quasi-saturation. This is done as an enhancement to the Gummel-Poon model and does not require more advanced models such as VBIC or Mextram. See Figure 1 of the article for an example of quasi-saturation behavior as it pertains to the DC characteristic curves of the MJL1302A.

One interesting question raised by the use of quasi-saturation modeling is whether the VTF parameter should be scrapped when the Kull model is used. VTF models the reduction in fT at low values of VCE. But quasi-saturation (not taken into account in the standard Gummel-Poon model) has the same effect of reducing fT at low VCE. Since quasi-saturation modeling is physical and VTF is a non-physical curve-fitting parameter, this suggests that when the Kull model is used, VTF may may no longer be needed to model the fT reduction at low VCE. More investigation of this possibility is needed.

Modeling the Variation of Base Resistance with Base Current

Bob Cordell's audio power amplifier design book describes a useful technique for computing the parameters RBM and IRB, which model the varying base resistance with base current. This technique will surely help in getting a better match of simulated and measured VBE vs. IC than was obtained with the models available here.

Engauge Digitizer Software for Capturing Data Sheet Graph Data

The very useful Engauge Digitizer freeware allows the user to take a graphics file such as a .png or .gif that captures a graph from a device data sheet, obtain the numerical data at a large number of points and save it to a text file. This eliminates the pain of manually reading values from data sheet graphs while providing more data than is practical with a manual approach.

Latest Developments

Usage of Matlab and Differential Evolution Optimization for Parameter Fitting

Some preliminary software has been written in Matlab for fitting the simulated collector-base capacitance CCB to the data sheet capacitance data, and for fitting the model's base-emitter capacitance CBE such that data sheet values of fT vs. IC match simulated values. The former problem is easy for even simple optimization code, but the latter requires simultaneous adjustment of TF, FC, CJE, VJE, MJE, ITF and possibly VTF to match simulated and measured data. These routines make use of a package contributed to the Matlab Central web site by Markus Buehren, which implements the Differential Evolution algorithm for optimization. This outstanding contribution has shown itself to be the most effective solution I've yet encountered for obtaining SPICE parameters when the objective function governing the optimization contains many local minima. In the process of fitting the fT data, some errors in Massobrio and Antognetti were uncovered.

Errors in Massobrio and Antognetti Regarding the Modeling of fT vs. IC

Equation (17) of the article, taken straight from Massobrio and Antognetti, was originally used in the Matlab code to compute the diffusion capacitance component of CBE for the determination of fT. An optimization was performed using those equations to set CBE such that the computed fT vs. IC matched the datasheet. Then, upon entering these optimized parameters into the model and simulating fT directly in SPICE, the results of the Matlab fT computation at high IC values differed from the SPICE results by a factor of 5 in one particularly bad case. Various sources of documentation I found differed on how the diffusion capacitance component of CBE should be computed. After trying these formulas with no success, I finally downloaded the Berkeley SPICE source code (version 3f5) and verified that Equation (17) is indeed in error. I implemented an algorithm in Matlab identical to the one used in SPICE3, and that fixed the problem. The correct algorithm for computing the diffusion capacitance component of CBE can be found in the file bjtload.c in the SPICE source code.

Modeling the Abrupt Reduction of fT at High Values of IC

Equation (13) of the article introduces a parameter called FC, whose purpose is to eliminate the singularity in the depletion capacitance component of CBE vs. VBE when VBE equals VJE. For an abrupt reduction of fT to occur, there must be an abrupt increase in CBE as VBE increases. This can be made to happen by setting the FC parameter very close to one, such that there is almost a singularity in CBE vs. VBE when IC is in the region where fT drops off abruptly. So if FC is made adjustable in the optimization, this abrupt reduction of fT at high currents can be modeled quite accurately. This technique is now being successfully used in the new Matlab code.


[1] Kull, Nagel, Lee, Lloyd, Prendergast and Dirks, "A Unified Circuit Model for Bipolar Transistors Including Quasi-Saturation Effects," IEEE Trans. Electron Devices, vol. ED-32, pp. 1103-1113, 1985