Differential Pair Sim

How to use openEMS. Discussion on examples, tutorials etc

Moderator: thorsten

Post Reply
Posts: 1
Joined: Thu 18 Feb 2021, 17:57

Differential Pair Sim

Post by jay » Thu 18 Feb 2021, 18:06

I was able to get the hyp2mat tutorial working with a single strip and capacitor. I am having trouble getting it to work with a differential pair. I am using the lumped port between signal plus and signal minus instead of signal and ground like the tutorial. Simulation runs but never completes. If someone has an example of how to do a differential pair please post it.


Posts: 3
Joined: Tue 25 Jan 2022, 10:45

Re: Differential Pair Sim

Post by JensW » Wed 26 Jan 2022, 16:04

Hi to everyone,

I also struggle to get a differential pair simulated. My first aim is to get the feeding and measurement reliable. Thorsten Liebig suggested that a 4-port measurement (like a VNA) with the AddStripLinePort or AddMSLPort should give good results.

I am happy to share my silly first try - and would be thankful indeed for any comments what is right or wrong in that octave-script.
octave script
(8.26 KiB) Downloaded 210 times
Here a short description, what I am up do:

The example shall show the measurement of a differential structure (DUT). The DUT in my case are just two stripelines forming a differential pair. The adjacent ground copper planes are formed with the boundary condition PEC. Because for my needs the electrical signal shall be unidirectional, only port 1 and 3 (think in S-Parameter) is simulated whereas all ports (1,2,3,4) are measured.
Because OpenEMS cannot excite two AddStripLinePort differentially. two separate simulations are performed (on for port 1 and one for 3). Here the whole geometry is constructed once in octave-object CSX and then modified ans simulated in CSX_port1 and CSX_port3. I assumed that I than can mix the results for calculation. Imported to note is that the two simulations hopefully have an completely equal excitation and therefore port 3 is negated in calculation to achieve differential signaling.

best Jens

Posts: 3
Joined: Tue 25 Jan 2022, 10:45

Re: Differential Pair Sim

Post by JensW » Fri 25 Feb 2022, 12:55

Hi all together,

I like to say a big Thanks for providing such a awesome Tool - it help me a lot getting a high speed layout obstacles solved. On the question of dealing this differential pair signalling I will share my experience just because I like to give something back to the community.
octave file
(26.45 KiB) Downloaded 162 times
The attacked octave file is a bit more complex PCB-structure. I had grade difficulty getting the meshing correct so that the model converges. Attention has to spend on the excitation and measurement ports. The AddStripLinePort seems to work properly only when placed symmetrically between the two conductor layers, with a port height exactly touching the conductor surface. The mesh in stack direction (z) should hit the stacked elements (conductor, port, conductor). I had no luck in simulation when pacing the stripeline port off centre (z direction). But it is totally ok to connect the port with an off centre trace.

The 2/3 rule of misalign the structure with the mesh is a bit confusing. It applies only in xy direction (when stacked in z) whereas a finer mesh (ignoring the 2/3 rule) seems to do more or less the same job. Because in PCB stackups the copper thickness can't be ignored I am only using the ports (AddStripLinePort,AddMSLPort) for launching and measuring. Here make sure that elements (port,trace) probably overlap - otherwise you may run into a not connected trace. Also keep in mind that the trace with an actual height requires differed width than the port, which has zero height, to match the impedance.

The attached file is nor beautiful or meant to be instructive, just a every day hack to get a job done. Nevertheless I hope you can find something useful out of it.

Best Jens

Posts: 3
Joined: Tue 25 Jan 2022, 10:45

Re: Differential Pair Sim

Post by JensW » Fri 25 Feb 2022, 13:39

Hi all,

one more appetizer..
paraview.jpg (56.76 KiB) Viewed 2212 times

Paraview is a beast of it's own to deal with. Because the simulation in the octave file is done in two runs you have to recombine them in Paraview for visualisation. This can be done with the /Python_Programmable_Filter and the following script:

e_field0 = inputs[0].PointData['E-Field']
e_field1 = inputs[1].PointData['E-Field']
output.PointData.append(e_field0 - e_field1,'E-Diff-Field')

The electrical field can be shown best with volume rendering. But note, to do so you have to convert the field to equidistant (called image data) grid before. There is a filter available that resamples the field. Be aware that the volume view is only able to show the magnitude of the field which does not show the differential nature of the signal. But you can also use glyphs to see where field lines go along. I did not find an obvious way to visualize the charge field - though some people ask and tried that.

The picture above is from the simulation with back_drill=false. You can observe a nice reflection at the end of the data set.

Please forgive me that I only give some hits here. I am not an instructor, and there is really good learning material out there.

Cheers, Jens

Post Reply