The Analog Discovery 2 has an impedance analyzer that includes short-circuit and open-circuit compensation to correct for the impedances of the test fixture, and I’ve been thinking about how that might be computed internally. The open-circuit and short-circuit compensation can be applied independently or together, but each requires making and recording an impedance at each frequency for which impedance analysis is done.

Since there are three impedances that are measured (open-circuit, short-circuit, and device-under-test), I came up with two circuits that could model the test setup:

Let’s look at the short-circuit compensation first. For the first model, if we replace Z_DUT with a short circuit, we measure an impedance of , while for the second circuit we measure . In the first model, we can do short-circuit compensation as , where is the measured impedance with the DUT in place. For the second circuit, we would need to measure another value to determine the appropriate correction to get .

For open-circuit compensation, in the first model we get and in the second model we get . So for the first model we would need another measurement to get , but for the second model , so .

If we do both compensations, we can use either model, but the corrections we end up with are slightly different.

For the first model, we have . We can rearrange this to , or .

We can simplify that to . If , this simplifies to our open-compensation formula, and if , this approaches our formula for short-circuit compensation.

For the second model, the algebra is a little messier. We have , which can be rewritten as , or .

We also have , so , and so

Once again, when , this formula simplifies to our formula for just open-circuit compensation, and when , this approaches out formula for short-circuit compensation.

We can make the two formulas look more similar, by using the same denominator for both, making the formula for the first model

That is, the only difference is whether we scale by or correct the open-circuit measurement to use . At low frequencies (with any decent test jig) the open-circuit impedance is several orders of magnitude larger than the short-circuit impedance, so which correction is used hardly matters, but at 10MHz, changing the compensation formula can make a big difference.

For example, for the following compensation measurements using the flywires, a breadboard, and some short leads with alligator clips to make the test fixture

the choice of compensation formula would make a 3% difference is the reported impedance at 10MHz. Notice that is approximately a small capacitor and is approximately a small resistor in series with a small inductor. Shorter wires and no breadboard can make these parasitic values much smaller, so that the compensation is not so crucial. For example, here are measurements of the impedance analyzer board:

The exact values of the measurements are often limited by the noise in measuring the current through the sense resistor, at least at lower frequencies, where the impedance of the parasitic capacitance is very high.

Thank you for the interesting post! Have you ever tried verifying what the AD2 is actually doing internally? I’m working a lot with impedance measurements lately and it seems to me that the device is doing something a bit elaborate when performing the short- and open-circuit compensation, since I did not manage to reproduce their compensated impedance curve based on short-/open- and uncompensated DUT measurement alone. Do you perhaps have any input on how the ProbeRes and ProbeCap settings of the impedance tool might come into play here?

Comment by Fabian — 2021 April 9 @ 02:31 |

I have no access to internals of the AD2 (nor, more relevant here, to the code in WaveForms). I have not done a series of measurements to see whether the theory I posted here matches what they do exactly. That might be something fun to try when I have some spare time.

I have never used the ProbeRes and ProbeCap settings—those would seem to be crude attempts to do compensation without actually measuring. The open-circuit compensation does usually look fairly capacitive, but short-circuit compensation usually looks more inductive than resistive.

Comment by gasstationwithoutpumps — 2021 April 9 @ 08:30 |

Okay, it turns out I made a simple error in my calculations and now everything matches pretty well. I plotted it here in case you are interested: https://imgur.com/a/L7jIHl3 So the AD2 is exactly doing what you stated. In my case it doesn’t matter if I include the Z_sc correction term, since Z_oc is several orders of magnitude above Z_sc, even at high frequencies. Therefore I can’t tell which of the two equations is actually implemented.

In my particular setup the DUT has a rather high capacitance and seems to form a perfect LC-circuit with the inductance of the wire, resonating right in the middle of my measurement interval at around 1 MHz. So the open-/short- circuit compensation is crucial, as the uncompensated measurement gives a completely wrong picture. I saw that sometimes the compensation is done assuming a third unknown impedance Zs2, requiring a third measurement using a known resistor (or capacitor/inductor for that matter). I’ll investigate that next if that will yield improved results or whether short-/open-circuit compensation is sufficient.

Thanks again for your input. I really enjoy reading your blog and this post in particular was very helpful for my work. :)

Comment by Fabian — 2021 April 9 @ 09:03 |

The simpler correction is likely the one that they are doing, but the difference is usually going to be insignificant, for exactly the reason you mention: the short-circuit impedance is usually orders of magnitude smaller than the open-circuit impedance. (If that is not the case, then the measurements are likely to be pretty bad anyway.)

Comment by gasstationwithoutpumps — 2021 April 9 @ 09:07 |