-
-
Notifications
You must be signed in to change notification settings - Fork 267
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
Vector Fitting: Inaccurate results for networks with nonlinear frequency? #846
Comments
The output of |
For the DUT I randomly picked a (Coilcraft 4310LC-132). On that website they provide 2-port S parameters measured with the inductor in shunt or in series. In my test I used the data with the inductor in series. You are right, the network is not symmetric, but it should be, right? That could definitely be a problem. |
Thanks your tests! I'm also starting to think that those Coilcraft measurements are somewhat "interesting". None of the data for the 4310LC is passive, none is symmetric, and none is reciprocal. Trying to vector fit these particular networks turns out to be quite a challenge. See plots below for Still, I don't understand why is does not work. It should not even be important to have passive, symmetric, or reciprocal data. And as you said, logarithmic frequency spacing should also not be an issue. |
Your definition of symmetry is new to me, or maybe I just don't get it. For my statement I trusted the output from I tried to start a discussion about the definition used in In addition, I found this report, see section 2 about network symmetry. Regarding the actual issue here, I'm also out of ideas for now. I tried different weighting methods for the residue fitting. Currently, uniform weighting is used, i.e. frequency independent weights. Other weights do change things, such as Sharing a common set of poles should not be an issue. As long as a sufficiently large number of poles is present, all features of all network responses should be represented by the model. After all, the residues are fitted individually for all responses. |
No problem, nothing to apologize shrug I'm not entirely sure what you mean by error. Is the error fed back to the algorithm in some way? From my understanding if the model is that far off, the error should be large as well |
I'm curious about how to apply the customized weight for the vector_fit. |
What I called error is just the deviation of the fit from the original data, evaluated and plotted at each sample frequency: |
This is not currently possible via the regular API, but you can obviously modify your local copy of the code. The weights should be applied to the coefficient matrix scikit-rf/skrf/vectorFitting.py Lines 546 to 555 in b824a9d
For my tests I placed the following code after line 548, at which point the matrix # weighting
#weight = np.ones_like(self.network.f)
weight = np.sqrt(self.network.frequency.df / np.mean(self.network.f) * self.network.frequency.npoints)
print(np.shape(weight))
print(np.shape(A))
A = weight[:, None] * A
freq_responses = weight * freq_responses As you see from the printed shape of |
There seems to be an issue with vector fitting of networks with nonlinear frequency vectors.
So far, the testing has probably only been done with linear frequency and I never noticed. Is the algorithm even supposed to work with nonlinear frequency data?
Example of an rf inductor (Coilcraft 4310LC-132), with a frequency spacing that is
neither linear norlogarithmic:The text was updated successfully, but these errors were encountered: