<<

Signals and Systems Lecture 5: Discrete Fourier

Dr. Guillaume Ducard

Fall 2018

based on materials from: Prof. Dr. Raffaello D’Andrea

Institute for Dynamic Systems and Control

ETH Zurich, Switzerland

1 / 27 Outline

1 The Discrete Discrete Fourier series representation of a periodic signal Properties of the discrete Fourier series DFS coefficients of real signals

2 Response to Complex Exponential Complex exponential as input DFS coefficients of inputs and outputs

3 Relation between DFS and the DT Fourier Transform Definition Example

2 / 27 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Response to Complex Exponential Sequences Properties of the discrete Fourier series Relation between DFS and the DT Fourier Transform DFS coefficients of real signals Overview of Frequency Domain Analysis in Lectures 4 - 6

Tools for analysis of signals and systems in frequency domain:

The DT Fourier transform (FT): For general, infinitely long and absolutely summable signals. ⇒ Useful for theory and LTI system analysis.

The discrete Fourier series (DFS): For infinitely long but periodic signals ⇒ basis for the discrete Fourier transform.

The discrete Fourier transform (DFT): For general, finite length signals. ⇒ Used in practice with signals from experiments.

Underlying these three concepts is the decomposition of signals into sums of sinusoids (or complex exponentials). 3 / 27 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Response to Complex Exponential Sequences Properties of the discrete Fourier series Relation between DFS and the DT Fourier Transform DFS coefficients of real signals Outline

1 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Properties of the discrete Fourier series DFS coefficients of real signals

2 Response to Complex Exponential Sequences Complex exponential as input DFS coefficients of inputs and outputs

3 Relation between DFS and the DT Fourier Transform Definition Example

4 / 27 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Response to Complex Exponential Sequences Properties of the discrete Fourier series Relation between DFS and the DT Fourier Transform DFS coefficients of real signals Recall on periodic signals

A periodic signal displays a pattern that repeats itself, for example over time or space. Recall A periodic x with period N is such that

x[n + N]= x[n], ∀n

5 / 27 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Response to Complex Exponential Sequences Properties of the discrete Fourier series Relation between DFS and the DT Fourier Transform DFS coefficients of real signals Overview of the Discrete Fourier Series

Analysis equation (Discrete Fourier Series) DFS coefficients are obtained as:

N−1 −jk 2π n X[k] = X x[n]e N . n=0

Synthesis equation (Inverse Discrete Fourier Series)

N−1 1 jk 2π n x[n]= X[k]e N N X k=0

6 / 27 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Response to Complex Exponential Sequences Properties of the discrete Fourier series Relation between DFS and the DT Fourier Transform DFS coefficients of real signals Discrete Fourier series representation of a periodic signal

The Discrete Fourier Series (DFS) is an alternative representation of a periodic sequence x with period N. The periodic sequence x can be represented 2π as a sum of N complex exponentials with frequencies k N , where k = 0, 1,...,N −1:

N−1 1 jk 2π n x[n]= X[k]e N (1) N X k=0

for all times n, where X[k] ∈ C is the kth DFS coefficient jk 2π n corresponding to the complex exponential sequence {e N }.

7 / 27 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Response to Complex Exponential Sequences Properties of the discrete Fourier series Relation between DFS and the DT Fourier Transform DFS coefficients of real signals Discrete Fourier series representation of a periodic signal

Remarks:

1 2π The frequency N is called the fundamental frequency and is the lowest frequency component in the signal. (We will later show that there is no loss of information in this representation.) 2 We only need N complex exponentials to represent a DT periodic signal with period N. Indeed, there are only N distinct complex exponentials with 2π frequencies that are integer multiples of N :

j(k+N) 2π n jk 2π n jN 2π n jk 2π n j2πn jk 2π n e N = e N e N = e N e = e N .

3 graphical representation (shown during class).

8 / 27 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Response to Complex Exponential Sequences Properties of the discrete Fourier series Relation between DFS and the DT Fourier Transform DFS coefficients of real signals Discrete Fourier series coefficients

