Introduction to Signal Processing

Version 0.1

Chapter 4: Continuous-time Concepts: Fourier Transform


In the last chapter we looked at the time domain characterization of LTI systems, which provides tools to analyse and understand LTI systems from the time-domain point of view. Another way of looking at continuous-time signals and continuous-time LTI systems is the frequency-domain view. The frequency-domain view of signals and system is based on the fundamental idea of representing or decomposing a given signal into a set of elementary singals - in this particular case complex sinuisoids. In fact this idea of decomposing signals into different components was also seen in the previous chapter, while discussing the concept of the impulse response. The impulse reseponse becomes useful just because of the fact that any arbitrary signal can be decomposed in time-shifted impulses of different strengths. The same principle is used in the frequency-domain view, where the elementary signals are complex-sinuisoids.

We study two important transforms that are essential for the analysing continuous-time signals and (LTI) systems.

4.1 Decomposing periodic signals: Fourier Series

The best place to start the study of frequency-domain analysis of signals and systems is the study of periodic signals and their decomposition. Consider a periodic signal $x(t)$ with the fundamental period $T_o$, then

$$ x(t + T_o) = x(t), \forall t $$

Let us assume that such a signal can be decomposed into harmonically related sinuisoids of differents weights. Then, we can write $x(t)$ as the following, $$ x(t) = a_0 + \sum_{n=1}^{\infty}a_n\cos{n\omega_{o}t} + \sum_{n=1}^{\infty}b_n\sin{n\omega_{o}t}, \,\,\, \forall t \in \mathbb{R}, \,\, \text{and} \,\, n \in \{1, 2, 3, \cdots\} $$

where, $\omega_o = \frac{2\pi}{T_o}$, and $a_0, a_n, b_n \in \mathbb{R}$. Here we assume that the signal is real, i.e. $x(t) \in \mathbb{R}$.

The above representation can be simplied if we replace the $\sin$ and $\cos$ terms by complex sinuisoids, i.e. $\cos \theta= \left(e^{j\theta} + e^{-j\theta}\right)/2$ and $\sin \theta= \left(e^{j\theta} - e^{-j\theta}\right)/2j$

$$ x(t) = a_0 + \sum_{n=1}^{\infty}a_n\left(\frac{e^{jn\omega_{o}t} + e^{-jn\omega_{o}t}}{2}\right) + \sum_{n=1}^{\infty}b_n\left(\frac{e^{jn\omega_{o}t} - e^{-jn\omega_{o}t}}{2j}\right) $$$$ x(t) = a_0 + \sum_{n=1}^{\infty}\left(\frac{a_n-jb_n}{2}\right)e^{jn\omega_{o}t} + \left(\frac{a_n+jb_n}{2}\right)e^{-jn\omega_{o}t} $$

Simplifying, we get $$ x(t) = \sum_{n=-\infty}^{\infty}c_ne^{jn\omega_{o}t} $$

Where, $c_n = \begin{cases} a_0 & n = 0 \\ (a_n -jb_n)/2 & n \geq 1 \\ (a_n + jb_n)/2 & n \leq -1 \end{cases}$.

The above representation rests on our ability to find out the parameters $c_n$. Let us now multiply both sides of the above equation by $e^{-jk\omega_ot}$, and integrate over one period $T_o$ of the singal $x(t)$.

$$ \int_{t_0}^{t_0 + T_o}x(t)e^{-jk\omega_ot}dt = \int_{t_0}^{t_0 + T_o}e^{-jk\omega_ot}\sum_{n=-\infty}^{\infty}c_ne^{jn\omega_{o}t}dt = \sum_{n=-\infty}^{\infty} \int_{t_0}^{t_0 + T_o}c_n e^{j(k-n)\omega_ot}dt $$

where, $k \in \mathbb{Z}$.

In the above equation, if $k \neq l$, then we have $$ \int_{t_0}^{t_0 + T_o}c_n e^{j(k-n)\omega_ot}dt = c_n \left.\frac{e^{j(k-n)t}}{j(k-n)}\right]_{t_0}^{t_0+T_o} = 0 $$

On the other hand, if $k = l$, then $$ \int_{t_0}^{t_0 + T_o}c_n e^{j(k-n)\omega_ot}dt = \int_{t_0}^{t_0 + T_o}c_ndt = c_n \left.t\right]_{t_0}^{t_0+T_o} = c_n T_o $$

Thus, $$ c_n = \frac{1}{T_o}\int_{t_0}^{t_0+T_o}x(t)e^{-j\omega_ot} $$

This is the Fourier series representation of continuous-time periodic signals, which consists of two essential components:

Synthesis equation $x(t) = \sum_{n=-\infty}^{\infty}c_n e^{jn\omega_ot}$
Analysis equation $c_n = \frac{1}{T_o}\int_{t_0}^{t_0+T_o}x(t) e^{-jn\omega_ot} dt$

Given this information about the Fourier series, the immediate question that arises is whether the synthesis equation $$\sum_{n=-\infty}^{\infty}c_n e^{jn\omega_ot}$$ converges to $x(t)$ for all values of $t$ for any arbirtrary period signal $x(t)$. i.e. can we represent any singal with harmonically related sines and cosine?

The Dirichlet conditions ensure that Forier series $\sum_{n=-\infty}^{\infty}c_n e^{jn\omega_ot}$ is equal to $x(t)$ for all values of $t$, except for the values of $t$ where the function $x(t)$ is discontinuous. At the values of the discontinuity, the value of the Fourier series will be the average of the values on either side of the discontinuity.

Dirichlet conditions

  1. $x(t)$ must have a finite number of discontinuities.
  2. $x(t)$ must have a finite number of maxima and minima.
  3. $x(t)$ must be bounded.
  4. $x(t)$ must be absolutely integrable over one period of signal. $$\int_{T_o}\left|x(t)\right|dt < \infty$$

