# What's the formula for an idealized diode?

How do I mathematically describe the curve of an idealized diode? I want to express the dependency of i and v in one expression. Is it possible?

• How accurate around 0 volts does the current need to be? Sep 22, 2023 at 15:08
• You model a diode to solve a problem. What is your problem? Sep 22, 2023 at 23:31

Here is a set of three relations which, taken together, describe an ideal diode:

$$IV = 0 \qquad I \ge 0 \qquad V \le 0.$$

If you want a single equation describing it, you can use the "max" function, which returns the greater of its two parameters. That equation would be

$$\text{max}(-I, V) = 0.$$

(If the unit mismatch there is unacceptable, then you can multiply $$\I\$$ by an arbitrarily chosen positive resistance.)

How do I mathematically describe the curve of an idealized diode? I want to express the dependency of i and v in one expression. Is it possible?

That is not a function, so hm, color me sceptical.

I like Charles' approach:

$$\i_\gamma(v) = e^{v\cdot\gamma}\$$

because for any finite $$\\gamma\$$, that thing is (easily!) differentiable (and hence can be used for finding optima), and for $$\\gamma \to \infty\$$ (same as Charles' $$\\tau \to 0^+\$$), it describes the idealized diode behaviour.

But that already betrays what I think you could be using this function for (mathematically modelling a circuit to find e.g. the point of maximum power transfer or something).

Point being: this not being a device that exists in reality, one would have to wonder why you're trying to model it! And as soon as you answer that question precisely, the expression for it will jump right at you. No promises that it's going to be a "single expression" (whatever that means). That category is pretty meaningless; for example, only because someone invented the names "sine" and "cosine" can we represent the waveform of a harmonic oscillator in a "single expression", but there's uncountably infinitely many things in nature that we haven't given "simple" names to.

• I like using a ratio for the exponent because then numerator and denominator use the same units, volts in this case. When you use the product of two numbers for the exponent, then they have reciprocal units. Mathematically this is fine, but I find it less intuitive. Sep 22, 2023 at 21:31

It's normally this:

$$\frac{I}{V} = \begin{cases} 0, & \text{V}<0 \\[2ex] \infty, & \text{V}\geq 0 \end{cases}$$

I know this is not a "single expression".

But maybe we can use the Dirac-Delta function directly:

$$\delta_a (x)=\lim_{a\rightarrow 0}\frac{1}{|a| \sqrt\pi} e^{-(x/a)^2}$$

For I-V characteristics of ideal diode, $$\x = V\$$ and $$\\delta(x) = I\$$, so

$$I=\delta(0)$$

This still has some problems. But maybe we can get inspired by the well-known diode equation, and write this:

$$I = \lim_{V\rightarrow0^-}(e^{(\varepsilon/V)}-1)$$

where $$\\varepsilon\$$ is, say, the smallest positive number ($$\\varepsilon\rightarrow 0^+)\$$. Negative finite values of $$\V\$$ will make the current, $$\I\$$, zero because the exponential part will go unity. As the $$\V\$$ approaches zero the current goes infinity.

• ah, small problem: your $\delta_a$ is an impulse, not a "step towards infinite". Sep 22, 2023 at 14:40
• @MarcusMüller I know, with the zero-centred distribution approximation in my answer, the magnitude reaches infinity for $a\rightarrow 0$. But I missed the point of zero-current for $V<0$. Good catch. Sep 22, 2023 at 14:43
• yes, but at a strictly positive voltage, the current's 0 again Sep 22, 2023 at 14:45
• This seems at face value to be incorrect as the ideal diode behaviour is undefined for V>0.
– Frog
Sep 24, 2023 at 19:04
• @Frog if you mean the final equation then no, it is not incorrect because the one-sided limit (approaching 0 from left i.e. $V\rightarrow 0^-)$ already indicates the discontinuity which means the function is undefined and not differentiable for V > 0. Sep 24, 2023 at 20:37

Here's an equation that I believe meets your requirements, but I can't imagine it is very useful for anything.

$$\ i = \displaystyle\lim_{\tau \to 0}e^{v/\tau} \$$

In math there is no numeric formula for your curve if you expect something where the voltage is calculated from the current (and from nothing else) or something where the current is calculated from the voltage (and from nothing else). That's because numeric formulas output a single number, but all positive currents are valid for V=0. Respectively all negative voltages are valid for current = 0.

You need a formula which allows certain voltage and current pairs as plane coordinates and deny the rest. The allowed points are the negative V-axis, (0,0) and the positive I-axis.

Math formalism contains ways to present such coordinate pairs. One way is to say that the result contains all pairs (V,I) which are got by letting t vary through all real number values and for t less than zero V=t and I=0, for t greater than or equal with zero V=0 and I=t.

Could this be presented as a single expression? Of course it could. It already is one - you must only allow vector valued expressions, a free variable which is defined by giving more constraints elsewhere and using "if-then-else" in calculations.

The free variable is t which can get any real number value. Deciding which value is the actually used t is not defined in this formula which only tells the allowed pairs (V,I). Other conditions should be given. In electronics the circuit around the diode is that extra condition which restricts the actually possible (V,I).

About versions which use infinity or the limit where a parameter approaches the infinity: They skip totally what the diode does (allow certain (V,I) pairs and deny the rest) and try to present I = infinite (that's not a number) if V>0, I=something when V=0 and I=0 when V<0.

Someone may defend himself by pulling the delta function which he says to be infinite at t=0, so infinity can be successfully used as a number. It's not. The delta function alone cannot be defined properly, only its effect in integrations can be defined as the limit of the integration results where a peak with a certain area in the integrand grows with no limit. That doesn't stop people to write all kind of limit expressions for the delta itself. The habit to use infinity (and its inverse) as a number was common even among mathematicians before top notch guys like Gauss, Cauchy, Weierstrass and some others succeeded to stop such nonsense in 1800s. I admit that working with the delta function can be ordered to a logical state as an algebra i.e as a game of symbols. There the delta isn't anything which has numeric values.

Maybe something like this:

$$\ i = \displaystyle\lim_{\tau \to 0}( \frac{1+ \tanh(v/\tau)}{\tau}) \$$

For $$\\tau \gt 0\$$ it is continuously differentiable, which is sometimes useful.

• Continuously differential is useful at times. Better that way than the Weierstrass function, anyway! ;) Sep 22, 2023 at 17:57

Take a number like $$\10^{24}\$$ and raise it to a big power that is dependent on input voltage. Then I divided by 1 million.

$$I_{DIODE} = \dfrac{(10^{24})^{\left(20\times V_{DIODE} + 0.2\right)}}{1000000}$$

Result in excel: -

Voltage along the X-axis and current in the Y-axis. Whether this is accurate enough I have no idea.

• he, but that's simply the $e^{\gamma v}$ approach by another name! Sep 22, 2023 at 16:17
• I didn't use $e^{???}$ and you also didn't make that remark to Rohat. I like to be practical and try things out so, that's the USP of my answer (also no symbols harmed or abused in my answer). TBH I had no idea what the $e^{???}$ answers were getting at so, not guilty on plagiarism of other answers @MarcusMüller however, I didn't make an answer out of congratulating another answer and making a meal of it ;>) Sep 22, 2023 at 16:27
• Fair enough :) The core of my answer was "It depends on what you are modelling for", though :) Sep 22, 2023 at 16:33

