TT Lab
Get started
Learn Learning paths Courses

My Cable Has an Echo

TDR: what can a returning wave tell you?

Continue in TT Lab

In one line

TDR is a method of sending a fast voltage change and reading the magnitude and time of the change that returns. The sign of the reflection tells you the impedance change at the boundary, and the round-trip delay tells you the one-way distance to the boundary. However, if there is no observable reflection, you cannot say you found the location.

Why this was needed

In the previous lab you compared the wave reflected at the end of the cable with the termination resistor. Now consider a situation where the thickness or structure changes in the middle of the cable. From the maximum received voltage alone, it is hard to know where the change arose. If you look at when the wave that came back to the transmit point appeared, you can read spatial information as time.

But multiplying the reflection time by the propagation speed does not directly give the distance. The signal goes to the boundary and returns along the same path. The departure delay and the finite rise time are also included in the observation time. This lesson is an ideal experiment that shows these items separated one by one. It is not a product-grade location estimator that resolves real equipment bandwidth, cable loss, or situations where several boundaries are mixed.

How it works

The experimental circuit consists of a 1V pulse source, a 50Ω source resistance, a 50Ω first line, a second line of a different impedance, and a termination matched to that value. The first line's one-way time is 2/3/4ns, and the second line's is 3ns. The second line Z2 and the termination are matched together to one of 25/50/100Ω. This removes additional reflection from the end termination so that only the effect of the single middle boundary remains. The source is also matched to the first line, so it does not reflect the returning wave again.

1V 펄스 ─ 50Ω 소스 ─ TX ─ [50Ω, 편도 TD] ─ 경계 ─ [Z2, 3ns] ─ Z2 종단
                         └──────── 경계로 출발 → ← TX로 귀환 ────────┘

The forward wave A first seen at TX is 0.5V. The reflection coefficient at the boundary is Γ=(Z2−50)/(Z2+50), and the plateau B after returning to the transmit point is A+AΓ. So from the two observed plateaus you find Γ=(B−A)/A and back out Z2=50(1+Γ)/(1−Γ). If you call B/A itself Γ, or wrap the difference in an absolute value, you mistake a low impedance for a high one.

Second line TX first plateau A TX after return B Γ
25Ω 0.5V About 0.3333V −1/3
50Ω 0.5V 0.5V 0
100Ω 0.5V About 0.6667V +1/3

This table is an analytical value for the specified circuit and is not a real measurement. In the lab you extract the two values from the TX waveform that ngspice actually calculated. The input pulse begins rising at 1ns, with a rise time of 0.2ns or 0.6ns. The departure time is when TX crosses A/2 upward, and the return time is when TX, after 3ns, crosses (A+B)/2 in the reflection direction. Half of the same rise time is included in both times, so taking the difference cancels the departure delay and that half.

For example, with TD=3ns and a rise time of 0.2ns, the departure half is about 1.1ns and the return half is about 7.1ns. The difference is 6ns and the one-way time is 3ns. Using the educational propagation speed of 0.2m/ns, the distance is 0.6m. If you use 7.1ns as it is, or multiply the round-trip 6ns directly by the speed, you overestimate the location. The real propagation speed must be learned separately depending on the cable structure and dielectric, and this value is not the speed of every line.

The time column of ngspice is in seconds. The analyzer converts to ns just once when reading, and all later time operations are in ns. The samples are not assumed to be equally spaced. It interpolates along a straight line between the two samples that bracket the threshold. Rising is checked as a.v < threshold ≤ b.v and falling as a.v > threshold ≥ b.v, and the after condition is applied to the interpolated time. Even if after falls between two samples, a valid crossing is not discarded. A first point that is already high, or a plateau, is not a new crossing. Distinguish this convention from the earlier lab's first_crossing_ns.

A plateau is the median of the samples in the closed time windows [2,3]ns and [12,14]ns. Each of the two windows must have at least two samples. This is the window choice of this fixed experiment and not a universal algorithm to apply to every TDR waveform. If there is no data, it must fail rather than fill in 0. Even if the whole waveform is truncated or times are duplicated, the analysis does not continue.

If |Γ|≤1e−6, this educational convention treats it as no reflection observed. The return time and distance are None, and null in JSON. Even if TD is written in the model settings, that number is not a result found by observation. At Γ=0 you can estimate that the impedance is 50Ω, but the location where two lines of the same impedance meet cannot be distinguished with this waveform. Do not turn "no reflection" into "no line".

What it looks like in the field

The most dangerous mistake in an analysis report is to write the location you entered straight into the result slot. It looks consistent with the result you want, but it is not an analysis. In the next lab you check for this mistake by preserving the real waveform and changing only the TD in the settings. The observed round-trip time must stay the same, and only consistent must change to false. You also distinguish the case where the impedance setting is changed in the opposite direction.

Validate all settings before running, and do not overwrite an existing output folder. For each case, leave the settings, the circuit, the engine log, and the full waveform, and link them with the final report. Even when the result looks right, keep simulated=true and physical_certified=false. Having solved a circuit model and having measured and certified a real cable are different. This agreement check only confirms the size and delay of that ideal model and is not a function that certifies the authenticity of the whole circuit file.

What you will do in the next lab

You complete eight steps: configuration validation, parsing the whole waveform, plateau extraction, signed reflection and impedance back-calculation, bidirectional crossing interpolation, single-run analysis, running multiple conditions, and CLI evidence preservation. The helper that generates waveforms is provided, and you write the analysis functions yourself. You compare nine conditions, including a condition with no reflection, and check that the round-trip delay is preserved even when the rise time changes.

Reference documents: the lossless T element in section 6.1 of the ngspice official manual and the reflection coefficient in TI AN-905. The latest edition of the manual differs from the ngspice 42 version in the lab image. The T element, tran, and wrdata commands used here are separately checked with the real 42 engine.