An important point to note is that the Dirichlet conditions are sufficient for the convergence of the Fourier series, but are not necessary. This means that there might be signals that do not satisfy these conditions, but still have Fourier series that converges.

Exercies:

  1. Derive the Fourier series of the following signals periodic signals with period $T$:

    • $ x(t) = t, \left|t\right| < T/2 $
    • $ x(t) = 3.1 + 0.5\sin \frac{2\pi t}{T} + \cos \frac{2\pi t}{T} + 0.25\sin \frac{4\pi t}{T} $
    • $ x(t) = \cos \frac{2\pi t}{T} + 5j\sin \frac{2\pi t}{T}$
  2. Let $c_n$ be the Fourier series coefficients of a period signal $x(t)$. What is the relationship between $c_n$ and $c_{-n}$ for,

    • $x(t)$ is a real signal, i.e. $x(t) \in \mathbb{R}$, $\Im (x(t)) = 0$.
    • $x(t)$ is purely imaginary, i.e. $\Re (x(t)) = 0$.
    • $x(t)$ is a complex, i.e. $x(t) \in \mathbb{C}$.

Average power of a periodic signal The energy of a periodic signal $x(t)$ with fundamental period $T_o$ is given by the following, $$ \text{Engergy in one period} = \int_{-T_o/2}^{T_o/2}\left|x(t)\right|^2dt $$

Now let us substitute the Fourier series representation of $x(t)$ in the above equation, $$ \int_{-T_o/2}^{T_o/2}\left|x(t)\right|^2dt = \int_{-T_o/2}^{T_o/2}\left|\sum_{n=-\infty}^{\infty}c_ne^{jn\omega_ot}\right|^2dt = \int_{-T_o/2}^{T_o/2}\sum_{n=-\infty}^{\infty}c_ne^{jn\omega_ot}\sum_{m=-\infty}^{\infty}c_m*e^{-jn\omega_ot}dt $$

Interchanging the order of the summation and intergration, we get $$ \int_{-T_o/2}^{T_o/2}\left|x(t)\right|^2dt = \sum_{n=-\infty}^{\infty}\sum_{m=-\infty}^{\infty}c_nc_m^{*}\int_{-T_o/2}^{T_o/2}e^{j(n-m)\omega_ot}dt $$

Out of all the terms of the sum on the right hand side (RHS), only the term where $n=m$ will be non-zero. Thus, $$ \int_{-T_o/2}^{T_o/2}\left|x(t)\right|^2dt = \sum_{n=-\infty}^{\infty}c_nc_n^{*}T = T\sum_{n=-\infty}^{\infty}\left|c_n\right|^{2} $$

$$ \implies \frac{1}{T}\int_{-T_o/2}^{T_o/2}\left|x(t)\right|^2dt = \sum_{n=-\infty}^{\infty}\left|c_n\right|^{2} $$

This result is called the Parseval's theorem (or Rayleigh's theorem). The above result leads to the following results relating the average power of a periodic signal with its Fourier series coefficients.

$$ \lim_{k\to\infty} \frac{1}{kT}\int_{-kT_o/2}^{kT_o/2}\left|x(t)\right|^2dt = \sum_{n=-\infty}^{\infty}\left|c_n\right|^{2}, \,\,\, k \in \mathbb{Z} $$

The above statement says that the average power of a periodic signal can be decomposed into an infite sum consisting of the average power of the different harmonics present in $x(t)$. The series, $\left|c_n\right|^2$ is called the discrete power spectrum of $x(t)$. The discrete power spectrum of the square wave (studied earlier is shown in the following plot).It must be noted that one cannot reconstruct the original $x(t)$ from the power spectrum, as the phase information is absent in the power spectrum.

Fourier series of a periodic square pulse waveform

$$x(t) = \begin{cases} 1, & \,\, \left|t\right| < \frac{T}{2} \\ 0, & \,\, \frac{T}{2} < \left|t\right| < T \\ \end{cases} $$

Here, the fundamental period of the signal is $2T$. The Fourier series coefficients for the square pulse is given by the following, where $\omega_o = \frac{2\pi}{2T} = \frac{\pi}{T}$ $$ c_n = \frac{1}{2T}\int_{-T}^{T}x(t)e^{-jn\omega_ot}dt = \frac{1}{2T}\int_{-T/2}^{T/2}e^{-jn\omega_ot}dt = -\frac{1}{2T}\left.\frac{e^{-jn\omega_ot}}{jn\omega_o}\right]_{-T/2}^{T/2} = \frac{1}{2T}\frac{e^{jn\omega_oT/2} - e^{-jn\omega_oT/2}}{jn\omega_o} = \frac{\sin \left(\omega_oT/2\right)}{n\omega_oT} = \frac{1}{2}\text{sinc} \left(\frac{n\omega_oT}{2}\right) = \frac{1}{2}\text{sinc} \left(\frac{n\pi}{2}\right) $$

$$ c_n = \frac{1}{2}\text{sinc} \left(\frac{n\pi}{2}\right) $$

The following figures demonstrate indicate the Fourier series for a square pulse.


In [1]:
%pylab inline
import seaborn as sb
from IPython.html.widgets import interact
from IPython.html import widgets


Populating the interactive namespace from numpy and matplotlib

In [3]:
def sinc(x):
    """Returns the value of the sinc function."""
    return 1.0 if x == 0. else np.sin(x)/x

def square_pulse(t, T):
    """Returns the values of the square pulse of a given period T
    for the given time t."""
    t_mod = ((t + 0.5 * T) % T) - 0.5 * T
    return 1.0 if np.abs(t_mod) <= 0.25 * T else 0.

fig = figure(figsize=(11.,7))
dT = 0.001
# square pulse of duration T = 1.0
T = 1.0
time1 = np.arange(-T, T, dT)
x1 = [square_pulse(t, T) for t in time1]

