# On testing two wire line loss with an analyser / VNA – part 4

This article calculates and compares three models for matched line loss (MLL) based on measurement of a transmission line section with short and open termination.

## Measurements

The measurements permitted calculation of MLL vs frequency over the measurement frequency range of 10-200MHz.

The measurement frequency range was chosen as appropriate to the intended application range and the available / manageable sample length. To make measurements down to 100kHz with similar measurement noise would have required a test length of hundreds of metres.

## Curve fitting

The measurement data was fitted to three popular models for MLL. Above is a plot of MLL (dB/m) calculated from the measurements saved as s1p files (raw), and fits to three models:

1. red x: raw MLL based on the measurements;
2. green: a curve fit to the model $$MLL = k_1\sqrt f$$;
3. blue: a curve fit to the model $$MLL = k_1\sqrt f+k_2f$$; and
4. yellow: a curve fit to the AC6LA / Johnson loss model.

With any curve fitting to a model, an important question is how good is the fit. For this article, let's use the Standard Error (SE), as an initial estimate of the Standard Deviation of the coefficient, an indicator of the variability of the coefficient on repeated sampling. We would like that the SE for a coefficient was  an order of magnitude lower than the coefficient, or lower.

For curve #2, the coefficient and SE are given below as two arrays, followed by analysis of the error:

[4.34064984e-06]
[3.92660188e-08]
Model: 1, MEAN: 0.04149, SSE: 0.001588, MSE: 1.588e-05, SSM: 0.01671, R^2: 0.913181

The SE is two orders of magnitude lower than the coefficient, so the coefficient is relevant to explanation of the variation of MLL with frequency.

The error analysis shows R^2 at 0.91, quite poor for a model of this type and warning that this model is not a very good estimator.

For curve #3, the coefficients and SE are given below as two arrays, followed by analysis of the error:

[2.76087268e-06 1.39740536e-10]
[1.16966678e-07 1.01438421e-11]
Model: 2, MEAN: 0.04149, SSE: 0.0005409, MSE: 5.409e-06, SSM: 0.02502, R^2: 0.978841

In both cases, the SE is an order of magnitude lower than the coefficient, so the coefficients are relevant to explanation of the variation of MLL with frequency.

For curve #4, the coefficients and SE are given below as two arrays, followed by analysis of the error:

[3.12463700e-14 8.41514869e-05 4.25928407e-09]
[6.57069625e-18 3.58347429e-06 3.10773959e-10]
MEAN: 0.04149, SSE: 0.0005409, MSE: 5.409e-06, SSM: 0.02502, R^2: 0.978841

One might hope that a good model with more parameters might be a better fit, but in this case, an insignificant increase in SSE and we might consider the two SSE to be equal.

## F test to compare models

The above mentioned R^2 for each of the models, but it is notoriously weak for a lot of purposes.

Let's use an F test to compare models.

### Compare $$MLL = k_1\sqrt f+k_2f$$ to AC6LA/Johnson

The first step is to define the null hypothesis and alternative hypothesis.

H0: $$MLL = k_1\sqrt f+k_2f$$
H1: AC6LA/Johnson

From the fit of model to measured data, we calculate $$F=\frac{(SSE_1-SSE_2)/(df_1-df_2)}{SSE_2/df_2}=0\\$$.

The critical value of F @ p=0.95 is 3.94, the measured value $$0 \in \left [ 0, 3.94 \right ]$$, so we accept the null hypothesis H0, the simpler model is a better estimator for this scenario.

### Compare $$MLL = k_1\sqrt f$$ to $$MLL = k_1\sqrt f+k_2f$$

The first step is to define the null hypothesis and alternative hypothesis.

H0: $$MLL = k_1\sqrt f$$
H1: $$MLL = k_1\sqrt f+k_2f$$

From the fit of model to measured data, we calculate $$F=\frac{(SSE_1-SSE_2)/(df_1-df_2)}{SSE_2/df_2}=190\\$$.

The critical value of F @ p=0.95 is 3.94, the measured value $$0.056 \notin \left [ 0, 3.94 \right ]$$, we can reject the null hypothesis H0 and accept the alternative hypothesis that the more complex model is a better estimator for this scenario.

## Conclusions

• It is possible to measure a short section of two wire transmission line with sufficient accuracy using a NanoVNA v3.3 to enable calculation of a predictive model for Matched Line Loss.
• The transmission line tested was an ‘easy' case, it used 7 strand copper conductors in a two wire windowed line construction (see the earlier articles).
• Three popular algorithms were used and an F test performed to compare adjacent pairs in the complexity hierarchy:
1. $$MLL = k_1\sqrt f$$;
2. $$MLL = k_1\sqrt f+k_2f$$; and
3. AC6LA / Johnson loss model.
• The F test rated #2 above the others on this example data.
• The case of #2 being better than #3 is an interesting one, demonstrating that a more complicated model does not assure better accuracy.
• The results apply to the scenario described, and the outcome may be different at different frequencies, or for different transmission line types.