CMRR Simulation in LTSpice shows abnormaly low values? - Page 1
Forum section: electronics / projects

author: Guille
author_rank: Regular Contributor
timestamp: May 30, 2025, 02:28:55 pm
content: Hi everyone,We are developing some difference amplifer at work based on the ISL28117 opamp. Since CMRR is a known issue in these topologies (due to resistor mismatch, etc) I decided to run an LTSpice simulation, the problem is I think Im getting abnormaly low CMRR valueseven without simulating resistor mismatch. Im talking 30dB at best. Sure I set up the amplifier to a low differential gain (blue), we need to for unrelated reasons, but 30dB seems abismal...My question is, is it normal for an opamp in ideal matching conditions to be showing such low CMRR? Should I assume the model or my simulation is bad? The comments on the .lib file for the model state that it does simulate CMRR. Also, is the CMRR stated in the datasheet (120dB) calculated as the open loop gain over the common mode gain?Here's a link to my Google Drive with all the relevant files (datasheet, .asc, .lib, etc) in case you wanna run it yourself:https://drive.google.com/drive/folders/1pxBfsXsNAAen5QC7qE62ciOx2hqNEfpe?usp=sharingIf you actually go ahead and run it you'll need to first import the ISL82117.lib model following these instructions:https://www.analog.com/en/resources/technical-articles/ltspice-simple-steps-to-import-third-party-models.html. Then run the .asc and graph CMRR by left-click->add trace->"V(outdm)/V(outcm)", or you could simply load the plot settings.Thank you for reading! :-

author: mtwieg
author_rank: Frequent Contributor
timestamp: May 30, 2025, 05:23:34 pm
content: There's definitely something wrong with the device model. It's as if the Vin- and Vin+ are mixed up, but it seems the symbol pinout agrees with what the .lib file wants. Open loop gain is also extremely low (like 20dB instead of >120dB).

author: Guille
author_rank: Regular Contributor
timestamp: May 30, 2025, 05:52:17 pm
content: Wow thank you mtwieg, that's very interesting, I did notice some weird behaviour with the model depending on whether I mirrored it or not in the schematic, how did you find out? Also, earlier I attempted to check the Open Loop Gain myself too but failed (I believe the opamp input VOS alone was saturating the output) this saturation threw off the AC analysis, would you be so kind as to share your .asc simulating it? Or perhaps a screenshot is enough.Again, thank you for your helpful response.

author: Zero999
author_rank: Super Contributor
timestamp: May 30, 2025, 08:06:46 pm
content: Please post the .asc file, along with the model.And you do know you can use the built-in op-amp (opamp2) symbol, rather than creating a nondescript box symbol.Here's an example showing how to use opamp2 with the TI LM358 model, pasted into the .asc file.op-amp emitter follower LM358 TI.asc

author: mtwieg
author_rank: Frequent Contributor
timestamp: May 30, 2025, 10:06:12 pm
content: Quote from: Guille on May 30, 2025, 05:52:17 pmI zipped everything after making a few changes:1. I removed the absolute path from the symbol's modelfile attribute. Instead, the .lib file is found with the .include statement in the schematic. This should make it much more portable.2. I had to remove the colon from line 56 of the .lib file. This was not valid syntax.3. I changed the DM circuit to generate a true differential mode input.4. Connected the Offset net on both the inputs and outputs (currently set to zero though).5. Named the nets connected to the Vin+ and Vin- pins.Also attached is the results of the transient sim, showing the output voltage vs differential input voltage for each op amp. This shows that the open loop gain is roughly 20dB, and has 180 phase from expected.When the offset source (V1) was given a nonzero value, the output seemed to quickly saturate somehow.edit: VVVVV Indeed you can use the built-in opamp symbols, so long as the ports of the model happen to match the symbol (usually they will, but not always).

author: Zero999
author_rank: Super Contributor
timestamp: May 31, 2025, 01:07:37 pm
content: No need for zip files. The model can be pasted into the .asc file and opamp2.asy which comes with LTSpice can be used.

author: Guille
author_rank: Regular Contributor
timestamp: June 01, 2025, 10:04:10 pm
content: Hi, sorry for the late response, I was away from the computer for most of the weekend.I have gone over your files and I agree with your corrections. I also agree that there seems to be something wrong with this model, I tried a simple AC sim with it in voltage buffer and it gave me some weird 30dB gain... Not to mention the frequent convergence errors.I did some napkin calculations to test my initial question: Is -10dB common mode gain too high? And I believe the CMRR predicted by the model is incorrect, my reasoning is that if we have perfectly matched resistors then the CMRR in a difference amplifier is dominated mostly by the opamps intrinsic CMRR or the CMRR stated in the datasheet.This is computed like so:CMRR_intrinsic = A_open_loop / A_common_modeWith perfectly matched resistors the common mode gain should be close to the one in open loop configuration thus we can find our expected common mode gian as:A_common_mode = A_open_loop / CMRR_intrinsicin lograithmic scale:A_common_mode = A_open_loop - CMRR_intrinsicFilling in some values from the datasheet:A_common_mode (f=10Hz) = 100dB - 200dB = -100dBThis kinda confirms my initial suspicion that a difference amplifier with perfectly matched resistors should show an amazingly low common mode gain (-100dB for instance) but we are seeing -10dB...I'm now trying my luck with other Renesas models, like the ISL70419SEH, which have similar characteristics and behaves a little bit better.Again, thank you all for your help, this forum has always been a great place to learn

author: mtwieg
author_rank: Frequent Contributor
timestamp: June 01, 2025, 10:36:00 pm
content: Whatever is wrong with the ISL82117 model will definitely make any CMRR measurements bogus as well.Interestingly, the ISL82117 datasheet actually includes a diagram of the SPICE model, don't often see manufacturers do that often! With sufficient effort you might be able to figure out what's wrong with the model.CMRR of an opamp is calculated as the ratio of itsopen loopgains (differential mode divided by common mode). CMRR of a difference amplifier circuit is calculated as the ratio of itsclosed loopgains. If resistor values are exact, then typically the two CMRR results will be the same (or very close depending on the closed loop gain).Keep in mind that opamp CMRR is very frequency dependent. Most opamp datasheets will have a plot showing this.