subplot2grid((5,1), (0, 0), rowspan=1)
plot(time1, x1)
ylim(-0.1, 1.1)
xlim(-1, 1)
xlabel('Time (s)')
gca().yaxis.set_ticks(np.arange(-0, 1.1, 0.5))
title('Periodic square pulse waveform', fontsize=15);

n = np.arange(-30, 30)
X1 = np.array([ 0.5 * sinc(0.5 * _n * np.pi) for _n in n])

# Fourier series of square pulse waveform of duration T = 1.0
subplot2grid((5,1), (1, 0), rowspan=2)
stem(n * (1./T), X1, basefmt='-', lw=0.1)
xlim(-20*(1./T), 20*(1./T))
xlabel('Frequency (Hz)')
title('Fourier series coefficient of the square pulse waveform', fontsize=15);

# Discrete power spectrum of square pulse waveform of duration T = 1.0
subplot2grid((5,1), (3, 0), rowspan=2)
stem(n * (1./T), pow(np.abs(X1), 2), basefmt='-', lw=0.2)
xlim(-20*(1./T), 20*(1./T))
ylim(-0.1, 0.3)
xlabel('Frequency (Hz)')
title('Discrete power spectrum of the square pulse waveform.', fontsize=15);
tight_layout();


Let us now reconstruct $x(t)$ from its Fourier series coefficients. $$ x(t) = \sum_{n=-\infty}^{\infty}\frac{1}{2}\text{sinc} \left(\frac{n\pi}{2}\right)e^{jn\omega_ot} $$

The square pulse $x(t)$ is real and even, thus we have $$ x(t) = c_o + 2\sum_{n=1}^{\infty}\frac{1}{2}\text{sinc} \left(\frac{n\pi}{2}\right) \cos n\omega_ot $$

The following figure demonstrates this reconstruction.


In [4]:
def sinc(x):
    """Returns the value of the sinc function."""
    return 1.0 if x == 0. else np.sin(x)/x

def square_pulse(t, T):
    """Returns the values of the square pulse of a given period T
    for the given time t."""
    t_mod = ((t + 0.5 * T) % T) - 0.5 * T
    return 1.0 if np.abs(t_mod) <= 0.25 * T else 0.

def FS_analyze_synthesize(N):
    fig = figure(figsize=(11., 7))
    dT = 0.001
    # square pulse of duration T = 1.0
    T = 1.0
    time1 = np.arange(-T, T, dT)
    x1 = [square_pulse(t, T) for t in time1]

    # plot of orignal signal
    subplot(3,1,1)
    step(time1, x1)
    ylim(-0.1, 1.1)
    xlim(-1, 1)
    gca().yaxis.set_ticks(np.arange(-0, 1.1, 0.5))
    title('Periodic square pulse waveform', fontsize=15);

    # plot of the first N harmonic components
    subplot(3,1,2)
    fs_comps = np.zeros((len(time1), N))
    for n in xrange(0, N):
        fs_comps[:, n] = np.array(0.5 * sinc(0.5*n*np.pi) * np.cos(2*np.pi*n*time1))
        plot(time1, fs_comps[:, n], color='0.3', lw=1.)
    ylim(-0.5, 0.6)
    xlim(-1, 1)
    gca().yaxis.set_ticks(np.arange(-0.5, 0.3, 0.2))
    title('First {0} harmonic components of the square pulse waveform'.format(N),
          fontsize=15);

    # plot of the reconstructed singal from the first N harmonic components
    subplot(3,1,3)
    plot(time1, fs_comps[:, 0] + 2*np.sum(fs_comps[:, 1:], 1),
         color='0.3', lw=2.0)
    step(time1, x1, 'r', lw=1.0)
    ylim(-0.2, 1.2)
    xlim(-1, 1)
    gca().yaxis.set_ticks(np.arange(0., 1.2, 0.5))
    title('Reconstruction of $x(t)$ from the components of the Fourier series'.format(N),
          fontsize=15);
    tight_layout();

interact(FS_analyze_synthesize, N=widgets.IntSliderWidget(min=1, max=256, step=1, value=2));


The above reconstructions of $x(t)$ from the Fourier series are only partial sums that use a finite number of harmonic components. $$ \text{Reconstructions from partial sums} = x_p(t) = \sum_{n=-N}^{n=N}c_ne^{jn\omega_ot} $$

Such partial sums exhibit osciallations on their sides of the discontinuities in $x(t)$, and this oscillation does not reduce in amplitude as $N \to \infty$. This is called the Gibbs phenomenon. The oscillations get shorter and shorter in time, but not in ampltiude as $N \to \infty$. The problem here is the attempt to approximate a discontinuous function with a finite sum of continuous functions. A good account on the Gibbs phenomenon can be found in [ 2].

4.2 Decomposing non-periodic signals: Fourier Transform

Consider a non-periodic singal $x(t)$. We cannot do a Fourier series decomposition on this signal. Let us now construction a periodic signal $x_T(t)$ with fundamental period $T$ out of this non-periodic signal $x(t)$, such that $$ x_T(t) = x(t), \,\,\, |t| < \frac{T}{2} $$ $$ x_T(t + T) = x_T(t), \forall t $$

The Fourier series representation of $x_T(t)$ is given by the following, $$ x_T(t) = \sum_{n=-\infty}^{\infty}X_ne^{jn\omega_ot}, \,\,\, \omega_o = \frac{2\pi}{T} $$

$$ X_n = \frac{1}{T}\int_{-T/2}^{T/2}x_T(t)e^{-jn\omega_ot}dt = \frac{1}{T}\int_{-T/2}^{T/2}x(t)e^{-jn\omega_ot}dt $$

