# What Is Cross Spectral Density and When Should You Use It?

### Key Takeaways

• There are several ways to compare two signals, but comparisons should be based on concrete analysis rather than graphical methods.

• Cross spectral density is a method for comparing the power spectra for two signals.

• Cross spectral density is also related to other signal comparison metrics, and signal processing engineers should understand which metrics are best to use in different situations.

Signal integrity, power integrity, EMI, and circuit design often involve signal capture and comparison. For simple harmonic signals in LIH systems—where an AC wave is sourced and measured in the time domain—signal comparison is very simple and only requires looking at graphs of two or more signals. It’s then possible to build a transfer function matrix that compares different signals (inputs and outputs) to fully understand the electrical behavior of your system.

What if you need to compare noisy signals that hide some amount of periodicity? What if your low-level harmonic input signals appear to be masked by random noise—how do you determine their relative level of randomness? Statistical techniques from time series analysis can be used to perform signal comparisons in electronics. The algorithms for computing these metrics rely on FFTs, but they can be implemented in signal processing blocks in your system’s host controller.

## What is Cross Spectral Density?

Cross spectral density is defined for a pair of signals, x(t) and y(t). The cross spectral density tells you how these two signals are roughly correlated in the time domain throughout their respective power spectra. A high cross spectral density value indicates the two time domain signals tend to have high power spectral density, while a value of 0 indicates they tend to have unrelated power spectral density. Note that the cross spectral density is a spectrum, so the previous sentence applies at specific frequency values.

Mathematically, cross spectral density is defined using a Fourier transform of a convolution between the two signals:

Cross spectral density definition

For discretely sampled signals in the time domain, the DFT algorithm would be used to determine the cross spectral density. When the two signals are equal, the cross spectral density reduces to the Fourier transform of an autocorrelation function according to the Wiener–Khinchin theorem.

### Interpretation

Cross spectral density is a type of covariance measurement between two signals. The two signals do not necessarily need to have the same units, and a normalized unit system may be used to quantify this type of covariance, making their correlation equal to their covariance. The use of covariance is quite important for examining when two signals with similar power spectra are coincident. In other words, this means two signals may be uncorrelated even though they have non-zero average power within the same bandwidth.

This is an interesting anomaly from statistics, where two signals may appear to be totally independent even though they have some coincidence or explicit dependence. For example, consider the time series X(t) and Y(t) = X-1. These two time series are defined as being dependent, but their average cross-correlation function is 0. Other examples can be derived for cases where the statistical moments (mean, variance, etc.) for the two time series are independent of time. The important point here is that a cross-correlation is not sufficient for resolving coincidence or dependence between every pair of signals, and time series analogs of higher order statistics (skewness, kurtosis, etc.) may be needed to examine dependence between time series.

### Relation to Cross-Correlation

As we discussed above, cross spectral density is a type of correlation between time series (or autocorrelation for two identical time series). In time series analysis, the cross spectral density is also defined in terms of a cross-correlation:

Cross spectral density definition in terms of cross-correlation

Note that, by matching the integrands in the above two equations, we can see that a cross-correlation is just a convolution between two time series. The definition of cross spectral density can be extended to the case of more than two signals by writing out a matrix. Indeed, correlation matrices are used in multivariate statistics to describe correlations between pairs of variables, and the same formalism can be used here to describe spectral densities. An example for a comparison between three signals is shown below:

Cross spectral density definition as a matrix for three signals i, j, and k

### Prediction in the Presence of Noise With Coherence

Cross spectral density is related to a predictive quantity in time series called coherence. The coherence function estimates the extent to which a measurement of y(t) can be predicted using a measurement of x(t) with a linear function, meaning this is the time series analog of the coefficient of determination from Gaussian statistics:

Coherence function

If the system is purely linear with a single input x(t) and single output y(t), the coherence will be equal to 1. If this purely linear system contains noise, the coherence value will converge to 1 as the number of {x(t), y(t)} sample pairs approaches infinity. This statement can only be generalized to a system with a larger number of inputs and outputs for an independent input-output pair. This statement may also only be valid in specific frequency domains; some systems may become nonlinear in certain frequency ranges, a fact which may not be obvious from comparing graphs of two time series.

### How to Use These Functions

Cross spectral density and the associated quantities shown above have some specific uses and interpretations to be considered in signal processing. Note that all of the above quantities are defined in the frequency domain based on measurements in the time domain. These values tell you about dependencies between signals in specific bandwidths. In a bandlimited system, the system may exhibit strong dependence in one frequency range while exhibiting no dependence in another frequency range.

In summary, the functions presented above can be used to learn about a system from measurements, making them useful for black-box systems. This is also useful for modeling noise in causal systems, specifically to determine which noise measurements may be dependent rather than totally random. Such cases can arise in passive and active systems with feedback. Cross spectral density and coherence measures of two or more signals in a system can be used in the following ways:

• To determine linearity, use coherence.
• To determine coincidence, use cross spectral density.
• To determine causal dependence, more investigation is typically needed.

Cadence’s PCB design and analysis software can help you simulate circuit behavior with additive noise sources and export your data into columnar format. You can then use your data in any modeling application to calculate cross spectral density and analyze signal behavior. When you use Cadence’s software suite, you’ll also have access to a range of simulation features you can use in signal integrity analysis, giving you everything you need to evaluate your system’s functionality.