Introduction to Signal Processing
Learning Objectives
- Define a signal and distinguish between continuous-time and discrete-time signals
- Explain the difference between time-domain and frequency-domain analysis
- Describe what linearity means for a signal processing system and why it matters
- State the conditions for stability and causality in a system
- Identify the four main filter types and describe what each one does
- Implement a basic low-pass filter in Python using scipy
- Apply signal processing vocabulary correctly in explanations and problem solutions
Quick Answer
A signal is a function that carries information about a physical quantity — temperature, pressure, voltage, audio — and can be either continuous (analog) or discrete (digital). Signal processing transforms, analyzes, and extracts useful information from these signals. Two fundamental viewpoints are used: the time domain, which tracks how amplitude changes over time, and the frequency domain, which shows the distribution of energy across frequencies. Key system properties — linearity, stability, and causality — determine how a system responds to any input. Filtering is the most common processing operation, removing unwanted frequencies from a signal while preserving the components of interest.
What is a Signal?
A signal is a function that conveys information about physical parameters such as temperature, pressure, voltage, current, flow rate, etc. It can be continuous (analog) or discrete (digital). In signal processing, we often represent signals mathematically using functions like:
- Continuous-time signals: f(t)
- Discrete-time signals: x[n]
Key Concepts in Signal Processing
Time Domain vs Frequency Domain
Signals can be analyzed in both time domain and frequency domain:
- Time domain: Represents how a signal changes over time
- Frequency domain: Represents the distribution of energy across different frequencies
Understanding both domains is essential for effective signal processing.
Linearity
Linearity is a fundamental property in signal processing. A system is linear if:
- It preserves scaling: y(ax) = ay(x)
- It preserves homogeneity: x(t) + y(t) → z(t) + w(t)
Understanding linearity helps in simplifying complex signal processing problems.
Stability
A system is stable if all its poles lie inside the unit circle in the s-plane. Stability ensures that the system output remains bounded for any finite input.
Causality
A causal system responds only to past and present inputs. This property is important in real-world applications where future inputs are unknown.
Signal Processing Techniques
Filtering
Filtering is one of the most common operations in signal processing. Filters remove unwanted frequencies or noise from signals.
Types of filters:
- Low-pass filter: Allows low frequencies, rejects high frequencies
- High-pass filter: Rejects low frequencies, allows high frequencies
- Band-pass filter: Allows a range of frequencies, rejects others
- Band-stop filter: Rejects a range of frequencies, allows others
Example: Implementing a Simple Low-Pass Filter Using Python
Here's a basic example of how to implement a low-pass filter using Python with the scipy library:
import numpy as np
import matplotlib.pyplot as plt
from scipy.signal import butter, filtfilt
# Function to create a low-pass filter
def low_pass_filter(data, cutoff_freq, sample_rate, order=5):
nyquist = 0.5 * sample_rate
normal_cutoff = cutoff_freq / nyquist
b, a = butter(order, normal_cutoff, btype='low', analog=False)
y = filtfilt(b, a, data)
return y
# Generate a sample signal
sample_rate = 1000 # Sampling rate in Hz
t = np.linspace(0, 1.0, sample_rate)
# Create a signal with high-frequency noise
signal = np.sin(2 * np.pi * 50 * t) + np.random.normal(0, 0.5, t.shape)
# Apply low-pass filter
cutoff_freq = 60 # Cut-off frequency in Hz
filtered_signal = low_pass_filter(signal, cutoff_freq, sample_rate)
# Plotting the original and filtered signals
plt.figure(figsize=(10, 6))
plt.subplot(2, 1, 1)
plt.plot(t, signal, label='Original Signal')
plt.title('Original Signal with Noise')
plt.xlabel('Time [s]')
plt.ylabel('Amplitude')
plt.grid()
plt.legend()
plt.subplot(2, 1, 2)
plt.plot(t, filtered_signal, label='Filtered Signal', color='orange')
plt.title('Low-Pass Filtered Signal')
plt.xlabel('Time [s]')
plt.ylabel('Amplitude')
plt.grid()
plt.legend()
plt.tight_layout()
plt.show()
In this example:
- A sample signal is generated, which combines a sine wave with some added noise.
- A low-pass filter is applied to the noisy signal, allowing lower frequencies to pass while attenuating the high-frequency noise.
- The original and filtered signals are plotted for comparison.
This example demonstrates how filtering can effectively clean up a signal, a common task in signal processing applications.
Key Terms
| Term | Definition | Related Concept |
|---|---|---|
| Signal | A function conveying information about a physical quantity | Continuous vs discrete |
| Continuous-time signal | A signal defined at every instant of time, represented as f(t) | Analog signal |
| Discrete-time signal | A signal defined only at specific time intervals, represented as x[n] | Digital signal |
| Time domain | Representation of how a signal's amplitude changes over time | Waveform |
| Frequency domain | Representation of a signal's energy distribution across frequencies | Fourier transform |
| Linearity | System property where output scales proportionally with input | Superposition |
| Stability | System property where bounded input always produces bounded output | Poles, unit circle |
| Causality | System property where output depends only on past and present inputs | Real-time systems |
| Low-pass filter | Filter that passes low frequencies and attenuates high frequencies | Cutoff frequency |
| Band-pass filter | Filter that passes a specific range of frequencies | Center frequency, bandwidth |
Common Mistakes
Misconception: Time-domain and frequency-domain are two separate signals. Why it's wrong: They are two different mathematical representations of the exact same signal. You can convert between them losslessly using the Fourier transform. Correct understanding: A signal has one physical reality; time domain and frequency domain are complementary lenses for analyzing it.
Misconception: A stable system is the same as a causal system. Why it's wrong: Stability and causality are independent properties. A system can be stable but non-causal (useful in offline processing), or causal but unstable. Correct understanding: Stability means bounded output for bounded input; causality means the output depends only on present and past inputs — these must each be checked separately.
Misconception: Filtering always removes only noise without affecting the desired signal. Why it's wrong: Any filter has a transition band where both signal and noise are partially attenuated. A poorly chosen cutoff frequency will attenuate signal components along with noise. Correct understanding: Filter design is a trade-off: setting the cutoff too low removes useful signal content, while setting it too high leaves noise behind.
Comparison and Connections
| Property | Time Domain | Frequency Domain |
|---|---|---|
| What it shows | Amplitude vs time | Amplitude vs frequency |
| Typical tool | Oscilloscope | Spectrum analyzer / FFT |
| Used for | Timing, phase, waveform shape | Filtering, noise analysis, bandwidth |
| Signal representation | f(t) or x[n] | X(f) or X(omega) |
| Filter design intuition | Difficult — convolution in time | Easy — multiplication in frequency |
Practice Questions
Recall
-
What are the two main classifications of signals in signal processing? Answer guidance: Continuous-time (analog) and discrete-time (digital). Continuous signals are defined at every instant; discrete signals are defined only at specific time steps.
-
List the four standard filter types and describe what each passes or rejects. Answer guidance: Low-pass (passes low, rejects high), high-pass (passes high, rejects low), band-pass (passes a frequency range), band-stop (rejects a frequency range).
Understanding
-
Explain in your own words why linearity is a useful property for a signal processing system. Answer guidance: Linear systems obey superposition — you can analyze each frequency component or input independently and add the results. This enormously simplifies analysis and design.
-
Why is it important to know whether a system is causal before deploying it in a real-time application? Answer guidance: A causal system only uses present and past inputs, so it can operate in real time. A non-causal system would need future data, which is impossible in live processing but acceptable in offline batch processing.
Application
-
A 50 Hz sine wave is buried in high-frequency noise above 200 Hz. Which filter type would you choose, and what cutoff frequency would you set? Answer guidance: A low-pass filter with a cutoff somewhere between 50 Hz and 200 Hz — for example, 100 Hz — would pass the 50 Hz component and reject the noise above 200 Hz.
-
You apply a filter and the output still contains significant noise. What two parameters might you adjust to improve noise rejection? Answer guidance: Increase the filter order (steeper roll-off) and/or lower the cutoff frequency. Both increase the attenuation of high-frequency components, though lowering the cutoff risks affecting the desired signal.
Analysis
-
Compare a low-pass filter applied in the time domain (convolution) versus the frequency domain (multiplication). Why do engineers often prefer the frequency-domain approach for design? Answer guidance: In the frequency domain, filtering is a simple multiplication of the signal's spectrum by the filter's frequency response. In the time domain, the equivalent operation is convolution — computationally heavier and harder to visualize. Frequency-domain design makes it easy to specify exactly which frequencies to pass or reject.
-
A student claims that a system with all poles outside the unit circle is stable. Is this correct? Explain. Answer guidance: No — this is backwards. For a discrete-time system, stability requires all poles to lie inside the unit circle. Poles outside cause the impulse response to grow without bound, leading to instability.
FAQ
What is the difference between a signal and a system? A signal is the information-bearing function — for example, a voltage waveform or an audio recording. A system is a process or device that takes an input signal and produces an output signal, such as a filter, amplifier, or communication channel. In signal processing you study both: what the signal looks like and how the system transforms it.
Why do engineers work in the frequency domain when signals exist in time? Time-domain signals can be hard to analyze directly when they contain many overlapping components. The frequency domain separates these components, making it easy to see which frequencies are present, design filters, and remove unwanted content. The Fourier transform lets you move freely between domains, so you choose whichever is more convenient for the task.
What does the cutoff frequency of a filter actually mean? The cutoff frequency is the point where the filter's response drops to approximately 70% of its maximum (specifically, 1/sqrt(2), or about -3 dB). Frequencies below the cutoff (for a low-pass filter) are passed; frequencies above are progressively attenuated. The exact shape of that transition depends on the filter order and design method.
Can a digital filter replace an analog filter? In most modern applications, yes. Digital filters are implemented in software or DSP hardware and offer precise, repeatable behavior that doesn't drift with temperature or component aging. The main limitation is that the signal must first be sampled (converted to digital), so very high-frequency signals may still require analog pre-filtering before sampling.
Why does order matter when designing a filter? A higher-order filter has a sharper transition between the passband and the stopband. A first-order filter rolls off gently; a fifth-order filter cuts off much more steeply. However, higher order also means more computation, more coefficient sensitivity, and potentially more phase distortion.
Quick Revision
- A signal is any function that conveys information about a physical quantity over time or space
- Continuous-time signals are written as f(t); discrete-time signals are written as x[n]
- Time domain: amplitude vs time; frequency domain: amplitude vs frequency
- A linear system obeys superposition — responses to individual inputs can be added
- A stable system produces bounded output for every bounded input
- A causal system uses only current and past inputs — essential for real-time operation
- Filters selectively pass or attenuate frequency ranges; four types: low-pass, high-pass, band-pass, band-stop
- The cutoff frequency marks the -3 dB point of a filter's frequency response
- Higher filter order = steeper roll-off = better frequency selectivity but more computation
- Scipy's
butterandfiltfiltfunctions implement Butterworth IIR filters in Python
Related Topics
Prerequisites: Basic circuit theory, sinusoidal signals, complex exponentials, introductory mathematics
Related Topics: Time-Domain Analysis, Frequency-Domain Analysis, Digital Filters, Fourier Transform
Next Topics: Signal Sampling and Reconstruction, Digital Filters, Fourier Transform