You can approximate it, but I think the real issue is that, as Marcus points out, that curve is not a "function" at all. For a relation like $$\y = f(x)\$$ to be a function, each value of $$\x\$$ must be mapped to one and only one value of $$\y\$$.

There are two functions we could try to define for an ideal diode with $$\-\infty \lt V \le 0\$$ and $$\0 \le I \lt \infty\$$:

$$I = f(V)$$ $$V = f(I)$$

$$\I\$$ can't be a function of $$\V\$$ because when $$\V = 0\$$, $$\I\$$ can have any value. Likewise, $$\V\$$ can't be a function of $$\I\$$, because when $$\I = 0\$$, $$\V\$$ can have any value.

I'm not a mathematician, but I suspect the underlying problem is that $$\I\$$ and $$\V\$$ never vary at the same time. Either $$\V\$$ is constant or $$\I\$$ is constant. To have a function (or even a relation) you need two variables.

If you think of this in terms of circuit theory, it makes sense. The whole point of an ideal diode is to not do any calculating at all. If the diode is on, it's a short circuit, which means the two nodes it's connected to are actually the same node. If the diode is off, it's an open circuit, which means it effectively doesn't exist. We don't normally think of opens and short as having I-V curves either.

Shockley diode equation: https://en.wikipedia.org/wiki/Shockley_diode_equation

$$I_D = I_S \left( e^\frac{V_D}{kT/q} -1 \right)$$

Horowitz and Hill's "The Art of Electronics" is a good book for reading such things.