Right way to calculate the T-Check??? - Page 1
Forum section: electronics / rf-microwave

author: erikka
author_rank: Regular Contributor
timestamp: August 21, 2019, 03:06:29 pm
content: Currently trying to assess the accuracy of my VNA and read about the T-Check.Found a artikel that specifies the calculation as:a= abs(s11*conj(s21)+s12*conj(s22))b= (1-abs(s11)^2-abs(s12)^2)c= (1-abs(s21)^2-abs(s22)^2)T-Check= a/sqrt(b*c)Is this the correct formula?Doing the measurement (without re-calibrating) from 0.1MHz to 700MHz, export to S parameter file and doing the calculations delivered this result:Could this be correct?Seems there is some room for improvement.

author: radiolistener
author_rank: Super Contributor
timestamp: August 21, 2019, 05:17:47 pm
content: according to document from R&S:ct = modulus(s11*conj(s21)+s21*conj(s11)) / (1 - pow(modulus(s11), 2) - pow(modulus(s21), 2))note that there are some differences with your equations. I'm not sure what version is correct...Currently I don't have 2 port VNA, so I cannot test it...

author: erikka
author_rank: Regular Contributor
timestamp: August 21, 2019, 05:24:27 pm
content: Most seems the same, the latter part seems missing.This is the snip of the R&S document.where I assume modulo is the same as abs

author: erikka
author_rank: Regular Contributor
timestamp: August 21, 2019, 05:29:03 pm
content: Terms b and c in my formula are in actual measurement almost the same so your formula is a good approximationa= abs(s11*conj(s21)+s12*conj(s22))b= (1-abs(s11)^2-abs(s12)^2)c= (1-abs(s21)^2-abs(s22)^2)T-Check= a/b (i.s.o. a/srt(b*c) )

author: radiolistener
author_rank: Super Contributor
timestamp: August 21, 2019, 05:41:13 pm
content: I assume modulus(z) = sqrt(z.re*z.re + z.im*z.im).Your equation looks like equation (10) from R&S document. My equation is (12), it assumes symmetrical tee-junction with the center port connected to a load of any complex impedance. But I'm not sure why it is different in comparison with equation (10).Note that there is not only missing part, but also s21*conj(s11) instead of s12*conj(s22)

author: erikka
author_rank: Regular Contributor
timestamp: August 21, 2019, 07:26:56 pm
content: Ah, missed that, after 35 years starting again with complex math I'm still a bit rusty.If we assume (12) eliminates the impact of the complex impedance in the tee then that explains why the results of the T-Check test improves with (12)Will dive a bit more into this. Thanks for the help!!!!!!!

author: erikka
author_rank: Regular Contributor
timestamp: August 21, 2019, 07:35:43 pm
content: Stupid me,The assumptions that allow transformation of (10) into (12) are given in the R&S document.s11 = s22s21 = s12e.g. the tee is fully symmetricalso you take (10) and replace s22 with s11 and s12 with s21That is why formula (12) gives a better T-Check value as it eliminates one side of the errorI will need to use formula (10) as it calculates the real error without assuming symmetry in the tee

author: radiolistener
author_rank: Super Contributor
timestamp: August 21, 2019, 07:44:53 pm
content: what do you use as T-junction?I'm planning to use this T-connector:https://www.aliexpress.com/item/32719574458.htmlWith this dummy load:https://www.aliexpress.com/item/32838542316.html

author: jca1955
author_rank: Newbie
timestamp: August 21, 2019, 08:33:07 pm
content: Quote from: erikka on August 21, 2019, 03:06:29 pmThere's a tool on MATLAB central for performing a T-check given an S2P file created using a T-adapter. I opened it and looked at the script; here's the function containing the T-check calculations:function plot_cal_error(hObject,eventdata,handles,Data)S = Data.S_Parameters;F_MHz = Data.Freq*1e-6;a = abs(S(1,1,:).*conj(S(2,1,:)) + S(1,2,:).*conj(S(2,2,:)));b = 1 - abs(S(1,1,:)).^2 - abs(S(1,2,:)).^2;c = 1 - abs(S(2,1,:)).^2 - abs(S(2,2,:)).^2;Cal_Deviation_Percent = 100*(squeeze(a./sqrt(b.*c))-1);scale = handles.scale;non_linear_y = tanh(Cal_Deviation_Percent*scale);if isreal(non_linear_y)x=F_MHz';y=non_linear_y';z=0*x;c=abs(y*handles.L_cmap);set(handles.hs,'XData',[x;x],'YData',[y;y],'ZData',[z;z],'CData',[c;c]);elseerrordlg('Did you measure a T with 50 ohms on one port?')end;There is a significant difference between your equations for b and c and those shown in the Matlab function, and it is that you've included the "1-" termwithinthe quantity being squared, rather than it being external to the squaring.Referencing the R&S app note, the equation for 'b' corresponds to the app note's equation 6 and 'c' corresponds to equation 7. Equation 'a' corresponds to equation 9. It looks to me that the a, b, and c in the Matlab function match the equations in R&S app note. But please check!By the way, the T-check Matlab utility can be found here:https://www.mathworks.com/matlabcentral/fileexchange/68893-s-parameter-utilities-v1-0-1?s_tid=prof_contriblnk. There is also a PDF explaining the various S-parameter utilities and their usage, including the T-check utility.

