### Author Topic: Equivalent circuit of a PCB for SPICE simulation  (Read 675 times)

0 Members and 1 Guest are viewing this topic.

#### danieljfarrell

• Contributor
• Posts: 9
• Country:
##### Equivalent circuit of a PCB for SPICE simulation
« on: September 25, 2021, 09:24:29 pm »
I want to make a simulation of a simple PCB to understand how the currents flow in the ground plane.

I don’t want to reinvent the wheel, I’m happy to use something already written, either open-source or commercial, but I cannot find anything! Commercial options are not in my budget.

I would solve this by making a spice network which represents the geometry of a simple PCB, say with a single trace on the top and a ground plane on the bottom. The simulation could be built up from two equivalent circuit unit cells: PCB with track and PCB without track.

#### TimFox

• Super Contributor
• Posts: 3543
• Country:
• Retired, now restoring antique test equipment
##### Re: Equivalent circuit of a PCB for SPICE simulation
« Reply #1 on: September 25, 2021, 09:33:41 pm »
In SPICE, you can insert voltage generators ("Vxx") with value 0 in series with any branch where you want to measure the current, and see the current through each generator.

#### evb149

• Super Contributor
• Posts: 1951
• Country:
##### Re: Equivalent circuit of a PCB for SPICE simulation
« Reply #2 on: September 25, 2021, 10:05:40 pm »
I don't think you can model that with spice perhaps unless you created your "ground plane"
as some kind of 2D L-C-R matrix of cells that created a lumped circuit approximation of the electromagnetic and transmission line impedance effects associated with a conductor plane.

A 2D or 2.5D computational electromagnetics program would seem to be the more appropriate choice for this than SPICE.

But if there is an easy / good way I'd be interested to know how, too.

#### T3sl4co1l

• Super Contributor
• Posts: 18151
• Country:
• Expert, Analog Electronics, PCB Layout, EMC
##### Re: Equivalent circuit of a PCB for SPICE simulation
« Reply #3 on: September 26, 2021, 01:41:44 am »
I recall ANSYS has a tool that can generate an equivalent N-port from the PCB fab.  But good luck with that...

Not aware of any free, open tools to do same.

Next best thing is perhaps simply learning how the fields work, and setting up environments to 1. prove out the theory by experiment, and 2. apply theory in practice.  Namely, we do #2 most often by using ground planes, so that traces manifest as transmission lines, with reasonable isolation between them (typically <10% coupling even for minimum-spaced buses), and low ground-return impedance, so that we can mostly ignore common mode effects.  With these factors being relatively small, it isn't important what the exact coupling is, because it's small enough everywhere to assume equal to zero.  Put another way: the coupling matrix is sparse.

