Kla's Blog

July 26, 2016

LabVIEW Newton-Raphson MOSFET Circuit Simulation

Filed under: MOSFET Models — kla @ 2:55 pm

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.

circuitf_LV

The function f plotted against the iteration voltage v, with solution v =Vgp at f = 0.

f_plot

First iteration step.

st_line_plot

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.

rootf_BD

Generate First Step

st_line_plot_BD

LabVIEW Iterator Program with solution, for init value v = 2 V as in the above plot.

iteration_2V

Init value v = 3.6 V

iteration_3.6

Init value v = 3.8 (> solution). The indicated f is the final difference between the two currents.

iteration_3.8

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.

iteration_BD

Iterate –

iterate

iterate_BD

PR % = 0.0001

iterate_2

Capture

 

 

 

Blog at WordPress.com.