The differential amplifier, from LTspiceIV, is as follows. For comparison to recent posts, the bias current (M1, etc.) is about 1mA.
A DC sweep on VG1 is given here. The DC transfer around VG1=0 is 18.6.
The LabVIEW DC sweep is here. The slope is around VG1=0 and is based on 5 computational points of VG1=-15 mV to 15 mV.
The parameters obtained with LabVIEW extraction are as follows. LTspice uses the primary parameters and will not accept auxiliary alternatives such as NSUB. (These were modified after some fine tuning with LETA.)
More discussion will be added on the iterative solutions in the simulation. The model is based on node voltage in and drain current out, such that the node voltages are iterated to satisfy certain drain current requirements.
A new resistor with value R1=5k is used, resulting in lower bias currents. A LabVIEW gain finder is now used to estimate the new DC transfer, as shown here. The LTspice DC transfer is 22.1
The Diagram is shown here. The gate voltage is made plus and minus 5 mV, and the output is determined as shown.
The LabVIEW diffamp simulator follows. The iteration loop is on VS, i.e., the source voltage of the differential stage. The icon outside of the loop is the bias resistor/NMOS, which provides the bias voltage of M5. Icon Sim N simulates that stage, with a current output compared to the sum of the currents of the differential transistors. A match halts the iteration, with the required precision pre-set.
Bias circuit simulator follows. The resistor voltage is iterated. The resistor current is computed and compared to that of the NMOS, such that the iteration is halted when they match.