Working With Signal Correlation And Frequency Analysis In Real Engineering
I spent about three years dealing with vibration data from rotating machinery before I stopped trying to force everything into textbook formulas and just started looking at what the numbers were actually telling me. Correlation and spectral analysis are two tools that ended up sitting side by side in my workflow most days. They solve different problems but they also overlap in ways that aren't always obvious. Correlation measures how similar two signals are across different time shifts. Cross-correlation tells you the delay between an exhaust pressure pulse and a cylinder firing event. Auto-correlation reveals periodicity hiding inside what looks like noise. Spectral analysis, which usually means taking a Fourier transform of your data, breaks that same signal down into its frequency components so you can see which tones are actually present and which are just measurement artifacts. The practical starting point is usually. Sample rate matters a lot more than people admit. If you are measuring a bearing fault on a motor running at 1800 rpm, the fundamental is 30 Hz. The bearing defect frequencies tend to sit somewhere between 200 Hz and 2 kHz depending on the geometry. You want your sample rate at least ten times the highest frequency of interest, so 5 kHz minimum, preferably 10 kHz to leave breathing room. Anything less and you will alias yourself into a corner you cannot climb out of.
Engineering Applications Of Correlation And Spectral Analysis
In structural testing, correlation is useful for finding transfer functions between an impact hammer input and accelerometers placed around a panel. You hit the structure at one point and record the response at five or six locations. Cross-correlate the force signal with each response signal and the peaks tell you the time delays. The spectral content of those correlations gives you mode shapes after you process enough points. This is standard modal analysis stuff. It works well until your structure has heavy damping, in which case the peaks broaden and the delay estimation gets sloppy. For condition monitoring, I mainly use spectral analysis on accelerometer data from gearboxes. A healthy gearbox shows clean gear mesh frequencies and their sidebands spaced at the shaft rotational frequency. A pitted gear introduces amplitude modulation that appears as widening sidebands around the mesh tone. The trick is knowing whether a sideband is meaningful or just harmonic leakage from the window function you chose. Hanning windows reduce leakage but widen the peaks. Flat-top windows give accurate amplitude but smear the frequency resolution. Pick based on whether you need amplitude accuracy or frequency accuracy, not both simultaneously because you cannot have both at full strength. One thing beginners consistently get wrong is treating the power spectral density plot as a complete description of the signal. It is not. The PSD tells you how power distributes across frequency but it throws away all phase information. If you are trying to figure out causal relationships between two channels, phase matters. That is where coherence comes in. Coherence is essentially a frequency-by-frequency correlation coefficient between two signals. Values near one mean the relationship is linear and consistent. Values near zero mean the output is either noisy, nonlinear, or influenced by an unmeasured input. I once spent two days chasing a phantom resonance at 47 Hz on a test rig before checking coherence and realizing the "peak" was actually electrical pickup coupling into the acquisition system, not a structural mode. The coherence plot at that frequency was basically zero.
Here is a specific problem I ran into that illustrates why these tools need to be used together rather than independently. We were troubleshooting intermittent chatter marks on a CNC machined part. The parts came out rough every third shift on certain tool paths. The spindle speed was constant at 8000 rpm, so the running order was 133.3 Hz. Time-domain vibration looked random. A standard FFT showed a broad hump around 3 kHz with nothing that jumped out as a definitive culprit. What we actually needed was cross-spectral analysis between the accelerometer on the tool holder and the encoder signal from the spindle. The cross-spectrum preserves both magnitude and phase information per frequency bin. When I computed it, there was a clear peak at 3 kHz with consistent phase relative to the encoder reference. That told us the 3 kHz feature was synchronous with the spindle rotation, not a free structural resonance. The chatter was being excited at a harmonic of the spindle speed, likely through tool runout interacting with the workpiece engagement angle. We adjusted the tool offset and the chatter disappeared. A plain FFT would have shown the same 3 kHz peak but without the phase information we would not have known it was synchronized to the spindle. Spectral analysis in practice almost always involves some form of averaging because real signals are not stationary over long windows. Welch's method is the standard approach: segment the signal, window each segment, compute the FFT of each, and average the magnitude-squared results. This reduces variance in the estimate at the cost of frequency resolution, since your effective resolution bandwidth is inversely proportional to the segment length. A 4096-sample segment at 10 kHz sampling gives you about 2.44 Hz resolution. If your gear mesh frequency is 2 kHz and your sideband spacing is 50 Hz, you can resolve them fine. If you downsample to 2048 points to get more segments for averaging, your resolution drops to 4.88 Hz and those sidebands start merging.
Get the Full Details

