Skip to Main Content Skip to Search
Product Documentation

Align Signals - Align two signals by finding delay between them

Library

Utility Blocks

Description

The Align Signals block aligns two signals by finding the delay between them. This is useful when you want to compare a transmitted and received signal to determine the bit error rate, but do not know the delay in the received signal. This block accepts a column vector or matrix input signal. For a matrix input, the block aligns each channel independently.

The s1 input port receives the original signal, while the s2 input port receives a delayed version. The two input signals must have the same dimensions and sample times. The block calculates the delay between the two signals, and then

See Delays in the Communications System Toolbox online documentation for more information about signal delays.

The block's Correlation window length parameter specifies how many samples of the signals the block uses to calculate the cross-correlation. The delay output is a nonnegative integer less than the Correlation window length.

As the Correlation window length is increased, the reliability of the computed delay also increases. However, the processing time to compute the delay increases as well.

You can make the Align Signals block stop updating the delay after it computes the same delay value for a specified number of samples. To do so, select the Disable recurring updates check box, and enter a positive integer in the Number of constant delay outputs to disable updates field. For example, if you set Number of constant delay outputs to disable updates to 20, the block will stop recalculating and updating the delay after it calculates the same value 20 times in succession. Disabling recurring updates causes the simulation to run faster after the target number of constant delays occurs.

Tips for Using the Block Effectively

Examples

See the Delays section of Communications System Toolbox User's Guide for an example that uses the Align Signals block in conjunction with the Error Rate Calculation block.

See Setting the Correlation Window Length, on the reference page for the Find Delay block, for an example that illustrates how to set the correlation window length properly.

Dialog Box

Correlation window length

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

Disable recurring updates

Selecting this option causes the block to stop computing the delay after it computes the same delay value for a specified number of samples.

Number of constant delay outputs to disable updates

A positive integer specifying how many times the block must compute the same delay before ceasing to update. This field appears only if Disable recurring updates is selected.

Algorithm

The Align Signals block finds the delay by calculating the cross-correlations of the first signal with time-shifted versions of the second signal, and then finding the index at which the cross-correlation is maximized.

See Also

Find Delay, Error Rate Calculation

  


Free Early Verification Kit

Learn how to apply early verification to your development process through these technical resources.

How much time do you spend on testing to ensure implementation meets system-level requirements?

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS