Vector network analyzer (source code)

= Vector network analyzer

A vector network analyzer measures complex reflection and transmission of electromagnetic signals as a function of <frequency>. The word vector records that both magnitude and relative <phase> are measured. It is used in <electrical measurement> of devices such as <transmission lines>, filters and amplifiers; the measurement is a comparison of outgoing signals with a reference excitation.

A primary manufacturer explanation describes a tuned receiver that down-converts the measured signal and compares it with a reference split from the source. Its test set samples the reference signal automatically. A longer signal path produces a frequency-dependent <phase> delay, even if its magnitude is unchanged.<Vector Network Analyzer Basics by Anritsu>[Opening tuned-receiver/reference-split discussion and electrical-delay example]{ref}

For a two-port device, <scattering parameters> relate incident wave amplitudes $a_1,a_2$ to outgoing amplitudes $b_1,b_2$:
$$
\begin{pmatrix}b_1\\b_2\end{pmatrix}
=\begin{pmatrix}S_{11}&S_{12}\\S_{21}&S_{22}\end{pmatrix}
\begin{pmatrix}a_1\\a_2\end{pmatrix}.
$$
When port 2 has no incident wave, $S_{11}=b_1/a_1$ and $S_{21}=b_2/a_1$. The termination and reference-plane conditions belong to the definition. For equal real reference impedances with power-normalized waves, $|S_{21}|^2$ is the transmitted-to-incident power ratio under that condition.

For example, $S_{21}=0.5e^{-i\pi/3}$ has magnitude $0.5$, phase $-60^\circ$ and power ratio $0.25$. Its logarithmic magnitude is $20\log_{10}(0.5)\approx-6.02\,\mathrm{dB}$. A magnitude-only measurement loses the phase. A pure delay $\tau$ contributes $e^{-2\pi if\tau}$; a $2\,\mathrm{ns}$ delay changes phase by $-36^\circ$ over a $50\,\mathrm{MHz}$ frequency increase, without changing magnitude. This is an original numerical example of the manufacturer's reference-delay principle.

<Instrument calibration> and a stated reference plane are consequently important: connecting cables and fixtures can contribute their own response. Phase wraps also require care because angles differing by $360^\circ$ describe the same complex value. The <complex relative gain error> can quantify a deviation that would be invisible if only transmitted magnitude were compared.