On the LRRM equation transformation

94 views
Skip to first unread message

jeanbiego

unread,
May 26, 2022, 12:47:39 AM5/26/22
to scikit-rf
Hello,
This time I attempted to use the scikit-rf calibration function to calibrate LRRM, but could not get good calibration results. I was reading the code and references to find the cause, and the following questions arose.
I believe lines 3874~3878 in calibration.py are the code corresponding to equation 47 in the reference[1], but is the variable x missing? If anyone has more information, please advise.
Thank you.


Reference: [1] Zhao, W.; Liu, S.; Wang, H.; Liu, Y.; Zhang, S.; Cheng, C.; Feng, K.; Ocket, I.; Schreurs, D.; Nauwelaers, B.; Qin, H.; Yang, X. A Unified Approach for Reformulations of LRM/LRMM/LRRM Calibration Algorithms Based on the T-Matrix Representation. Appl. Sci. 2017, 7, 866.

"""lines 3874~3878 calibration.py
wm_t1 = inv(npy.transpose(npy.array([[ones, ones],[r11, r21]]), [2,0,1]))
wm_t2 = npy.transpose(npy.array([[ones], [mm1]]), [2,0,1])
wm = wm_t1 @ wm_t2
wm1 = wm[:, 0, 0]
wm2 = wm[:, 1, 0]
"""
eq47.png

Henrik Forstén

unread,
May 27, 2022, 4:00:28 AM5/27/22
to scik...@googlegroups.com

Hey,

Lines 3874 - 3878 correspond to equation (14). Equation (47) is only used as a step in the derivation and is not found in the code.

For successful LRRM calibration it is very important that the assumptions about the standards are filled. For example match should not have any transmission line section. All thru S-parameters should be known and especially the thru length should be correct.

--
You received this message because you are subscribed to the Google Groups "scikit-rf" group.
To unsubscribe from this group and stop receiving emails from it, send an email to scikit-rf+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/scikit-rf/3a35244f-d3da-43cd-9178-711c43a9f4dbn%40googlegroups.com.

jeanbiego

unread,
May 30, 2022, 1:55:03 AM5/30/22
to scikit-rf
Thank you for your answer.

>  Lines 3874 - 3878 correspond to equation (14). Equation (47) is only used as a step in the derivation and is not found in the code.
I see, I was mistaken. I will read more carefully..

> For successful LRRM calibration it is very important that the assumptions about the standards are filled. For example match should not have any transmission line section. All thru S-parameters should be known and especially the thru length should be correct.
Measured/Ideal match is measured/created in s1p and combined with rf.two-port_reflect to make s2p. Thus, the transmission element is inf. 
The electrical length of ideal thru is assumed to be 1 psec, but the actual measurement is 0.9~1.1 psec.

Could you also advise us on the following?
I got UserWarning: Load inductance determination failed. Calibration might be incorrect.
The following figure shows the result of the calibration as it is. As you can see, Ripple stands out.

Thank you.
S11.png
S21.png

2022年5月27日金曜日 17:00:28 UTC+9 henrik....@gmail.com:

Henrik Forstén

unread,
May 30, 2022, 10:20:45 AM5/30/22
to scik...@googlegroups.com

Your results look similar to cases where switch terms are not specified or they are incorrect. You should check the previous thread on the mailing list if you have the same problem with the VNA factory calibration. Have you used any other calibration routines with switch terms in scikit-rf successfully with data captured with the same VNA? If you have match measurement data on both ports you can check if EightTerm or UnknownThru calibration works with the same data. Those are tested much more extensively than LRRM. If those methods show the same ripple you likely have problem with the measurements, most likely with switch term measurement.

Message has been deleted

jeanbiego

unread,
May 31, 2022, 4:26:47 AM5/31/22
to scikit-rf
Thank you very much, I am now able to calibrate LRRM by applying the switch term correctly.
S21.png
May I ask one more point?
I assumed that the code below(line 3868, 3869) corresponds to equation 49 or 36, but why is the first term not -c1/(2*c2)?
"""calibration.py line 3868, 3869
z0 = -c1 + npy.sqrt(c1**2 - 4*c2*c0)/(2*c2)
z1 = -c1 - npy.sqrt(c1**2 - 4*c2*c0)/(2*c2)
"""
eq49.png
2022年5月30日月曜日 23:20:45 UTC+9 henrik....@gmail.com:

Julien Hillairet

unread,
May 31, 2022, 5:39:57 AM5/31/22
to scik...@googlegroups.com
Could you explain to us and future users what you have made to fix your issues?

Julien

Henrik Forstén

unread,
May 31, 2022, 9:11:33 AM5/31/22
to scik...@googlegroups.com

The equation is incorrect in the code. However since c1 is non-zero only if the ideal thru S11 and S22 are different, it gives the correct answer for practically all realistic inputs. That's why it was not found before since all the tests fulfill that assumption. I will make a fix for it.

jeanbiego

unread,
May 31, 2022, 10:30:21 PM5/31/22
to scikit-rf
> Julien-san
Thank you for pointing this out.
When putting switch-terms obtained as s2p into the rf.calibration.LRRM argument, s11 and s22 were inadvertently put in, corrected to s21 and s12.
wrong: (switch_terms.s11, switch_terms.s22)
correct:  (switch_terms.s21, switch_terms.s12)

> henrik-san
Now I know why it wasn't affected. Thank you for confirming this.

2022年5月31日火曜日 22:11:33 UTC+9 henrik....@gmail.com:
Reply all
Reply to author
Forward
0 new messages