Real HF transmission lines, such as coaxial cable or ladder line, are not perfect conductors of HF energy,
and will therefore lead to a certain amount of RF signal loss. Depending on the type and length of transmission
line, and the operating frequency, these losses can be quite substantial.

For single-band antennas, such losses are negligible around the resonant frequency. For multi-band antennas -
such as OCFD, EFHW antennas, and half-square antennas configured as voltage-fed EFHWs - the losses are also
negligible at the various resonant frequencies, but become very significant at frequencies where the antenna
is not resonant:

40-meter EFHW antenna - chart of VSWR at the feed-point

In this example, showing only VSWR values at the antenna feed-point, very high VSWR values are seen at the
frequencies where the antenna is not resonant, i.e at the 30m, 17m and 12m bands.

By introducing a configurable length and type of coax cable into the analysis, however, it is possible to
transform such high values to ones more accessible to the average antenna tuner:

40-meter EFHW antenna - chart of VSWR at feed-point, and at the transmitter end of a length of coax

Here, the green curve shows the VSWR values to be expected at the transmitter end of a length of coax (in this
example, 12 meters of RG-316 U coax). It is apparent that the resulting VSWR values at the 30m, 17m and 12m bands
are much more amenable to tuning below 3:1 by an antenna tuner; it should be understood that this comes at the
penalty of higher signal loss.

The following section shows how such losses, and hence VSWR curves at the transmitter end of a length of coax, are
calculated.

The input impedance of a real, lossy transmission line is computed using the
Transmission Line Equation which can take
several forms. Here we use a variation using hyperbolic trigonometric functions, after
ARRL Antenna Book, 20th Edition, p. 24-12:

${Z}_{\mathrm{in}}={Z}_{0}\frac{{Z}_{L}cosh\left(\gamma l\right)+{Z}_{0}sinh\left(\gamma l\right)}{{Z}_{L}sinh\left(\gamma l\right)+{Z}_{0}cosh\left(\gamma l\right)}$

We expand this expression in order to separate out the real and imaginary parts in the sinh and cosh arguments.

${Z}_{\mathrm{in}}={Z}_{0}\frac{{Z}_{L}cosh\left(l\right(\alpha +j\beta \left)\right)+{Z}_{0}sinh\left(l\right(\alpha +j\beta \left)\right)}{{Z}_{L}sinh\left(l\right(\alpha +j\beta \left)\right)+{Z}_{0}cosh\left(l\right(\alpha +j\beta \left)\right)}$

This second expression is then expanded fully, using standard identities for hyperbolic sines and cosines of complex numbers.
This is the basis of the code used to calculate the value of Z_{in} .

${Z}_{\mathrm{in}}={Z}_{0}\frac{{Z}_{L}(cosh(l\alpha )*cos(l\beta )+jsinh(l\alpha )*sin(l\beta \left)\right)+{Z}_{0}(sinh(l\alpha )*cos(l\beta )+jcosh(l\alpha )*sin(l\beta \left)\right)}{{Z}_{L}(sinh(l\alpha )*cos(l\beta )+jcosh(l\alpha )*sin(l\beta \left)\right)+{Z}_{0}(cosh(l\alpha )*cos(l\beta )+jsinh(l\alpha )*sin(l\beta \left)\right)}$
Eq. (1)

where

${Z}_{\mathrm{in}}=$
complex impedance at input of coax line

${Z}_{L}=$
complex load impedance at end of coax line, i.e. at the antenna
$={R}_{a}\pm j{X}_{a}$

${Z}_{0}=$
characteristic impedance of coax line
$={R}_{0}+j{X}_{0}$

$l=$
physical length of coax line in meters

$\gamma =$
complex loss coefficient
$=\alpha +j\beta $

$\alpha =$
matched line loss attenuation constant, in nepers per unit length

(1 neper = 8.68589 dB; cables are rated in dB per 100 meters)

$\beta =$
phase constant of coax line in radians per unit length

$\phantom{\rule{8px}{0ex}}=\frac{2\mathrm{\pi}}{{F}_{v}{L}_{w}}$
for
${F}_{v}=$
velocity factor of coax line, and
${L}_{w}=$
wavelength
$=\frac{300}{{f}_{\mathrm{MHz}}}$

Since, for a given setup, all of these values except frequency are constant,
${Z}_{\mathrm{in}}$
will vary with frequency.

Once the value of
${Z}_{\mathrm{in}}$
has been established for a particular combination of antenna, coax feed-line and frequency, we use
the following expression
(from a letter in the Technical Correspondence section of QST magazine, November 1997, p70-71)
to calculate the loss in dB due to VSWR:

${L}_{\mathrm{VSWR}}=10{log}_{10}\left(\frac{(1-|{\rho}_{\mathrm{in}}{|}^{2})}{(1-|{\rho}_{L}{|}^{2})}\right)$
Eq. (2)

where

${L}_{\mathrm{VSWR}}=$
loss in dB due to VSWR

$\left|{\rho}_{\mathrm{in}}\right|=\text{the magnitude of\hspace{0.5em}}({Z}_{\mathrm{in}}-{Z}_{0}^{*})/({Z}_{\mathrm{in}}+{Z}_{0})$

$\left|{\rho}_{L}\right|=\text{the magnitude of\hspace{0.5em}}({Z}_{L}-{Z}_{0}^{*})/({Z}_{L}+{Z}_{0})$

${Z}_{0}^{*}=\text{complex conjugate of the feed-line characteristic impedance\hspace{0.5em}}{R}_{0}+j{X}_{0}$

This expression avoids problems associated with possibly negative values of VSWR by using complex impedances and
thus eliminating VSWR from the calculation.

In calculating losses for a particular combination of antenna and coax feed-line
over several frequencies, it is necessary to
calculate both equations 1 and 2 for each frequency. The number of frequencies covered for a VSWR curve
over a single band is on the order of 40 or 50.