-
-
Notifications
You must be signed in to change notification settings - Fork 264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
180° phase jumps with IEEEP370_SE_NZC_2xThru deembedding #684
Comments
@denzchoe |
One method would be checking which root choice is closer to the previous frequency point: k = 1
test = k * np.sqrt(s21r * (1 - e111 * e112))
e01 = zeros((n), dtype = complex)
for i, value in enumerate(test):
e01[i] = np.sqrt(s21r[i] * (1 - e111[i] * e112[i]))
if i > 0:
if npy.abs(-test[i] - test[i-1]) < npy.abs(test[i] - test[i-1]):
e01[i] *= -1
# calc e10
k = 1
test = k * np.sqrt(s12r * (1 - e111 * e112))
e10 = zeros((n), dtype = complex)
for i, value in enumerate(test):
e10[i] = np.sqrt(s12r[i] * (1 - e111[i] * e112[i]))
if i > 0:
if npy.abs(-test[i] - test[i-1]) < npy.abs(test[i] - test[i-1]):
e10[i] *= -1 |
Here's an even better method for determining e01 and e10: # calc e01 and e10
e10e01 = 0.5 * (s12r + s21r) * (1 - e111 * e112)
e01 = np.sqrt(e10e01)
e10 = zeros(n, dtype = complex)
for i in range(n):
if i > 0:
if npy.abs(-e01[i] - e01[i-1]) < npy.abs(e01[i] - e01[i-1]):
e01[i] *= -1
e10[i] = e10e01[i] / e01[i] There is only one root choice since |
Looks great ! |
@Ttl |
Yes, that's fine. |
fix #684 phase jumps in 2xthru deembedding
While using IEEEP370_SE_NZC_2xThru deembedding to extract side1 and side2 of a 100mm CPWG line measurement, 180° phase jumps appeared in insertion loss, inducing corresponding phase error in deembedding results:
These are caused by the computation of
e01
ande10
usingsqrt
. The results ofsqrt
could be either positive or negative and the correct solution shall be picked.This is done here:
https://github.com/mhuser/scikit-rf/blob/b7d026cbf513924e07c97274aab311d1e54f454f/skrf/calibration/deembedding.py#L1152-L1161
and here:
https://github.com/mhuser/scikit-rf/blob/b7d026cbf513924e07c97274aab311d1e54f454f/skrf/calibration/deembedding.py#L1163-L1172
The test assume the sign invert at each positive slope change of the phase. This is correct, but calibration error and measurement noise can cause positive spikes of small amplitudes that trigger the sign inversion wrongly, this is what happens on above plot:
The text was updated successfully, but these errors were encountered: