I've been designing a (very) simple MOSFET op-amp for school, and one of the things I need to do is determine the CMRR from my simulations. For the assignment, I'm just going to use the value at 1kHz, which should fulfill the assignment requirements. However, thinking about it made me wonder if there is a way to make LTSpice (or any other version of Spice) plot the CMRR over multiple frequencies?
I won't show the circuit, as this question is relevant to differential amplifiers in general, but here are the directives I'm using to run my current simulation:
.ac dec 100 1 100Meg
.step param vi list 0 1
vi
is an AC voltage parameter for the non-inverting input, and the inverting input has a fixed value of AC 1
.
Here is the result, measured at the output:
The black line (vi=0
) shows the open loop frequency response with a differential input and the blue line shows the response with a common-mode input. In other words, it simulates these two circuits:
simulate this circuit – Schematic created using CircuitLab
I am wondering if there is a way to divide two instances of the same parameter. In other words, I want to divide the output voltages corresponding to the differential and common-mode gains so that I can do something like this:
$$ CMRR = \frac{v_o|_{v_i=0}}{v_o|_{v_i=1}} $$