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.
The model uses parallel signal paths to compute and compare the number of samples of delay between signal
sig1 and signal
The upper path uses the
Find Delayblock to compute the delay between
Delayblock in the upper path inputs the computed signal delay and adds the delay to the reference signal
The lower path adds a fixed delay to the reference signal using the
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.