The reconstructed singal $x_T(t)$ is equal to the original non-periodic singal for the time interval $t \in (-T/2, T/2)$. Thus, for $t \in (-T/2, T/2)$ $$ x(t) = x_T(t) = \sum_{n=-\infty}^{\infty}X_ne^{jn\omega_ot} = \sum_{n=-\infty}^{\infty} \left(\frac{1}{T} \int_{-T/2}^{T/2}x(t)e^{-jn\omega_ot}dt\right)e^{jn\omega_ot} = \sum_{n=-\infty}^{\infty} \left(\int_{-T/2}^{T/2}x(t)e^{-j\omega_nt}dt\right)e^{j\omega_nt} \frac{\Delta\omega}{2\pi}$$

Let, $n\omega_o = \omega_n$, $\frac{1}{T} = \frac{\Delta\omega}{2\pi} = \frac{\omega_n - \omega_{n-1}}{2\pi}$.

Now, if we let $T \to \infty$, then $\Delta\omega \to 0$, and the above summation becomes an integral.

$$ x(t) = \frac{1}{2\pi} \int_{-\infty}^{\infty} X(\omega)e^{jn\omega_ot} d\omega $$

Where, $X(\omega)$ is the Fourier transform of $x(t)$. $$ X(\omega) = \int_{-\infty}^{\infty}x(t)e^{-jn\omega_ot}dt $$

The Fourier transform representation of continuous-time non-periodic signals consists of two essential components:

Synthesis equation $x(t) = \frac{1}{2\pi}\int_{-\infty}^{\infty}X(\omega) e^{j\omega t}dt$
Analysis equation $X(\omega) = \int_{-\infty}^{\infty}x(t) e^{-j\omega t} dt$

Here, $x(\bullet )$ and $X(\bullet)$ are called the Fourier transform pairs. $$ x(t) \longleftrightarrow X(\omega) $$

Almost all of the signals that we will deal with in the book and in practical situations will be singals that are absolutely integrable, i.e. $$ \int_{-\infty}^{\infty}\left|x(t)\right|dt < \infty $$ This is a sufficient condition for the existence of the Fourier transform. However, we will see examples of signals that do not satisfy these conditions and still have a Fourier transform.

The Fourier transform $X(\omega)$ is a complex quantify which can be written as the following,

$$ X(\omega) = |X(\omega)|e^{j\theta(\omega)} $$

where, $|X(\omega)|$ is the amplitude spectrum and $\theta(\omega)$ is the phase spectrum.

4.2.1 Properties of the Fourier transform and its inverse

The following properties of the Fourier transform and its inverse help us to gain a deeper understanding on the Fourier transform, and will also be very helpful in easily evaluating the Fourier transform and its inverse of several useful functions without having to carrying out the integrals.

Fourier transforms of special signals

Now we will look at some of the properties of the Fourier transform and its inverse, which will be very helpful for understanding the relationship time and frequency domains relationships of continuous-time signals. Consider an arbitrary signal $x(t)$, such that $$ x(t) = x_r(t) + jx_i(t), \,\,\, x_r(t), x_i(t) \in \mathbb{R} $$

The Fourier transform of $x(t)$ will be, in general, a complex function of $\omega$.

$$ X(\omega) = X_r(\omega) + jX_i(\omega), \,\,\, X_r(\omega), X_i(\omega) \in \mathbb{R} $$

where, $$ X_r(\omega) = \int_{-\infty}^{\infty}\left(x_r(t)\cos \omega t + x_i(t) \sin \omega t\right)dt $$

$$ X_i(\omega) = \int_{-\infty}^{\infty}\left(x_i(t)\cos \omega t - x_r(t) \sin \omega t\right)dt $$

$x_r(t)$ and $x_i(t)$ can be be expressed in terms of $X_r(\omega)$ and $X_i(\omega)$,

$$ x_r(t) = \frac{1}{2\pi}\int_{-\infty}^{\infty}\left(X_r(\omega)\cos \omega t - X_i(\omega)\sin \omega t\right)d\omega $$$$ x_i(t) = \frac{1}{2\pi}\int_{-\infty}^{\infty} \left(X_i(\omega)\cos \omega t + X_r(\omega)\sin \omega t\right)d\omega $$
  • When $x(t)$ is real.

If the time-domain signal is real, then $x_i(t) = 0$ $$ X_r(\omega) = \int_{-\infty}^{\infty}x(t)\cos \omega t\,dt $$

$$ X_i(\omega) = -\int_{-\infty}^{\infty}x(t) \sin \omega t\,dt $$

This means that $X_r(\omega)$ is an even function of $\omega$, and $X_i(\omega)$ is an odd function of $\omega$. Thus,

$$ X(-\omega) = X^*(\omega) $$
  • When $x(t)$ is real and even.

Here, $x_r(t) = x_r(-t)$, and $x_i(t) = 0$. Since $x(t)$ is real, $X(\omega) = X^*(\omega)$. The function $x(t)sin \omega t$ is an odd function of time, and $x(t)\cos \omega t$ is an even function of time. Therefore,

$$ X_r(\omega) = 2\int_{0}^{\infty} x(t) \cos \omega t\,dt $$$$ X_i(\omega) = 0 $$

Thus, $X(\omega)$ is a real function of $\omega$. The inverse Fourier transform is given by,

$$ x(t) = \frac{1}{\pi}\int_{0}^{\infty}X_r(\omega)\cos \omega td\omega $$

Exercises:

  1. Prove the following:
    • If $x(t)$ is imaginary, then $X(\omega) = -X^{*}(-\omega)$
    • If $x(t)$ is real and odd, then $X(\omega)$ is imaginary.
    • If $x(t)$ is an arbitrary real signal, then $x_e(t) \leftrightarrow X_r(\omega)$, and $x_o(t) \leftrightarrow X_i(\omega)$, where $x_e(t)$ and $x_o(t)$ are the even and odd components of $x(t)$.

From this point on, we will only deal with time-domain signals that are real. Thus all time-domain signals are assumed to be real, unless specfied otherwise.

  • When $x(t)$ is causal.

