**Jim Lux** 2021/08/20 07:57
On 8/20/21 5:19 AM, Joe Smith via groups.io wrote:

> For example: Looking at S11, with nothing connected to port 1 the VNA

> returns 1.00083 -0.00272913 i. Assuming a characteristic impedance

> of 50 ohms, calculate resistance. Show your work.

On the original NanoVNA, the receiver sums 48 samples against a SIN/COS

table, using 32 bit math (16 bit ADC, 16 bit sin/cos), which is then

scaled to a single precision float.

The raw reflection measurement I and Q is probably good to about 1 part

in 100,000 (14 bit ENOB & sqrt(48) averaging). I suspect that the drive

levels are set so that they are down a bit from saturating the ADC, so

the raw measurement is probably more like 1 part in 10,000 to 1 part in

20,000

1.00083 is ~1 part in 1000 away from 1, slightly more than the

measurement uncertainty, but I'd want to delve into the actual math

before saying "that is or isn't measurement noise"

gamma is calculated as

// calculate reflection coeff. by samp divide by ref

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;

rs,rc,ss,sc all have that 1 in 10,000 measurement uncertainty.

so rr is the sum of two uncertain values squared - (x+uc)*(x+uc) = x^2 +

2x*uc + uc^2 - the uc^2 term is tiny, assuming x is 1, that makes the

uncertainty in rr roughly 4x the uncertainty (because it's the sum of

two squares).

Then the actual gamma calculation is similar, 4x uncertainty for the

numerator.

So the uncertainty in gamma (I might be off here a bit, not had coffee

yet) is going to be on the order of 8-10x uncertainty of a single

measurement, so around 1 in 1000.

One has to be careful with divides, if rr has a small magnitude, then

its uncertainty might be magnified. It's too early to figure it out in

detail, and I'm sure there's an app note somewhere with a more rigorous

derivation.