The first project circuit is, as shown, a reference-voltage circuit, Vgp. The iteration function is f = Id (pmos) – I (Rb), with f = 0 at the solution. The LabVIEW simulator is below. The PMOS simulator here is Level 3 Spice.
The function f plotted against the iteration voltage v, with solution v =Vgp at f = 0.
First iteration step.
Generation of the plot. Loop on the right finds the plot index for f at sign change, and the index is used to obtain an approximate value of Vgp, as indicated above. Index is 7971 of 10000. Array v is the input to Index Array with Vgp output.
Generate First Step
LabVIEW Iterator Program with solution, for init value v = 2 V as in the above plot.
Init value v = 3.6 V
Init value v = 3.8 (> solution). The indicated f is the final difference between the two currents.
Iteration Program. Voltage v inputs to f function are v + v/100k and v – v/100k. The small difference provides for an incremental f, df, to form the derivative for a known dv.
Iterate –
PR % = 0.0001