A causal signal is one which is zero for $t < 0$. These are important signals as the impulse response of physically realizable systems are all causal.

$$ x(t) = 0, \,\,\, t < 0 $$

Decomposing $x(t)$ into its even $x_e(t)$ and odd $x_o(t)$ components, we have

$$ x_e(t) = \begin{cases} \frac{x(t)}{2} & t \geq 0 \\ \frac{x(-t)}{2} & t < 0 \end{cases} \,\,\,\, \text{and} \,\,\,\, x_o(t) = \begin{cases} \frac{x(t)}{2} & t \geq 0 \\ -\frac{x(-t)}{2} & t < 0 \end{cases} $$

$x(t) = 2x_e(t) = 2x_o(t), \,\,\,\, t \geq 0$. Thus we have,

$$ x(t) = \frac{2}{\pi}\int_{0}^{\infty}X_r(\omega)\cos \omega t\,d\omega = -\frac{2}{\pi}\int_{0}^{\infty}X_i(\omega)\sin \omega t\,d\omega, \,\,\, t \geq 0 $$

The above relations tell us that $x(t)$ can be reconstructed knowing either $X_r(\omega)$ or $X_i(\omega)$, which means that $X_r(\omega)$ and $X_i(\omega)$ are not independent and the knowledge of one allows us to calculate the other.

Linearity

The Fourier transform is a linear transform. If $x_n(t)$ and $X_n(\omega)$ are Fourier transform pairs, then $$ \sum_{n=1}^{N}a_nx_n(t) \longleftrightarrow \sum_{n=1}^{N}a_nX_n(\omega) $$

Symmetry

It can be seen from the formulae for the Fourier transform and its inverse that there is some form of symmetry between them. If $X(\omega)$ is Fourier transform of $x(t)$, then $$ X(t) \longleftrightarrow 2\pi x(-\omega) $$

Consider the Fourier transform of $x(t)$, $$ X(\omega) = \int_{-\infty}^{\infty}x(t)e^{-j\omega t} dt $$

Switch the variables $t$ and $\omega$, $$ X(t) = \int_{-\infty}^{\infty}x(\omega)e^{-j\omega t} d\omega $$

Replace $\omega$ by $-\omega$, $$ X(t) = -\int_{\infty}^{-\infty}x(-\omega)e^{j\omega t} d\omega = \frac{1}{2\pi}\int_{\infty}^{-\infty}2\pi x(-\omega)e^{j\omega t} d\omega $$

which is the inverse Foruier transform of $2\pi x(-\omega) $.

Time/frequency scaling

Let $x(t)$ and $X(\omega)$ be Fourier transform pairs, then for any $a \in \mathbb{R}$ and $a \neq 0$, $$ x(at) \longleftrightarrow \frac{1}{|a|}X(\frac{\omega}{a}) $$

Consider the Fourier transform of $x(at)$,

$$ \int_{-\infty}^{\infty} x(at)e^{-j\omega t}dt $$

Replace $at$ with $\tau$. If $a$ is negative the limits of the integration will be reversed, but the sign of $a$ can be removed to restore the limits to be between $-\infty$ to $\infty$.

$$ \int_{-\infty}^{\infty} x(at)e^{-j\omega t}dt = \frac{1}{|a|}\int_{-\infty}^{\infty} x(t)e^{-j\omega t/a}dt = \frac{1}{|a|}X(\frac{\omega}{a}) $$

The above result indicates that when a time-domain signal is dialted along the time axis, it gets compressed along the frequency axis, and vie versa. This is demonstrated in the following interactive plot of a rectangular pulse and its Fourier transform. Let us first derive the Fourier transform of a rectangular pulse $x(t)$ before looking at the effect of time scaling.

Fourier transform of a rectangular pulse

Consider a rectangular pulse, $$ x(t) = \begin{cases} 1 & |t| < \frac{T}{2} \\ 0 & \text{Otherwise} \end{cases} $$

The Fourier transform is given by $X(\omega)$, $$ X(\omega) = \int_{-T/2}^{T/2}e^{-j\omega t}dt = -\frac{1}{j\omega}\left|e^{-j\omega t}\right|_{-T/2}^{T/2} = \frac{e^{j\frac{\omega T}{2}} - e^{j\frac{-\omega T}{2}}}{j\omega} = \frac{2}{\omega}\sin \left(\frac{\omega T}{2}\right) = 2\frac{T}{2}\frac{\sin \frac{\omega T}{2}}{\frac{\omega T}{2}} = T\text{sinc} \frac{\omega T}{2} $$


In [5]:
def sinc(x):
    """Returns the value of the sinc function."""
    return 1.0 if x == 0. else np.sin(x)/x

def square_pulse(t, T):
    """Returns the values of the square pulse of a given period T
    for the given time t."""
    return 1.0 if np.abs(t) <= 0.5 * T else 0.

def FT_time_scaling(a):
    T = 1.0
    # pulse waveform
    time = np.arange(-4*T, 4*T, 0.001)
    x_t = np.array([square_pulse(a*t, T) for t in time])

    # Fourier transoform.
    omega = np.arange(-2*np.pi*15, 2*np.pi*15, 0.001)
    X_f = (1/np.abs(a))*np.array([T * sinc((f/a)*T/2.) for f in omega])

    figure(figsize=(13,3))
    subplot(1,2,1)
    plot(time, x_t)
    xlim(time[0], time[-1])
    ylim(-0.1, 1.1)
    xlabel('Time (s)', fontsize=15)
    title('Rectangular pulse $x({0}t)$, $T={1}$'.format(a, T), fontsize=15)

    subplot(1,2,2)
    plot(omega, X_f)
    xlim(omega[0], omega[-1])
    ylim(-2.5, 10.2)
    xlabel('Frequency (rad/s) $\omega$', fontsize=15)
    title('Fourier transform of $x({0}t)$'.format(a, T), fontsize=15);