I'm not sure what angle you're coming at this from -- it could be a relative beginner question, looking to just see the pretty pictures and play with a reasonably-realistic simulator (at least, if it's easy enough to work with), and in that way, perform those experiments and build up the knowledge level.  Or it could be a professional in-depth level, where you already know generally how things work, but due to strict constraints on a given project, you need to evaluate tighter-coupled designs, and thus cannot make use of the design rules / assumptions listed above.  (Or anything inbetween, like, say: getting a quantitative measure of ground bounce, coupling, etc., rather than just a hand-waving approximation to it.)

Tim
Seven Transistor Labs, LLC
Electronic design, from concept to prototype.
Bringing a project to life?  Send me a message!

#### Just_another_Dave

• Regular Contributor
• Posts: 182
• Country:
##### Re: Equivalent circuit of a PCB for SPICE simulation
« Reply #4 on: September 26, 2021, 08:23:17 am »
It might be possible to obtain an impedance model of the PCB tracks using an impedance extractor. Then, that model could be included in your spice schematic. For that purpose there are many programs available, but FastHenry and FastCap are completely free (https://www.fastfieldsolvers.com/software.htm). However, if you have an Ansys Electromagnetics Desktop license I think HFSS is also able to do that.

On the other hand, you might be interested in using a FEA simulator directly instead of adding those models to your Spice model as it might be less time consuming. HFSS even allows co-simulating the pcb and a circuit. Nevertheless, I think OpenEMS (https://openems.de/start/)can also be used for simulating pcbs (at least it allows simulating pcb antennas) if you can’t afford an Ansys license

#### Keith956

• Regular Contributor
• Posts: 79
• Country:
##### Re: Equivalent circuit of a PCB for SPICE simulation
« Reply #5 on: September 26, 2021, 08:32:00 am »
You would need a 3D field solver that can create a SPICE model of the structure you want to analyse.

https://www.easii-ic.com/en/EZMOD3D.php

#### danieljfarrell

• Contributor
• Posts: 9
• Country:
##### Re: Equivalent circuit of a PCB for SPICE simulation
« Reply #6 on: September 26, 2021, 12:04:18 pm »
Thanks for phrasing this better than I could! Yes, I was trying to suggest modelling a PCB in quasi-2D using a SPICE network.

I am interested in audio frequencies and DC so might be able to get away without the full electromagnetic simulation. That that was my hope.

I think I have found an equivalent circuit of a PCB track here https://passive-components.eu/r-l-c-and-a-pcb-trace-impedance-measurement-and-simulation/ I'm not sure how these models are parameterised in terms of track length and thickness; there much be equations behind the scenes.

Thanks so much for the software suggestions. I was not aware of them. I will check them out now.
« Last Edit: September 26, 2021, 12:15:59 pm by danieljfarrell »

#### Just_another_Dave

• Regular Contributor
• Posts: 182
• Country:
##### Re: Equivalent circuit of a PCB for SPICE simulation
« Reply #7 on: September 26, 2021, 12:22:08 pm »
Thanks for phrasing this better than I could! Yes, I was trying to suggest modelling a PCB in quasi-2D using a SPICE network.

I am interested in audio frequencies and DC so might be able to get away without the full electromagnetic simulation. That that was my hope.

I think I have found an equivalent circuit of a PCB track here https://passive-components.eu/r-l-c-and-a-pcb-trace-impedance-measurement-and-simulation/ I'm not sure how these models are parameterised in terms of track length and thickness; there much be equations behind the scenes.

Thanks so much for the software suggestions. I was not aware of them. I will check them out now.

For low frequency applications, you might be able to find precise enough analytical models. Check IEEE just in case someone has conducted any research on that

#### danieljfarrell

• Contributor
• Posts: 9
• Country:
##### Re: Equivalent circuit of a PCB for SPICE simulation
« Reply #8 on: September 26, 2021, 03:04:21 pm »
Behind the paywall, hard to tell, but might be relevant:

Audio frequency ground integrity modeling and measurement for a TDMA smartphone system https://ieeexplore.ieee.org/document/7893110

Inductance of printed circuit board ground planes https://ieeexplore.ieee.org/document/473718

#### danieljfarrell

• Contributor
• Posts: 9
• Country:
##### Re: Equivalent circuit of a PCB for SPICE simulation
« Reply #9 on: September 26, 2021, 03:19:53 pm »
Oh this looks like a good tool. I’m not near my PC yet, so will try later. I hope it is gives R L C values for different geometry tracks. Will also check the documentation, as hopefully the calculations are referenced.

https://saturnpcb.com/saturn-pcb-toolkit/

#### Just_another_Dave

• Regular Contributor
• Posts: 182
• Country:
##### Re: Equivalent circuit of a PCB for SPICE simulation
« Reply #10 on: September 26, 2021, 04:01:02 pm »
Behind the paywall, hard to tell, but might be relevant:

Audio frequency ground integrity modeling and measurement for a TDMA smartphone system https://ieeexplore.ieee.org/document/7893110

Inductance of printed circuit board ground planes https://ieeexplore.ieee.org/document/473718