The DFS coefficients of Equation (1) are obtained from the periodic signal x (the role of X and x are permuted with a minus sign in the exponential) as:

N−1 −jk 2π n X[k] = X x[n]e N . n=0

The DFS operator is denoted as Fs , where:

X = Fsx −1 and x = Fs X. The pairs are usually denoted as {x[n]} ←→ {X[k]}.

9 / 27 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Response to Complex Exponential Sequences Properties of the discrete Fourier series Relation between DFS and the DT Fourier Transform DFS coefficients of real signals Discrete Fourier series coefficients

Note that, like the underlying sequence x, X is periodic with period N: Proof: N−1 −j(k+N) 2π n X[k + N]= X x[n]e N n=0 N−1 −jk 2π n −j2πn = X x[n]e N e = X[k]. n=0 |=1{z∀n} Conclusions When working with the DFS, it is therefore common practice to only consider one period of the sequence {X[k]}, that is: only the N DFS coefficients as

X[k] for k = 0, 1,...,N −1. 10 / 27 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Response to Complex Exponential Sequences Properties of the discrete Fourier series Relation between DFS and the DT Fourier Transform DFS coefficients of real signals Proof that the DFS operator in invertible - Part I

The following identity highlights the orthogonality of complex exponentials:

N−1 2 Z 1 j(r−k) π n 1 for r − k = mN, m ∈ e N = N n=0 (0 otherwise. X Proof: Case 1 : r − k = mN. In this case, we have 2 jmN π n j2πmn e N = e = 1 for all m, n N−1 N−1 2 1 j(r−k) π n 1 1 ∴ e N = 1= N= 1. N N N n=0 n=0 X X Case 2 : r − k 6= mN. Define l := r − k. We then have 2 N−1 jl π N 1 2π 1 1 − e N jl N n e = 2π , N N jl N n=0 1 − e X jl 2π the above equation is a geometric series and e N 6= 1 since l 6= mN. For 2 1 1−ej πl l mN 2 . 6= , we therefore have N jl π = 0 1−e N 11 / 27 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Response to Complex Exponential Sequences Properties of the discrete Fourier series Relation between DFS and the DT Fourier Transform DFS coefficients of real signals Proof that the DFS operator in invertible - Part II

−1 In order to prove that Fs is the inverse transform of Fs , we need to show: −1 1 Fs Fs = I −1 2 and Fs Fs = I, where I is the identity operator.

−1 We now show that Fs Fs = I:

N−1 N−1 2 2 −1 1 jr π n −jk π n F F {X[k]} = X[r]e N e N s s N ( n=0 r=0 ! ) X X N−1 N−1 2 1 j(r−k) π n = X[r] e N .   N   r=0 n=0  X  X    From above equation, the term in underbrace is equal to 1 forr = k mod N and 0 otherwise. Thus: | {z }

N−1 N−1 2 −1 1 j(r−k) π n F F {X[k]} = X[r] e N = {X[k mod N]} = {X[k]}. s s N ( r=0 n=0 !) X X 12 / 27 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Response to Complex Exponential Sequences Properties of the discrete Fourier series Relation between DFS and the DT Fourier Transform DFS coefficients of real signals

−1 In a similar way, it can also be shown that Fs Fs = I.

Remark: As both x and X are periodic with period N, we can sum over any N consecutive values (denoted as hNi):

1 jk 2π n −jk 2π n x[n]= X[k]e N and X[k]= x[n]e N . N X X k=hNi n=hNi

13 / 27 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Response to Complex Exponential Sequences Properties of the discrete Fourier series Relation between DFS and the DT Fourier Transform DFS coefficients of real signals Outline

1 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Properties of the discrete Fourier series DFS coefficients of real signals

2 Response to Complex Exponential Sequences Complex exponential as input DFS coefficients of inputs and outputs

3 Relation between DFS and the DT Fourier Transform Definition Example

14 / 27 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Response to Complex Exponential Sequences Properties of the discrete Fourier series Relation between DFS and the DT Fourier Transform DFS coefficients of real signals Properties of the discrete Fourier series

Linearity

a1{x1[n]} + a2{x2[n]} ←→ a1{X1[k]} + a2{X2[k]}

Parseval’s theorem (recall: period is N)

N−1 N−1 1 |x[n]|2 = |X[k]|2 X N X n=0 k=0

15 / 27 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Response to Complex Exponential Sequences Properties of the discrete Fourier series Relation between DFS and the DT Fourier Transform DFS coefficients of real signals Proof of Parseval’s theorem

N−1 1 |X[k]|2 =? N k X=0 N−1 1 ∗ ∗ = X [k]X[k] (where denotes the complex conjugate) N k X=0 N−1 N−1 1 ∗ jk 2π n = x [n]e N X[k] N k n=0 ! X=0 X N−1 N−1 2 1 ∗ jk π n = x [n]X[k]e N N k n=0 X=0 X N−1 N−1 ∗ 1 jk 2π n = x [n] X[k]e N N n=0 k X X=0 x[n] N−1 N−1 ∗ | {z } = x [n]x[n]= |x[n]|2 n=0 n=0 X X 16 / 27 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Response to Complex Exponential Sequences Properties of the discrete Fourier series Relation between DFS and the DT Fourier Transform DFS coefficients of real signals Outline

1 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Properties of the discrete Fourier series DFS coefficients of real signals

2 Response to Complex Exponential Sequences Complex exponential as input DFS coefficients of inputs and outputs

3 Relation between DFS and the DT Fourier Transform Definition Example

17 / 27 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Response to Complex Exponential Sequences Properties of the discrete Fourier series Relation between DFS and the DT Fourier Transform DFS coefficients of real signals DFS coefficients of real signals: x[n] ∈ R for all n 1 So far: x[n] ∈ C for all n. 2 Now we consider: x[n] ∈ R for all n; (most often case in practice)

N−1 −jk 2π n Recall: DFS coefficients of a periodic signal x : X[k]= x[n]e N . n=0 Letting k = N − γ, where γ is an integer, leads to P N−1 2 −j(N−γ) π n X[N − γ] = x[n]e N n=0 X N−1 N−1 N−1 2 2 2 −j2πn jγ π n jγ π n ∗ jγ π n ∗ = x[n] e e N = x[n]e N = x [n]e N = X [γ], n=0 ∀ n=0 n=0 X =1 n X X real ∗ We used that for a | signal{z } x, x[n]= x [n]. Conclusions: For a real signal x, we have that X[N − k]= X∗[k]. Take γ = 0 → X[N]= X∗[0], γ = N → X[0] = X∗[N]. By periodicity X[0] = X[N]. Thus X[0] = X∗[0]. For a real signal, X[0] is therefore always real. 18 / 27 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Response to Complex Exponential Sequences Properties of the discrete Fourier series Relation between DFS and the DT Fourier Transform DFS coefficients of real signals DFS coefficients of real signals

Example Consider the periodic signal : 1 1 x = {..., , 2, , 1,... }, 2 2 ↑

Questions: 1 What is the period of such signal ? 2 Compute the Discrete Fourier Series coefficients.

19 / 27 The Discrete Fourier Series Complex exponential as input Response to Complex Exponential Sequences DFS coefficients of inputs and outputs Relation between DFS and the DT Fourier Transform Outline

1 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Properties of the discrete Fourier series DFS coefficients of real signals

2 Response to Complex Exponential Sequences Complex exponential as input DFS coefficients of inputs and outputs

3 Relation between DFS and the DT Fourier Transform Definition Example

20 / 27 The Discrete Fourier Series Complex exponential as input Response to Complex Exponential Sequences DFS coefficients of inputs and outputs Relation between DFS and the DT Fourier Transform

Consider a periodic input sequence {u[n]} with period N. When this input is applied to the LTI system G for all time n, the resulting output sequence {y[n]} = G{u[n]} is also periodic (period N), and thus has a DFS representation. Rewriting the sequences using their DFS representations, it follows that:

N−1 N−1 2 2 1 jk π n 1 jk π n Y [k]e N = G U[k]e N . N N ( k ) ( k ) X=0 X=0 Using linearity, this can be rewritten as:

N−1 N−1 1 jk 2π n 1 jk 2π n ∀n, Y [k] e N = G U[k]e N N N k k X=0 X=0   N−1 2 2 1 jk π jk π n = H(z = e N ) U[k] e N , N k X=0 where H(z) is the transfer of system G.

21 / 27 The Discrete Fourier Series Complex exponential as input Response to Complex Exponential Sequences DFS coefficients of inputs and outputs Relation between DFS and the DT Fourier Transform Outline

1 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Properties of the discrete Fourier series DFS coefficients of real signals

2 Response to Complex Exponential Sequences Complex exponential as input DFS coefficients of inputs and outputs

3 Relation between DFS and the DT Fourier Transform Definition Example

22 / 27 The Discrete Fourier Series Complex exponential as input Response to Complex Exponential Sequences DFS coefficients of inputs and outputs Relation between DFS and the DT Fourier Transform

N−1 N−1 2 2 2 1 jk π n 1 jk π jk π n Y [k] e N = H(z = e N ) U[k] e N . N N k k X=0 X=0 Comparing the coefficients of the complex exponential terms leads to, for all k ∈ Z, lead to the following relationship between the DFS coefficients:

2 jk π Y [k] = H(e N )U[k].

This result shows that: the DFS coefficients of the output sequence’s : Y [k] are related to the DFS coefficients of the input U[k] by the system’s transfer functionH(z), sampled 2 jk π at z = e N .

Remark: Note that this is equivalent to sampling the discrete-time Fourier transform 2π H(Ω) of the system’s impulse response {h[n]} at discrete frequencies Ω= k N for k ∈ Z.

23 / 27 The Discrete Fourier Series Definition Response to Complex Exponential Sequences Example Relation between DFS and the DT Fourier Transform Outline

1 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Properties of the discrete Fourier series DFS coefficients of real signals

2 Response to Complex Exponential Sequences Complex exponential as input DFS coefficients of inputs and outputs

3 Relation between DFS and the DT Fourier Transform Definition Example

24 / 27 The Discrete Fourier Series Definition Response to Complex Exponential Sequences Example Relation between DFS and the DT Fourier Transform Relation between DFS and the DT Fourier Transform

Consider the Fourier series representation of a periodic signal x with period N: N−1 1 jk 2π n x[n]= X[k]e N N k X=0 for all times n. In Lecture 4, we saw how to extend the Fourier transform to deal with sequences that are not absolutely summable. Using that result (and recalling that a rigorous treatment would need an understanding of the theory of distributions), we can find the Fourier transform of x as follows:

∞ N−1 2 1 jk π n −jΩn X(Ω) = X[k]e N e N n=−∞ k X X=0 N−1 ∞ N−1 2 1 jn(k π −Ω) 2π 2π = X[k] e N = X[k]δ(Ω − k ). N N N k n=−∞ k X=0 X X=0 1 Note that one would have to rigorously show that the order of summation can be swapped. 2 The DT Fourier transform of a periodic signal is therefore a finite sum of scaled and shifted Dirac delta functions. 3 Note that the delta functions are located at the finite frequencies of the DFS, and scaled by the DFS coefficients X[k]. 25 / 27 The Discrete Fourier Series Definition Response to Complex Exponential Sequences Example Relation between DFS and the DT Fourier Transform Outline

1 The Discrete Fourier Series Discrete Fourier series representation of a periodic signal Properties of the discrete Fourier series DFS coefficients of real signals

2 Response to Complex Exponential Sequences Complex exponential as input DFS coefficients of inputs and outputs

3 Relation between DFS and the DT Fourier Transform Definition Example

26 / 27 The Discrete Fourier Series Definition Response to Complex Exponential Sequences Example Relation between DFS and the DT Fourier Transform

Example : Consider the absolutely summable sequence {x1[n]}, the sequence {x2[n]} which is periodic with N = 6, and the magnitudes of their DT Fourier transforms.

We see that X2(Ω) is composed of Dirac functions located at the discrete frequencies of the DFS representation of {x2[n]}: 2π x n 1 5 X k ejk 6 n 2[ ]= 6 k=0 2[ ] 27 / 27 P