Version:

Last Modified: January 9, 2017

Computes the cross power spectrum of the signals.

The sample period of the time-domain signal, usually in seconds.

Set this input to 1/*fs*, where *fs* is the sampling frequency of the time-domain signal.

**Default: **1

Error conditions that occur before this node runs. The node responds to this input according to standard error behavior.

**Default: **No error

The cross power spectrum of the input sequences.

The frequency interval of the power spectrum. The unit of this output is Hz if the sample period is in seconds.

The cross power,
${S}_{xy}\left(f\right)$, of the signals *x*(*t*) and *y*(*t*) is defined as

${S}_{xy}\left(f\right)=X*\left(f\right)Y\left(f\right)$

where

*X**(*f*) is the complex conjugate of*X*(*f*)*X*(*f*)=*F*{*x*(*t*)}*Y*(*f*)=*F*{*y*(*t*)}

This node uses the FFT or DFT routine to compute the cross power spectrum, which is given by

${S}_{xy}=\frac{1}{{n}^{2}}F*\left\{X\right\}F\left\{Y\right\}$

where *S*_{xy} represents the complex sequence **cross spectrum** and *n* is the number of samples that can accommodate input sequences **signal x** and **signal y**.

The largest cross power that this node can compute by the FFT is 2^{23} (8,388,608 or 8M).

Some textbooks define the cross power spectrum as
${S\prime}_{xy}\left(f\right)=X\left(f\right)Y*\left(f\right)$. If you prefer this definition of cross power to the one specified in this node, take the complex conjugate of the output sequence **cross spectrum**, because this node operates on the real and imaginary portions separately.

When the number of samples in the inputs **signal x** and **signal y** are equal and are a valid power of 2, such that
$n=m={2}^{k}$ for *k* = 1, 2, 3,..., 23, this node makes direct calls to the FFT routine to compute the complex cross power sequence. This technique is efficient in both execution time and memory management because this node performs the operations in place.

When the number of samples in the inputs **signal x** and **signal y** are not equal, this node first resizes the smaller sequence by padding it with zeros to match the size of the larger sequence. If this size is a valid power of 2, such that
$\mathrm{max}(n,m)={2}^{k}$ for *k* = 1, 2, 3,..., 23, this node computes the cross power spectrum using the FFT. Otherwise, this node uses the slower DFT to compute the cross power spectrum. Thus, the size of the complex output sequence is defined by
$\text{size}=\mathrm{max}(n,m)$.

**Where This Node Can Run: **

Desktop OS: Windows

FPGA: Not supported