Main Content

Find Delay Between Correlated Signals

Three sensors at different locations measure vibrations caused by a car as it crosses a bridge. The signals they produce arrive at the analysis station at different times. The sample rate is 11,025 Hz. Use the Signal Analyzer app to determine the delays between the signals.

Load the signals into the MATLAB® Workspace. The name of each signal includes the number of the sensor that took it.

load sensorData

Open the app. Drag all three signals from the Workspace Browser to the Signal table. Add time information. Select the three signals in the Signal table and click the Time Values button on the Analyzer tab. Select the Sample Rate and Start Time option and enter the sample rate of 11,025 Hz. For more information, see Edit Sample Rate and Other Time Information. Plot the first two signals in separate displays.

The signal from s2 arrives earlier than the signal from s1.

The signals share a common time axis. Link their time spans by selecting each display and selecting Link Time on the Display tab. To estimate the delay between the signals, pan them horizontally and line up a salient feature to the end of the time axis. From the Time tab, read the time from the lower limit of the time-axis. Choose a region where the signal-to-noise ratio is high, such as the signal maximum toward the end of each signal. In the signal from s2, that feature occurs about 0.197 second after the clock starts. Similarly, the signal from s1 has that feature about 0.229 second after the start. Therefore, the delay is approximately 0.032 second.

You can also use data cursors to find a delay. Press the space bar to reset the view. Clear the bottom display and then plot s3. On the Display tab, click Data Cursors and select Two. Place a cursor on the maximum of each signal. You can read the lag of approximately 0.014 second between s1 and s3 directly from the app.

You can get similar results with the finddelay and xcorr functions.

See Also

Apps

Functions

Related Examples

More About