interact(FT_time_scaling, a=widgets.FloatSliderWidget(min=0.2, max=3.0, step=0.1, value=1.0));


Time shifting

The Fourier transform of time-shifted signal $x(t-t_0)$ is given by, $$ x(t-t_0) \longleftrightarrow X(\omega)e^{-j\omega t_0} $$

In the case of a time shift in the signal $x(t)$, we see that the resulting Fourier transform's amplitude spectrum is not affected, and only the phase spectrum is affected.

$$ \left|X(\omega)e^{-j\omega t_0}\right| = \left|X(\omega)\right|\left|e^{-j\omega t_0}\right| = \left|X(\omega)\right| \implies \text{Amplitude spectrum is unaffected.} $$$$ \arg(X(\omega)e^{-j\omega t_0}) = \theta(\omega)-\omega t_0 \implies \text{A linear phase shift in the phase spectrum} $$

This is demonstrated in the following for the rectangular pulse signal.


In [6]:
def sinc(x):
    """Returns the value of the sinc function."""
    return 1.0 if x == 0. else np.sin(x)/x

def amplitude_spectrum(f, T):
    """Returns the magnitude spectrum value of the rectangular pulse."""
    return T * sinc(f*T/2.)

def phase_spectrum(f, t0):
    """Returns the phase spectrum value of the rectangular pulse."""
    return -f*t0

def square_pulse(t, T):
    """Returns the values of the square pulse of a given period T
    for the given time t."""
    return 1.0 if np.abs(t) <= 0.5 * T else 0.

def FT_time_shifting(t0):
    T = 1
    # pulse waveform
    time = np.arange(-4*T, 4*T, 0.001)
    x_t = np.array([square_pulse(t-t0, T) for t in time])

    # Fourier transoform.
    omega = np.arange(-2*np.pi*15, 2*np.pi*15, 0.001)
    A_f = np.array([amplitude_spectrum(f, T) for f in omega])
    theta_f = np.array([phase_spectrum(f, t0) for f in omega])

    figure(figsize=(13,3))
    subplot(1,3,1)
    plot(time, x_t)
    xlim(time[0], time[-1])
    ylim(-0.1, 1.1)
    xlabel('Time (s)', fontsize=15)
    title('Rectangular pulse $x(t-({0}))$'.format(t0), fontsize=15)

    subplot(1,3,2)
    plot(omega, A_f)
    xlim(omega[0], omega[-1])
    ylim(-0.5, 2.2)
    xlabel('Frequency (rad/s) $\omega$', fontsize=15)
    title('Amplitude spectrum of $x(t-({0}))$'.format(t0), fontsize=15)
    
    subplot(1,3,3)
    plot(omega, theta_f)
    xlim(omega[0], omega[-1])
    ylim(-200, 200)
    xlabel('Frequency (rad/s) $\omega$', fontsize=15)
    title('Phase spectrum of $x(t-({0}))$'.format(t0), fontsize=15);

interact(FT_time_shifting, t0=widgets.FloatSliderWidget(min=-3.0, max=3.0, step=0.5, value=0.0));


Frequency shifting

Similar to the time shifting, we can perform a frequency shiting operation and look at the corresponding effect in the time-domain signal. If $x(t)$ and $X(\omega)$ are Fourier transform pairs, then $$ x(t)e^{j\omega_0 t} \longleftrightarrow X(\omega - \omega_0) $$

Time differentiation and integration

Let us take the $n^{th}$ derivative of a signal $x(t)$. Then the Fourier transform of the $n^{th}$ derivative is, $$ \frac{d^nx(t)}{dt^n} \longleftrightarrow (j\omega)^nX(\omega) $$

Now consider a function $y(t) = \int_{-\infty}^{t}x(\tau) d\tau$, with a Fourier transform $Y(\omega)$. From the second fundamental theorem of calculus, $\frac{d}{dt}y(t) = x(t)$, thus we have $X(\omega) = j\omega Y(\omega)$. If $y(t)$ is absolutely integrable, then $$ \int_{-\infty}^{t}x(\tau)d\tau \longleftrightarrow \frac{X(\omega)}{j\omega} $$

Convolution theorem

The convolution theorem is an very important theorem which tells the the relationship between convolution in the time-domain and the corresponding operation in the frequency-domain.

Let us consider two signals, $x_1(t)$ and $x_2(t)$. Let us define $y(t)$ to be convolution of these two signals, $$ y(t) = x_1(t) * x_2(t) = \int_{-\infty}^{\infty}x_1(\tau)x_2(t-\tau)d\tau $$

Now, what is the Fourier transform of $y(t)$, if we know that $X_1(\omega)$ and $X_2(\omega)$ are the Fourier transforms of $x_1(t)$ and $x_2(t)$, respectively?

The convolution theorem states that,

$$ \int_{-\infty}^{\infty} \left( \int_{\infty}^{\infty}x_1(\tau)x_2(t-\tau) d\tau \right) e^{-j\omega t} dt = X_1(\omega)X_2(\omega) $$

Proof: $$ \int_{-\infty}^{\infty} \left( \int_{\infty}^{\infty}x_1(\tau)x_2(t-\tau) d\tau \right) e^{-j\omega t} dt = \int_{-\infty}^{\infty} x_1(\tau) d\tau \int_{\infty}^{\infty} x_2(t-\tau) e^{-j\omega t} dt = \int_{-\infty}^{\infty} x_1(\tau) X_2(\omega) e^{-j\omega \tau} d\tau = X_1(\omega)X_2(\omega) $$

Comment: In the above the order of integration was reversed, which can be done only if $x_1(t)$ and $x_2(t)$ are square integrable.