Correlation has its own averaging problem. If you compute the cross-correlation of two signals directly in the time domain, the result is only as good as the length of the record you have. Short records give you poor lag resolution and high variance. The fast way to do it is through the Fourier domain: multiply one spectrum by the complex conjugate of the other, then inverse transform. This is computationally efficient for records longer than roughly 1024 samples but it assumes the signals are periodic within the window, which introduces circular correlation artifacts. Zero-padding at least to twice the record length removes that issue entirely. Another practical consideration is DC offset. A large DC component in your signal will dominate the low-frequency end of your spectrum and can mask real content. It also inflates the auto-correlation at zero lag without contributing useful information. Always high-pass filter or subtract the mean before doing correlation or spectral work unless you genuinely care about the DC level. I learned this the hard way when a hydrophone measurement of underwater structure-borne noise showed an enormous peak at 0 Hz that I initially thought was a low-frequency acoustic mode. It was just the preamp bias voltage. When it comes to identifying faults from spectral data, the common pitfall is looking for the fault frequency and stopping there. Ball pass frequency outer race, ball pass frequency inner race, fundamental train frequency, ball spin frequency, nutation frequency. These are all calculable from the bearing geometry and shaft speed. But the raw fault frequency rarely appears as a standalone peak. What you usually see is the gear mesh frequency or a running order modulated by the defect frequency. The defect shows up as sidebands, not as an isolated tone. If you only scan for the calculated BPFO value and ignore the mesh region, you will miss most real faults. The information is in the modulation pattern, not in a single frequency bin.
Correlation-based methods also have a blind spot that people forget. They assume stationarity over the correlation window. If your signal is nonstationary, like a transient impact or a sweep tone, the correlation peak will smear across multiple lags and the spectral estimate will spread energy across adjacent bins. For these cases, wavelet analysis or short-time Fourier transforms are more appropriate. I switched to spectrograms whenever I was analyzing tool breakage events because the frequency content changes rapidly over milliseconds and a full-record FFT just produces a featureless blur. There is also the issue of synchronously averaged spectra versus ensemble averages. Synchronous averaging locks the FFT window to a multiple of the shaft rotation period. This is extremely effective forgearbox analysis because it rejects all nonsynchronous content and leaves only the periodics. The downside is that if the shaft speed fluctuates even slightly during the capture window, the synchronous average will smear instead of clean up the signal. I had one dataset where the motor drive had a 0.5 Hz ripple on the speed, and the synchronous average made the gear mesh peak wider rather than sharper. Switching to a conventional averaged spectrum with a Hanning window produced a cleaner result because it does not assume perfect periodicity. Data acquisition hardware is another area where people cut corners and pay for it later. The dynamic range of your ADC limits what you can see in the spectral domain. A 16-bit ADC gives you roughly 96 dB of theoretical dynamic range, but real converters with antialias filters and reference noise often deliver closer to 80 to 85 dB usable range. If your fault-related vibrations are 60 dB below the dominant running order, you are already at the edge of what a 16-bit system can resolve without additional techniques like oversampling or dithering. Higher-resolution ADCs help but they also slow down your maximum sample rate, so you have to balance resolution against bandwidth.
For anyone actually implementing this in code rather than just reading plots in a commercial package, the numpy and scipy ecosystems cover the basics well. The scipy.signal.csd function computes the cross-spectral density using Welch's method with configurable window type, segment length, and overlap. For coherence, scipy.signal.coherence does the same under the hood. If you need synchronous averaging, you will likely have to write a custom loop that resamples each record onto a common angle grid before computing spectra. The resampling step is where things get tricky because interpolation errors can introduce artificial spectral content. The software side of things also depends heavily on your trigger strategy. Free-running acquisition gives you continuous data but you have no guarantee that any particular event lines up with your analysis window. Triggered acquisition on a physical event, like a photodiode detecting a keyway passing a sensor, gives you phase-locked records that are much easier to average and correlate. The trade-off is that you need a clean trigger signal, and in industrial environments those signals are often noisy or intermittent. I once dealt with a hall-effect sensor on a rotating shaft that picked up metallic chips from the machining process, causing false triggers roughly once per minute. The spurrious triggers contaminated the ensemble average until I added a dead-time filter that rejected any trigger occurring within 20 milliseconds of the previous one. One more nuance worth mentioning is the difference between correlation in the time domain versus coherence in the frequency domain. They are related but not equivalent. Coherence measures linear correlation at each frequency while time-domain cross-correlation measures the overall similarity across all frequencies combined. A pair of signals can have high coherence at one frequency and near-zero coherence at another, producing a cross-correlation function that looks messy even though the individual frequency relationships are clean. I use coherence first to identify which frequency bands have a stable relationship, then I look at the time-domain correlation restricted to those bands using bandpass filtering.
The main limitation of this whole approach is that it is descriptive, not diagnostic. Spectral peaks tell you what frequencies are present and correlation tells you how signals relate, but neither tells you definitively why something is happening without domain knowledge. A 1 kHz peak could be a bearing defect, a structural resonance, an electrical noise source, or a data acquisition artifact. The math does not care. The interpretation does. That is why people who rely solely on automated fault detection algorithms without understanding the underlying physics tend to generate more false alarms than they solve problems.