IV.33 - Diode Modeling?
This section was contributed by Steve Scott (sscott@vieng.com) at V I Engineering, a company which provides (among other things) modeling and simulation services.
Introduction to Diode Modeling
This FAQ discusses some basic concepts of diode modeling and illustrates some of the pitfalls of conventional diode modeling techniques. It's not meant to be comprehensive or rigorous, just an introduction.
There are generally two classes of silicon diode models. The first consists of a set of equations that directly define a diode's terminal characteristics. This type of model is primarily used by circuit designers in circuit simulations where the diode is only one of many electronic components.
The second type of model is based on a physical description of the diode design including diffusion geometries, doping profiles, lifetime profiles, etc. The basic equations of semiconductor physics are solved in one, two, or three dimensions. This type of model can be of great value to device designers but is typically slower and usually not appropriate for larger circuits or simulations that span a large number of switching cycles.
Most design engineers are more interested in the first kind of model. Often they just want to know how a particular component will behave in a circuit, rather than being interested in device physics or the diode design. In addition, the detailed diode design information needed to define a rigorous physics-based model is usually not available to system designers.
This FAQ won't get into the question of what kind of model is 'best'. In fact, they both have their uses. But since most designers need circuit simulation models, we'll discuss only those types of models.
A variety of techniques have been developed to predict the behavior of diodes in circuits. The most commonly used model is the SPICE model. While the SPICE model has been very successful in many ways, it can also yield disastrously unrealistic results in some practical applications. Circuit designers must take care to avoid being misled by simulation results when simplified diode models such as the standard SPICE model are used.
SPICE DC Current Basics
Diode models include formulas to calculate steady-state current vs. voltage (I-V characteristics), and charge storage within the diode (typically, a nonlinear capacitance vs. applied voltage).
Steady state current can usually be modeled fairly well using the classical SPICE formulas. In its basic form, it says that the DC component of current increases roughly exponentially with forward voltage:
Iak = Is*{exp[Vak/(n*vt)] - 1}
where Iak is the diode's anode-to-cathode current, Vak is the applied anode-to-cathode voltage (with the drop across any series resistance subtracted), Is the diode's saturation current parameter, vt = k*T/q is the thermal voltage (equal to about 26 millivolts at room temperature), where k is Boltzmann's constant and T is the temperature, and n is an 'emission coefficient' having a value of about one or two.
Note that Iak represents the total diode current only during steady state conditions. When bias conditions are changing there is another contributor to the total current: the charging or discharging of the diode's capacitance (described shortly).
The model also includes a series resistance, usually called 'RS', which can be very useful in matching a diode's DC characteristics.
Many models also have a variety of parameters to describe avalanche breakdown current, special high current effects, temperature coefficients, etc. We won't cover these here.
Typically, the SPICE model formulation is adequate to obtain reasonably good fits for STEADY STATE (DC) measured data. Deciding on parameter values can, however, be a bit tricky since some automated curve-fitting programs have trouble fitting exponential functions. Sometimes it's actually more convenient or accurate to choose parameters 'by hand' (using the human brain) rather than rely on a computer algorithm. But that depends on what parameter extraction software you use.
SPICE Charge Storage Basics
Another important characteristic of diodes is charge storage. This is modeled in SPICE as a voltage-dependent capacitance.
There are two components to the charge stored in a diode. The first is due to the 'fixed' (not mobile) charge of ionized dopant atoms in the device. The amount of this charge depends on the applied bias Vak since the size of the depletion region (the region where dopant atoms are ionized) varies with voltage. The SPICE model uses the following formula to calculate this charge:
Cdepl = CJO/{[1 - Vak/VJ]**MJ}
Where Cdepl is the component of capacitance due to fixed charge, CJO is the zero-bias capacitance, VJ is the "junction potential' parameter, and MJ is the "junction gradient coefficient". VJ will typically have a value of about one volt while MJ will have a fractional value of about ½. Because this capacitance varies considerably with applied reverse bias, diodes can be used as voltage-dependent capacitors (or varactors) for such purposes as tuning RF circuits.
The equation above isn't exactly correct; diode models actually include terms that prevent Cdepl from 'blowing up' when Vak approaches Vj during forward bias. This usually isn't a big issue so we'll ignore it.
Note that Cdepl is a differential capacitance; that is, it is defined as
Cdepl = dQdepl/dVak
where Qdepl is the stored charge due to ionized atoms. This is NOT the same as Qdepl/Vak, which is sometimes the definition of capacitance used by physicists or others. In order to calculate the charge Qdepl, the formula for differential capacitance Cdepl must be integrated over Vak.
The other component of stored charge in a diode is due to mobile or 'injected' carriers. During forward bias (and immediately afterward) this charge can be much larger than the depletion charge Qdepl since the density of injected carriers (electrons and holes) in the middle of a diode may be much larger than the density of ionized dopant atoms there. In fact, it is this mobile charge that usually causes 'reverse recovery' effects. More about that in a minute.
In the SPICE model this charge is assumed to be proportional to the forward steady-state current term, or
Qinj = TT*Iak
where Iak is given by the voltage-dependent formula above and TT is a parameter having units of time called the "transit time". The differential mobile charge capacitance Cinj can be calculated as above by taking the derivative of Qinj with respect to Vak.
This charge storage is just a nonlinear voltage-dependent capacitance. When the formula for Iak is plugged into the equation for Qinj, it is evident that the time variation of this charge depends only on the instantaneous value of the applied voltage Vak:
Qinj = TT* Is*{exp[Vak/(n*vt)] - 1}
This charge is zero at zero bias, large in forward bias, and small in reverse bias (just like the DC current term Iak!). Physically, the parameter "TT" depends on the size of the diode, the 'lifetime' of carriers in the diode (which can vary with processing, dopants, current level, radiation treatments, etc.), and other design characteristics.
The total stored charge is just the sum of the two charge components Qdepl and Qinj. Similarly, the total differential capacitance is just the sum of the two capacitances Cdepl and Cinj.
Reverse Recovery
Here's why the charge storage described above can be significant:
The term 'reverse recovery' refers to a delay in turn-off (i.e., the transition to a high resistance) of a diode when the current through it is reversed from the forward direction to the reverse direction. This delay is mostly the result of the injected stored charge Qinj mentioned above (since the depletion charge is usually much smaller).
This phenomenon can be significant in many real electronic applications ranging from power electronics to RF circuits. The plots below show measured current and voltage during a typical reverse recovery event. (Note: the voltage is a bit inaccurate due to some parasitic effects in the test setup.)

There are several interesting features of this data. Firstly, note that even when the current through the diode becomes negative (reverse current), the voltage across the diode initially remains positive. This is because the test circuit must discharge some stored charge before the diode voltage can be reversed.
Also, note that the reverse current begins to decrease (rapidly) when the forward voltage drops to zero. This roughly agrees with the prediction of the SPICE model, since its stored mobile charge Qinj essentially disappears when the applied voltage reaches zero.
But, finally, note that the reverse current does not instantaneously drop to zero when the diode voltage goes negative. Instead, it decreases somewhat gradually in a 'tail' that lasts for 100-200 nsec. This is often referred to as 'soft' reverse recovery.
This latter observation is important because it points out a significant shortcoming in the traditional SPICE model. From the equation for Qinj above, we see that the SPICE model's stored charge disappears when the applied voltage becomes negative. So where is the decaying reverse current 'tail' (after 200 nsec) coming from? According to the SPICE equations there should be no steady-state reverse current 'Iak' AND no stored charge remaining during this time!
What's Wrong With the SPICE Charge Storage Model?
The answer is that the traditional SPICE charge storage model is seriously deficient. Here's a seat-of-the-pants explanation:
The real problem is that the SPICE model does not incorporate the concept of an actual 'transit time' for electron and hole carriers inside the diode. In fact, the term 'transit time' used to describe the SPICE parameter 'TT' is a very unfortunate and very misleading misnomer. While 'TT' does have units of time, it does NOT describe the time required for carriers to physically traverse the length of the diode!
The usual interpretation of the phrase 'transit time' is that it refers to a finite amount of time needed for something (electrons and holes in this case) to travel a finite distance at a finite velocity (from the middle of the diode to the external terminals, here). But the SPICE model does not include such a concept!
We can clearly see this from the equation for Qinj. The stored injected charge Qinj is an INSTANTANEOUS function of the applied voltage. If you transition from a forward voltage bias to a reverse bias within one picosecond, the stored charge in the SPICE diode model will be discharged in one picosecond. If you reverse the applied voltage in one femtosecond, the stored charge will disappear in one femtosecond, etc. There is obviously no minimum time required for carriers to traverse a finite distance at a finite velocity in this SPICE model!
In other words, the SPICE diode model is very much like an ideal capacitor. If you put a screwdriver across the terminals of an ideal capacitor, sparks will fly and you will discharge it immediately (please don't bring realistic limitations such as series inductance, etc., into this illustration, they're not really relevant to the basic argument). It is both appropriate and very helpful to think of the SPICE diode charge model as an ideal capacitor having a nonlinear voltage dependence.
Just to reiterate, even when the applied diode voltage reverses, real diode reverse current does not drop to zeroINSTANTANEOUSLY, but instead, decreases more gradually. This is NOT an effect that can be obtained using the traditional SPICE model!
So Who Cares About the Esoteric Details of Diode Charge Models?
Maybe YOU should!. The predictions obtained from standard SPICE models can be very wrong and very misleading (or, maybe not, depending on a particular diode's charge storage characteristics!).
Let's take a look at results from a reverse recovery simulation that uses the standard SPICE model. Below are the calculated diode current and voltage waveforms corresponding to the measured device data above. This model includes accurate forward I-V and depletion capacitance characteristics, plus a non-zero TT parameter. Compare to the measured data above. There isn't reasonable agreement!

During the forward conduction and negative-going current ramp the SPICE-model simulation looks OK.
But as soon as the diode voltage reaches zero (at about 200 nsec) the SPICE model's stored charge suddenly is depleted and the reverse current stops almost instantaneously. The diode and test circuit contain some parasitic series inductance (very little, but not zero). The large dI/dt due to the diode model's sudden shutoff causes a large voltage spike across this inductance. This inductor and the diode's reverse depletion capacitance form a tank circuit that then rings wildly. The diode current swings positive, then negative, the diode then runs out of stored charge, and the whole thing starts over again (with a bit of energy loss every time). It isn't anything like the actual test results!
The maximum reverse voltage from the measured data is about 9 volts. The maximum reverse voltage in the simulation is over 200 volts. If you're relying on your simulation to provide accurate results, you're obviously in big trouble! Do you order a 10 volt diode or a 250 volt one?
Besides the vast differences in the current and voltage results, there is also another issue that should be considered. The power dissipated in a diode during reverse recovery can differ greatly between real circuit results and the SPICE model simulation.
Take a look at the measured power (V x I) below. Notice the large spike in power during the dying tail current. This occurs because, during the tail (which the SPICE model does not predict!), both the reverse current AND the reverse voltage can simultaneously be large. Keep in mind that, for this test setup, the final reverse voltage was limited to a small value by the test circuit (about 4 volts). Much larger reverse recovery power spikes can occur in higher voltage circuits! This can be of special concern, for example, in very high frequency power converters. (By the way, everything that I'm saying here about diodes translates fairly directly to the intrinsic 'body' diodes of power MOSFETs, to IGBTs, to SCRs, to GTOs, etc.).

Even More Esoteric Stuff - 'Forward Recovery'
If you don't use really high voltage diodes in your designs (a few hundred volts or above), you probably don't need to read this section.
It turns out that there is another 2nd-order effect that is occasionally significant and is not contained in the standard SPICE model. It is called 'forward recovery' and refers to a short delay in the turn-on of a diode when bias is suddenly changed from a reverse direction (or zero) to the forward direction.
This turn-on delay occurs because in the initial 'off' state the series resistance of the undepleted middle region of the diode (especially for 'P-I-N' diodes) can be quite large. This high resistance is reduced greatly as soon as a significant number of electrons and holes move into the high resistance region through diffusion and drift. But this takes a little time (and charging current of course). The result is that the diode seems to turn on a bit slowly, instead of instantaneously (as the SPICE model predicts).
This effect is usually significant only for very high voltage diodes because the doping of their middle regions must be particularly low in order to achieve a high avalanche breakdown voltage. In addition, their minimum middle region length must be longer. These factors can make the initial turn-on resistance of some very high voltage diodes quite large.
An example of a problem this might cause is if a 1000 volt diode is being used in a high voltage circuit as a clamp diode to protect some other device. If the voltage across the protected device rises very quickly, the slow turn-on of a clamp diode can result in the voltage across the protected device rising higher than desired, if only for a short time.
It should be noted that the effects of forward recovery are very similar to the effects caused by series inductance. They are not, however , the same. Either one can delay the turn-on of a diode. It can sometimes require considerable investigation to determine how much each effect is contributing to slow turn-on.
Are There Any Fixes for SPICE's Charge Model Problems?
Fortunately, a variety of techniques have been developed to improve diode models - but they're not always easy to find, understand, or use.
The Saber simulator from Analogy, for example, uses its analog hardware description language MAST to create an improved diode model that includes soft reverse recovery effects. Equation-based models have also been developed at schools such as the University of Washington, University of California at Berkeley, etc.
The company I work for (V I Engineering) has also developed a SPICE-compatible model that gives very similar results. It uses a subcircuit approach to add the missing charge storage effects to the basic SPICE model. Below is a comparison of measured and simulated reverse recovery current when using this model. The measured current is red and the simulation results are blue. Note that this model, which includes soft reverse recovery (and forward recovery) effects, yields MUCH more realistic results than the basic SPICE model.

I prefer the SPICE-compatible model because it doesn't require a particular proprietary simulation program; most analog circuit simulators are compatible with the basic SPICE models it uses. Thus it's easily portable.
A Few Words About Reverse Recovery Characterization
Unfortunately, manufacturers' spec sheets do not usually include enough detailed information with which to create a realistic model. Additional measurements must usually be done.
Probably the most badly needed data is information on soft recovery characteristics. Some diodes have very long reverse recovery tails ('soft' recovery diodes), some have moderate ones (like the example shown here), and some have almost no measurable tails at all (these are sometimes called snap-recovery or fast recovery diodes, which behave pretty much like the traditional SPICE model and have interesting uses in RF circuits).
Because reverse recovery effects typically die out fairly quickly (usually not more than a few microseconds and possibly as low as nanoseconds) it is necessary to use considerable care in designing an appropriate characterization system.
In the traditional method for measuring reverse recovery, an inductor and a resistor are placed in series with the diode to be tested and a step-function voltage source applied to the series combination. Initially a forward bias is applied to the diode so that forward current occurs. Then the voltage is abruptly reversed. The series inductance causes the diode current to move in the negative direction at a roughly linear rate.
This method yields easily obtained and adequate results IF YOU DO NOT WISH TO INCLUDE SOFT RECOVERY EFFECTS IN YOUR MODEL. It is also argued that this is the most logical way to characterize diodes since most actual applications (for example, in power conversion) also include significant series inductance, usually as a part of the design.
However, if you wish to characterize the soft recovery tail, this kind of test setup can make characterization difficult or impossible. The problem is that the larger the inductance placed in series with the diode, the more the diode voltage and current will 'ring' when it begins to turn off. The tank circuit consisting of the test circuit's series inductance and the diode's reverse depletion capacitance just naturally want to oscillate. This oscillation can totally obscure the smoothly decaying current tail of a diode exhibiting soft recovery.
In fact, it can look something like the results shown above for the traditional SPICE model simulation results (with large voltage and current spikes, but not usually as bad).
By reducing the test circuit series inductance to an absolute minimum ringing can be reduced. The lower the series inductance is, the less series resistance it takes to achieve critical damping of the parasitic tank circuit so that the soft recovery tail can be accurately observed. Even if a smaller series inductance is insufficient to completely eliminate ringing, the ringing will be smaller in magnitude and die out quicker if the series inductance is smaller.
This is one case where it's usually a BAD idea to characterize a device under conditions similar to those it experiences in actual applications!
By the way, the measured data shown on these pages was obtained using a special test circuit that employs active transistor control to create the roughly linear negative-going ramp in diode current. The results LOOK LIKE those that might have been obtained from a higher inductance test circuit, but the inductance in this circuit was very small. This allowed the smooth decaying tail current to be visible without being obscured by ringing.
Summary
Simulation of circuitry including diodes can be risky if conventional diode models are employed. But if care and common sense are used, there are ways to achieve extremely reliable simulation results.
Please don't give up on simulation if it gives you a bad result. Instead, I hope you will decide that it is worthwhile to take the effort to improve your models' accuracy and believability to the point where you CAN trust them, and thus gain great technical and economic benefits. Simulation can be an incredibly valuable design tool!
The old adage about software, "Garbage in, garbage out", is just as true for analog simulation. In order to achieve believable results, models MUST incorporate appropriate and adequate features.
- Steve Scott
V I Engineering