This is a very useful result, as this means that convolution in the time-domain can be replaced by multiplication in the frequency-domain. Convolution integrals are often clumpy and not easy to evaluate, and requires lot of care to determine the appropriate limits of integration for different conditions. But with the above result, a convolution integral can eb replaced by a multiplication operation through the Fourier transformation. Thus, for signal that are easily transformed to and inverted from the the Fourier domains, we can evaluate convolution integrals in time using the above result.

Given the symmetry of Fourier transform pairs, we can obtain a similar result for convolution in the frequency domain. $$ x_1(t)x_2(t) \longleftrightarrow \frac{1}{2\pi}\int_{-\infty}^{\infty}X_1(p)X_2(\omega-p)dp = \frac{1}{2\pi}X_1(\omega)*X_2(\omega) $$

Parseval's Theorem

We can calculate the energy of $x(t)$ as we did for the Fourier series, and get the corresponding relationship between $x(t)$ and its Fourier transform $X(\omega)$.

Let us consider the Fourier transform of $x(t)y(t)$, $$ \int_{-\infty}^{\infty}x(t)y(t)e^{-j\omega t}dt = \int_{-\infty}^{\infty}X(p)Y(\omega - p)dp $$

When $\omega = 0$, we have $$ \int_{-\infty}^{\infty}x(t)y(t)dt = \int_{-\infty}^{\infty}X(p)Y(-p)dp $$

If we now replace $y(t)$ by $y^*(t)$, then $Y(\omega)$ will be replaced by $Y^*(-\omega)$, thus we have

$$ \int_{-\infty}^{\infty}x(t)y*(t)dt = \int_{-\infty}^{\infty}X(\omega)Y^*(\omega)d\omega $$

This implies that,

$$ \int_{-\infty}^{\infty}|x(t)|^2dt = \int_{-\infty}^{\infty}x(t)x^*(t)dt = \frac{1}{2\pi} \int_{-\infty}^{\infty} X(\omega)X^*(\omega) d\omega = \frac{1}{2\pi} \int_{-\infty}^{\infty} |X(\omega)|^2 d\omega $$$$ \implies \int_{-\infty}^{\infty}|x(t)|^2dt = \frac{1}{2\pi} \int_{-\infty}^{\infty} |X(\omega)|^2 d\omega $$

Gibbs phenomenon

The Gibbs phenomenon which was discussed in the context of the Fourier series can also be observed in the Fourier transform. In fact, with some of the above theorem, we can get a deeper understanding of why the Gibbs phenomenon is observed.

Consider the rectangular pulse signal which we looked at earlier, $$ x(t) = \begin{cases} 1 & |t| < \frac{T}{2} \\ 0 & \text{Otherwise} \end{cases} $$

The Fourier transform of $x(t)$ is $X(\omega) = T\text{sinc} \frac{\omega T}{2}$.

Now, let us consider a band-limited version of $x(t)$, which we call $x_{\Omega}(t)$. The term band-limited means that the singal has non-zero freqencu components only for finite values of $\omega$, such that $|\omega| < \Omega$, and its is zero otherwise.

In the case of $X(\omega)$, a band-limited version of this spectrum $X_{\Omega}(\omega)$ can be obtained by multiplying $X(\omega)$ by a retangular pulse function in the frequnecy domain $P_{\Omega}(\omega)$.

$$ X_{\Omega}(\omega) = \begin{cases} X(\omega) & |\omega| < \Omega \\ 0 & \text{Otherwise} \end{cases} = X(\omega)P_{\Omega}(\omega) $$

where, $P_{\Omega}(\omega) = \begin{cases} 1 & |\omega| < \Omega \\ 0 & \text{Otherwise} \end{cases}$.

From the convolution theorem, we know that this multiplication in the frequency domain will result in a corresponding convolution operation in the time-domain.

$$ X(\omega)P_{\Omega}(\omega) \longleftrightarrow 2\pi \int_{-\infty}^{\infty} x(\tau) p_{\Omega}(t - \tau)d\tau $$

where, $p_{\Omega}(t) = \frac{1}{2\pi}\int_{-\infty}^{\infty}P_{\Omega}(\omega)e^{j\omega t}d\omega$.

We can obtain $p_{\Omega}(t)$ using the symmetry property of Fourier transforms. $$ p_{\Omega}(t) = \frac{\Omega}{\pi}\text{sinc} \left(\Omega t\right) $$

Thus, $x_{\Omega}(t)$ is given by

$$ x_{\Omega}(t) = \int_{-\infty}^{\infty} x(\tau) p_{\Omega}(t - \tau) d\tau = \frac{\Omega}{\pi} \int_{-\infty}^{\infty} x(\tau) \text{sinc}\,\Omega\left(t - \tau\right) d\tau $$

This is demonstrated below.


In [2]:
def sinc(x):
    """Returns the value of the sinc function."""
    return 1.0 if x == 0. else np.sin(x)/x

def square_pulse(t, T):
    """Returns the values of the square pulse of a given period T
    for the given time t."""
    return 1.0 if np.abs(t) <= T else 0.

def convolve_sq_sinc(time, T, omega_c):
    z = np.zeros(len(time))
    dt = time[1] - time[0]
    for i, t in enumerate(time):
        _x = np.array([square_pulse(tau, T) for tau in time])
        _y = np.array([(omega_c/np.pi)*sinc(omega_c*(t - tau)) for tau in time])
        z[i] = np.sum(_x*_y)*dt
    return z

