# Autocorrelation to diagnose faults

I'm attending a very practical course on signals and i have some doubts, i hope to receive answers in layman terms.

1) My prof said i can use the autocorrelation of the output of a process to diagnose faults. I'm trying to understand how. Maybe by calculating the autocorrelation in different $$\Delta t$$ and notice changes ?

2) Is it possible to calculate the autocorrelation in subsequent $$\Delta t$$ and then compare the Power Spectral Densities of each $$\Delta t$$ to notice faults ?

3) Why autocorrelation is considered a statistical approach? To me, it's simply multiplications (and a division) operations applied to signal samples...

4) In which cases i'm forced to use autocorrelation instead of FFT to diagnose faults ?

• You need to define what you mean by "faults" – Hilmar Jan 24 at 12:33

I would assume by faults you mean breaks in a signal line such that a reflection occurs. This is indeed an application of the autocorrelation: You transmit a sequence down a transmission line. If there is any change in impendance in the the line (such a break or kink etc) then a portion of your signal will be reflected back according to the reflection coefficient, given as:

$$\rho = \frac{Z_L-Z_o}{Z_L+Z_o}$$

Where $$Z_L$$ is the impedance of the load and $$Z_o$$ is the impedance of the transmission line, and $$\rho$$ is a complex valued reflection coefficient with magnitude ranging from -1 to +1, and is the amount of signal reflected back toward the source at the load (from 0 to 100% and with any phase angle).

Before explaining the autocorrelation further and how you would use it, I think it would be important to know some basic transmission line theory and in particular the properties that are given by this reflection coefficient.

For example, if we had a transmission line that had an impedance of 50 ohms, and if it was terminated with a 50 ohm resistor at the load, the reflection at the load would be 0 as given by the numerator of the equation, meaning none of the signal was reflected (this is the maximum power transfer condition when we match impedance of load to the line and to the source). In such a condition, if we looked into the properly terminated transmission line from the source, since no reflection comes back it would look no different to us than if we were looking directly at a 50 ohm resistor at the source (this is one way to define the impedance of the cable; an infinitely long cable will have the same impedance as a resistor of the same value-- a shorter cable will only also look like this if it is terminated with a resistor having the value of the cable's impedance.)

Observe these other interesting conditions about the reflection coefficient and see how much it can tell us about the load.

$$Z_L = Z_o \rightarrow \rho = 0$$

$$Z_L > Z_o \rightarrow 0 > \rho \ge 1$$

$$Z_L < Z_o \rightarrow -1 \le \rho < 0$$

If the load is an open, the reflection is 1 (100%) and in phase.

If the load is a short, the reflection is -1 and out of phase.

As the reflection propagates back down the line, it constructively and destructively adds with the forward signal from the source as the line itself has phase shift proportional to the position on the line and the frequency of the signal. (A constant delay has a negative linear phase versus frequency). The velocity of this reflection is the speed of light divided by the square root of the dielectric constant of the transmission line (that sentence may be confusing, bottom line the reflection goes at the speed of light, or slower if in a transmission line with a higher dielectric constant than air). So we can measure the reflection at the source, but we can't yet tell if the load (or anywhere along the line where a discontinuity occurs, essentially becoming our new "load") was an open or a short (if it was one of the two). If the length of the line was exactly a quarter wave-length in propagation distance of our source signal's frequency, then the source signal will have shifted 90° by the time it reached the load, and any reflection will shift yet another 90° by the time it reaches our source for a total 180° phase shift. This is exactly how a quarter wave line translates the impedance of a source to an open. Similarly a quarter wave 50 ohm line will translate the impedance of a 100 ohm load to 25 ohms (these are called impedance transformers and we use these techniques to match different impedances to minimize reflections that otherwise distort our signals).

With all that said, the great thing we can do with the autocorrelation of special sequences is to accurately resolve our distance in propogation time to the mismatched load or fault (a cable RADAR). As far as special sequences, we need to use sequences that have desirable auto-correlation properties, ideally ones that have a strong correlation to themselves only when they are completely aligned and zero at all other time offsets. White noise has this property specifically, so that is what we seek: good approximations to white noise. Such sequences are called pseudo-random sequences given they appear random yet we know exactly what the sequence is (and we need to in order to correlate to it). If a sequence didn't have this property, meaning it also correlated to delayed versions of itself, then this would reduce our ability to accurately measure range to a reflection given multiple delays will also create a response from the one reflection.

Thus to do this, you transmit a psuedo-random sequence down the transmission line, while measuring the reflection (a "directional coupler" is a useful low cost relatively simple device for doing this). Correlate the reflection to the sequence at all delay offsets. The resulting plot of correlation vs delay offset will indicate faults AND range to fault based on size of peaks and distance from the origin in this correlation function. Opens and shorts will have the strongest peak. If you don't have an open and short but a damaging kink such as to change the line impedance (which would cause signal distortion and other problems so is a worthy fault to find) then you will see a smaller reflection at the range of this fault along with another likely even smaller reflection from the load that isn't perfectly matched. With a sensitive measurement you will often see something from the load due to imperfect matches at the physical transition from the transmission line to the load. If your source also is not well matched to the line, then you can see multiple reflections as a strong reflection bounces back and forth between source and load, but each of these will be at progressively further offsets from the origin with progressively smaller magnitudes so it will be very clear what is going on, especially if we have an estimate of the actual length of the transmission line.

I don't really understand Question 3. Autocorrelation is indeed simply multiplies and accumulation applied to signal samples, and is indeed a statistical approach (not either/or). One very important aspect of this is when you add samples that have noise values given by an independent identically distributed random process (the background noise you will get when you receive your reflected signal from the transmission line), the standard deviation of the sum will go up at $$\sqrt{N}$$ where $$N$$ is the number of samples you are adding. Coherent samples (which is what occurs when the sequence you are testing for is in perfect time alignment with the received reflected signal) will go up at $$N$$, so thus you achieve a $$\sqrt{N}$$ increase in the signal to noise magnitude ratio (in dB to be clear $$10Log10(N)$$).

Consider the simple Barker Code sequence that does have this nice autocorrelation property we seek, and assume you transmit a +1 when the code is 1 and an -1 when the code is 0. When you multiply this with itself in time alignment and accumulate the result, it will add to 11. The standard deviation for the IID random process of any noise on each sample will however increase by only $$\sqrt{11}$$. I leave it as an exercise for you to to see how it only adds to 1 for any other rotational shift. Consider what would occur with practical sequences that can have much longer lengths given by $$2^{k}-1$$ where k is a positive integer.

$$\begin{bmatrix} 1 & 0 & 1 & 1 & 0 & 1 & 1 & 1 & 0 & 0 & 0 \end{bmatrix}$$

To answer your last question, you can do all this with an FFT since the circular autocorrelation can be computed using the FFT:

$$XCORR = ifft(fft(a)(fft(b^*)))$$

Where $$a$$ is the perfect sequence as transmitted and $$b$$ is the reflected complex signal as received. The * represents the complex conjugate. The FFT is used but you would still be doing the process I described of using the autocorrelation property of the sequence. If you had another FFT approach that could give you the range and intensity of the fault please clarify what that is and we can further compare if you don't see it now yourself.

• Solid. I would only suggest that the "statistical approach" qualifier might have been made because of the relationship between autocorrelation->correlation->covariance. – A_A Jan 24 at 15:48
• @A_A nice addition, thanks! – Dan Boschen Jan 25 at 0:52