16
\$\begingroup\$

If I understand correctly:

  1. The resistance of some circuit components (like diodes) depends on the voltage across them.
  2. When two components are connected in series: \$\frac{V1}{V2} = \frac{R1}{R2}\$

In order to calculate the voltage across such a component I need to know its resistance, but in order to know that I need to know the voltage across it. Sounds like the chicken and the egg. Did I understand something incorrectly?

schematic

simulate this circuit – Schematic created using CircuitLab

Any help would be really welcome, because this question is not letting me sleep.

\$\endgroup\$
4
  • 21
    \$\begingroup\$ You have discovered non-linear circuits, many of the problem solving methods you learned for linear circuits won't work. However, there are many methods to solve non-linear problems. If you give a specific example, someone will help. \$\endgroup\$
    – Mattman944
    Commented Mar 5, 2023 at 18:52
  • 9
    \$\begingroup\$ There is no chicken and egg problem here, but since the diode is nonlinear the simple approach you might take for a resistor will not work. A common approach is to solve the problem iteratively: start with a reasonable guess for the diode, solve for the resistor, then use the value for the resistor to update the diode, etc until you get close enough to the exact solution. \$\endgroup\$ Commented Mar 5, 2023 at 18:52
  • 2
    \$\begingroup\$ V1/V2 = R1/R2 is a formula for resistors. \$\endgroup\$
    – user20574
    Commented Mar 6, 2023 at 12:16
  • \$\begingroup\$ Wait until you discover en.wikipedia.org/wiki/Metastability_(electronics) 😱 \$\endgroup\$ Commented Mar 7, 2023 at 6:19

5 Answers 5

20
\$\begingroup\$

Components that are time-invariant but not necessarily linear are characterized by an I-V curve, that is a graph that shows how much current they will pass for a given voltage (or vice versa). An ideal resistor has an I-V curve that's a straight line through the origin, so V/I = dV/dI = R everywhere, and we can call R "the resistance". For everything else, there is no "the resistance", but we can learn things from the I-V curve. For the kinds of components where it makes sense, you will probably be able to find the curve in a datasheet.

For your example of an LED in series with a resistor, there are a couple things we can do.

For a resistor of known value, we can take the I-V curves for the LED and the resistor, and "add them horizontally" (that is, plot a new point at the sum of the V values for each I, since they're in series; if they were in parallel we would add "vertically" by summing the Is for each V). Then we could find where that new curve crossed 3V to get the current through the whole circuit, and then get the voltage dropped by the LED and the resistor individually by looking at their I-V curves.

The "load line" method in Mattman944's answer is basically just a nomogram that simplifies this technique for the case of a single series resistor by plotting things differently so that a single intersection point gives you the answer directly (which is very nice for calculating on paper), but the basic principle is more general.

But I see that "R1 = ?Ω" in your schematic, which indicates that maybe the question is more like "I want to pass 30mA through this LED; what value should I choose for the series resistor?" In that case, you look at the I-V curve for your LED and you find that it drops (for example) 1.8V at 30mA; since your supply is 3V, the resistor must be dropping 1.2V, and you can easily figure that its value must be 40 ohms.

But then you might wonder: "how does my LED intensity change with supply voltage variation?" Now that you have your 40Ω value, you can go back to step 1 and make yourself an I-V curve for the series circuit, plot it for voltages of interest, and find out exactly how things will behave. At no point is it really useful to calculate "the resistance of the LED".

\$\endgroup\$
23
\$\begingroup\$

Here are some methods to solve a problem like this. But first, you need more information for it to be solveable. Sometimes you know the resistor value and want to know the current. Other times you want to know what resitor value will give you the current you want.

Methods:

  1. Trial and error. Guess an answer, adjust until it fits.
  2. Load Line.

enter image description here https://en.wikipedia.org/wiki/Load_line_(electronics)

  1. Simulator (which will probably use #1).
  2. Mathematically, if you have an equation for the diode I-V curve. However, unless you are a math professor, this usually only works for the simplest of circuits.
\$\endgroup\$
4
\$\begingroup\$

I'm not real sure about the exact aim of your question, but this answer will be a little bit beside it anyway, so it doesn't matter too much.

I'd like to answer about solvability in general.

To solve a circuit, we generally have a system of simultaneous equations: one equation for each node (or loop) in the circuit, and expressions for the current flows (or voltages in common) between them. When the circuit is linear, the coefficients are fixed, and linear algebra (a formalization of simultaneous equations) gives a simple solution: matrix inversion.

When the elements are nonlinear, obviously linear algebra is no longer applicable, and we'll have to figure it out some other way.

For the R-D circuit shown, we can assume a relation like the Shockley equation,

$$ I = I_s \left[ \exp \left( {\frac{V_F}{n V_{T}}} \right) - 1 \right] $$

where \$I\$ is diode current, \$I_s\$ is the saturation current, \$V_F\$ the forward voltage, \$V_{T} = \frac{k_B T}{e}\$ the thermal voltage (about 26mV at room temperature), and \$n\$ the emission coefficient (typically ~2 for rectifiers). (In general, \$I_s\$ varies with temperature, a bit more slowly.)

If we plug this into the node equations, we have:

schematic

simulate this circuit – Schematic created using CircuitLab

At the V2 node,

$$ \frac{(V_1 - V_2)}{R_1} - I_s \left[ \exp \left( {\frac{(V_2 - 0)}{n V_{T}}} \right) - 1 \right] = 0 $$

We get an expression for V2 in terms of V1, as we expect. But \$V_2\$ appears on both sides of the exponential; we cannot reduce this equation further.

This is called a transcendental function. It has no analytical, closed-form solution; like some algebraic numbers are only representable as the solution to a given equation, so too we have some transcendental numbers only representable by equations such as these.

Fortunately, as engineers, we aren't concerned about exact (and anyway unknowable) numbers; these equations are generally solved easily by numerical methods, for which the value converges quickly.

If we take some typical values \$I_s\$ = 1nA, \$V_T\$ = 26mV, \$n\$ = 2, \$V_1\$ = 5V and \$R_1\$ = 1kΩ, we can solve for \$V_1\$ in terms of all these (and itself inside the exponential), and feed it into itself and see if it converges. Or if it diverges, we can invert the equation and try again (in terms of variables and the logarithm of itself).

Then we'll have, $$ V_2 = R_1 I_s + V_1 + \left( - R_1 I_s \right) \exp \left( \frac{1}{n V_T} V_2 \right) $$ which notice has the form \$x = a + b e^{c x}\$, with \$a = R_1 I_s + V_1\$, \$b = -R_1 I_s\$ and \$c = \frac{1}{n V_T}\$. This type of transcendental function can be solved in terms of the Lambert W function (which is itself transcendental of course, but we only need to solve for its general case to also solve any particular equation like this).

If we iterate, we get this:

This is easy to do right in ones' [desktop] browser, by the way, so I'm using Javascript to do this a little faster.

function v2(v) { var R1 = 1000, Is = 1e-9, V1 = 5, n = 2, Vt = 0.026;
    return R1 * Is + V1 - R1 * Is * Math.exp(v / (n * Vt)); }

v2(.8)
> 0.19765366429140485
v2($_)
> 4.999956252659821
v2($_)
> -5.737456800804937e+35
v2($_)
> 5.000001
v2($_)
> -5.74239615516765e+35
v2($_)
> 5.000001

Oh dear, it diverged, and produces alternating absurd values. Well, clearly the exp form was the incorrect choice; let's invert it and try the log form:

$$ V_2 = n V_T \ln \frac{V_1 + R_1 I_s - V_2}{R_1 I_s} $$

function v2(v) {var R1 = 1000, Is = 1e-9, V1 = 5, n = 2, Vt = 0.026;
    return n * Vt * Math.log((V1 + R1 * Is - v) / (R1 * Is)); }

v2(1)
> 0.7904938687923749
v2($_)
> 0.7931485186473244
v2($_)
> 0.7931157154394317
v2($_)
> 0.7931161209112584
v2($_)
> 0.793116115899347
v2($_)
> 0.7931161159612977
v2($_)
> 0.793116115960532
v2($_)
> 0.7931161159605414
v2($_)
> 0.7931161159605413
v2($_)
> 0.7931161159605413

Which you can see converges quickly to a useful value, and within numerical accuracy (JS uses double precision) in only nine iterations. So that's not very painful.

As for the Lambert solution, Wolfram Alpha provides a convenient means to test:
-10^-6 - 0.052LambertW(-5.000001/0.052e^(-5.000001*10^-6)) - Wolfram Alpha
but I get a complex value. I probably made a transcription error somewhere...

Anyway, even more general methods are used by circuit simulators, which might not even have a symbolic representation of the device (i.e., the number falls out of a computer function call, not provided as symbols in an equation). In that case, maybe a derivative is available (the slope of the equation at the given values), maybe it has to be calculated as well (sampling nearby points and taking their slope). This then computes an approximation, which is iterated until the desired accuracy is reached.

These methods are rather complex to approach as a beginner — suffice it to say, where nonlinearity goes, solutions follow with arbitrary complexity. We can, after all, compute arbitrary functions with systems of equations — they are Turing complete. The best we can do is apply unlimited cleverness to try and reduce the problem, or brute-force it by taking tiny steps of crude approximations. As it happens, both are effective.

So, be thankful when you have only a linear system in your homework, I guess!


tl;dr: You can't solve that kind of system as resistors — but there may still be ways to approach it. In general, nonlinear systems need not have a complete solution, but we can still make useful approximations to work with them.

\$\endgroup\$
1
  • \$\begingroup\$ I notice that my WP-34s calculator has the Lambert W function. You can't get those calculators any more, but you can download an emulator that runs on a PC or iPhone. Highly recommended. \$\endgroup\$ Commented Mar 9, 2023 at 19:38
1
\$\begingroup\$

The resistance of some circuit components (like diodes) depends on the voltage across them.

A more practical model is: The current through each circuit element depends on the voltage across it.

  • For resistors, the relation is I = U / R, where R is the resistance.

  • For capacitors, I = C · dU/dT, where C is the capacitance.

  • For diodes, a common approximation has form I = s · (exp(U / f) - 1), where s and f depend on diode model.

Calculating using the resistance is only useful for resistors, for other components it is more straightforward to calculate the current directly. In circuit analysis, the Kirchhoff's laws are concerned only with currents and voltages.

\$\endgroup\$
1
  • \$\begingroup\$ The notion of "resistance" may be useful not just for resistors, but for devices that behave, in the scenarios of interest, like a resistor in series with a voltage source or in parallel with a current source. \$\endgroup\$
    – supercat
    Commented Mar 8, 2023 at 19:44
0
\$\begingroup\$

If you have an equation, one simple way is to do a search. Say you want to know the voltage across a diode at 1mA. The equation is perhaps far too complex to solve in closed form (maybe it's a polynomial correction factor on top of an ugly exponential function).

So let's say you know the voltage across a diode at 1mA will be somewhere between 0 and 2V. The exact limits are not too important, as you will see, just that they bracket the answer. You also know that the current increases monotonically with voltage.

So you set VL = 0V and VH = 2V, then calculate the current at V= (VL+VH)/2. If that current is < 1mA you know the answer lies in the interval 0..(VL+VH)/2 so you set VH = V. If it is < 1mA you set VL = V. Then repeat.

Each time you iterate you halve the interval in terms of voltage, so you gain 1 bit of accuracy. To get an answer good to 0.1% of the initial interval (2mV in this case) you need to iterate 10 times. Iterate 20x and you're in ppm territory.

Note that this does not tell you about the accuracy in terms of current. That depends on the local slope of the I/V curve. Since you are evaluating it for each iteration, you do know the error however.

If you're very unsure and start with a huge bracket it takes a few more iterations to get to the same accuracy. If the result turns out to be right at the edge of the initial bracket, that's a sign that your initial numbers did not bracket the correct answer (but you'd probably check by evaluating them first at the margins).


There are faster ways that take advantage of slopes to minimize the number of evaluations of the function, however for many practical purposes this works very well.

Note the monotonic requirement- if the part has a 'Esaki diode'-like curve that is not monotonic you would find only one of the possible two solutions.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.