Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Scroll Documents: Update page title prefix

Overview

Computes the zero-lag cross correlation

Discussion

This module calculates the cross correlation of 2 single-channel inputs. The calcuation is block based and the module outputs a single value which is the correlation for the block of input data. The cross correlation is without time lag. The formula is:

...

NORM_TYPE (Tunable parameter) chooses between L1 norm or L2 norm. L1 norm is the Manhattan distance of a vector. L2 norm (Euclidean) is the Pythagorean distance of a vector.

Type Definition

Code Block
typedef struct _ModuleCorrelationFract32
{
    ModuleInstanceDescriptor instance;            // Common Audio Weaver module instance structure
    INT32 norm;                                   // Type of norm: L1_norm=1, L2_norm=2
} ModuleCorrelationFract32Class;

Variables

Properties

Name

Type

Usage

isHidden

Default value

Range

Units

norm

int

parameter

0

2

1:2

Pins

Input Pins

Name: in1

Description: Signal input 1

...

Sample rate range: Unrestricted

Complex support: Real

Output Pins

Name: out

Description: xcorrelation value

Data type: fract32

MATLAB Usage

File Name: correlation_fract32_module.m

...