Decimation in Signal Processing: Definition and Examples
decimation is the process of reducing the sampling rate of a signal by keeping only every n-th sample and discarding the rest. It helps to lower data size and processing needs while preserving the important information of the signal.How It Works
Decimation works by taking a signal sampled at a high rate and selecting only every n-th sample, where n is called the decimation factor. Imagine you have a video recorded at 60 frames per second, but you only want to watch it at 15 frames per second. You would keep every 4th frame and skip the others. This is similar to decimation in signals.
Before decimation, it is important to apply a low-pass filter to the signal. This filter removes high-frequency parts that could cause distortion or errors when samples are dropped. The low-pass filter acts like a guard, making sure the signal stays smooth and accurate after reducing the sample rate.
Example
import numpy as np import matplotlib.pyplot as plt # Create a sine wave sampled at 100 points x = np.linspace(0, 2 * np.pi, 100) signal = np.sin(x) # Decimation factor n = 3 # Decimate by keeping every n-th sample signal_decimated = signal[::n] x_decimated = x[::n] # Plot original and decimated signals plt.plot(x, signal, label='Original Signal') plt.stem(x_decimated, signal_decimated, linefmt='r-', markerfmt='ro', basefmt='k-', label='Decimated Signal') plt.legend() plt.title('Signal Decimation by Factor of 3') plt.xlabel('x') plt.ylabel('Amplitude') plt.show()
When to Use
Decimation is useful when you want to reduce the amount of data to process or store without losing important information. For example, in audio processing, decimation can lower the sample rate to save memory while keeping sound quality acceptable.
It is also used in communication systems to match different sampling rates between devices or to simplify signal analysis by working with fewer samples.
Key Points
- Decimation reduces the sampling rate by keeping every
n-th sample. - Applying a low-pass filter before decimation prevents distortion.
- It helps save storage and processing power.
- Common in audio, video, and communication signal processing.