On 26 August 2012 10:33, Volker Braun <[email protected]> wrote: > Sounds very much like a non-linear fit will be able to figure out the 8 > unknown parameters. You need a formula ("model") for impedance(frequency) > depending on the parameters.
That is what I thought might be a problem. I have no idea if its even possible to determine formual. Not even any real sensible guess, other than the fact the terms which depend on frequency^3 will likely be less important if measurements are made at low frequencies only. The basic way to use a vector network analyzer is 1) The 8 scalar parameters of the open and short circuit are programmed into the firmware of the VNA. Those practically never change. 2) After switching on the VNA, leaving it to warm up for an hour, presses a "CAL" button, choses from a list of calibration kits. The instructure then tell you to connect the open, short and load. 3) The computer in the VNA then works out the systematic errors in the VNA and applies a 12 point error correction to all measurments. Those errors will change with temperature, so if the temperature changes by more than 1 deg C, one has to do a new calibration. But there is no way to find out the correction factors the VNA applies. Note, the 4 parameters of the open and 4 paramters of the short are not considered to be temperature dependant, but the systematic errors in the VNA are. If I change the 8 paramters in the network analyzer which describe the open and short, then I need go through the calibration routine again. If I dont do that, and only change the numbers, these will be ignored, as the network analyzer only uses those 8 numbers when computing the 12 point error correction. I think if one only makes measurements at one port of the VNA, then less than 12 error terms will be needed. The mathematics of how the 12 point error correction is computed from the measurements the VNA makes of the calibration standards can be found in the literature. One can't read those paramters from the VNA, but it might be possible to determine what they are, if one takes note of the measurements, uses the data for the know calibration constants, and works out the error correction terms. > Having complex values is a bit of an extra > complication since fitting in Sage only works for real numbers. For > starters, you could look only at abs(impedance). You can emulate complex > outputs by having two real output values in the model, but Sage allows only > scalar models. GSL has some useful support here, but its not wrapped in > Sage. I suspect I need a complex fit. I very much doubt the absolute magnitude of the impedance will be very useful. A scaler network analyzer looks at the abosolute magnitude only, and calibration for scaler network analyzers is a lot simpler than for vector models. I could calibrate the VNA with a good calibration kit, then measure the complex impedance of the open circuit at every frequency. There will only be 4 unknowns of the open-circuit. But I don't have any idea how to compute the 4 scaler quantities. Perhaps this is why good calibration sets cost a lot of money! They range in price from about $1500 to over $20000. Dave. > > http://www.sagemath.org/doc/reference/sage/numerical/optimize.html#sage.numerical.optimize.find_fit > > > > On Sunday, August 26, 2012 1:06:17 AM UTC+1, Dr. David Kirkby wrote: >> >> I'm trying to work out how to solve an engineering problem. I'm hoping >> Sage can help me, but I can't work out the maths of it. I'm hoping >> someone here might be able to. >> >> A vector network analyzer (VNA) is a bit of electronic test equipment >> which measures complex impedance values as a function of frequency. >> Let's assume at 500 differenct frequencies. The VNA should be >> calibrated prior to making a measurement. It's calibrated using some >> standard devices. >> >> * A 50 Ohm resistor. Assumed to be perfect. >> * A short circuit, which is not perfect, and so it is characterised by >> 4 parameters called Ts, L0, L1 and L2. >> * A open circuit, which is not perfect, and so it is characterised by >> 4 parameters called To, C0, C1 and C2. >> >> These standards are expensive (several thousand $'s). >> >> Knowing the true values of these 8 paramters, which are pre-programmed >> into the firmware of the VNA, the computer in the VNA can calculate a >> set of correction coefficients which can remove most of its systematic >> errors. The values of these 8 parameters are all known. But how they >> affect the measurements is not known. But the point is, that using >> these high quality standards, on a good VNA, the results are accurate. >> >> Now comes the tricky bit. >> >> I have a second VNA, which is differnet from the first. It too uses >> the 50 Ohm resistor, short circuit and open circuit. But it uses a >> different set of open and short circuits. These are cheap or home-made >> ones, for which we don't know the values of the 8 parameters Ts, L0, >> L1, L2, To, C0, C1 and C2. >> >> So if I program in 8 random values for these paramters into the second >> VNA, and take a mesurement at 500 frequencies, I can be 99.9999% sure >> the resuts will be wrong. >> >> Is there any way, by comparing >> >> * True values, measured on a VNA with good calibration standards >> * Incorrect values, measured on a VNA with standards which have >> unknown coefficents >> >> I can work out what the value of these 8 coefficients should be? >> >> It is tediuous to change the coefficents in the VNA, so comparting >> results at 500 frequencies with lots of different values for the 8 >> paramters is not practical. >> >> Would programming in 8 differents sets of coefficients be sufficient >> to work out the correct values? (That would be 64 coefficents in >> total). That would be very tedious to do, but it might be possible. It >> *may* be possible to program them by computer, but I am not sure of >> that. They might need to be entered manually with keys on the VNA, >> which will be tedious. >> >> Can anyone help me with the maths, and give me an idea what functions >> in Sage might help. >> >> I'm guessing this is some non-linear fitting problem, but I'm not sure. >> >> Dave > > -- > You received this message because you are subscribed to the Google Groups > "sage-support" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]. > Visit this group at http://groups.google.com/group/sage-support?hl=en. > > -- You received this message because you are subscribed to the Google Groups "sage-support" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sage-support?hl=en.
