The issue is that I’ve downloaded LMV791.MOD file from TI’s website(Pspice version). It works as expected in LTspice but QSPICE generates wrong result.
If exactly duplicate your circuit, get same result that OUT is about 28mV. I export the netlist and put into LTspice, simulation results is the same, 28mV for OUT.
By remove R1/R7/V2 and replace with a ramp voltage source, can simulate with this amplifier where V(out)/V(in) before rail clamp is about 22. Again, if export netlist and load into LTspice, can get same results.
But if you download the PSPICE model from TI’s website instead of exporting the netlist from QSPICE and include it to the LTspice than it works as expected. I guess there is an issue with parsing process in QSPICE…
According to the LMV791 datasheet, the maximum input common-mode voltage range is around VDD-1V.
It seems that LV721 may not be compatible with your design.
Try changing the supply voltage, e.g., to 5V. It will work fine.
The expected output voltage is,
Input differential voltage = 100 / (2.2k + 100) * 3.2V = 0.139V
V(out) = 220k / 10k * 0.139V = 3.06V
*The simulation model has an input offset voltage, so the simulation results have some difference from the expected value.
But what made the difference in your QSpice and LTspice results?
This is where I download the model to verify your observation.
It seems EL34 created a symbol from LMV791.mod in LTspice and can get same simulation results as in Qspice.
As @EL34 mentioned about common-mode voltage value, the model should respond as it is in QSPICE but I did not look at my LTSPICE yet. I’ll
I tested LMV791 on LTspice - 17.0.35.0.
I’ve just re-simulated in LTspice without any change. As it is seen common mode voltage is about 3V in the simulation but in the datasheet CM voltage value is given 1.5V (MAX) and -0.3V(MIN).
Therefore LTspice doesn’t give proper result for my case.