Align Signals - Align two signals by finding delay between them

Library

Utility Blocks

Description

The Align Signals block aligns a signal with a delayed, and possibly distorted, version of itself. The block is particularly useful when you want to compare a transmitted and received signal to find the bit error rate, but do not know the delay in the received signal.

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

See Computing Delays in the Communications Blockset™ 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 theComputing Delays section of Communications Blockset 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

  


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