Unit 4 - Notes
Unit 4: The Continuous Time Fourier Transform
1. Introduction
The Continuous Time Fourier Transform (CTFT) is a fundamental tool in signal processing that extends the concept of the Fourier Series to aperiodic (non-periodic) signals. While the Fourier Series represents a periodic signal as a sum of discrete sinusoids at harmonic frequencies, the Fourier Transform represents an aperiodic signal as a continuous spectrum of frequencies. It essentially decomposes a signal from the time domain into its constituent frequencies in the frequency domain.
- Time Domain: A signal is represented as a function of time,
x(t). - Frequency Domain: The same signal is represented as a function of frequency,
X(jω), showing which frequencies are present and their respective magnitudes and phases.
2. Representation of Aperiodic Signals: The CTFT
The CTFT can be viewed as the limiting case of the Fourier Series as the period T of a signal approaches infinity. This causes the fundamental frequency to approach zero, and the discrete harmonics become a continuous spectrum.
2.1 The Fourier Transform Pair
The CTFT is defined by a pair of equations: the analysis equation (forward transform) and the synthesis equation (inverse transform).
Analysis Equation (Forward CTFT): From Time to Frequency
This equation analyzes the signal x(t) to find its frequency spectrum X(jω).
x(t)is the time-domain signal.X(jω)is the frequency-domain representation (the Fourier Transform). It is a complex-valued function.ωis the angular frequency in radians per second (ω = 2πf).
The function X(jω) is also called the frequency spectrum or spectral density of x(t). Since it's complex, it can be represented in two common forms:
- Rectangular Form:
X(jω) = R(ω) + jI(ω) - Polar Form:
X(jω) = |X(jω)| e^{j\angle X(jω)}|X(jω)|is the magnitude spectrum, representing the "amount" of each frequency.∠X(jω)is the phase spectrum, representing the phase shift of each frequency component.
Synthesis Equation (Inverse CTFT): From Frequency to Time
This equation synthesizes the time-domain signal x(t) from its frequency spectrum X(jω).
The pair is often denoted as: x(t) \leftrightarrow X(j\omega)
2.2 Conditions for Existence (Dirichlet Conditions)
For the Fourier Transform integral to converge, the signal x(t) must satisfy the Dirichlet conditions:
- Absolutely Integrable: The signal must be absolutely integrable over its entire duration.
- Finite Number of Maxima and Minima: Within any finite interval,
x(t)must have a finite number of local maxima and minima. - Finite Number of Discontinuities: Within any finite interval,
x(t)must have a finite number of discontinuities, and these discontinuities must be finite.
Signals that satisfy these conditions are guaranteed to have a Fourier Transform. However, some useful signals that do not satisfy these conditions (like periodic signals or the unit step function) can still have a Fourier Transform if we allow for generalized functions like the Dirac delta function.
3. The Fourier Transform for Periodic Signals
A periodic signal x(t) is not absolutely integrable, so it does not have a Fourier Transform in the strict sense. However, we can represent its transform using a series of Dirac delta functions.
Recall the Fourier Series representation for a periodic signal x(t) with period T and fundamental frequency ω₀ = 2π/T:
where a_k are the complex Fourier Series coefficients.
To find the Fourier Transform X(jω), we can take the transform of each term in the sum. We use the fundamental Fourier Transform pair:
Applying this to the Fourier Series sum:
Key Takeaway: The Fourier Transform of a periodic signal is a train of impulses (Dirac delta functions) located at the harmonic frequencies (kω₀). The "strength" (area) of each impulse is 2π times the corresponding Fourier Series coefficient a_k. This shows that all the signal's energy is concentrated at these discrete harmonic frequencies, resulting in a line spectrum.
4. Software Simulation of Frequency Spectrum
In practice, we analyze real-world signals using computers. Since computers work with discrete data, we use the Discrete Fourier Transform (DFT), which is efficiently calculated by the Fast Fourier Transform (FFT) algorithm.
Process:
- Sampling: The continuous-time signal
x(t)is sampled at a constant ratefsto get a discrete sequence of points. - Windowing: A finite-length segment of the sampled signal is selected.
- FFT: The FFT algorithm is applied to this segment to compute the DFT.
- Visualization: The magnitude of the FFT output is plotted against frequency to visualize the spectrum.
Example (Python): Spectrum of a Rectangular Pulse and a Sinusoid
import numpy as np
import matplotlib.pyplot as plt
# --- Simulation Parameters ---
fs = 500 # Sampling frequency (Hz)
T = 1.0 # Total time duration of signal (s)
N = int(fs * T) # Number of samples
t = np.linspace(0, T, N, endpoint=False) # Time vector
# --- Signal 1: Rectangular Pulse ---
# A pulse of width 0.1s, centered at 0.5s
rect_pulse = np.zeros_like(t)
rect_pulse[(t > 0.45) & (t < 0.55)] = 1.0
# --- Signal 2: Sum of Two Sinusoids ---
f1 = 50 # Frequency of first sine wave (Hz)
f2 = 120 # Frequency of second sine wave (Hz)
sum_sines = 0.7 * np.sin(2 * np.pi * f1 * t) + np.sin(2 * np.pi * f2 * t)
# --- Function to compute and plot FFT ---
def plot_spectrum(signal, fs, N, title):
# Compute FFT
yf = np.fft.fft(signal)
xf = np.fft.fftfreq(N, 1 / fs)
# Plotting (only positive frequencies)
plt.figure(figsize=(10, 4))
# We only plot up to fs/2 (Nyquist frequency)
# The magnitude is normalized by N/2 for single-sided spectrum
plt.plot(xf[:N//2], 2.0/N * np.abs(yf[:N//2]))
plt.title(title)
plt.xlabel('Frequency (Hz)')
plt.ylabel('Magnitude')
plt.grid(True)
plt.show()
# --- Plot Spectra ---
plot_spectrum(rect_pulse, fs, N, 'Frequency Spectrum of a Rectangular Pulse')
plot_spectrum(sum_sines, fs, N, 'Frequency Spectrum of a Sum of Sinusoids')
5. Properties of the Continuous Time Fourier Transform
Understanding these properties allows for easier manipulation and analysis of signals in both time and frequency domains. Let x(t) \leftrightarrow X(j\omega) and y(t) \leftrightarrow Y(j\omega).
| Property | Time Domain g(t) |
Frequency Domain G(jω) |
Notes |
|---|---|---|---|
| Linearity | a x(t) + b y(t) |
a X(jω) + b Y(jω) |
The transform of a linear combination of signals is the same linear combination of their transforms. |
| Time Shifting | x(t - t₀) |
e^{-jωt₀} X(jω) |
A shift in time corresponds to a linear phase shift in frequency. The magnitude spectrum |X(jω)| is unchanged. |
| Frequency Shifting | e^{jω₀t} x(t) |
X(j(ω - ω₀)) |
Multiplying by a complex exponential in time shifts the spectrum in frequency. This is the basis of amplitude modulation (AM). |
| Time Scaling | x(at) |
(1/|a|) X(j(ω/a)) |
Compressing a signal in time (a > 1) expands its spectrum. Expanding a signal in time (0 < a < 1) compresses its spectrum. |
| Duality | X(jt) |
2π x(-ω) |
The analysis and synthesis equations are structurally similar. This leads to a symmetry between the time and frequency domains. |
| Conjugation | x*(t) |
X*(-jω) |
The transform of the conjugate is the conjugate of the frequency-reversed transform. |
| Differentiation (Time) | d/dt x(t) |
jω X(jω) |
Differentiation in time emphasizes high-frequency components. |
| Integration (Time) | ∫ x(τ) dτ (from -∞ to t) |
(1/jω) X(jω) + πX(0)δ(ω) |
Integration in time suppresses high-frequency components (acts like a low-pass filter). |
| Convolution | x(t) * y(t) = ∫ x(τ)y(t-τ) dτ |
X(jω) Y(jω) |
Convolution in the time domain becomes simple multiplication in the frequency domain. This is extremely useful for LTI systems. |
| Multiplication | x(t) y(t) |
(1/2π) [X(jω) * Y(jω)] = (1/2π) ∫ X(jθ)Y(j(ω-θ)) dθ |
Multiplication in the time domain becomes convolution in the frequency domain. |
| Parseval's Relation | ∫ |x(t)|² dt (Energy in time) |
(1/2π) ∫ |X(jω)|² dω (Energy in frequency) |
The total energy of a signal is the same whether calculated in the time domain or the frequency domain. |
6. Sampling
6.1 Introduction
Sampling is the process of converting a continuous-time signal, x(t), into a discrete-time signal, x[n], by taking its values at discrete, uniform intervals of time.
T: The sampling period (time between consecutive samples).f_s = 1/T: The sampling frequency or sampling rate (samples per second, in Hz).ω_s = 2π/T: The sampling angular frequency (in rad/s).
The relationship is given by: x[n] = x(nT).
The crucial question is: can we perfectly reconstruct the original continuous signal x(t) from its samples x[n]? The Sampling Theorem answers this.
6.2 Representation of a CT Signal by its Samples: The Sampling Theorem
The Nyquist-Shannon Sampling Theorem states that a bandlimited signal x(t) can be perfectly reconstructed from its samples if the sampling rate f_s is strictly greater than twice the maximum frequency present in the signal.
- A signal is bandlimited if its Fourier Transform
X(jω)is zero outside a finite frequency range. That is,X(jω) = 0for|ω| > ω_M. ω_M(orf_M = ω_M / 2π) is the maximum frequency or Nyquist frequency.2ω_M(or2f_M) is the Nyquist rate.
Condition for Perfect Reconstruction:
Mathematical Justification:
The sampling process can be modeled as multiplying the continuous signal x(t) by an ideal impulse train p(t):
The sampled signal x_p(t) is then:
Using the multiplication property of the Fourier Transform (multiplication in time is convolution in frequency), the spectrum of the sampled signal X_p(jω) is:
The Fourier Transform of the impulse train p(t) is also an impulse train in frequency:
Convolving X(jω) with this impulse train creates copies of X(jω) centered at integer multiples of the sampling frequency ω_s:
This means the spectrum of the sampled signal is an infinite, periodic repetition of the original signal's spectrum, scaled by 1/T. If ω_s > 2ω_M, these repeated spectra do not overlap.
6.3 Reconstruction of a Signal from its Samples
If the sampling theorem condition is met, we can recover the original signal x(t) by isolating the central copy of the spectrum (the one centered at ω=0). This is achieved by passing the sampled signal x_p(t) through an ideal low-pass filter.
Ideal Reconstruction Filter H(jω):
- Gain:
T(to cancel the1/Tscaling factor from the sampling process). - Cutoff Frequency
ω_c: Must be betweenω_Mandω_s - ω_M. A common choice isω_c = ω_s / 2.
The frequency response is:
The impulse response h(t) of this filter is the inverse Fourier Transform of H(jω), which is a sinc function:
Choosing ω_c = ω_s / 2 = π/T, we get:
The reconstructed signal x_r(t) is the convolution of the sampled signal with the filter's impulse response:
This results in the Whittaker-Shannon interpolation formula:
This formula shows that the original signal is a sum of scaled and shifted sinc functions, with each sinc centered on a sample point.
6.4 The Effect of Undersampling: Aliasing
When a signal is sampled at a rate below the Nyquist rate (ω_s < 2ω_M), the periodic replicas of the spectrum in X_p(jω) overlap. This phenomenon is called aliasing.
Because of the overlap, it becomes impossible to use a low-pass filter to isolate the original spectrum. The high-frequency components of the original signal x(t) "fold over" and get mixed with the low-frequency components. When the signal is reconstructed, these high frequencies appear as if they were lower frequencies that were never present in the original signal. This distortion is irreversible.
Example: A high-frequency rotating wheel in a film (which is sampled at 24 frames/sec) can appear to rotate slowly or even backwards. This is a classic example of temporal aliasing. Similarly, in audio, a high-pitched tone sampled too slowly can sound like a completely different low-pitched tone.
7. Software Simulation of Aliasing
This example shows a 40 Hz sine wave being sampled correctly and then incorrectly, demonstrating aliasing. The Nyquist rate is 2 * 40 = 80 Hz.
import numpy as np
import matplotlib.pyplot as plt
# --- Signal Parameters ---
f_signal = 40 # Frequency of the original signal (Hz)
t_max = 0.5 # Time duration for plots
t_continuous = np.linspace(0, t_max, 1000) # High-res time for "true" signal
y_continuous = np.sin(2 * np.pi * f_signal * t_continuous)
# --- Case 1: Sampling Above Nyquist Rate ---
fs1 = 100 # Sampling rate > 80 Hz (Correct)
t1 = np.arange(0, t_max, 1/fs1)
y1 = np.sin(2 * np.pi * f_signal * t1)
# --- Case 2: Undersampling (Aliasing) ---
fs2 = 50 # Sampling rate < 80 Hz (Incorrect)
t2 = np.arange(0, t_max, 1/fs2)
y2 = np.sin(2 * np.pi * f_signal * t2)
# --- Calculate Aliased Frequency ---
# The aliased frequency f_alias = |f_signal - round(f_signal / fs2) * fs2|
# f_alias = |40 - round(40/50)*50| = |40 - 1*50| = |-10| = 10 Hz
f_alias = 10 # Hz
y_aliased_continuous = np.sin(2 * np.pi * f_alias * t_continuous)
# --- Plotting ---
plt.figure(figsize=(14, 8))
# Plot for Case 1 (Correct Sampling)
plt.subplot(2, 1, 1)
plt.plot(t_continuous, y_continuous, 'k-', label=f'Original {f_signal} Hz Signal')
plt.stem(t1, y1, 'b', markerfmt='bo', basefmt=" ", label=f'Samples at {fs1} Hz')
plt.title(f'Correct Sampling (fs = {fs1} Hz > Nyquist Rate of 80 Hz)')
plt.xlabel('Time (s)')
plt.ylabel('Amplitude')
plt.legend()
plt.grid(True)
# Plot for Case 2 (Aliasing)
plt.subplot(2, 1, 2)
plt.plot(t_continuous, y_continuous, 'k-', label=f'Original {f_signal} Hz Signal')
plt.stem(t2, y2, 'r', markerfmt='ro', basefmt=" ", label=f'Samples at {fs2} Hz')
plt.plot(t_continuous, y_aliased_continuous, 'g--', label=f'Apparent {f_alias} Hz Aliased Signal')
plt.title(f'Undersampling (fs = {fs2} Hz < Nyquist Rate of 80 Hz) -> Aliasing')
plt.xlabel('Time (s)')
plt.ylabel('Amplitude')
plt.legend()
plt.grid(True)
plt.tight_layout()
plt.show()
Observation from the Simulation:
- In the top plot (correct sampling), the discrete samples clearly trace the path of the original 40 Hz wave.
- In the bottom plot (undersampling), the samples taken at 50 Hz give the false impression of a much slower 10 Hz sine wave. If one were to reconstruct a signal based only on these red sample points, the result would be the green dashed line, not the original black line. This is aliasing.