Last Modified: January 12, 2018

Computes the auto-correlation matrix of a signal.

A Boolean to determine initialization of the internal state of the node.

True | Initializes the internal states to zero. |

False | Initializes the internal states to the final states from the previous call of this node. |

This node automatically initializes the internal state to zero on the first call and runs continuously until this input is True. For a large data sequence consisting of smaller blocks, when this input is True, this node calculates the histogram of the current block only and ignores previous blocks.

**Default: **False

Order of the auto-correlation matrix. If the order is smaller than zero, this node returns an error.

**Default: **0

Method used to compute the auto-correlation matrix.

Name | Value | Description |
---|---|---|

AutoCorrelation | 0 | Uses the auto-correlation method. |

Pre-Windowed | 1 | Uses the pre-windowed method. |

Post-Windowed | 2 | Uses the post-windowed method. |

Covariance | 3 | Uses the covariance method. |

Modified Covariance | 4 | Uses the modified covariance method. |

Determining Which Method to Use

Auto-correlation matrix is widely used in the field of spectrum analysis to estimate the spectral components within the input signal. In general, Covariance and Modified Covariance methods give better results in spectral estimation processing than the AutoCorrelation, Pre-Windowed and Post-Windowed methods. NI recommends that you use the Covariance or the Modified Covariance method to estimate the auto-correlation matrix when performing spectrum analysis.

Algorithm Definition for the Auto-Correlation Method

If **method** is AutoCorrelation, *R* is a data matrix of size (*N*+*k*)-by-(*k*+1) defined as follows.

$R=\left[\begin{array}{ccc}{x}_{0}& \cdots & 0\\ \vdots & \ddots & \vdots \\ {x}_{k}& \cdots & {x}_{0}\\ \vdots & \text{\hspace{0.17em}}& \vdots \\ {x}_{N-1}& \cdots & {x}_{N-k-1}\\ \vdots & \ddots & \vdots \\ 0& \cdots & {x}_{N-1}\end{array}\right]$

where

*x*_{i}is the*i*^{th}element in the input signal*N*is the length of the input signal*k*is**order**

The normalization factor is equal to *N*.

Algorithm Definition for the Pre-Windowed Method

If **method** is Pre-Windowed, *R* is a matrix of size *N*-by-(*k*+1) defined as follows.

$R=\left[\begin{array}{ccc}{x}_{0}& \cdots & 0\\ \vdots & \ddots & \vdots \\ {x}_{k}& \cdots & {x}_{0}\\ \vdots & \text{\hspace{0.17em}}& \vdots \\ {x}_{N-1}& \cdots & {x}_{N-k-1}\end{array}\right]$

where

*x*_{i}is the*i*^{th}element in the input signal*N*is the length of the input signal*k*is**order**

The normalization factor is equal to *N*.

Algorithm Definition for the Post Windowed Method

If **method** is Post-Windowed, *R* is a matrix of size *N*-by-(*k*+1) defined as follows.

$R=\left[\begin{array}{ccc}{x}_{k}& \cdots & {x}_{0}\\ \vdots & \text{\hspace{0.17em}}& \vdots \\ {x}_{N-1}& \cdots & {x}_{N-k-1}\\ \vdots & \ddots & \vdots \\ 0& \cdots & {x}_{N-1}\end{array}\right]$

where

*x*_{i}is the*i*^{th}element in the input signal*N*is the length of the input signal*k*is**order**

The normalization factor is equal to *N*.

Algorithm Definition for the Covariance Method

If **method** is Covariance, *R* is a matrix of size (*N*-*k*)-by-(*k*+1) defined as follows.

$R=\left[\begin{array}{ccc}{x}_{k}& \cdots & {x}_{0}\\ \vdots & \text{\hspace{0.17em}}& \vdots \\ {x}_{N-1}& \cdots & {x}_{N-k-1}\end{array}\right]$

where

*x*_{i}is the*i*^{th}element in the input signal*N*is the length of the input signal*k*is**order**

The normalization factor is equal to *N*-*k*.

Algorithm Definition for the Modified Covariance Method

If **method** is Modified Covariance, *R* is a matrix of size 2(*N*-*k*)-by-(*k*+1) defined as follows.

$R=\left[\begin{array}{ccc}{x}_{k}& \cdots & {x}_{0}\\ \vdots & \text{\hspace{0.17em}}& \vdots \\ {x}_{N-1}& \cdots & {x}_{N-k-1}\\ {\begin{array}{c}{x}_{0}\end{array}}^{*}& \cdots & {\begin{array}{c}{x}_{k}\end{array}}^{*}\\ \vdots & \text{\hspace{0.17em}}& \vdots \\ {\begin{array}{c}{x}_{N-k-1}\end{array}}^{*}& \cdots & {\begin{array}{c}{x}_{N-1}\end{array}}^{*}\end{array}\right]$

where

*x*_{i}is the*i*^{th}element in the input signal*N*is the length of the input signal*k*is**order***x*_{i}* is the complex conjugate of*x*_{i}

The normalization factor is equal to 2*(*N*-*k*).

**Default: **AutoCorrelation

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an **error in** input and an **error out** output so that the node can respond to and communicate errors that occur while code is running. The value of **error in** specifies whether an error occurred before the node runs. Most nodes respond to values of **error in** in a standard, predictable way.

**Default: **No error

Auto-correlation matrix of the input signal.

The output can return a 2D array of double-precision, floating-point numbers or a 2D array of complex double-precision, floating-point numbers.

The size of the auto-correlation matrix is (**order**+1) multiplied by (**order**+1).

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

**error in** input and an **error out** output so that the node can respond to and communicate errors that occur while code is running. The value of **error in** specifies whether an error occurred before the node runs. Most nodes respond to values of **error in** in a standard, predictable way.

This node uses the following equation to calculate the auto-correlation matrix.

$M=\frac{{R}^{H}*R}{s}$

where

*M*is**autocorrelation matrix***R*is data matrix*s*is normalization factor*R*^{H}is the conjugate transpose of matrix*R*

**Where This Node Can Run: **

Desktop OS: Windows

FPGA: Not supported

Web Server: Not supported in VIs that run in a web application