Keyword/Relationship Explained

For periodic signal, Signals can be constructed by summing sinusoids of different frequencies, amplitudes and phases.

Signals = A0+A1cos(2πf1t+θ1)+A2cos(2πf2t+θ2)+A3cos(2πf3t+θ3)+...A_{0}+A_{1}cos(2\pi f_{1}t + \theta_{1})+A_{2}cos(2\pi f_{2}t + \theta_{2})+A_{3}cos(2\pi f_{3}t + \theta_{3})+...

Waveform : a plot of a function of time

Spectrum : a plot of a function of frequency

Amplitude spectrum is even, while phase spectrum is odd.

Frequency-domain representation: Represented with the set of scaling factors + phase angles.

Frequency domain analysis = get the scaling factors and the phase angles (AiA_i and θi\theta_i )

We use different approaches for different signals.

Signal Approach
Periodic continuous time signal Continuous time Fourier Series (CTFS)
Aperiodic continuous time signal Continuous time Fourier Transform (CTFT)
Periodic discrete time signal Discrete time Fourier series (DTFS)
Aperiodic discrete time signal Discrete time Fourier Transform (DTFT)

For continuous time signal, refer to here

Discrete-time Fourier Series (DTFS)

Used to analyze a periodic discrete-time signal

  • Discrete time, discrete frequency
  • Periodic in time, periodic in frequency

Definition

Inverse DTFS (for getting the x[n])

x[n]: periodic, n ={0, 1, …, N-1} is time index

N is period of the input signal.

X[k]x[n]=k=0N1X[k]ej2πknNX[k] \longrightarrow x[n]=\sum_{k=0}^{N-1} X[k] e^{j 2 \pi \frac{k n}{N}}

Forward DTFS (for getting the X[k])

X[k]: periodic, k={0, 1, …, N-1} is frequency index

N is period of the input signal.

x[n]X[k]=1Nn=0N1x[n]ej2πknNx[n] \longrightarrow X[k]=\frac{1}{N} \sum_{n=0}^{N-1} x[n] e^{-j 2 \pi \frac{k n}{N}}

Properties of DTFS

Time shifting

A shift doesn’t affect the amplitude spectrum but the phase spectrum.

x[nn0]ej2πkn0NX[k]x\left[n-n_{0}\right] \longleftrightarrow e^{-j 2 \pi k \frac{n_{0}}{N}} X[k]

Frequency Shifting (Harmonic Number Shifting)

ej2πk0nNx[n]X[kk0]e^{j 2 \pi k_{0} \frac{n}{N}} x[n] \longleftrightarrow X\left[k-k_{0}\right]

Conjugation

x[n]X[k]x^{*}[n] \longleftrightarrow X^{*}[-k]

If x[n]x[n] is a real-value sequence

  • x[n]=x[n]X[k]=X[k]x[n] = x^*[n] \rightarrow X[k] = X^*[-k]
    • X[k]=X[k]=X[k]|X[k]| = |X^*[-k]| = |X[-k]| -> Amplitude spectrum is an even function
    • X[k]=X[k]=X[k]\angle X[k] = \angle X^*[-k] = -\angle X[-k] -> Phase spectrum is an odd function

Time Reversal

x[n]X[k]x[-n] \longleftrightarrow X[-k]

If x[n]x[n] is a real-value sequence and an even function

  • x[n]=x[n]X[k]=X[k]x[n] = x[-n] \rightarrow X[k] = X[-k]
    • X[k]=X[k]|X[k]| = |X[-k]| -> Amplitude spectrum is an even function
    • X[k]=X[k]\angle X[k] = \angle X[-k] -> Phase spectrum is an even function

But If x[n]x[n] is a real-value sequence only, Phase spectrum is an odd function.

Since Phase spectrum is both odd and even function -> Phase spectrum = 0

Therefore If x[n]x[n] is a real-value sequence and x[n]=x[n]x[n] = x[-n] (even function) , Phase spectrum = 0

DTFS Example

Forward DTFS

Reconstructing x[n] (Inverse DTFS)

Practice Questions

As we are given the X[k] of We will be using property to do these questions.

Key info of this question:

DTFS - x[n] is periodic

Time-shift:

x[nn0]ej2πkn0NX[k]x\left[n-n_{0}\right] \longleftrightarrow e^{-j 2 \pi k \frac{n_{0}}{N}} X[k]

Time-reversal:

x[n]X[k]x[-n] \longleftrightarrow X[-k]

x[n]=[1 1 0 0]x[n] = [1\space1\space0\space0] (Given)

X[k]={0.5, (0.250.25j), 0, (0.25+0.25j)}X[k] = \{0.5,\space(0.25-0.25j),\space0,\space(0.25+0.25j)\} (Given)

(1) x1[n]x_1[n] = [1 1 0 0 1 1 0 0]

It is basically the same as [1 1 0 0]. Period = 4

x1[n]=x[n]x_1[n] = x[n]

X1[k]=X[k]={0.5, (0.250.25j), 0, (0.25+0.25j)}X_1[k] = X[k] = \{0.5,\space(0.25-0.25j),\space0,\space(0.25+0.25j)\}

Note:

A sequence of period NN is also a sequence of period nNnN, where nn is a +ve integer.

If you consider it as a sequence of period nNnN and compute the DTFS for the sequence, the output is a spectrum of period nNnN.

