# Finding the mathematical function that describes voltage across diode and resistor circuit

I have the following circuit:

simulate this circuit – Schematic created using CircuitLab

Where $$\\text{V}_\text{i}\left(t\right)=\hat{\text{u}}\sin\left(\omega t+\varphi\right)\$$ and the relation between the current through and voltage across the diode is given by the Shockley diode equation:

$$\text{I}_\text{D}=\text{I}_\text{S}\left(\exp\left(\frac{\text{q}\text{V}_\text{D}}{\eta\text{k}\text{T}}\right)-1\right)\tag2$$

Question: What is the mathematical function that describes the voltage $$\\text{V}_1\$$ using Ohm's law and the Shockley diode equation?

• This is a few lines that asks for mountains of effort in reply. The site is not for free personal tutoring. Please edit your question and detail you already know, show all that you have discovered for yourself on the subject. Feb 2 at 14:02
• $I_D = \dfrac{V_1}{R_1}$ sounds like a good place to start. Feb 2 at 14:07
• This is a nonlinear circuit so you can use iteration (numerical solution) or you could try to use the Lambert W function. Is this what you want?
– G36
Feb 2 at 14:57
• – G36
Feb 2 at 15:08
• @JanEerland Don't know if this helps, or not. Might be. From the diode current you can use that to multiply by the external resistance and subtract from the supply voltage to find the diode voltage, for example.
– jonk
Feb 2 at 17:31

## 1 Answer

It is given that

$$\V_i=u\sin(\omega t +\varphi)\$$ and $$\I_D=I_S \left[ \exp \left( \frac{qV_D}{\eta k T} \right)-1 \right]\$$

From the circuit, we can say: $$\V_1 = V_i-V_D\$$ and $$\I_D=\frac{V_1}{R_1}\$$

So, we get:

$$\\frac{V_1}{R_1}=I_S \left[ \exp \left( \frac{qV_D}{\eta k T} \right)-1 \right]\$$

$$\\Rightarrow \frac{V_1}{R_1I_S}= \exp \left( \frac{qV_D}{\eta k T} \right)-1\$$

Defining $$\C_1 := \frac{1}{R_1I_S}\$$ and $$\C_2:=\frac{q}{\eta k T}\$$, we get

$$\C_1V_1= \exp \left( C_2V_D \right)-1\$$

$$\\Rightarrow \frac{V_1}{C_1}+1=\exp(C_2V_D)\$$ $$\\Rightarrow \ln \left( \frac{V_1}{C_1}+1 \right)=C_2V_D\$$ $$\\Rightarrow V_D = \frac{1}{C_2} \ln \left( \frac{V_1}{C_1}+1 \right)\$$

Hence voltage relation can be re-written as:

$$\V_1 = V_i - \frac{1}{C_2} \ln \left( \frac{V_1}{C_1}+1 \right)\$$

$$\\Rightarrow C_2V_1 = C_2V_i - \ln \left( \frac{V_1}{C_1}+1 \right)\$$

$$\\Rightarrow \ln \left( \frac{V_1}{C_1}+1 \right) = C_2V_i - C_2V_1 \$$

$$\\Rightarrow \frac{V_1}{C_1}+1 = \exp \left( C_2V_i - C_2V_1 \right) \$$

$$\\Rightarrow \frac{V_1}{C_1}+1 = \exp \left( C_2V_i \right) \exp \left(- C_2V_1 \right) \$$

$$\\Rightarrow \frac{V_1}{C_1} = \exp \left( C_2V_i \right) \exp \left(- C_2V_1 \right) -1 \$$

$$\\Rightarrow V_1 = C_1\exp \left( C_2V_i \right) \exp \left(- C_2V_1 \right) - C_1 \$$

The general solution using Lambert W function is given by (see Wikipedia for quick reference and a book for compelte reference): $$\x = a+b\exp \left( cx \right) \Rightarrow x=a-\frac{1}{c}W \left( -bc\exp(ac) \right)\$$

Using the above solution considering $$\V_1=x\$$, $$\a= -C_1\$$, $$\b=C_1\exp(C_2V_i)\$$, and $$\c=-C_2\$$, we obtain

$$\V_1=-C_1+\frac{1}{C_2}W \left( C_1C_2\exp(C_2V_i) \exp(C_1C_2) \right)\$$

And hence:

$$\V_1=-C_1+\frac{1}{C_2}W \left( C_1C_2\exp(C_2u\sin(\omega t +\varphi)) \exp(C_1C_2) \right)\$$

• Plotting this gives the same voltage as the input which can't be right. Feb 2 at 17:17
• What values are you using for the numerical simulation? Remember when the diode is in the forward bias, the circuit can be approximated by replacing the voltage drop by a diode is same as its knee voltage. This is how the LED resistance is calculated. Feb 2 at 17:21