Port Renumbering For Mixed-Mode skrf.network.Network.renumber

40 views
Skip to first unread message

Denz Choe

unread,
Jul 22, 2021, 10:05:49 PMJul 22
to scikit-rf
I am writing this topic as extra info for some of the confusion I experienced and probably some others that might be facing the same issue. A GitHub issue thread was created for a similar discussion. 

If you are dealing with Mixed-Mode S-Parameters, a great deal of port-renumbering needs to be done, especially when you want to compare the results of the sim with the measurement. Port renumbering and Port Renormalization needs to be equal in other for the data to be interpreted correctly

I will only describe 1 Example from the Simulation perspective. 


Simulated_Port_Definition.jpg


As you can see, the Simulation Setup above in CST defines the Modes as above at Port 1 Side.
The touchstone output file is as below:

! Touchstone port assignment:
! Touchstone port 1 = CST MWS port 1 ("") mode 1
! Touchstone port 2 = CST MWS port 1 ("") mode 2
! Touchstone port 3 = CST MWS port 1 ("") mode 3
! Touchstone port 4 = CST MWS port 1 ("") mode 4
! Touchstone port 5 = CST MWS port 2 ("") mode 1
! Touchstone port 6 = CST MWS port 2 ("") mode 2
! Touchstone port 7 = CST MWS port 2 ("") mode 3
! Touchstone port 8 = CST MWS port 2 ("") mode 4
# GHz S MA R 50

Say you have a DUT that defines Side A and Side B as such.

DUT_AB.jpg

Then the definition of Each Modes at Side A is as such:
_____________________________________________________| 'A' Side - Type Mode
! Touchstone port 1 = CST MWS port 1 ("") mode 1 | A1-DM
! Touchstone port 2 = CST MWS port 1 ("") mode 2 | A1-CM
! Touchstone port 3 = CST MWS port 1 ("") mode 3 | A2-DM
! Touchstone port 4 = CST MWS port 1 ("") mode 4 | A2-CM

whereby, DM & CM means Differential Mode and Common Mode respectively

Now if I want to rearrange the ports on Side A and Side B from the following definition:
Touchstone: [Port 1, Port 2, Port 3, Port 4, Port 5, Port 6, Port 7, Port 8]
'A/B' Side - Mode: [A1-DM, A1-CM, A2-DMA2-CM, B1-DM, B1-CM, B2-DM, B2-CM]

to the following definition
Touchstone: [Port 1, Port 2, Port 3, Port 4, Port 5, Port 6, Port 7, Port 8]
'A/B' Side - Mode: [A1-DM, B1-DM, A1-CM, B1-CM, A2-DM, B2-DM, A2-CM, B2-CM]

then the renumbering script is as such.
yourmixedmodeNwk.renumber([0,1,2,3,4,5,6,7],[0,2,4,6,1,3,5,7]) 

From "Touchstone file perspective" (index in Touchstone files doesn't begin at 0); the code above translates as
Old Port 1 rearranged to Port 1 
Old Port 2 rearranged to Port 3
Old Port 3 rearranged to Port 5
Old Port 4 rearranged to Port 7
Old Port 5 rearranged to Port 2
Old Port 6 rearranged to Port 4
Old Port 7 rearranged to Port 6
Old Port 8 rearranged to Port 8

I cannot emphasis enough on the meaning of rearranged to here. It caused me a great deal of trouble for misinterpreting the term 'becomes'. You may want to check your old codes if you are victim to this as well. :)

misinterpretation.JPG

Once you have renumber your mixed-mode Network, do not forget to renormalize it to the impedance you want if necessary.
Since mine was as below from the Touchstone file, 
# GHz S MA R 50

I will have to renormalize them to as below for plotting.
yourmixedmodeNwk.renormalize([100,100,25,25,100,100,25,25])

And when you are done, you can now compare your results with your Measured files when Port numbers are now renumbered to the same arrangement. 

Jackson Anderson

unread,
Jul 23, 2021, 11:57:22 AMJul 23
to scikit-rf
Hello,

This is a good overview of the renumbering function. It seems like enough users are confused by the wording that it could definitely use an update. One thing I want to confirm - the fact that you have to renormalize your impedances is not due to the renumber function but because of how CST exports correct? For users trying to move single ended ports around for conversion using se2gmm - se2gmm should take care of the impedance renormalization when moving from single ended to mixed mode. 

Regards,
Jackson

Denz Choe

unread,
Jul 23, 2021, 2:41:54 PMJul 23
to scik...@googlegroups.com
Hi Jackson, 



You're partially correct on how CST exports. 
There's an option where I can export in Touchstone 1.0 or Touchstone 2.0.

According to the documentation of Touchstone 2.0, the S-Parameters can have multiple Reference Impedances according to the Port count. (Much like how scikit-rf operates at Network object form). 

But I stuck with exporting my CST S-Parameter values at Touchstone 1.0 to avoid confusion.  (everything normalised to 1 impedance value, and do all the post processing at Scikit-rf block). Just my personal preference. The form I've simulated on CST was mixed-mode, renormalized at 50 ohms when exported. 

I cannot clearly remember whether I had issues importing or exporting Touchstone 2.0 formatting using scikit-rf or other software; but I knew that losing track of the impedance renormalization values in my workflow is going to give me a huge amount of headache somewhere. 

Also, thanks for reminding our readers that se2gmm has an impedance renormalizing feature. 




-------------------------
Sent from my Pixel

--
You received this message because you are subscribed to a topic in the Google Groups "scikit-rf" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/scikit-rf/AoKAHpWlkcc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to scikit-rf+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scikit-rf/85fe2650-c115-4d9c-8d96-6f7dbec6b848n%40googlegroups.com.

Julien Hillairet

unread,
Jul 24, 2021, 2:35:06 AMJul 24
to scik...@googlegroups.com
According to the documentation of Touchstone 2.0, the S-Parameters can have multiple Reference Impedances according to the Port count. (Much like how scikit-rf operates at Network object form).

Indeed, Touchstone 2.0 can define different reference impedances for each port, while for Touchstone 1.0 it is the same for each port.

Note that HFSS formats Touchstone 1.0 files with some additional comment lines that allow defining different reference impedances for each ports. (file that scikit-rf knows how to parse).

So far we don't have a Touchstone 2.0 parser. That's an open issue and work to do, see https://github.com/scikit-rf/scikit-rf/issues/400

 
NB : concerning the main topic of this thread, also see SimSmith thread https://groups.io/g/SimSmith/topic/79185575#1517

Julien
Reply all
Reply to author
Forward
0 new messages