LTspice - Apparent common mode coupling to the GND node - Page 1
Forum section: electronics / projects

author: pertinax
author_rank: Newbie
timestamp: January 23, 2025, 12:57:50 pm
content: I found this phenomenon while trying to simulate common mode interference across an optocoupler. Turns out this was difficult, since there was common mode coupling even without any circuit element connecting the two parts. Even without the optocoupler! I have narrowed it down to this minimal example. My guess is that the problem lies in the opamp model. I have tried various models, from the most simple to the proprietary LT6268. There are variations in the coupling between models but none of them seems to work as expected. Anyone seen this before? As you can see in the circuit, the ground node (node 0) has one single connection. It sets the reference voltage for the rest of the circuit but with its single connection it should not be able to affect the circuit in any other way.

author: iMo
author_rank: Super Contributor
timestamp: January 23, 2025, 01:54:52 pm
content: Mind the AC analysis in the LTspice does not work with the models per se, it in first step creates a "small signal model" of the entire schematics (no active parts), and in the second step it makes the AC sweep.Also I do not get how your schematics should work.. For CM simulation I would ground the V2 and U1, and put a voltage source with Vcm in series with V1..

author: youngda9
author_rank: Regular Contributor
timestamp: January 23, 2025, 02:20:17 pm
content: Your opamp ground pin should be connected to ground. You are plotting the output with reference to GND, which contains the AC source.

author: mtwieg
author_rank: Frequent Contributor
timestamp: January 23, 2025, 02:38:08 pm
content: Quote from: youngda9 on January 23, 2025, 02:20:17 pmI believe they're not trying to measure the CMRR of the opamp itself (in which case you'd be correct), but rather observe that putting a common perturbation on all terminals of the circuit produces an unexpected output relative to that common perturbation.It's an interesting result, but I'm guessing it's mainly due to the opamp model itself. It likely makes use of the global ground node somewhere, and that's causing the issue. Also possible that the spice engine is adding conductances to global gnd, but I tried setting .options cshunt=0p, cshuntintern=0 and that didn't seem to have any effect.

author: AndyC_772
author_rank: Super Contributor
timestamp: January 23, 2025, 04:42:32 pm
content: That's a good one. What happens if you replace the AC source with a sine wave, and run a transient analysis? Does that work as expected?

author: pertinax
author_rank: Newbie
timestamp: January 23, 2025, 07:22:33 pm
content: Thanks for the input. I tried a transient simulation with a 1 MHz sinewave and the result is the same. It seems like the problem indeed is due to the opamp model. I found this thread:https://electronics.stackexchange.com/questions/696613/wrong-ltspice-simulation-results-when-circuit-has-a-large-common-mode-potentialWhat are the odds, it mentions the very same opamp!In the other thread, the author had tried a discrete transistor amplifier with similar results. However, the latter problems seems to have been due to a completely different effect, that of rounding. Perhaps rounding will favor signals which are referenced to the common GND and cause a sort of common mode effect as well?My solution to the original problem will be to keep potentials around GND and simulate e.g. capacitive coupling in the optoisolator using separate components.

author: Zero999
author_rank: Super Contributor
timestamp: January 23, 2025, 09:27:52 pm
content: SPICE is just a fancy calculator. It's important to have models which simulate the parameters you're interested in. If you want to simulate something which the person who made the model didn't think of, then the model will not give you the correct results.Also note the limited precision of the 64-bit floating point calculations. Using a potential divider with a resistors of 10s of orders of magnitude difference can produce nonsensical results. Here's an example from another thread I started, when I encountered this issue.https://www.eevblog.com/forum/chat/spice-generates-nonsense-with-near-zero-resistor-values/msg5647165/#msg5647165