Design Simulation Systems Ltd


VMODEL 2
SPICE Semiconductor Model Parameter
Extraction Tool
User Manual & Description

Mark Sitkowski

Overview

Vmodel2 is a tool which extracts Berkeley SPICE model parameters from a 20-point description of one or more of the device characteristic curves. It uses a combination of this information and some device data sheet parameters to fit the equations describing the performance of the device to the curves entered by the user. The variables to the equations are the SPICE model parameters, which are adjusted for the best fit.
Devices currently supported are: BJT, JFET and MOSFET (Level 1).
Errors in the input data are accommodated, to the extent of assuming the curve X-Y data to be within one standard deviation of the true value.
The method employed is the Marquand-Leverson technique for non-linear equation curve-fitting, combined with a hybrid Newton-Raphson/Bisection equation solution method.
Just imagine the fun I had differentiating the SPICE BJT and MOSFET equations, with respect to each parameter, in turn. Strange how useful all that high-school mathemtics is, when you least expect it.

Accuracy


The equations used internally by Vmodel2 are exactly the same ones used by the SPICE simulator when evaluating the voltage/current characteristics of semiconductor primitives. Thus, it is guaranteed (provided convergence is achieved) that simulating the semiconductor using the extracted parameters will re-create the same curves.
This statement is subject to qualification.
All parameter extraction routines rely on a reasonable guess as to the values of the parameters being extracted. The guesses are then incremented or decremented in such a way as to minimise the error between the curve as seen, and the curve as re-calculated using the new parameter value.
Thus, it is possible for two sources of error to influence the results.
Firstly, not all parameters cause the same percentage change in the curve shape for a given percentage change in the parameter. Therefore, some parameters can be varied quite wildly without affecting the result, while others cause drastic changes with a very small change. In the former case, it may mean "close enough is good enough", where the final solution falls within the measurable error limits. In the latter, it may result in a failure to converge, if the initial guess is not accurate enough.
Secondly, it occasionally happens that two parameters are being simultaneously fitted which have opposing effects on the curve. For example, if the equation
                          y = (a / b) * c
is being fitted for 'a' and 'b', then any pair of values giving the correct ratio will be deemed to be correct. Fortunately, few SPICE model parameters appear in the characteristic equations in this form. Where it does occur, the software solves for the ratio, not the individual parameters.

Although this underlines the importance of a reasonably accurate guess for the starting values of parameters to be extracted, a safety net has been included to help with cases where no obvious starting values can be found.

CONVERGENCE

All semiconductor characteristic curves are defined by an equation which needs to vary two or more parameters to fit the curve. Each parameter numerical entry box has associated with it a pushbutton, which determines whether that parameter is used in the fitting process. Thus, if the value of a particular parameter is known (perhaps from measurement), then it may be left constant, while the remaining parameters are fitted.

Additionally, if the results of fitting all parameters give values which are obviously wrong, then the fitting may be performed one by one, until reasonable results are obtained.

It is extremely unlikely that misconvergence will occur if the input data and the parameter starting values are of reasonable accuracy. If the algorithm fails to converge, it is usually due to the fact that the curve as entered does not conform to the equations used by SPICE. This in itself is not a problem, unless too many slopes are reversed, in such a way that a change of sign within the equation cannot compensate for this.

Invocation

Vmodel2 is invoked by typing:

Vmodel2

The default size for the frame is smaller than that used for Vspice3 or GEX, so that Vspice3 can be left running simultaneously, to examine the results of the fit.

There are two means of data entry. One relates to the Pushbutton menu, and one to the Data Entry Menu.

Pushbutton Menu

The number of pushbuttons varies with the device type, and data is entered by selecting a button and, when it has depressed, typing the data on the prompt bar, where it will be echoed.

When the carriage-return is pressed, the pushbutton will reset, and the entered data will be entered on it. Note that for all functions, numeric data entry is completely free-form, and follows the same rules as SPICE. This means that "1m", "0.001" and "1E-3" all mean the same.

