Electrical – Measure CMRR of amplifier in a single HSPICE simulation

hspiceoperational-amplifierscriptsimulation

So far I measured CMRR by first obtaining the open loop gain and exporting the wave, and then doing the same with the AC source in common mode, but this adds the need for additional software, and make the process difficult automatize.

I don't think there's any easy way, since the two test circuits are different (basically with the AC source connected as common or differential input), but I wondered if there is any HSPICE trick to make it work.

Best Answer

I'm not very familiar with HSPICE (mainly LTSpice), but I think this can be done with .MEAS and .STEP commands, which I believe are common to both environments.

Basically, design a step command such that one run will configure the sources so as to measure differential performance, and the second run will configure them as common-mode.

Then, use a measure command to measure the output amplitudes of each run, and a second measure command to find the ratio of these two.