Keyboard Shortcuts
ctrl + shift + ? :
Show all keyboard shortcuts
ctrl + g :
Navigate to a group
ctrl + shift + f :
Find
ctrl + / :
Quick actions
esc to dismiss
Likes
- Nanovna-Users
- Messages
Search
Re: Pitfalls of measuring components with the NanoVNA
#measurement
On 3/23/21 7:24 PM, jmr via groups.io wrote:
On Wed, Mar 24, 2021 at 12:39 AM, Roger Need wrote:The bridge doesn't.? It generates a 5kHz signal which is digitized. Then, in the software that's mixed with a 5 kHz sin and cos, and then averaged over 48 points? to make an I and Q value.I did some research today on how the NanoVNA calculates the reflectionI've not actually looked inside my nanovna but a quick glance at the online schematic shows a classic resistive bridge. When you connect a test circuit to the CH0 input the bridge in the nanoVNA should output a signal that measures to have the magnitude of the reflection coefficient. It will also have the phase of the reflection coefficient. The LO + NE612 mixer converts this down to 5kHz where it can be sampled with an ADC and measured in relation to the reference signal in terms of amplitude and phase. The reference is also mixed down to 5kHz. static const int16_t sincos_tbl[48][2] = { ? { 10533,? 31029 }, { 27246,? 18205 }, { 32698,? -2143 }, { 24636, -21605 }, ? {? 6393, -32138 }, {-14493, -29389 }, {-29389, -14493 }, {-32138,?? 6393 }, ? {-21605,? 24636 }, { -2143,? 32698 }, { 18205,? 27246 }, { 31029,? 10533 }, ? { 31029, -10533 }, { 18205, -27246 }, { -2143, -32698 }, {-21605, -24636 }, ? {-32138,? -6393 }, {-29389,? 14493 }, {-14493,? 29389 }, { 6393,? 32138 }, ? { 24636,? 21605 }, { 32698,?? 2143 }, { 27246, -18205 }, { 10533, -31029 }, ? {-10533, -31029 }, {-27246, -18205 }, {-32698,?? 2143 }, {-24636,? 21605 }, ? { -6393,? 32138 }, { 14493,? 29389 }, { 29389,? 14493 }, { 32138,? -6393 }, ? { 21605, -24636 }, { 2143,? -32698 }, {-18205, -27246 }, {-31029, -10533 }, ? {-31029,? 10533 }, {-18205,? 27246 }, {? 2143,? 32698 }, { 21605,? 24636 }, ? { 32138,?? 6393 }, { 29389, -14493 }, { 14493, -29389 }, { -6393, -32138 }, ? {-24636, -21605 }, {-32698,? -2143 }, {-27246,? 18205 }, {-10533,? 31029 } }; |
Re: Pitfalls of measuring components with the NanoVNA
#measurement
On 3/23/21 5:39 PM, Roger Need via groups.io wrote:
On Tue, Mar 23, 2021 at 06:15 AM, Jim Lux wrote:The basic instrument calculates I/Q (dsp.c, dsp_process()) from the input samples, with the usual multiply by sin/cos. acc_samp_s and _c, and acc_ref_s and _c.You should really be looking at the I/Q uncertainty (R and X) ratherJim,, It then calculates gamma by dividing by the reference (dsp.c, calculate_gamma()) ? float rs = acc_ref_s; ? float rc = acc_ref_c; ? float rr = rs * rs + rc * rc; ? //rr = sqrtf(rr) * 1e8; ? float ss = acc_samp_s; ? float sc = acc_samp_c; ? gamma[0] =? (sc * rc + ss * rs) / rr; ? gamma[1] =? (ss * rc - sc * rs) / rr; that's the usual (a+bj)/(c+dj)? identity -> (a+bj) * (c-dj)/[(c+dj)(c-dj)] that's gamma as a complex number. sweep() in main.c actually does the measurements for the frequencies, and applies the calibrations.? It calls *sample_func, which is defined on line 610: static void (*sample_func)(float *gamma) = calculate_gamma; The conversion to phase is done in plot.c - look for the function phase() in main.c, the trace type is set to TRC_PHASE in cmd_trace(), and that sets it up so when trace_into_index() in plot.c is called, ??? v = refpos - phase(coeff[i]) * scale; which turns the phase into a the plot value. If you're looking to turn gamma (reflection coefficient) into impedance, that's done in plot.c, also in gamma2imp() ? float z0 = 50; ? float d = z0 / ((1-coeff[0])*(1-coeff[0])+coeff[1]*coeff[1]); ? float zr = ((1+coeff[0])*(1-coeff[0]) - coeff[1]*coeff[1]) * d; ? float zi = 2*coeff[1] * d; similarly for displaying phase, trace_get_value_string() turns the value (coeff[2]) into a string. ? case TRC_PHASE: ??? v = phase(coeff[i]); ??? chsnprintf(buf, len, "%.3f" S_DEGREE, v); ??? break; So, in summary, the NanoVNA measures things in cartesian coordinates, and only converts to polar for display or plotting.
|
Re: Pitfalls of measuring components with the NanoVNA
#measurement
On Tue, Mar 23, 2021 at 07:24 PM, jmr wrote:
I've not actually looked inside my nanovna but a quick glance at the onlineJMR, Please read carefully what I wrote. I did not say the "bridge generates I and Q signals". But it is not as simple as you say. Here is edy555 commenting on the original design. How is it done now? I don't know... /g/nanovna-users/files/Miscellaneous/NanoVNA%20design%20notes%20by%20edy555/Calculate%20reflection%20coefficient%20from%20NanoVNA%20signal%20and%20plot%20frequency%20characteristics.pdf Rather than you or I speculating I hope someone here that knows the firmware details can comment. Roger |
Re: Pitfalls of measuring components with the NanoVNA
#measurement
On Wed, Mar 24, 2021 at 12:39 AM, Roger Need wrote:
I did some research today on how the NanoVNA calculates the reflectionI've not actually looked inside my nanovna but a quick glance at the online schematic shows a classic resistive bridge. When you connect a test circuit to the CH0 input the bridge in the nanoVNA should output a signal that measures to have the magnitude of the reflection coefficient. It will also have the phase of the reflection coefficient. The LO + NE612 mixer converts this down to 5kHz where it can be sampled with an ADC and measured in relation to the reference signal in terms of amplitude and phase. The reference is also mixed down to 5kHz. If the ADC after the NE612 mixer says the 5kHz signal is shrunk to 99.9% of the size of the 5kHz reference input then the reflection coefficient is 0.999. If the 5kHz signal has a phase of -112degrees with respect to the 5kHz reference then the angle of the reflection coefficient will be -112degrees. That's the way I assume the system works. I don't see why you and Jim think the bridge generates I and Q signals. What am I missing here? |
Re: Pitfalls of measuring components with the NanoVNA
#measurement
If anyone does read the paper linked to by Roger the test setup for s11 in that paper is shown in figure 4 and it is awful with bits of wobbly copper tape and a metal bar making up the short and the open. They claim they try and correct for it using equations based on a crude circuit model for their unsuitable test jig. I don't think they know what they are doing. It appears that they don't actually realise that their de-embedding won't account for the uncontrolled nature of the short and open system they are using. The damage (to the measurement uncertainty of mag r of the test cap) will already have been done during the SOL calibration. You can get away with a crude system like that if you just want to measure the capacitance of the component but if you want to measure both the magnitude and angle of the reflection coefficient of the capacitor you need to have extremely well defined open and short circuit connections.
To make the measurements I'm making I use a GHz rated text fixture where the fixture/cal Zo is very well controlled right up until it hits the open or the short discontinuity at the end of the cal kit. I'm using a cal kit where I should have the offset delays for OPEN and SHORT corrected to (hopefully) less than 1ps. I'm using a precision 50 ohm load for the cal kit. This might seem over the top but the offset delays for the cal kit need to be known quite accurately or errors can creep in for critical measurements like this. It appears that they are measuring just under 0.2R ESR for the 1nF cap across VHF using s11 That is a Q in the ballpark of just 20! They get 0.05R ESR using another method. I'm not surprised they are getting strange results with s11 (like a Q of 20) because their test setup is an uncertain mess. |
Re: Pitfalls of measuring components with the NanoVNA
#measurement
An interesting paper "Measuring Capacitor Parameters Using Vector Network Analyzers" by Stepins, Asmanis, and Asmanis might be of interest to members of this group. The three common methods of measuring components using S11 refection, S21 shunt and S21 series are discussed. It can be downloaded here....
They conclude the following: "The most problematic parameter to measure accurately with VNA is capacitor ESR. Only shunt-through technique should be used for accurate ESR measurements. However there are some limitations. ESR can accurately be measured only at f(res) and in vicinity of it (ESR measurement error below 3% can be achieved). For frequencies which are much higher or lower than f(res) the measurement accuracy can be very poor, even using shunt-through technique, because when capacitor reactance is much higher than its ESR, then the measurement error can increase enormously. Accurate measurements of ESR of capacitors with C lower than several tens of nF are impossible. ESR measurements of small-capacitance capacitors using VNA is completely useless." Roger |
Re: Pitfalls of measuring components with the NanoVNA
#measurement
On Tue, Mar 23, 2021 at 06:15 AM, Jim Lux wrote:
You should really be looking at the I/Q uncertainty (R and X) ratherJim,, I did some research today on how the NanoVNA calculates the reflection coefficient, Gamma, from the digitized bridge signals. There is very little information on this available and the firmware source code does not have a flowchart or text description. The best I could find was edy555 notes where he said he first calculates the magnitude and phase of the reflection coefficient in polar form (magnitude and phase) . From there the real and imaginary form of gamma, impedance and SWR etc. is easily calculated. If anyone has specific information on the steps done in the nanoVNA I would be interested to hear about it. My analysis program does have the Gamma I and Q output capability so here is the output based on a 470 pF capacitor at 3.4 MHz. with a reactance of 100 ohms. You can see that a .03 to .04% error in I or Q measurement results in a calculated Q error of 100 for this example. If the Q to be measured is higher even less IQ error can be tolerated. For example with a reactance of 20 ohms and a Q of 1000 the ESR is .02 ohms and a .007% in I or Q measurement results in a Q error of 50. Chasing High Q on the NanoVNA seems pointless.... Roger |
Re: NanoVNA measurement of an EFHW Transformer
Jeff
I have been using the ancient bridges for years and still use them for the high Z's. Yes! All of these ancient bridges had to go thru an initial balance for each freq. Not to mention you needed an RF source and a null meter. No swept measurement for sure. 73 |
Re: Pitfalls of measuring components with the NanoVNA
#measurement
Sorry, I made a slight goof with the last plot as the trace for the poly 470pF cap was from the wrong S1p file. To make the traces overlay correctly I have to make sure that both VNAs have the same start and stop frequencies and both have 101 points and the same applies for the simulator that plots the results. Otherwise the graphing engine creates interpolation errors and the trace will look incorrect. I've corrected this for the poly 470pF cap trace. As a bonus see the yellowish trace in the plot below. This is probably the highest Q cap I can find at about 470pF. It is a pair of 1111 series 820pF ceramic caps in series to make up a 410pF cap with very high Q. In terms of highest Q across the HF bands (for approx 400-470pF) it does seem to be the daddy at the moment...
Obviously, I had to measure this with the Agilent VNA and I'm not sure how realistic this result is for the 820pF in series with 820pF. I would definitely treat this impressive Q result as 'educational' rather than accurate! |
Re: Pitfalls of measuring components with the NanoVNA
#measurement
To make things harder for the nanoVNA I pulled a couple of 220pF ceramic disk caps from an old Cobra 148GTL-DX CB radio that was probably made in 1981. I put them in parallel to make up 440pF.
These caps should have a higher Q than the previous Philips 470pF poly capacitor. See below for a comparison between the Agilent VNA and the nanoVNA. You can see that the nanoVNA is really struggling and (as expected) the data gets really noisy at 10MHz where the Q is just over 1000. This is a 'very' harsh test for both VNAs and also the cal kit and the test fixture but you can see that the pair of 220pF caps in parallel have a much improved Q compared to the poly 470pF cap. I think it would be better to measure the Q a different way because I think there will be a fair bit of measurement uncertainty creeping in to the system when measuring higher Q capacitors like this but at least the Agilent VNA and the nanoVNA are performing roughly as expected across 5MHz to 50MHz for this type of capacitor. |
Re: Pitfalls of measuring components with the NanoVNA
#measurement
Isee, it is complex but can be accurate.
toggle quoted message
Show quoted text
But as I understand it you really have to relate the thermal losses to the real power loss, reactive power does not produce heath. Regards, Ignacio EB4APL El 23/03/2021 a las 18:56, Manfred Mornhinweg escribi¨®:
It looks like measuring the Q of high quality capacitors could be veryWell, there is always the thermal method: Put the capacitor under test in a resonant circuit, thermally disconnected from the coil, excite it to a high amplitude, and measure the temperature rise of the capacitor. Several methods can be used to calculate the loss from temperature rise, or putting the capacitor in a thermal enclosure together with some more thermal mass, and measure the rate of temperature rise, and so on. Once the power loss has been computed, it's simple to relate it to the reactive power in the capacitor, and calculate Q or dissipation factor from that. --
El software de antivirus Avast ha analizado este correo electr¨®nico en busca de virus. |
Re: Pitfalls of measuring components with the NanoVNA
#measurement
It looks like measuring the Q of high quality capacitors could be veryWell, there is always the thermal method: Put the capacitor under test in a resonant circuit, thermally disconnected from the coil, excite it to a high amplitude, and measure the temperature rise of the capacitor. Several methods can be used to calculate the loss from temperature rise, or putting the capacitor in a thermal enclosure together with some more thermal mass, and measure the rate of temperature rise, and so on. Once the power loss has been computed, it's simple to relate it to the reactive power in the capacitor, and calculate Q or dissipation factor from that. But it's a rather complex and slow method, to get the Q at just a single frequency. |
Re: Pitfalls of measuring components with the NanoVNA
#measurement
I did not, but it is designed to measure the Q of resonant circuits, where the Q is normally defined by the L. So trying to measure the capacitor's Q using this principle leads to get the Q of the L component. My Philips PM6303 RCL meter also measures Q, but according to the tests (and the manufacturer) it is limited to Q < 500.
toggle quoted message
Show quoted text
I just tried with a very high quality 2000 pF 0.5% silver-mica capacitor and both Q and D indicates out of range. It looks like measuring the Q of high quality capacitors could be very difficult, even at single frequencies. Ignacio, EB4APL El 23/03/2021 a las 14:46, n2msqrp escribi¨®:
Speaking of Q measurements has anyone tried this EDN design: > > <> > > Mike N2MS --
El software de antivirus Avast ha analizado este correo electr¨®nico en busca de virus. |
Re: Pitfalls of measuring components with the NanoVNA
#measurement
Another fairly crude form of verification would be to place a large resistorYes, that should be a good test. Also, itThe question is whether the ESR in a cap stays constant over frequency. Surely not! So even if I could measure its Q at 200MHz, that says alittle about its Q at 7MHz, which is the frequency at which I would more like use 470pF capacitors. It's relatively easy to build an ESR meter that simply measures resistance at a frequency high enough to make the reactance small compared to resistance. It can be designed like a VNA optimized for very low impedances. But it's of little use, except for bypass and coupling capacitors. Also, try andThat won't happen... I'm living in the woods, locked up (and down) due to COVID, and anyway in my country there aren't a lot of places using advanced modern electronic instrumemtation! Obviously, I'd expect the lab VNA to have the edge over the nanoVNA here.Me too. Well, the point is finding out how to get the most from the NanoVNA. And having fun with it! |
Re: Pitfalls of measuring components with the NanoVNA
#measurement
Speaking of Q measurements has anyone tried this EDN design:
toggle quoted message
Show quoted text
<> Mike N2MS On 03/23/2021 9:08 AM Jim Lux <jim@...> wrote: |
Re: Pitfalls of measuring components with the NanoVNA
#measurement
On 3/22/21 7:58 PM, Roger Need via groups.io wrote:
I spent the afternoon building a spreadsheet to calculate the reflection coefficient and phase angle required for different values of reactance and capacitance. It was quite interesting to test different scenarios. You should really be looking at the I/Q uncertainty (R and X) rather than mag and phase.? The VNA directly measures I and Q, which is then converted to reflection coefficient with sqrt and atan.? For "small" random uncertainties in I/Q on a vector, the uncertainty in magnitude and angle (in radians) are comparable. This is comparable to the "small angle approximation for sin(x) = x. Think of a vector with a "cloud" of measurement points around the tip of the vector - the noise on I and the noise on Q are comparable, and as long as noise is "small" compared to magnitude, that cloud is pretty symmetrical in shape. |
Re: Pitfalls of measuring components with the NanoVNA
#measurement
On 3/22/21 8:52 AM, Manfred Mornhinweg wrote:
Manfred's plots of the 2000pF 'Hi Q' capacitor (on the EFHW transformerEverything is possible. But I do think that the main cause of the Q inaccuracy is the limits of the NanoVNA. It's just very hard to measure a very small resistance when it's in series with a very much larger reactance. The typical way to look at this in terms of the math is to look at the I/Q precision (since that gets all the ugliness of the arctangent out of the way).? A Q of 1000 implies that the ratio between the I/Q components is 1000:1.?? The real chore, as you point out, is the precision of the I term. If your measurement uncertainty is, in absolute terms, say, 0.1 unit. And you measure 1000 units for Q and 1 unit for I, the 10% uncertainty in I dominates over the 0.01% uncertainty in Q.?? In this example, the Q measurement would have 10% error bars. So, while the NanoVNA can get, 70-80 dB SNR (1 part in 3000 to 1 part in 10,000), that's only true when measuring a big signal (that is, S is big, because N is constant) There's also the problem of getting from the raw measurement precision to the final result precision.? The calibration terms are derived from measurements with their own uncertainties. I don't see an easy way to solve this problem.? Sure, one could put a very carefully measured resistance in series, but that just rotates the I/Q, and you're still stuck with measuring small resistances.?? LCR meters solve this by using a much higher precision measurement tool (i.e. they use a lot more bits).? Yes, you could average a lot of NanoVNA measurements, but averaging only improves the uncertainty as sqrt(N) - 100 measurements gets you a factor of 10 improvement, and that's assuming that the system is stable over that time, and that there are no biases or other sources of randomness. It's like averaging the results from a counter. If the Allan deviation of the signal or reference is big enough, it doesn't help. |
Re: Pitfalls of measuring components with the NanoVNA
#measurement
Here's a Q plot of an ancient Philips 470pF poly capacitor from about 1MHz to 20MHz. I measured it on a regular Agilent VNA and then on the little nanovna. Both VNAs use a basic SMA mechanical calibration kit.
This capacitor is fairly grim in terms of Q especially above 5MHz. However, I thought it would be interesting to measure. |
to navigate to use esc to dismiss