X[nk]={X[k] for integer k0 else X^{\prime}[n k]=\left\{\begin{array}{cc} X[k] & \text { for integer } k \\ 0 & \text { else } \end{array}\right.

Now in our case, n=2n = 2.

X[0] -> X[0] ,

X[1] -> X[2],

X[2] -> X[4],

X[3] -> X[6]

X1[k]=X[2k]={0.5, 0, (0.250.25j), 0, 0, 0, (0.25+0.25j), 0}X_1[k] = X[2k] = \{0.5,\space0,\space(0.25-0.25j),\space0,\space0,\space0,\space(0.25+0.25j),\space0\}

Therefore solution for (1) is X1[k]={0.5, 0, 0.250.25j, 0, 0, 0, 0.25+0.25j, 0}X_1[k] = \{0.5,\space0,\space0.25-0.25j,\space0,\space0,\space0,\space0.25+0.25j,\space0\}

(2) x2[n]x_2[n] = [0 1 1 0]

It is a shifted version of [1 1 0 0]. Shift to right 1 unit -> x[n1]x[n-1]

x2[n]=x[n1]x_2[n] = x[n-1]

X2[k]=ej2πk14X[k]=ejπ12kX[k]=(j)kX[k]X_2[k] = e^{-j2\pi k\frac{1}{4}}X[k] = e^{-j\pi\frac{1}{2}k}X[k] = (-j)^kX[k]

(j)kX[k]={0.5×1, (0.250.25j)×(j)1, 0×(j)2, (0.25+0.25j)×(j)3}(-j)^kX[k] = \{0.5\times 1,\space(0.25-0.25j)\times (-j)^1,\space0\times(-j)^2,\space(0.25+0.25j)\times(-j)^3\}

X2[k]={0.5, (0.250.25j), 0, (0.25+0.25j)}X_2[k] = \{0.5,\space(-0.25-0.25j),\space0,\space(-0.25+0.25j)\}

Therefore solution for (2) is X2[k]={0.5, (0.250.25j), 0, (0.25+0.25j)}X_2[k] = \{0.5,\space(-0.25-0.25j),\space0,\space(-0.25+0.25j)\}

Note: Magnitude spectrum X2[k]=X[k]|X_2[k]| = |X[k]| as ej2πk14e^{j2\pi k \frac{1}{4}} does not affect the magnitude.

(3) x3[n]x_3[n] = [0 0 1 1]

Again, It is a shifted version of [1 1 0 0]. Shift to right 2 unit -> x[n2]x[n-2]

x3[n]=x2[n1]=x[n2]x_3[n] = x_2[n-1] = x[n-2]

X3[k]=ej2πk24X[k]=ejπkX[k]=(1)kX[k]X_3[k] = e^{-j2\pi k \frac{2}{4}}X[k] = e^{-j\pi k}X[k] = (-1)^kX[k]

(1)kX[k]={0.5×(1)0, (0.250.25j)×(1)1, 0×(1)2, (0.25+0.25j)×(1)3}(-1)^kX[k] = \{0.5\times(-1)^0,\space(0.25-0.25j)\times(-1)^1,\space0\times(-1)^2,\space(0.25+0.25j)\times(-1)^3\}

X3[k]={0.5, (0.25+0.25j), 0, (0.250.25j)}X_3[k] = \{0.5,\space(-0.25+0.25j),\space0,\space(-0.25-0.25j)\}

Therefore solution for (3) is X3[k]={0.5, (0.25+0.25j), 0, (0.250.25j)}X_3[k] = \{0.5,\space(-0.25+0.25j),\space0,\space(-0.25-0.25j)\}

Note: Magnitude spectrum X3[k]=X[k]|X_3[k]| = |X[k]| as ej2πk24e^{j2\pi k \frac{2}{4}} does not affect the magnitude.

(4) x4[n]x_4[n] = [1 0 0 1]

Method 1

It is flipped version of x[n]x[n].

Note: you need to mind which one is the x[n]x[n] (We get x[n]x[-n] by flipping x[n]x[n] about x[0]x[0])

x4[n]=x[n]x_4[n] = x[-n]

X4[k]=X[k]X_4[k] = X[-k]

X[k]={0.5, (0.250.25j), 0, (0.25+0.25j)}X[k] = \{0.5,\space(0.25-0.25j),\space0,\space(0.25+0.25j)\} (Given)

After flipped:

X[k]={0.5, (0.25+0.25j), 0, (0.250.25j)}X[-k] = \{0.5,\space(0.25+0.25j),\space0,\space(0.25-0.25j)\}

Therefore solution for (4) is X4[k]={0.5, (0.25+0.25j), 0, (0.250.25j)}X_4[k] = \{0.5,\space(0.25+0.25j),\space0,\space(0.25-0.25j)\}

Method 2

It is a shifted version of [1 1 0 0]. Shift to left 1 unit -> x[n+1]x[n+1]

x4[n]=x[n+1]x_4[n] = x[n+1]

X4[k]=ej2πk14X[k]=(1j)kX[k]=(j)kX[k]X_4[k] = e^{-j2\pi k\frac{-1}{4}}X[k] = (\frac{-1}{j})^kX[k] = (j)^kX[k]

(j)kX[k]={0.5×(j)0, (0.250.25j)×(j)1, 0×(j)2, (0.25+0.25j)×(j)3}(j)^kX[k] = \{0.5\times(j)^0,\space(0.25-0.25j)\times(j)^1,\space0\times(j)^2,\space(0.25+0.25j)\times(j)^3\}

X4[k]={0.5, (0.25+0.25j), 0, (0.250.25j)}X_4[k] = \{0.5,\space(0.25+0.25j),\space0,\space(0.25-0.25j)\}

Therefore solution for (4) is X4[k]={0.5, (0.25+0.25j), 0, (0.250.25j)}X_4[k] = \{0.5,\space(0.25+0.25j),\space0,\space(0.25-0.25j)\}

Note: Magnitude spectrum X4[k]=X[k]|X_4[k]| = |X[k]|

  • X[k]=X[k]|X[k]| = |X[-k]| -> Amplitude spectrum is an even function

FIrst, find the period.

Period = 8 (Given)

As Amplitude Spectrum of a real-value periodic sequence is an even function.

To complete the amplitude spectrum, just make it periodic.

Note: For k = -4:4 , the range is 8 = period.

  • Period determines how the amplitude spectrum look like.

Discrete-time Fourier Transform (DTFT)

Used to analyze a aperiodic discrete-time signal

Connection between DTFS and DTFT:

  • 2πkN=Ω\frac{2\pi k}{N} = \Omega
  • Ω\Omega is a continuous variable, and periodic with 2π2\pi

Definition

Inverse DTFT

X(Ω)x[n]=12πππX(Ω)ejΩndΩX(\Omega) \longrightarrow x[n]=\frac{1}{2 \pi} \int_{-\pi}^{\pi} X(\Omega) e^{j \Omega n} d \Omega

Forward DTFT

x[n]X(Ω)=n=x[n]ejΩnx[n] \longrightarrow X(\Omega)=\sum_{n=-\infty}^{\infty} x[n] e^{-j \Omega n}

Properties

DTFT and inverse DTFT are linear. (Homogeneous + Additive) -> enable us to use shortcut to get answer

x[n] and time-shifted x[n] have same magnitude spectrum.

x[n]X(Ω)=n=x[n]ejΩnx[n] \rightarrow X(\Omega) = \sum^\infty_{n=-\infty} x[n]e^{-j\Omega n}

x[nn0]Xnew(Ω)=ejΩn0X(Ω)x[n-n_0] \rightarrow X^{new}(\Omega) = e^{-j\Omega n_0} X(\Omega)

DTFT is periodic with period 2π2\pi.

X(Ω+2π)=X(Ω)X(\Omega + 2\pi) = X(\Omega)

DTFT Example

Forward DTFT

Inverse DTFT

DTFT vs DTFS

Connection between DTFS and DTFT

  • Ω=2πk/N\Omega = 2\pi k/N is the normalized freq
  • NN \rightarrow \infty \rightarrow
    • Ω\Omega is a continuous variable
    • Ω\Omega is periodic with 2π\pi

Basically

In Polar form z=ρejθz = \rho e^{j\theta}

  • ρ\rho is the Amplitude
  • θ\theta is the Phase

In Retangular form z=a+jbz = a+jb

X[k]=a2+b2|X[k]| = \sqrt{a^2+b^2} for each term

X[k]=tan1ba\angle X[k] = tan^{-1}\frac{b}{a} for each term

  • Amplitude spectrum must be even
  • Phase spectrum must be odd

Periodic in one domain = Discrete in another domain

Aperiodic in one domain = Continuous in another domain

  • A signal having a discrete spectrum must be periodic time signal.
  • A signal having a periodic spectrum must be discrete time signal.

Euler’s Relation

2cosθ=ejθ+ejθ2cos\theta = e^{j \theta} + e^{-j \theta}

2jsinθ=ejθejθ2jsin\theta = e^{j\theta} - e^{-j\theta}

sin(θ)=cos(π2θ)=cos(θπ2)sin(\theta) = cos(\frac{\pi}{2} - \theta) = cos(\theta - \frac{\pi}{2})

cos(α)=cos(α)=cos(2kπα)cos(-\alpha) = cos(\alpha) = cos(2k\pi - \alpha)

  • DTFT is for discrete time aperiodic signals to derive their amplitude and phase spectrum
    • both amplitude and phase spectrum is continuous
  • DTFS is for discrete time periodic signals to derive their amplitude and phase spectrum
    • both amplitude and phase spectrum is discrete
  • CTFT is for continuous time aperiodic signals to derive their amplitude and phase spectrum
    • both amplitude and phase spectrum is continuous
  • CTFS is for continuous time periodic signals to derive their amplitude and phase spectrum
    • both amplitude and phase spectrum is discrete
  • A continuous time signal may not be perfectly reconstructed with sufficient number of terms in its Fourier series.
  • A discrete time signal can be perfectly reconstructed with sufficient number of terms in its Fourier series.

Relations Among Fourier Methods

CTFS

CTFT

DTFS

DTFT

Discrete Fourier Transform (DFT)

Note: Discrete Fourier Transform (DFT) =/= Discrete-time Fourier Transform (DTFT)

Main Concept:

  • Sampling the spectrum and Keep the samples only.
  • Just keeping one period of the spectrum only.

Basic Idea, DFT help you to skip steps.

DTFT route: x[n]DTFTX(Ω)SamplingX[k]x[n] \rightarrow \text{DTFT} \rightarrow X(\Omega) \rightarrow Sampling\rightarrow X[k]

DFT route: x[n]DFTX[k]x[n] \rightarrow \text{DFT} \rightarrow X[k]

The Idea of DFT

Definition

It actually looks like DTFS. nearly no difference.

Forward DFT

k : marks the frequency

N : number of samples we sample a period of the spectrum

  • A DFT of length N is called a N-point DFT.

x[n]X[k]=n=0N1x[n]ej2πkNnx[n] \longrightarrow X[k]=\sum_{n=0}^{N-1} x[n] e^{-j 2 \pi \frac{k}{N} n}

Note: X[0] is the DC component

  • X[0]=NxˉX[0]=N \bar{x}

Inverse DFT

k : marks the frequency

N : number of samples we sample a period of the spectrum

  • A DFT of length N is called a N-point DFT.

X[k]x[n]=1Nk=0N1X[k]ej2πkNnX[k] \longrightarrow x[n]=\frac{1}{N} \sum_{k=0}^{N-1} X[k] e^{j 2 \pi \frac{k}{N} n}

Relation Between DFT and DTFT

DFT Spectrum matches DTFT Spectrum exactly, but at a finite no of points only.

  • DTFT: produces smooth functions of frequency,
  • DFT: produces sampled versions of the same spectra

Resolution of DFT Spectrum

DFT spectrum has N points to cover a range of frequencies from 0 to 2π\pi, each frequency separates by 2π/N2\pi/N

Resolution = frequency spacing of DFT

The higher the value N, the better the resolution of the frequency spectrum.

Resolution Issue

Sometimes, the resolution might not be fine enough to characterize the spectrum

The spectrum resolution can be improved by increasing NN.

Use of DFT

When we see an aperiodic discrete time signal

  • We chop one of its segments (or the whole segment if its length is finite)
  • repeat the segment an infinite number of times to construct a virtual periodic discrete-time signal
  • Represent the virtual periodic signal with DTFS to study its spectrum.

Useful Tables

Practice Questions for DFT and DTFT

(a) xa[n]=0.5nu[n]x_a[n] = 0.5^n u[n]

Method 1

From Table, You can see this formula:

anu[n]11aejΩ,a<1a^{n} u[n] \leftrightarrow \frac{1}{1-a e^{-j \Omega}},|a|<1

Sub 0.50.5 into aa, you get xa[n]=0.5nu[n]Xa(Ω)=110.5ejΩx_a[n] = 0.5^n u[n] \leftrightarrow X_a(\Omega) = \frac{1}{1-0.5e^{-j\Omega}}

Method 2

This is how 0.5nu[n]0.5^n u[n] looks like. (Not scaled to graph)

xa[n]=0.5nu[n]=δ[n]+0.51δ[n1]+0.52δ[n2]++0.5kδ[nk]+x_a[n] = 0.5^n u[n] = \delta[n] + 0.5^1\delta[n-1] + 0.5^2\delta[n-2] +\cdots+ 0.5^k\delta[n-k] + \cdots

Using the transform table, you will see:

xa[n]Xa(Ω)=1+0.5ejΩ+0.52ej2Ω++0.5kejkΩ+x_a[n] \leftrightarrow X_a(\Omega) = 1 + 0.5e^{-j\Omega} + 0.5^2e^{-j2\Omega} +\cdots+ 0.5^ke^{-jk\Omega} + \cdots

According the Geometric progression formula (Geometric Sequence):

  • Ratio r=0.5ejΩr = 0.5e^{-j\Omega}
  • First Term a=1a = 1

Therefore Xa(Ω)=110.5ejΩX_a(\Omega) = \frac{1}{1-0.5 e^{j\Omega}}

(b) xa[n]=n0.5nu[n]x_a[n] = n \cdot0.5^n u[n]

From Table, You can see this formula: Multiplication by nn

nx[n]jddΩX(Ω)n x[n] \leftrightarrow j \frac{d}{d \Omega} X(\Omega)

Basically, xb[n]=nxa[n]x_b[n] = n\cdot x_a[n]

Therefore Xb(Ω)=jddΩXa(Ω)X_b(\Omega) = j\frac{d}{d\Omega}X_a(\Omega)

Do a differentiation.

Hint : f(x)=xrf(x)=rxr1f(x) = x^r \longrightarrow f'(x) = rx^{r-1}

Hint: Chain Rule

Hint: f(x)=eaxf(x)=aeaxf(x) = e^{ax} \longrightarrow f'(x) = ae^{ax}

ddΩXa(Ω)=(1)×(10.5ejΩ)2×(00.5×jejΩ)\frac{d}{d\Omega}X_a(\Omega) = (-1) \times (1-0.5e^{-j\Omega})^{-2}\times(0-0.5\times -je^{-j\Omega})

=(1)×(10.5ejΩ)2×(0.5jejΩ)= (-1)\times(1-0.5e^{-j\Omega})^{-2}\times(0.5je^{-j\Omega})

= j0.5ejΩ(10.5ejΩ)2\frac{-j0.5e^{-j\Omega}}{(1-0.5e^{-j\Omega})^{2}}

Xb(Ω)=jddΩXa(Ω)=jj0.5ejΩ(10.5ejΩ)2X_b(\Omega) = j\frac{d}{d\Omega}X_a(\Omega) = j\frac{-j0.5e^{-j\Omega}}{(1-0.5e^{-j\Omega})^{2}}

Since j×j=1j \times - j = 1

Xb(Ω)=0.5ejΩ(10.5ejΩ)2X_b(\Omega) = \frac{0.5e^{-j\Omega}}{(1-0.5e^{-j\Omega})^{2}}

(a) v[n]=x[n5]v[n] = x[n-5]

From Table, you can see this formula: Time Shift

x[nq]X(Ω)ejqΩ,q is any integer x[n-q] \leftrightarrow X(\Omega) e^{-j q \Omega}, q \text { is any integer }

V(Ω)=X(Ω)ej5Ω=ej5ΩejΩ+bV(\Omega) = X(\Omega)\cdot e^{-j5\Omega} = \frac{e^{-j5\Omega}}{e^j\Omega + b}

(b) v[n]=nx[n]v[n] = n\cdot x[n]

From Table, You can see this formula: Multiplication by nn

nx[n]jddΩX(Ω)n x[n] \leftrightarrow j \frac{d}{d \Omega} X(\Omega)

V(Ω)=jddΩX(Ω)=jddΩ(1ejΩ+b)V(\Omega) = j\frac{d}{d\Omega}X(\Omega) = j\frac{d}{d\Omega}(\frac{1}{e^{j\Omega} + b})

Do a differentiation.

Hint : f(x)=xrf(x)=rxr1f(x) = x^r \longrightarrow f'(x) = rx^{r-1}

Hint: Chain Rule

Hint: f(x)=eaxf(x)=aeaxf(x) = e^{ax} \longrightarrow f'(x) = ae^{ax}

ddΩ(1ejΩ+b)=ddΩ(ejΩ+b)1=(1)×(ejΩ+b)2×(jeΩ+0)=jeΩ(ejΩ+b)2\frac{d}{d\Omega}(\frac{1}{e^{j\Omega} + b}) = \frac{d}{d\Omega}(e^{j\Omega}+b)^{-1} = (-1)\times (e^{j\Omega} + b)^{-2} \times (je^{\Omega}+0) = \frac{-je^{\Omega}}{(e^{j\Omega}+b)^2}

Since j×j=1j \times - j = 1

V(Ω)=jjeΩ(ejΩ+b)2=ejΩ(ejΩ+b)2V(\Omega) = j\frac{-je^{\Omega}}{(e^{j\Omega}+b)^2} = \frac{e^{j\Omega}}{(e^{j\Omega}+b)^2}

(a) xc[n]=n0.5ncos(4n)u[n]x_{c}[n]=n \cdot 0.5^{n} \cdot \cos (4 n) \cdot u[n]

xc[n]=n0.5nu[n]cos(4n)x_{c}[n]=n \cdot 0.5^{n}\cdot u[n] \cdot \cos (4 n)

We break it into serval steps and store it with different variables.

Let y[n]=(0.5)nu[n]Y(Ω)=1(10.5ejΩ)y[n] = (0.5)^n u[n] \leftrightarrow Y(\Omega) = \frac{1}{(1-0.5e^{-j\Omega})}

Let z[n]=nu[n]Z(Ω)=jddΩ(Y(Ω))=0.5ejΩ(10.5ejΩ)2z[n] = n\cdot u[n] \leftrightarrow Z(\Omega) = j\frac{d}{d\Omega}(Y(\Omega)) = \frac{0.5e^{-j\Omega}}{(1-0.5e^{-j\Omega})^2}

xc[n]=z[n]cos(4n)Xc(Ω)=12[Z(Ω+4)+Z(Ω4)]x_c[n] = z[n]cos(4n) \leftrightarrow X_c(\Omega) = \frac{1}{2}[Z(\Omega + 4) + Z(\Omega-4)]

Xc(Ω)=12{0.5ej(Ω+4)(10.5ej(Ω+4))2+0.5ej(Ω4)(10.5ej(Ω4))2}X_{c}(\Omega)=\frac{1}{2} \cdot\left\{\frac{0.5 e^{-j(\Omega+4)}}{\left(1-0.5 e^{-j(\Omega+4)}\right)^{2}}+\frac{0.5 e^{-j(\Omega-4)}}{\left(1-0.5 e^{-j(\Omega-4)}\right)^{2}}\right\}

(b) xd[n]=(0.5)n<n<x_{d}[n]=(0.5)^{|n |} \quad-\infty<n<\infty

you need to know what it is exactly.

The first graph is how (0.5)n(0.5)^{|n|} looks like. (Not scaled to graph)

It is basically 0.5nu[n]0.5^n u[n] + a flipped 0.5nu[n]0.5^n u[n] - a overlapped pulse.

xd[n]=(0.5)n=(0.5)nu[n]+(0.5)nu[n]δ[n]x_{d}[n]=(0.5)^{|n |} = (0.5)^n u[n] + (0.5)^{-n} u[-n] - \delta[n]

Break it down into serveral steps.

Let f[n]=(0.5)nu[n]F(Ω)=110.5ejΩf[n] = (0.5)^n u[n] \longleftrightarrow F(\Omega) = \frac{1}{1-0.5e^{-j\Omega}}

f[n]=(0.5)nu[n]F(Ω)=110.5ejΩf[-n] = (0.5)^{-n} u[-n] \longleftrightarrow F(-\Omega) = \frac{1}{1-0.5e^{j\Omega}}

Therefore

xd[n]=f[n]+f[n]δ[n]Xd(Ω)=F(Ω)+F(Ω)1x_d[n] = f[n] + f[-n] - \delta[n] \longleftrightarrow X_d(\Omega) = F(\Omega) + F(-\Omega) - 1

Xd(Ω)=110.5ejΩ+110.5ejΩ1X_d(\Omega) = \frac{1}{1-0.5e^{-j\Omega}} + \frac{1}{1-0.5e^{j\Omega}} - 1

Do a simplification

Xd(Ω)=110.5ejΩ+0.5ejΩ10.5ejΩ=10.5ejΩ+0.5ejΩ0.2510.5ejΩ0.5ejΩ+0.25=0.751.25cosΩX_d(\Omega) = \frac{1}{1-0.5e^{-j\Omega}} + \frac{0.5e^{j\Omega}}{1-0.5e^{j\Omega}} = \frac{1-0.5e^{-j\Omega}+0.5e^{j\Omega}-0.25}{1-0.5e^{-j\Omega}-0.5e^{j\Omega}+0.25}= \frac{0.75}{1.25-cos\Omega}

Basically the hardest step is simplification -.-

(a) v[n]=x[n]x[n1]v[n] = x[n] - x[n-1]

V(Ω)=X(Ω)+X(Ω)ejΩ=1ejΩ+bejΩejΩ+bV(\Omega) = X(\Omega) + X(\Omega) e^{-j\Omega} = \frac{1}{e^{j\Omega} + b} - \frac{e^{-j\Omega}}{e^{j\Omega}+b}

V(Ω)=1ejΩ+b(1ejΩ)V(\Omega) = \frac{1}{e^{j\Omega} + b}\cdot(1-e^{-j\Omega})

(b) v[n]=x[n]x[n]v[n]=x[n] \otimes x[n]

V(Ω)=X(Ω)×X(Ω)=1(eΩ2+b)2V(\Omega) = X(\Omega) \times X(\Omega) = \frac{1}{(e^{\Omega-2}+b)^2}

© v[n]=x[n]ej2nv[n] = x[n] e^{j2n}

V(Ω)=X(Ω2)=1eΩ2+bV(\Omega) = X(\Omega-2) = \frac{1}{e^{\Omega-2}+b}

(a) Obtain the 3 point DFT.

Forward DFT formula:

x[n]X[k]=n=0N1x[n]ej2πkNnx[n] \longrightarrow X[k]=\sum_{n=0}^{N-1} x[n] e^{-j 2 \pi \frac{k}{N} n}

Length = N=3N = 3

X[k]=n=031x[n]ej2πnk3X[k] = \sum^{3-1}_{n=0}x[n]e^{-j2\pi \frac{nk}{3}}

X[k]=1×ej2π0k3+0×ej2π1k3+1×ej2π2k3X[k] = 1\times e^{-j2\pi\frac{0k}{3}} + 0 \times e^{-j2\pi\frac{1k}{3}} + -1 \times e^{-j2\pi\frac{2k}{3}}

X[k]=1ejπk43X[k] = 1 - e^{-j\pi k \frac{4}{3}}

X[0]=1ejπ4×03=11=0X[0] = 1 - e^{-j\pi \frac{4\times0}{3}} = 1-1 = 0

X[1]=1ejπ4×13=1(cos4π3jsin4π3)=1.50.8666j=1.7321ej0.5236X[1] = 1 - e^{-j\pi \frac{4\times1 }{3}} = 1 - (cos\frac{4\pi}{3} - jsin\frac{4\pi}{3}) = 1.5-0.8666j = 1.7321e^{-j0.5236}

X[2]=1ejπ4×23=1(cos8π3jsin8π3)=1.5+0.8666j=1.7321ej0.5236X[2] = 1 - e^{-j\pi \frac{4\times2 }{3}} = 1 - (cos\frac{8\pi}{3} - jsin\frac{8\pi}{3}) = 1.5+0.8666j = 1.7321e^{j0.5236}

(b) Obtain the 6 point DFT.

Forward DFT formula:

x[n]X[k]=n=0N1x[n]ej2πkNnx[n] \longrightarrow X[k]=\sum_{n=0}^{N-1} x[n] e^{-j 2 \pi \frac{k}{N} n}

Length = N=6N = 6

X[k]=n=061x[n]ej2πnk6X[k] = \sum^{6-1}_{n=0}x[n]e^{-j2\pi \frac{nk}{6}}

X[k]=1×ej2π0k6+0×ej2π1k6+1×ej2π2k6X[k] = 1\times e^{-j2\pi\frac{0k}{6}} + 0 \times e^{-j2\pi\frac{1k}{6}} + -1 \times e^{-j2\pi\frac{2k}{6}}

X[k]=1ejπk46=1ejπk23X[k] = 1 - e^{-j\pi k \frac{4}{6}} = 1-e^{-j\pi k \frac{2}{3}}

X[0]=1ejπ2×03=11=0X[0] = 1 - e^{-j\pi \frac{2\times0}{3}} = 1-1 = 0

X[1]=1ejπ2×13=1(cos2π3jsin2π3)=1.5+0.8666j=1.7321ej0.5236X[1] = 1 - e^{-j\pi \frac{2\times1 }{3}} = 1 - (cos\frac{2\pi}{3} - jsin\frac{2\pi}{3}) = 1.5+0.8666j = 1.7321e^{j0.5236}

X[2]=1ejπ2×23=1(cos4π3jsin4π3)=1.50.8666j=1.7321ej0.5236X[2] = 1 - e^{-j\pi \frac{2\times2 }{3}} = 1 - (cos\frac{4\pi}{3} - jsin\frac{4\pi}{3}) = 1.5-0.8666j = 1.7321e^{-j0.5236}

X[3]=1ejπ2×33=1(cos2πjsin2π)=0X[3] = 1-e^{-j\pi\frac{2\times3}{3}} = 1 - (cos2\pi - jsin2\pi) = 0

X[4]=1ejπ2×43=1(cos8π3jsin8π3)=1.5+0.8666j=1.7321ej0.5236X[4] = 1 - e^{-j\pi\frac{2\times4}{3}} = 1- (cos\frac{8\pi}{3}-jsin\frac{8\pi}{3}) = 1.5+0.8666j = 1.7321e^{-j0.5236}

X[5]=1ejπ2×53=1(cos10π3jsin10π3)=1.50.8666j=1.7321ej0.5236X[5] = 1 - e^{-j\pi\frac{2\times5}{3}} = 1- (cos\frac{10\pi}{3}-jsin\frac{10\pi}{3}) = 1.5-0.8666j = 1.7321e^{-j0.5236}

©

4-point DFT equation:

X[k]=n=03x[n]ej2πkn4X[k]=\sum_{n=0}^{3} x[n] e^{-j 2 \pi \frac{k n}{4}}

(a) x[n] = [1 0 1 0]

X[k]=1+0+1×ej2π2k4+0=1+ejπkX[k] = 1 + 0 + 1\times e^{-j2\pi\frac{2k}{4}} + 0 = 1 + e^{-j\pi k}

X[0]=1+1=2X[0] = 1 + 1 = 2

X[1]=1+ej1π=11=0X[1] = 1 + e^{-j1\pi} = 1 - 1 = 0

X[2]=1+ej2π=1+1=2X[2] = 1 + e^{-j2\pi} = 1 + 1 = 2

X[3]=1+ej3π=11=0X[3] = 1 + e^{-j3\pi} = 1 - 1 = 0

(b) x[n] = [1 0 -1 0]

X[k]=1+0+(1)×ej2π2k4+0=1ejπkX[k] = 1 + 0 + (-1)\times e^{-j2\pi\frac{2k}{4}} + 0 = 1 - e^{-j\pi k}

X[0]=11=0X[0] = 1 - 1 = 0

X[1]=1ej1π=1+1=2X[1] = 1 - e^{-j1\pi} = 1 + 1 = 2

X[2]=1ej2π=11=0X[2] = 1 - e^{-j2\pi} = 1 - 1 = 0

X[3]=1ej3π=1+1=2X[3] = 1 - e^{-j3\pi} = 1 + 1 = 2

© x[n] = [-1 0 1 2]

X[k]=1+0+1×ej2π2k4+2×ej2π3k4=1+ejπk+2ejπk32X[k] = -1 + 0 + 1\times e^{-j2\pi\frac{2k}{4}} + 2\times e^{-j2\pi\frac{3k}{4}} = -1 + e^{-j\pi k} + 2e^{-j\pi k \frac{3}{2}}

X[0]=1+1+2=2X[0] = -1 + 1 + 2 = 2

X[1]=1+ej1π+2ejπ3×12=11+2j=2+2jX[1] = -1 + e^{-j1\pi} + 2e^{-j\pi\frac{3\times 1}{2}} = -1 - 1 + 2j = -2 + 2j

X[2]=1+ej2π+2ejπ3×22=1+1+2ej3π=1+12=2X[2] = -1 + e^{-j2\pi} + 2e^{-j\pi\frac{3\times 2}{2}} = -1 + 1 + 2e^{-j3\pi} = -1 + 1 - 2 = -2

X[3]=1+ej3π+2ejπ3×32=11+2(j)=22jX[3] = -1 + e^{-j3\pi} + 2e^{-j\pi\frac{3\times 3}{2}} = -1 - 1 + 2(-j) = -2 - 2j

Discrete-time System Analysis via the DTFT and DFT

Recall: LTI System

linear time-invariant discrete-time systems (LTI system)

system outputs for a given input can be determined via a time domain system analysis

Output = input convolve with unit-pulse response

y[n]=i=0M1h[i]x[ni]y[n]=\sum_{i=0}^{M-1} h[i] x[n-i]

we can also determine the output via a frequency domain system analysis.

LTI system can respond to some basic input signals in frequency domain:

  • Exponential input
  • Cosine input
  • Periodic input
  • Aperiodic input

Discrete-time Signals

In frequency domain, DT signals are represented as

  • Discrete time Fourier series
    • for periodic signals
  • Discrete time Fourier transform or Discrete Fourier transform
    • for aperiodic signals

Frequency response (DTFT of h[n])

Tells how the system responds to individual frequency components of the input.

Basically = DTFT of h[n]h[n]

DTFT formula:

H(Ω)=i=h[i]ejΩi=i=0M1h[i]ejΩiH(\Omega)=\sum_{i=-\infty}^{\infty} h[i] e^{-j \Omega i}=\sum_{i=0}^{M-1} h[i] e^{-j \Omega i}

Recall :

You can get impulse response h[n]h[n] from the difference equation.

Then by changing the domain (Fouries Transform), you get H(ω)H(\omega).

Note:

aejkωaδ[nk]\mathrm{ae}^{-\mathrm{jk} \omega} \leftrightarrow \mathrm{a} \delta[\mathrm{n}-\mathrm{k}]

Learn to get common factors from ejωe^{j\omega}.

eajω+ebjω=eab2(eb+a2+eb+a2)e^{-aj\omega} + e^{-bj\omega} = e^{\frac{-a-b}{2}}(e^{\frac{|-b+a|}{2}}+e^{\frac{-|-b+a|}{2}})

  • e.g. ejω+e2jω=e1.5jω(e0.5jω+e0.5jω)e^{-j\omega} + e^{-2j\omega} = e^{-1.5j\omega} (e^{0.5j\omega}+e^{-0.5j\omega})

(ea+ea)=2cos(a)(e^{a} + e^{-a}) = 2cos(a)

LTI system responds to Exponential input

x[n]=Aejϕejω^nx[n]=A e^{j \phi} e^{j \hat{\omega} n}

y[n]=H(ω^)Aejϕejω^ny[n]=H(\hat{\omega}) A e^{j \phi} e^{j \hat{\omega} n}

where

H(Ω)=i=0M1h[i]ejΩiH(\Omega)=\sum_{i=0}^{M-1} h[i] e^{-j \Omega i}

^Frequency response of system

You need to know H(Ω)H(\Omega) then you will be able to find y[n]y[n]

For LTI system with Exponential input:

  • Frequencies of both Input & Output signals are ω^\hat{\omega}
    • Frequency does not changed by the system!
  • Output signal is
    • the Input signal ×\times the frequency response of H at frequency ω^\hat{\omega}

Reminder

Note:

You can get frequency response from impulse response h[n]h[n].

To know H(Ω)H(\Omega)'s mag and phase:

H(Ω)=H(Ω)ejH(Ω)H(\Omega) = |H(\Omega)|e^{j\angle H(\Omega)}

mag = H(Ω)|H(\Omega)|

phase = H(Ω)\angle H(\Omega)

ejΩ+ejΩ=2cosΩe^{j\Omega} + e^{-j\Omega} = 2cos\Omega

LTI system responds to Periodic input (DTFS)

In this case, x[n] is a periodic input. (cos input)

x[n]=A0+i=1NAicos(ω^in+ϕi)x[n]=A_{0}+\sum_{i=1}^{N} A_{i} \cos \left(\hat{\omega}_{i} n+\phi_{i}\right)

y[n]=A0H(0)+i=1NAiH(ω^i)cos[ω^in+ϕi+H(ω^i)]y[n]=A_{0} H(0)+\sum_{i=1}^{N} A_{i}\left|H\left(\hat{\omega}_{i}\right)\right| \cos \left[\hat{\omega}_{i} n+\phi_{i}+\angle H\left(\hat{\omega}_{i}\right)\right]

where

H(Ω)=i=0M1h[i]ejΩiH(\Omega)=\sum_{i=0}^{M-1} h[i] e^{-j \Omega i}

^Frequency response of system

You need to know H(Ω)H(\Omega) then you will be able to find y[n]y[n]

For LTI system with Periodic input:

  • Frequencies of both Input & Output signals are ω^i\hat{\omega}_i
    • Frequency does not changed by the system!
  • Output Amplitude scaled by the factor H(ω^i)|H(\hat{\omega}_i)|
  • Output Phase shifted by H(ω^i)\angle H(\hat{\omega}_i)

LTI system responds to Aperiodic input (DTFT)

x[n]=1Nk=0N1X[k]ej2πkNnx[n]=\frac{1}{N} \sum_{k=0}^{N-1} X[k] e^{j 2 \pi \frac{k}{N} n}

y[n]=1Nk=0N1{X[k]H[k]}ej2πkN(n)y[n]=\frac{1}{N} \sum_{k=0}^{N-1}\{X[k] H[k]\} e^{j 2 \pi \frac{k}{N}(n)}

Note : NN = Length of h[n] + Length of x[n] – 1

where

H[k]=n=0N1h[n]ej2πkNnH[k]=\sum_{n=0}^{N-1} h[n] e^{-j 2 \pi \frac{k}{N} n}

^Frequency response of system

You need to know H[k]H[k] and X[k]X[k] then you will be able to find y[n]y[n].

You use the same DFT formula to get X[k]X[k].

For LTI system with Periodic input:

  • Identify NN should be Length of h[n]h[n] + Length of x[n]x[n] - 1
  • Get the DFT of the input first (X[k]X[k]) with NN (use Zero Padding)
  • Get the DFT of the impulse response (H[k]H[k]) with NN (use Zero Padding)
  • Then Multiply X[k] and H[k] to get Y[k]Y[k]
  • Output = Inverse DFT of X[k]H[k]X[k]H[k]
  • NN should be Length of h[n]h[n] + Length of x[n]x[n] - 1
    • the length of the linear convolution output of h[n]h[n] and x[n]x[n]

or

  • Get the convolution of x[n]x[n] and h[n]h[n] to get y[n]y[n] directly

Zero Padding

Assume missing samples are zeros.

Connection between DFT and Convolution

convolution in time domain = multiplication in frequency domain

Useful info

1δ[n]1 \leftrightarrow \delta[n]

aejkωaδ[nk]ae^{-jk\omega} \leftrightarrow a\delta[n-k]

X(ω)ax[nk]X(\omega) \leftrightarrow ax[n-k]

H(ω^)=H(ω^)\mathcal{H}(-\hat{\omega})=\mathcal{H}^{*}(\hat{\omega})

H(ω^)=H(ω^)|\mathcal{H}(-\hat{\omega})|=|\mathcal{H}(\hat{\omega})|

H(ω^)=H(ω^)\angle \mathcal{H}(-\hat{\omega})=-\angle \mathcal{H}(\hat{\omega})

e{H(ω^)}=e{H(ω^)}m{H(ω^)}=m{H(ω^)}\begin{aligned} \Re e\{\mathcal{H}(-\hat{\omega})\} &=\Re e\{\mathcal{H}(\hat{\omega})\} \\ \Im m\{\mathcal{H}(-\hat{\omega})\} &=-\Im m\{\mathcal{H}(\hat{\omega})\} \end{aligned}

Practice Questions - DFT and System

H(Ω)=k=p2×π4(Ω+2πk)H(\Omega) = \sum_{k=-\infty}^{\infty} p_{2 \times \frac{\pi}{4}}(\Omega+2 \pi k)

Note:

H(Ω)h[n]H(\Omega) \leftrightarrow h[n]

k=p2B(Ω+2πk)Bπsinc(Bπn)\sum_{k=-\infty}^{\infty} p_{2 B}(\Omega+2 \pi k) \leftrightarrow \frac{B}{\pi} \operatorname{sinc}\left(\frac{B}{\pi} n\right)

(a)

To get h[n]:

h[n]=π4πsinc(π4πn)h[n] = \frac{\frac{\pi}{4}}{\pi}sinc(\frac{\frac{\pi}{4}}{\pi}n)

h[n]=14sinc(n4)h[n] = \frac{1}{4}sinc(\frac{n}{4})

(b)

(i)

Find x[n]=cos(nπ8)x[n] = cos(\frac{n\pi}{8})

x[n]x[n] has 1 AC component which frequency is nπ8\frac{n\pi}{8}

H(nπ8)=1H(\frac{n\pi}{8}) = 1 (See the H(Ω)H(\Omega) graph)

y[n]=1×cos(nπ8+0)y[n] = 1 \times cos(\frac{n\pi}{8} + 0)

=cos(nπ8)= cos(\frac{n\pi}{8})

(ii)

x[n]=cos(3nπ4)+cos(nπ16)x[n] = cos(\frac{3n\pi}{4}) + cos(\frac{n\pi}{16})

H(3nπ4)=0H(\frac{3n\pi}{4})= 0 (See the H(Ω)H(\Omega) graph)

H(nπ16)=1H(\frac{n\pi}{16}) = 1 (See the H(Ω)H(\Omega) graph)

y[n]=0cos(3πn4+0)+1cos(nπ16+0)y[n] = 0 cos(\frac{3\pi n}{4} + 0) + 1cos(\frac{n\pi}{16} + 0)

=cos(nπ16)= cos(\frac{n\pi}{16})

Note :

δ[n]1\delta[n] \leftrightarrow 1

δ[nN]ejNΩ\delta[n-N] \leftrightarrow e^{-jN\Omega}

(a)

h[n]=δ[n]+δ[n1]+δ[n2]+δ[n3]h[n] = \delta[n] + \delta[n-1] + \delta[n-2] + \delta[n-3]

H(Ω)=1+ej1Ω+ej2Ω+ej3ΩH(\Omega) = 1+e^{-j1\Omega} + e^{-j2\Omega} + e^{-j3\Omega}

=ej0Ω+ej1Ω+ej2Ω+ej3Ω= e^{-j0\Omega}+e^{-j1\Omega} + e^{-j2\Omega} + e^{-j3\Omega}

=ejΩ(ejΩ+ejΩ)+ej2Ω(ejΩ+ejΩ)= e^{-j\Omega}(e^{j\Omega}+e^{-j\Omega}) + e^{-j2\Omega}(e^{j\Omega}+e^{-j\Omega})

=4cos(Ω)cos(Ω2)e3jΩ2= 4cos(\Omega)cos(\frac{\Omega}{2})e^{\frac{-3j\Omega}{2}}

(b)

x[n]=4+3cos(0.2nπ+π/3)x[n] = 4 + 3cos(0.2n\pi + \pi/3)

x[n]x[n] has a DC component and a AC component which frequency is 0.2nπ0.2n\pi

H(0)=4H(0)=4

H(0.2π)=3.077e3j0.2π2=3.077e0.3jπH(0.2\pi) = 3.077e^{\frac{-3j0.2\pi}{2}} = 3.077e^{-0.3j\pi}

y[n]=4×4+3.077×3cos(0.2πn+π30.3π)y[n] = 4\times 4 + 3.077\times 3cos(0.2\pi n + \frac{\pi}{3}-0.3\pi)

=16+9.233cos(0.2πn+π30.3π)= 16 + 9.233cos(0.2\pi n+\frac{\pi}{3}-0.3\pi)

(a)

Fastest way: Factorize and do time-domain convolution

H(ω)=(1+ejω)(1ejπ/4ejω)(1ejπ/4ejω)H(\omega)=\left(1+e^{-j \omega}\right)\left(1-e^{j \pi / 4} e^{-j \omega}\right)\left(1-e^{-j \pi / 4} e^{-j \omega}\right)

=(1+ejω)(12cos(ω4)ejω+e2jω)= (1+e^{-j\omega})(1-2cos(\frac{\omega}{4})e^{-j\omega}+e^{-2j\omega})

Now hop to

h[n]={1,1}{1,2,1}h[n] = \{1,1\} \otimes \{1 ,-\sqrt2,1\}

h[n]={1,(12),(12),1}h[n] = \{1,(1-\sqrt2),(1-\sqrt2),1\}

h[n]=δ[n]+(12)δ[n1]+(12)δ[n2]+δ[n3]h[n] = \delta[n] + (1-\sqrt2)\delta[n-1] + (1-\sqrt2)\delta[n-2] + \delta[n-3]