Time Shifting of Signal: Definition and Examples
signal processing, this is done by changing the time variable to t - t_0 or t + t_0, which delays or advances the signal respectively.How It Works
Imagine you have a sound recording and you want to play it a little later or earlier. Time shifting does exactly that for signals. It moves the whole signal along the time axis without changing its shape.
Mathematically, if you have a signal x(t), shifting it by t_0 seconds means creating a new signal y(t) = x(t - t_0). If t_0 is positive, the signal is delayed (starts later). If t_0 is negative, the signal is advanced (starts earlier).
This is like sliding a movie clip left or right on a timeline. The content stays the same, but when it happens changes.
Example
This example shows how to shift a simple signal, a sine wave, by delaying it by 1 second.
import numpy as np import matplotlib.pyplot as plt # Original time vector from 0 to 5 seconds t = np.linspace(0, 5, 500) # Original signal: sine wave with frequency 1 Hz x = np.sin(2 * np.pi * 1 * t) # Time shift value (delay by 1 second) t0 = 1 # Shifted signal: x(t - t0) y = np.sin(2 * np.pi * 1 * (t - t0)) # Plot both signals plt.plot(t, x, label='Original Signal') plt.plot(t, y, label='Shifted Signal (delay 1s)', linestyle='--') plt.xlabel('Time (seconds)') plt.ylabel('Amplitude') plt.title('Time Shifting of a Signal') plt.legend() plt.grid(True) plt.show()
When to Use
Time shifting is useful when you want to align signals in time or simulate delays. For example:
- In audio processing, to sync tracks or add echo effects.
- In communications, to model signal delays caused by transmission.
- In control systems, to analyze how delays affect system behavior.
It helps in adjusting timing without changing the signal's content.
Key Points
- Time shifting moves a signal forward or backward in time.
- It is done by replacing
twitht - t_0in the signal function. - Positive
t_0delays the signal; negativet_0advances it. - The shape and frequency of the signal remain unchanged.
- Common in audio, communications, and control systems.