# Simulate Earthing in LTSpice

I wan to simulate earthing or frame ground which is separate from circuit GND in LTSpice. I want to simulate line filter using Y capacitors C2 and C3 in the below image.

See below image for clarity.

I can consider negative terminal of input source as Neutral, so will that be ground? If yes then what should I connect to common connection of C2 and C3 where GND is connected right now?

There is one option which is to put two different ground in the simulation, one for Neutral and another one for frame ground. Now, what will be the parasitic elements to be put between Neutral and frame ground to simulate frame ground as earthing?

• In SPICE, the ground is the general reference. LTspice allows you a second ground symbol, but that's just a convenient way to differentiate between that another node. Under the hood it's just another node (just as the ground is, actually). How you use that special, or any other named net, is up to you. Usually, it's a parallel RC, with Meg or G as a value, and a few pF(more or less) worth of capacitance. Of course, this implies air contact. Real ground has to have a more complicated impedance (which I don't know). – a concerned citizen Nov 16 '17 at 8:19
• I have posted an answer, but if you could provide a bit more details about your application, the answer could be tailored for your particular real life application. – Jurkstas Oct 19 '18 at 22:10

A few things to keep in mind:

1. Ground is not special. Not in reality, and not in LTSpice. Ground is nothing more than the potential that we've decided to be 0V. It's a label, and one that is totally contrived and arbitrary.

2. To drive my point home, it doesn't matter what part of your LTSpice circuit you pick as ground. If you move your ground from one net to a completely different one, there will not be any change in the simulated result. The values will probably change but superficially only (because you've changed what LTSpice is using for 0V).

3. LTSpice can only simulate one circuit. Isolation or floating nodes are not supported.

That said, it sounds like you might be overthinking this. The only thing that you need to worry about when choosing your ground node is what you want LTSpice to reference all the voltages in the simulation to. That's all.

And when you want a 'second ground', what does that actually mean? It means you simply want a net that is, for all intents and purposes, not connected to ground, but is kept at the same potential. 'Kept at the same potential' here really just means that you want this to also be a 0V reference point.

What I typically do is use the already available 'COM' net option, which is just another net label and symbol provided for convenience. It isn't connected to ground, its just connected to what you connect it to. I build my circuit exactly how I intend it, with the separate GND ground and COM grounds placed and connected just like they would be physically.

Then, once I am done, I connect COM to GND... though my trusty 1 EΩ resistor. That's right, Exaohms. Is that perfectly isolated? No, but neither is your real-world circuit. The leakage through our 1EΩ resistor is going to less than an fA, which is likely substantially (like, orders of magnitude) less than the leakage you'll be getting in the real deal.

But don't just use a resistor, put a 1 zF (yep, zeptofarad) capacitor in parallel. This will again be much much lower than the real capacitive coupling that is almost certainly present when this is built physically, and it eliminates some issues with unrealistically high resistance values making simulation speed extremely slow.

Of course, in your application, it would probably be better try and make a rough estimate of the parasitic capacitive coupling you might have between your power ground and chassis ground and use that value instead of a 1 zF capacitor. a few pF is not unusual.

Here is an example of this in action. It's the text fixture for an isolated push-pull power supply. Note that the isolation is simulated using COM on the output, but with this little impedance hack, it still behaves exactly as expected.

Regardless, it really is that simple. But it is also easy to convince ourselves that it isn't.

1) It dipends on what noise you want to simulate, common mode noise or differential mode noise. For the differential mode you can avoid to connect the middle point between the capacitor.

2) I don't think that you can put different ground on spice

• I am mostly concentrating on the common mode noise. If I don't connect the middle point between capacitor, wouldn't that change the return path for the noise? – Vishal P Nov 15 '17 at 11:21
• Ok, then i think you will put another voltage generator between neutral and ground. To better understand it would be better to see the complete circuit. – RodezIO Nov 15 '17 at 12:57
• Thank you Rodezio, but what should be the parameters of voltage generator? Should it be sine wave generator or pulses or DC? That's what is missing what should we put between Neutral and earth to simulate actual scenario? – Vishal P Nov 15 '17 at 13:43
• Indeed it depends on what is the noise signal that you want to simulate. It could be a surge, a burst or any other kind of undesired signal. What noise do you want to simulate ? – RodezIO Nov 16 '17 at 7:46

You can simulate anything you can model. There is only one ground net, but it is only the reference point for simulation - the zero V net. If you are modeling circuit ground and frame ground, it means that you have two nets. How are those nets coupled? Common mode usually enters through parasitic capacitance. So add a "Frame" net and add some capacitance to both wires of your power supply. For example like this:

In this circuit it is assumed that:

1. Y filter common point and neutral are connected to PE, no parasitic resistance nor inductance.
2. Frame is only coupled to the circuit via parasitic capacitance, 10pF to both neutral and live.

You can observe that the frame is essentially floating between the two potentials. If you would add some details on how your circuit is connected, the answer could be more detailed.

• Can you also model to inject interference via capacitive and inductive coupling? – atmnt Nov 22 '18 at 17:37
• Yes, you can model and then simulate both inductive and capacitive coupling. Modeling is the hard part, though. – Jurkstas Dec 10 '18 at 18:28

Do a search for "earthing systems." If you have a neutral and PE running to this circuit, then both are connected together back at a panel. If your frame is connected to PE, which would be required for a UL listing, frame is connected to ground. In this case, the - lead of V2 is ground and the junction of your filter is connected to ground too with perhaps a very low series resistance and some inductance.

Probably a better idea is to model a LISN (line impedance stabilization network). This is what would be put between a power source and your device when it is tested by a certification lab. V2 would then be your ideal grounded power source and the line, neutral and PE would be run through your LISN circuit to your device circuit.

To see the effects change each value with the known worst-case tolerance then replace your 0V reference with a grounded impulse generator of say 1V on your ground to simulate broadband noise between ground. Use any rep rate to simulate 50 to 50MHz. CMRR is a function of your cable and circuit imbalanced impedance. Insert 0.5 uH/m between the generator to simulate ground cable length.