Main Content

Align Single Rate Signals in Simulink

The example computes the delay between a random signal, sig1 and a delayed copy of the signal, sig2, by using the Find Delay block. Signals are delayed and aligned by using instances of the Delay (Simulink) block.

Model Structure

The model uses parallel signal paths to compute and compare the number of samples of delay between signal sig1 and signal sig2.

  • The upper path uses the Find Delay block to compute the delay between sig1 and sig2. The Delay block in the upper path inputs the computed signal delay and adds the delay to the reference signal sig1.

  • The lower path adds a fixed delay to the reference signal using the Delay block.

  • The signal with the fixed delay and the signal with the computed delay are compared to show the same delay was applied to both signals.

Delayed Signal Comparison

Plot the difference between signals output by the lower delay path and the upper delay path. The plotted delay difference is zero, indicating same delay was applied to both signals. The computed delay is displayed after the simulation runs.

The delay computed by the |Find Delay| block is 7.