The standard equipment for measuring impedance variations is a Time Domain Reflectometer, TDR. TDRs are very effective but resolving small elements requires a wide bandwidth, which implies the TDR will be very expensive. This note explores a £35/$55 alternative based on SDR dongles and noise sources, to see what can and cannot be achieved.
Although there are limitations, initial results are surprisingly good and useful. For example, Figure 1 shows reflections in two different transmission lines with an open-circuit stub 3.1m from the TDR. The first stub is 19cm long, and the second is 29cm long.
The stubs’ differing lengths are clearly distinguishable.
Why do such impedance variations matter? Because with RF circuits and medium/high speed digital circuits, connections must be uniform-impedance correctly terminated transmission lines. Impedance discontinuities in RF circuits causes peaks and troughs in the frequency response, leading to poor performance and/or link failure. Impedance discontinuities in digital circuits cause signal integrity problems, leading to marginal operation and/or pattern-sensitive errors.
TDRs inject a short impulse into the transmission line, and display the line’s “impulse response” on an oscilloscope. Impedance imperfections appear as “echoes” in the “impulse response” of the circuit, and the scope’s limited bandwidth determines the smallest visible feature.
For a bandwidth , the adjacent impulses in the time-domain response are seconds apart. Given an impedance mismatch distance from the instrument and propagation velocity , the reflection will be visible at the instrument at time . Thus the distance resolution is .
Many amateurs have 100MHz oscilloscope, and the velocity in a transmission line is typically 0.66c, so the distance resolution will be = 0.5m and discontinuities 1m apart can be clearly distinguished. Alternatively, cheap SDR dongles can receive signals at up to 1.5GHz, so the distance resolution is potentially 33mm with discontinuities 66mm apart being distinguishable.
A circuit’s frequency-domain response and time-domain impulse response are duals of each other, related by the Fourier Transform, , and inverse Fourier Transform, . Hence if the circuit’s frequency response is measured, its impulse response can be calculated.
The usual method of measuring the frequency response is to use a vector network analyser (VNA) or spectrum analyser (SA), with a coupled tracking signal generator. Unfortunately VNAs and SAs at least as expensive as an equivalent oscilloscope. A very good overview of using a VNA as a TDR is Agilent’s Time Domain Analysis Using a Network Analyzer Application Note 1287-12.
Cheap SDR dongles are intended to demodulate RF signals, but they can also be used to measure power without demodulation. Since they are cheap and it doesn’t affect their intended purpose, their frequency response is far from flat, their dynamic range is limited, and their sweep speed is slow. Despite those limitations, they can function as crude spectrum analysers, as demonstrated by many programs including RTL-SDR Scanner, RTL SDR Wide Spectrum Analyzer, and Simon Schrödle’s evaluation.
Cheap programmable signal generators are available, and could be swept in sync with the SDR. However, those which work at GHz frequencies are based on synthesisers which produce square waves, not sine waves. In this application such synthesisers’ harmonic content is not filtered out, and is unacceptably high.
The cheap low-tech alternative is a diode-based white noise source, which emits white noise from MHz to several GHz. While frequency sweeping is unnecessary, it also has disadvantages that limits the overall dynamic range and correspondingly limits the maximum observable distance:
- with non-linear devices in the transmission line, high powers could produce excessive intermodulation products
- if the SDR’s RF front end has too high a gain, it will be saturated
To simplify discussions, it is assumed that the homebrew TDR is being used to measure a transmission line. The circuit diagram in Figure 2 shows:
- an SDR dongle: R820T2 based on a Realtek R820-T2 front-end tuner/amplifier and RTL2832U demodulator, with the input impedance changed from 75Ω to 50Ω. Frequency range 24MHz-1.5GHz RF power is measured by Kyle Keen’s program rtlpower. Dynamic range is around 30dB. Cost:£12/$18
- a noise source: from EBay, based on the “BG7TBL 2014-06-20” design. Frequency range probably around 4GHz, i.e. much greater than the SDR dongle’s. Power output approximately 10dBm. Cost: £19/$30
- splitter-combiner: Mini-circuits ZFSC-2-2500-S+, 10-2500MHz. Cost: £4/$7, second-hand
- Python programs control the SDR dongle, calculate and display the impulse response
The relative merits of splitter-combiners and directional couplers have not yet been fully assessed. Simple tee-junctions have the disadvantage that the input impedance is 25Ω, which causes power reflected from the transmission line to be re-reflected back into the transmission line.
Process and Algorithm
Unlike VNAs, SAs are inherently scalar, and there is no useful phase information in a noise source. Now the inverse-FFT does contain phase information, but it is meaningless and thus is discarded by only using the magnitude of time series. The net result is that the impulse response cannot distinguish positive reflections from negative reflections. Thus a short-circuit appears identical to an open-circuit, and in a 50Ω line a 55Ω termination gives the same result as a 45.5Ω termination.
Nonetheless, if it is only impedance changes and reflection coefficients that are important, this technique is sufficient.
The process is:
- verify SDR dongle input is not saturated
- with a 50Ω terminator at the reference plane, measure the spectrum of the noise source and SDR dongle. This, with all its imperfections, is the “baseline spectrum”,
- replace the 50Ω terminator with the transmission line under test and measure the spectrum,
- the frequency-domain response of the transmission line is therefore
- the impulse response of the transmission line is then , where is the inverse Fourier transform
Note that no window function is applied to the responses; that will be the subject of later experiments.
Figure 3 shows the baseline spectrum, , with a 50Ω terminator connected directly to the TDR.
The reasons for the ripple at 1.1GHz and discontinuities around 100-300MHz are unclear; possibilities are discussed in RTL SDR Dongles: Anomalous Frequency Domain Response.
Figures 4 and 5 show the frequency response, and impulse response, of 2.02m RG-58 cable terminated with 50Ω, 75Ω, a short-circuit and an open-circuit.
The main peak is at 2.1m, and the echoes at 4.22m and 6.27m presumably indicate a less than perfect match at the splitter-combiner. The peak at 6cm is presumably due to mismatches inside the TDR. Update: the spurious echoes and “hash” between 0 and 2m can be significantly reduced, as will be described in part 2.
Figure 6 shows the reflections from an open-circuit stub located 3m along a terminated transmission line.
The first peak at 3.1m is caused by the tee, the second is caused by reflections off the end of the stub. Two impulse responses are shown, for 19cm and 29cm long stubs with reflections at ~3.3m and ~3.4m respectively.
Figures 7 and 8 show the frequency response, and impulse response, of a much longer transmission line: a terrestrial TV feed cable from a roof-mounted antenna. The characteristics of the cable are unknown, but reception is variable across the DTV band around 650MHz. It is probable that the reflections at 13.1-14.1m are from the antenna itself. The reflections at 4-5m and 2m may or may not be the cause of the patchy reception; either way they are undesirable.
Those results are sufficient to demonstrate the principle of using an SDR dongle plus noise source, but there are annoying imperfections in the results. It will be interesting to see if the imperfections can be minimised by further processing.