Engee documentation

Find Delay

Finds the delay between two signals.

blockType: SubSystem

Path in the library:

/Communication Systems/Utility Blocks/Find Delay

Description

Block Find Delay finds the delay between the signal and its delayed and possibly distorted version. This is useful if there is a need to compare the transmitted and received signal to find the error rate, but the delay of the received signal is not known. This unit receives an input signal in the form of a column vector or matrix. For the input signal in the form of a matrix, the block outputs a row vector and finds the delay in each channel of the matrix independently.

Ports

Input

# sRef — reference signal
vector, matrix

Details

An initial reference signal specified as a vector or matrix. The dimensionality and sampling period of sRef and sDel must coincide.

Data types

Float64.

Complex numbers support

No

# sDel — delayed signal
vector, matrix

Details

A delayed or distorted version of the reference signal, specified as a vector or matrix. The dimensionality and sampling period of sRef and sDel must match.

Data types

Float64.

Complex numbers support

No

Output

# delay — delay
scalar, vector

Details

The delay output port outputs the delay in units of samples.

For a matrix input signal, the unit outputs a vector string and finds the delay in each channel of the matrix independently.

The output delay value is a non-negative integer smaller than Correlation window length (samples).

Data types

Float64.

Complex numbers support

No

Parameters

Main group

# Correlation window length (samples) — number of samples

Details

The number of samples the unit uses to calculate the cross-correlations of two signals.

As the Correlation window length (samples) value increases, the reliability of the calculated delay increases. However, the processing time to calculate the delay also increases.

Default value

200

Program usage name

corr_len

Tunable

No

Evaluatable

Yes

Additional information

Determining the signal delay before calculating the error rate

A typical usage of this block is to determine the correct Receive delay parameter in the block Error Rate Calculation.

Finding the delay for word alignment

Another typical usage of this block is to determine how to align frame boundaries with codeword boundaries or other types of data blocks.

Tips

  • If the cross-correlation between the two signals is large, then the value of Correlation window length (samples) there must be much more than the expected delay, otherwise the algorithm may stabilize at the wrong value. For example, the CPM signal has a wide autocorrelation, so it has a wide cross-correlation with the delayed version of itself. In this case, the value is Correlation window length (samples) there should be a lot more than the expected delay.

  • If the block calculates a delay that is more than 75% from Correlation window length (samples), then the signal sRef probably delayed relative to the signal sDel. In this case, the signal lines leading to the two input ports should be swapped.

Algorithms

Block Find Delay finds the delay by calculating the cross-correlations of the first signal with the time-shifted versions of the second signal, and then finding the index at which the cross-correlation is maximum.