Some pushbuttons have a toggle function so that selecting, for example, the polarity of a transistor, requires no typing on the part of the user. Each press of the button causes the entry to switch from "NPN" to "PNP" and back again.

Data Entry Menu

This appears whenever a "FIT" function is selected from the Pushbutton Menu. Its function is to permit entry of X-Y data point values from semiconductor characteristic curves, and to permit entry of starting guesses for parameters to be extracted.

The graphical frame is divided into an upper and lower area, both containing numeric entry boxes.

The upper four boxes are identified by the names of the parameters being extracted. Each box has an associated pushbutton which determines whether the parameter is fixed, or is to be calculated. Before the curve-fitting is started, the user must enter a guess for the value of each parameter, and select the pushbuttons of those to be fitted.

The lower part of the frame contains pairs of numeric entry boxes labelled from X0 to X19, and from Y0 to Y19. These boxes are for user-entered characteristic curve data, derived from a data sheet or from measurements.

In practise, there is default data for every characteristic curve stored in the software and, on selection, all boxes contain this data. The purpose of this is to provide a means of familiarisation. Note, however, that not all the data came from the same device so that, for example, the output characteristic data for the BJT is that of a BC108, whereas the hFE/IC data is that of a 2N2222.

In the case of terminal capacitances, where is no voltage/capacitance curve available, the entry of a single value and its measurement voltage will cause the zero-bias value to be calculated according to the Meyer equation, with the default exponent of 0.33.

STARTING THE ITERATION

Along the lower bar of the frame, are two pushbuttons. The one marked "COMPUTE" starts the iteration process. During iteration, the current "best fit" values for the parameters being fitted are displayed in the uppermost four numeric entry boxes.

Clearing The Data

Along the lower bar of the frame, are two pushbuttons. The one marked "CLEAR" clears all X-Y data, both from the numeric entry boxes, and from the internal data structures. This is to save having to backspace over the existing data before entering new numbers. The default starting values are not cleared, in case the user needs a prompt for a typical starting value.

Output

In order to examine the quality of each fit, an ASCII file called "fit.asc", in Berkeley format, is generated after each "FIT" operation, and contains two curves.

One is the original data, as entered by the user, and the other is the prediction of the shape of the curve using the final values of the model parameters generated by the fitting process.

When the user is satisfied with the fit of the curve, and the final values of all the parameters, "WRITE" should be selected from the menubar, which will cause the SPICE .MODEL card to be written to the local file "models".

