Tuesdays are definitely more optimistic than Mondays, welcome to the 2/7th week.
With simulation of linear circuits going strong, the challenge was to tackle non-linear circuits. I started off with the diode since my intention was to use the Ebers-Moll model for the transistor which incorporates two diodes. The simplest circuit to understand the approach is as follows
In the above figure, we have a voltage source Vs, a load R and a diode with a certain knee voltage Vd. The diode current is modelled by Shockley equation as shown below.

With Diodes, we have two types of possible approaches. The first is the small signal AC analysis where the AC fluctuations about the DC offset is small enough to warrant the assumption that the diode conductance does not vary. This implies that the diode can pretty much be treated as a resistor in small signal AC analysis with the resistance value being calculated from the slope at the DC bias point. The second being large signal wherein the DC operating point of the diode changes significantly and hence the diode conductance varies non-linearly. The second case subsumes the first and the first case is used only to improve the efficiency of the simulation. I proceeded with using the second case(works for all configurations) since I wasn't too bogged up about efficiency at the initial stages.
If one were to compute the diode drop and hence the diode current by hand. We would have proceeded with load line analysis, where the intersection of the load line and the diode I-V curve gives the DC bias point. However, the computer cannot figure it out graphically hence there is a need to express this method in mathematical form and that's where Newton-Raphson comes into the picture. The essence of the program is to first assume a diode drop(the knee voltage is a good assumption since if the diode is forward biased, the voltage across it hardly changes beyond the knee) using this drop the diode current is computed from the Shockley equation. This gives us a point on the diode I-V curve which we name (v1,i1). The tangent to the curve at this point meets the load line at another point which we name (v2,i2).
If we have found the DC bias point then the two points should coincide otherwise the distance between them tells us how far off we are from the true diode drop. We are essentially finding the zero point of this function that accounts for the distance between the points by using Newton-Raphson. Newton-Raphson gives us a way to update our assumed diode drop to proceed with the next iteration until the distance is less than a certain acceptable value. So, at the end of the day I had the diode working for a DC source
For the purpose of verifying, I have taken Vs=10V, R=500Ohms and n*vT=0.039V. The simulation converges to the diode drop being 0.831V and the diode current being 18.34mA. This can be verified from Boylestad which uses the same example. So, at the end of day two we have diodes working with DC sources
With simulation of linear circuits going strong, the challenge was to tackle non-linear circuits. I started off with the diode since my intention was to use the Ebers-Moll model for the transistor which incorporates two diodes. The simplest circuit to understand the approach is as follows
In the above figure, we have a voltage source Vs, a load R and a diode with a certain knee voltage Vd. The diode current is modelled by Shockley equation as shown below.
With Diodes, we have two types of possible approaches. The first is the small signal AC analysis where the AC fluctuations about the DC offset is small enough to warrant the assumption that the diode conductance does not vary. This implies that the diode can pretty much be treated as a resistor in small signal AC analysis with the resistance value being calculated from the slope at the DC bias point. The second being large signal wherein the DC operating point of the diode changes significantly and hence the diode conductance varies non-linearly. The second case subsumes the first and the first case is used only to improve the efficiency of the simulation. I proceeded with using the second case(works for all configurations) since I wasn't too bogged up about efficiency at the initial stages.
If one were to compute the diode drop and hence the diode current by hand. We would have proceeded with load line analysis, where the intersection of the load line and the diode I-V curve gives the DC bias point. However, the computer cannot figure it out graphically hence there is a need to express this method in mathematical form and that's where Newton-Raphson comes into the picture. The essence of the program is to first assume a diode drop(the knee voltage is a good assumption since if the diode is forward biased, the voltage across it hardly changes beyond the knee) using this drop the diode current is computed from the Shockley equation. This gives us a point on the diode I-V curve which we name (v1,i1). The tangent to the curve at this point meets the load line at another point which we name (v2,i2).
![]() |
| Courtesy of Wikipedia |
If we have found the DC bias point then the two points should coincide otherwise the distance between them tells us how far off we are from the true diode drop. We are essentially finding the zero point of this function that accounts for the distance between the points by using Newton-Raphson. Newton-Raphson gives us a way to update our assumed diode drop to proceed with the next iteration until the distance is less than a certain acceptable value. So, at the end of the day I had the diode working for a DC source
For the purpose of verifying, I have taken Vs=10V, R=500Ohms and n*vT=0.039V. The simulation converges to the diode drop being 0.831V and the diode current being 18.34mA. This can be verified from Boylestad which uses the same example. So, at the end of day two we have diodes working with DC sources


No comments:
Post a Comment