author: jca1955
author_rank: Newbie
timestamp: August 21, 2019, 08:53:43 pm
content: Quote from: radiolistener on August 21, 2019, 05:17:47 pmHmmm...the NanoVNA does measure both S11 and S21 (unless I am mistaken), and these are the only two quantities specified in the equation for ct, above (which assumes that S11 = S22 and S12 = S21 for the T-adapter, which may or may not be true, depending upon the accuracy of the 50 ohm terminations at the NanoVNA's ports). So one 'ought' to be able to make a T-check on the NanoVNA. Don't know how accurate it would be, though.- Jeff, k6jca

author: jca1955
author_rank: Newbie
timestamp: August 21, 2019, 09:02:35 pm
content: Quote from: jca1955 on August 21, 2019, 08:33:07 pmOoops, Erikka, my mistake! Your equations are the same as those in the Matlab function. In rereading your post, I realized that I missed your close-parenthesis at the end of each equation.Best,- Jeff, k6jca

author: erikka
author_rank: Regular Contributor
timestamp: August 22, 2019, 06:23:22 am
content: I did some more thinking based on the R&S T-Check document.Formula (10) is the T-Check function. This does NOT assume a perfectly symmetrical Tee.Formula (12) is a simplified T-Check that assumes perfect symmetry and it is mathematically proven that if the measurement is perfect AND the Tee is perfectly symmetrical formula (12) is equal to 1So if you would use the NanoVNA to do a one side measurement (only S11 and S21) of a Tee assumed to be perfectly symmetrical you would get 1Well I tried and I do not get 1 as is visible in the "Formula 12" graph so there are two possible causes for " Formula 12" not to be a perfect line on 1- The Tee I use is not symmetrical- The VNA has measurement errorsAs there is a difference between calculating (10) and (12) I assume both are true.So I tested if there is a random error in the VNA by measuring twice the S11 and S21 and doing the T test calculation both according to (10) and (12) and this is the outcomeNow (10) and (12) deliver the same result (except for some noise) so the previous delta between (10) and (12) was indeed caused by the Tee being imperfect.What remains is a systematic error and this is very visible in the measurementWith a perfect Tee and purely resistive Z and perfect calibration S11 and S21 should be straight lines and (except S21 Phase due to the length of the Tee) all be independent of the frequency and this is not true.....The errors are biggest at low and high end of the frequency range and there is the weird phase jump at 300MHz I can not calibrate away. Guess there is some non-linearity otherwise the calibration would have taken careNeed to make some improvements.

author: jca1955
author_rank: Newbie
timestamp: August 22, 2019, 12:07:02 pm
content: Erikka, there might be another reason for the errors (rather than asymmetry of the Tee itself or measurement errors).Isn't the Tee's S11 and S22 measured with both ports connected to the VNA?If so, then the symmetry of S11 and S22 isn't dependent solely on the Tee itself, but also on the quality of the VNA termination (and interconnecting coax) connected to each of the Tee's ports.For example, assuming a NanoVNA, if measuring the Tee's S11 via the NanoVNA's CH0 port, you are actually measuring the Tee's 50 ohm load paralleled with the impedance seen at the Tee's other port, which happens to be the input impedance of the NanoVNA's "CH1" port connected to the Tee through coax. And ditto for S22 (but with CH0's input impedance now in parallel with the Tee's load instead of CH1's impedance).So if the NanoVNA's CH0 and CH1 input impedances differ, then S11 and S22 will not be symmetric. Ditto for S21 and S12.Or, the input impedances could be identical, but not equal to the characteristic impedance of the interconnecting coax (e.g. 50 ohms). In this case, if the lengths of the interconnecting coax are different, then S11 and S22 will also be different (as pictured by rotation around the Smith Chart).Of course, it could be measurement error, too. But I would also suspect port-impedance differences.- Jeff

author: erikka
author_rank: Regular Contributor
timestamp: August 22, 2019, 01:18:53 pm
content: Thanks JeffWill take that into account when investigating and will come back with what I learn.

author: erikka
author_rank: Regular Contributor
timestamp: August 22, 2019, 02:52:32 pm
content: Just for laughs here is the VNA I'm evaluating. I'm not well know for the beauty of my builds.....A dead bug style build similar to nanoVNA w.r.t. generator and mixers, bridge is somewhat different setup. Some opamps to buffer and amplify. All sweep control and audio DSP processing is done in a PC. A Arduino nano manages the SI5351 and the reflection/transmission FET switchesThe two ports use effectively the same circuit as there is the same bridge at both sides as preparation for a full 2 port setup. I have not yet found any difference between the two ports.When above 300MHz the harmonics mode is activated there is some small error in the frequency calculation that is creating a frequency/phase shift in the output of the mixers. Will have to look into that.When measuring the Tee I guess I should measure 25 ohm(when extrapolated to zero Hz) but I get 23.7 ohm. I get also 23.7 ohm with two 50 terminators on a Tee that separately do measure as 50 ohm. Is this a problem?

author: erikka
author_rank: Regular Contributor
timestamp: August 23, 2019, 07:53:44 am
content: After some checking I removed some filter capacitors that could cause phase/amplitude errors and where not really needed. So now there are no more critical capacitors in the signal path.This lead to some relevant improvement in the T-Check from 1MHz till 400MHzStill need to hunt the errors above 400MHz

author: rf-messkopf
author_rank: Regular Contributor
timestamp: August 23, 2019, 10:15:23 am
content: Quote from: erikka on August 22, 2019, 06:23:22 amThat's true. Just for completeness: the T-check quantity$$\frac{ |S_{11}\bar S_{21} + S_{12}\bar S_{22}| }{\sqrt{ (1 - |S_{11}|^2 - |S_{12}|^2) (1 - |S_{21}|^2-|S_{22}|^2) }}$$being equal to unity for a perfectly corrected VNA assumes that the tee is lossless, i.e., that its 3x3 S-matrix is unitary. Symmetry or reciprocity of its S-matrix is not required.Edit: The termination on the tee also does not have be real 50 ohms, and can even have imaginary components.