def FT_Gibbs_Phenomenon(T, fc):
    omega_c = 2*np.pi*fc
    
    # pulse waveform
    time = np.arange(-4*T, 4*T, 0.01)
    x_t = np.array([square_pulse(t, T) for t in time])

    # Fourier transoform.
    omega = np.arange(-2*np.pi*25, 2*np.pi*25, 0.01)
    X_f = np.array([T * sinc(f*T/2.) for f in omega])
    
    # band-limited spectrum.
    P_fc = np.array([square_pulse(f, omega_c) for f in omega])
    
    # band-limited time signal.
    p_fc = np.array([(omega_c/np.pi)*sinc(omega_c*t) for t in time])
    x_fc = convolve_sq_sinc(time, T, omega_c)
    
    figure(figsize=(10,9))
    subplot(3,1,1)
    step(time, x_t)
    plot(time, x_fc, 'r', lw=1.0)
    xlabel('Time (s)', fontsize=15)
    title('Rectangular pulse $x(t)$', fontsize=15)
    
    subplot(3,1,2)
    plot(time, p_fc, lw=1.0)
    xlim(time[0], time[-1])
    xlabel('Time (s)', fontsize=15)
    title('Rectangular pulse $x(t)$', fontsize=15)

    subplot(3,1,3)
    plot(omega, X_f)
    step(omega, P_fc, lw=1.0)
    plot(omega, X_f*P_fc, 'r', lw=1.0)
    xlim(omega[0], omega[-1])
    ylim(-0.6, 2.1)
    xlabel('Frequency (rad/s) $\omega$', fontsize=15)
    title('Fourier spectrum of $x(t)$', fontsize=15)
    
    tight_layout();

interact(FT_Gibbs_Phenomenon,
         T=widgets.FloatSliderWidget(min=0.25, max=2., step=0.1,value=1.),
         fc=widgets.FloatSliderWidget(min=0.1, max=10, step=0.5,value=5.));


In the case of the band-limited signal $x_{\Omega}(t)$, $$ x_{\Omega}(t) = \frac{\Omega}{\pi} \int_{-\infty}^{\infty} x(\tau) \text{sinc}\,\Omega\left(t - \tau\right) d\tau = \int_{-\infty}^{\infty} x(\tau)\frac{\sin\,\Omega(t - \tau)}{\pi (t-\tau)} d\tau $$

Here, as $\Omega$ tends to $\infty$, then $x_{\Omega}(t)$ tends towards $x(t)$. Thus,

$$ x(t) = \lim_{\Omega \to \infty} x_{\Omega}(t) \implies \lim_{\Omega \to \infty}\frac{\sin\,\Omega(t - \tau)}{\pi (t-\tau)} = \delta(t - \tau) $$

4.3 What is so special about complex exponentials?

So far, we have looked at a set of signals that can be represented as combination of complex exponentials. There is a good reason for choosing the complex exponential. Complex exponentials are eigenfunctions of LTI systems. An eignefunction is a function when input to a LTI system will result in an output that is a scaled version of the input, i.e. if $H$ is a LTI system, then, $$ H\{e^{st}\} = \lambda e^{st} $$ where, $e^{st}$ is the eigenfunction of $H$, and $\lambda$ is the corresponding eigenvalue. In general the eigenvalue $\lambda$ will be $\lambda(s)$, i.e. a function of $s$.

We had seen in the previous chapter that the output of a LTI system for any given arbitrary input $x(t)$ is given by the convolution of $x(t)$ by the system's impulse response $h(t)$. But if the input is an eigenfunction, then the convolution can be replaced by a multiplication operation to obtain the output. Thus, if we can represent an arbirtray signal as a linear combination of complex exponentials, then the output can be obtained by scaling the individual complex exponentials to obtain the output, i.e. $$ y(t) = H\{x(t)\} = H\bigg\{ \sum_{i}a_ie^{s_it} \bigg\} = \sum_{i}a_i H\{e^{s_it}\} = \sum_{i}a_i\lambda(s_i)e^{s_it} $$

The above equation is useful only if we know the exact eigenvalues $\lambda(s_i)$, which are required to obtain the output.

How does one obtain the eigenvalues?

The impulse response hold the key to this problem; it contains all the information we need to obtain the eigenvalues.

The output of a LTI system for an arbitrary input is given by the following, $$ y(t) = \int_{-\infty}^{\infty}x(\tau)h(t-\tau)d\tau = \int_{-\infty}^{\infty}h(\tau)x(t-\tau)d\tau $$

When $x(t) = e^{st}$, then we have $$ y(t) = \int_{-\infty}^{\infty}h(\tau)e^{s(t-\tau)}d\tau = e^{st} \int_{-\infty}^{\infty}h(\tau)e^{-s\tau}d\tau = H(s)e^{st} $$

Where, $H(s) \triangleq \int_{-\infty}^{\infty}h(\tau)e^{-s\tau}d\tau$. $H(s)$ is the eigenvalue of the system.

If we choose $s=j\omega$, then we have $$ H(\omega) = \int_{-\infty}^{\infty}h(t)e^{-j\omega t}dt $$

From the above equation, we see that $H(\omega)$ is the Fourier transform of the impulse response $h(t)$. $H(\omega)$ is called the frequency response of the LTI system.

Output of a LTI system in terms of the frequency response

With the frequency response, we can replace the convolution between the impulse response $h(t)$ and an arbitrary input $x(t)$ by a multiplication operation of their corresponding Fourier transforms, which results in the Fourier transform of output $y(t)$.

$$ y(t) = \int_{-\infty}^{\infty}x(\tau)h(t-\tau)d\tau \implies Y(\omega) = H(\omega)X(\omega) $$$$ y(t) = \int_{-\infty}^{\infty}H(\omega)X(\omega) e^{j\omega t}d\omega $$

References

  1. Haykin, Simon, and Barry Van Veen. Signals and systems. John Wiley & Sons, 2007.
  2. http://en.wikipedia.org/wiki/Gibbs_phenomenon Accessed on: Jan 20 2015
  3. Percival, Donald B. Spectral analysis for physical applications. Cambridge University Press, 1993.
  4. Papoulis, Athanasios. The Fourier integral and its applications. McGraw-Hill, 1962.

In [1]:
from IPython.core.display import HTML
def css_styling():
    styles = open("../styles/custom.css", "r").read()
    return HTML(styles)
css_styling()


Out[1]: