In electronics, diode modelling refers to the mathematical models used to approximate the actual behaviour of real diodes to enable calculations and circuit analysis. A diode's I-V curve is nonlinear. A very accurate, but complicated, physical model composes the I-V curve from three exponentials with a slightly different steepness (i.e. ideality factor), which correspond to different recombination mechanisms in the device; at very large and very tiny currents the curve can be continued by linear segments (i.e. resistive behaviour). In a relatively good approximation a diode is modelled by the single-exponential Shockley diode law. This nonlinearity still complicates calculations in circuits involving diodes so even simpler models are often used. This article discusses the modelling of p-n junction diodes, but the techniques may be generalized to other solid state diodes. Large-signal modelling Shockley diode model The Shockley diode equation relates the diode current of a p-n junction diode to the diode voltage . This relationship is the diode I-V characteristic: , where is the saturation current or scale current of the diode (the magnitude of the current that flows for negative in excess of a few , typically 10−12A). The scale current is proportional to the cross-sectional area of the diode. Continuing with the symbols: is the thermal voltage (, about 26 mV at normal temperatures), and is known as the diode ideality factor (for silicon diodes is approximately 1 to 2). When the formula can be simplified to: . This expression is, however, only an approximation of a more complex I-V characteristic. Its applicability is particularly limited in case of ultrashallow junctions, for which better analytical models exist. Diode-resistor circuit example To illustrate the complications in using this law, consider the problem of finding the voltage across the diode in Figure 1. Because the current flowing through the diode is the same as the current throughout the entire circuit, we can lay down another equation. By Kirchhoff's laws, the current flowing in the circuit is . These two equations determine the diode current and the diode voltage. To solve these two equations, we could substitute the current from the second equation into the first equation, and then try to rearrange the resulting equation to get in terms of . A difficulty with this method is that the diode law is nonlinear. Nonetheless, a formula expressing directly in terms of without involving can be obtained using the Lambert W-function ,