Main Menu Bar

  • QUIT
  • Exits gracefully.

  • WRITE
  • Appends a .MODEL card into the local file "models". If the file does not exist, it is created. The .MODEL card is that of the currently active device, i.e: that which was last selected from the menu bar.

  • FILEDATA
  • The purpose of this function is to permit the reading in of semiconductor characteristic curves from a file, instead of entering the data manually. First, an appropriate FIT function must have been selected, such that the data entry boxes are displayed.

    The function prompts for a file name, which must be the name of a Berkeley format ASCII file (as used for all Vspice3 utilities), to be entered on the prompt bar.

    The ASCII file is read and the numerical data from the first two columns is entered as X and Y axis data, respectively, into the data structures. Since Vmodel2 only needs 20 data points, only the first 20 are loaded into the internal data structures.

  • DIODE
  • Displays the diode menu. At the present moment, no diode characteristics can be fitted, despite appearances to the contrary.

  • BJT
  • Displays the Bipolar Junction Transistor menu.

    • TRANSISTOR MODEL NAME
    • This must conform to Berkeley SPICE rules. It must not begin with a digit, and must be no more than 8 characters long.

    • NPN or PNP
    • The polarity toggles with each selection, from one to the other.

    • STORAGE TIME
    • This parameter is used to calculate the reverse transit time (tR). It is usually only quoted for switching transistors, and if unavailable, a value of 1.5 / (fT * 2PI) is uaually adequate.

    • Si Sc Ge
    • This selects the device Energy Gap. The display toggles with each selection, from one to the next.

    • SAT VOLTAGE (VCEsat)
    • This value is used to estimate RC and RE, in conjunction with the saturation current (below). If an output characteristic is available, then the value should be taken at a point high up the VC/IC curve, before the non-linearity begins.

    • IC at VCEsat (ICsat)
    • This value is used to estimate RC and RE, in conjunction with the saturation voltage (above). If an output characteristic is available, then the value should be taken at a point high up the VC/IC curve, before the non-linearity begins.

    • MEASURED Vbe
    • From the VBE/IC curve, the device saturation current is estimated, according to the following relationship:

      
                              IS = IC / (exp(Vbe/Vt) - 1)
      

      Its value is used for all the FIT functions. However, it is non-critical, and a pair of Vbe : IC values giving IS = 1E-16 is a good default.

    • IC at this Vbe
    • From the VBE/IC curve, the device saturation current is estimated, according to the following relationship:

      
                              IS = IC / (exp(Vbe/Vt) - 1)
      

      Its value is used for all the FIT functions. However, it is non-critical, and a pair of Vbe : IC values giving IS = 1E-16 is a good default.

    • FIT Cib/VBE
    • The Meyer voltage/capacitance equation is fitted to the user-supplied data, of Cib vs VBE, to calculate the emitter capacitance at zero bias, (CJE).

      Both the exponent (MJE) and the diode voltage (VJE) are calculated to achieve the best fit to the data.

    • FIT Cob/VCE
    • The Meyer voltage/capacitance equation is fitted to the user-supplied data, of Cob vs VCB, to calculate the emitter capacitance at zero bias, (CJC).

      Both the exponent (MJC) and the diode voltage (VJC) are calculated to achieve the best fit to the data.

    • FIT hFE/IC
    • Four parameters may be either simultaneously, or individually fitted to the user-supplied data of hFE vs IC:

      a) IKF High current beta rolloff current

      The starting value for this may be obtained from either the curve of hFE/IC, where it is the current where hFE falls to 0.74 of its peak value, or by taking 0.74 of the current at which the maximum value for hFE is quoted by the manufacturer.

      b) BF Maximum current gain

      This is not equal to hFE, but is a theoretical maximum which would have occurred without low or high current roloff. A good starting value for iteration is 1.5 times the peak hFE value.

      c) ISE Emitter-base diode saturation current

      This parameter, in conjunction with NE, determines the low current rolloff point, according to the relationship:

      
                  IL = IS . (ISE.BF / IS) ^ (NE/(NE-1))
      
      The value of IL is very critically dependent on both NE and ISE.

      d) NF/NE Ratio of emission coefficients of CB/BE diodes

      If NF has not been previously fitted, its value is taken as unity (which is very close to the truth, in most cases).

    • VCE for hFE/IC FIT
    • For small and medium devices, the hFE/IC characteristics are measured at a collector-emitter voltage of around 10 volts. This parameter is always specified, and should be entered here.

    • FIT fT/IC
    • The data entered here should be from the graph of transition frequency vs collector current, AFTER THE PEAK. From this data, we calculate the forward transit time, tF. The parameter tF only affects fT at high frequencies, while at low frequencies, the fall-off of transition frequency is caused by the collector time-constant. This is the reason that only the HF end of the curve should be entered.

      The parameters fitted by this function are TF XTF ITF VTF, which determine the variation of the BJT's transition frequency with collector voltage and current.

      Note that it is preferable to have fitted for IKF before attempting to run this function, since ITF and IKF are related.

    • VCE for fT/IC FIT
    • The value of voltage used for the fT measurements must be entered, as it is related to VTF.

    • FIT VCE/IC
    • Three parameters may be either simultaneously, or individually fitted to the user-supplied data of VCE vs IC. In practise, it has been found that it is better to first fit for VAF and NF and, when these are found, to fix them and fit for ISC.

      It is best not to use a linear X increment when describing the output characteristic. The points of inflection should be sampled quite closely, while the horizontal part of the characteristic is adequately described by, perhaps, three points. The fitting function attempts to extract four parameters which, between them, describe the entire curve. However, the fast-changing parts of the characteristic are more critical to achieve an overall best-fit than the steady parts.

    • VAF Forward Early voltage
    • The value of this parameter may be determined from the slope of the output characteristic. It is numerically equal to the intercept on the voltage axis found by extrapolating the tangent to the horizontal part of the curve beyond zero. Although negative, its value is treated as positive by SPICE, and should be entered as such. The default starting value is unity, but values of between 20 and 200 are more usual.

    • ISC CB diode saturation current
    • This parameter should be fitted after NF and VAF have been determined.

    • NF CB diode emission coefficient
    • The default value of NF is unity, and represents the case where the VC/IC characteristic at low current rises fairly linearly. A value of NF greater than unity will cause the rise to be delayed by a certain voltage.

    • Ib for VCE/IC FIT
    • It is essential to have the correct value for the base current at which the above curve was measured. The default is 400uA, which represents a mid-range value for the transistor in question.

  • JFET
    • JFET MODEL NAME
    • This must conform to Berkeley SPICE rules. It must not begin with a digit, and must be no more than 8 characters long.

    • N or P CHANNEL
    • The polarity toggles with each selection, from one to the other.

    • FWD T/CONDUCTANCE (yFS)
    • This parameter is used to estimate starting values for fitting parameters used internally. The value is non-critical.

    • OUTPUT ADMITTANCE (yOS)
    • This parameter is used to estimate starting values for fitting parameters used internally. The value is non-critical.

    • "ON" VOLTAGE (VDS)
    • This value is used to estimate RD and RS, in conjunction with the "on" current (below). If an output characteristic is available, then the value should be taken at a point high up the VD/ID curve, before the non-linearity begins.

    • "ON" CURRENT" (IDS)
    • This value is used to estimate RD and RS, in conjunction with the "on" voltage (above). If an output characteristic is available, then the value should be taken at a point high up the VD/ID curve, before the non-linearity begins.

    • 1/f NOISE COEFF
    • The entered value is transferred unchanged to the .MODEL card

    • 1/f NOISE EXPONENT
    • The entered value is transferred unchanged to the .MODEL card

    • FIT Ciss
    • The Meyer voltage/capacitance equation is fitted to the user-supplied data, of Ciss vs VGS, to calculate the gate-source capacitance at zero bias, (CGS).

      The diode voltage (PB) is calculated to achieve the best fit to the data, but the exponent is fixed internally by SPICE at 0.5, so this cannot be varied.

      Note that the relationship used to determine the internal capacitances is:

      
                               CGS = Ciss - Crss
                               CGD = Crss
      

      So, for meaningful results, both sets of data should be entered before either is fitted.

    • FIT Crss
    • The Meyer voltage/capacitance equation is fitted to the user-supplied data, of Crss vs VGS, to calculate the gate-drain capacitance at zero bias, (CGD).

      The diode voltage (PB) is calculated to achieve the best fit to the data, but the exponent is fixed internally by SPICE at 0.5, so this cannot be varied.

      Note that the relationship used to determine the internal capacitances is:

      
                               CGS = Ciss - Crss
                               CGD = Crss
      

      So, for meaningful results, both sets of data should be entered before either is fitted.

    • FIT VGS/ID
    • Some data sheets only provide a transfer function, and no output characteristic. This fitting function uses the same equations as that fitting the output characteristic to derive the same parameters.

    • VDS for VGS/ID FIT
    • The value of VDS used when measuring the transfer function should be entered here.

    • FIT VDS/ID
    • It is best not to use a linear X increment when describing the output characteristic. The points of inflection should be sampled quite closely, while the horizontal part of the characteristic is adequately described by, perhaps, three points. The fitting function attempts to extract four parameters which, between them, describe the entire curve. However, the fast-changing parts of the characteristic are more critical to achieve an overall best-fit than the steady parts.

    • VGS for VDS/ID FIT
    • The value of VGS used when measuring the output characteristic should be entered here.

  • MOSFET
    • MOSFET MODEL NAME
    • This must conform to Berkeley SPICE rules. It must not begin with a digit, and must be no more than 8 characters long.

    • N or P CHANNEL
    • The polarity toggles with each selection, from one to the other.

    • FWD T/CONDUCT (gfs) (S)
    • This parameter is used to estimate starting values for fitting parameters used internally. The value is non-critical.

    • DRAIN CURRENT at gfs (A)
    • This parameter is used to estimate starting values for fitting parameters used internally. The value is non-critical.

    • "ON" VOLTAGE (VDS)
    • This value is used to estimate RD and RS, in conjunction with the "on" current (below). If an output characteristic is available, then the value should be taken at a point high up the VD/ID curve, before the non-linearity begins.

    • "ON" CURRENT (ID)
    • This value is used to estimate RD and RS, in conjunction with the "on" voltage (above). If an output characteristic is available, then the value should be taken at a point high up the VD/ID curve, before the non-linearity begins.

    • OUTPUT CAPACITANCE Coss
    • SPICE uses a fixed capacitance for both junction capacitances, so no fitting is performed. However, it frequently happens that a data sheet will quote the junction capacitance at a given value of voltage. This is used, in conjunction with the value, in Meyer's Equation, to back calculate the value at zero bias.

      Since the calculations are performed simultaneously, only one value of voltage will be used for both.

    • INPUT CAPACITANCE Ciss
    • SPICE uses a fixed capacitance for both junction capacitances, so no fitting is performed. However, it frequently happens that a data sheet will quote the junction capacitance at a given value of voltage. This is used, in conjunction with the value, in Meyer's Equation, to back calculate the value at zero bias.

      Since the calculations are performed simultaneously, only one value of voltage will be used for both.

    • F/BACK CAPACITANCE Crss
    • SPICE uses a fixed capacitance for both junction capacitances, so no fitting is performed. However, it frequently happens that a data sheet will quote the junction capacitance at a given value of voltage. This is used, in conjunction with the value, in Meyer's Equation, to back calculate the value at zero bias.

      Since the calculations are performed simultaneously, only one value of voltage will be used for both.

    • CAP MEASURED @ Vds
    • The measurement voltage used for Coss, Ciss and Crss should be entered here.

      Note that the following relationships are used to determine the device's actual capacitances:

                            cgd = crss
                            cgs = ciss - crss
                            cds = coss - crss
      

      So, for meaningful results, there should be a value entered for all three parameters.

    • FIT VGS/ID
    • Some data sheets only provide a transfer function, and no output characteristic. This fitting function uses the same equations as that fitting the output characteristic to derive the same parameters.

    • VDS for VGS/ID FIT
    • It is essential that the correct value be entered here, so that the fit of the output characteristic gives the correct parameters.

    • FIT VDS/ID
    • It is best not to use a linear X increment when describing the output characteristic. The points of inflection should be sampled quite closely, while the horizontal part of the characteristic is adequately described by, perhaps, three points. The fitting function attempts to extract four parameters which, between them, describe the entire curve. However, the fast-changing parts of the characteristic are more critical to achieve an overall best-fit than the steady parts.

    • VGS for VDS/ID FIT
    • It is essential that the correct value be entered here, so that the fit of the output characteristic gives the correct parameters.

BUGS and OMISSIONS

  • Cleared numeric entry boxes contain zeros on refresh
  • Text entered before iteration commences is cleared on refresh.
  • Default data is derived from different semiconductors
  • Note:
    The BJT default data comes from a BC108, 2N22222 and 2N4403. It was chosen to highlight the fitting of a particular parameter, rather than to make a default device. It is likely that the final release will have consistent default data.