 # Discrete Time Periodic Signals A discrete time signal x[n] is periodic with period N if and only if for all n. Definition: Meaning: a periodic signal keeps.

## Presentation on theme: "Discrete Time Periodic Signals A discrete time signal x[n] is periodic with period N if and only if for all n. Definition: Meaning: a periodic signal keeps."— Presentation transcript:

Discrete Time Periodic Signals A discrete time signal x[n] is periodic with period N if and only if for all n. Definition: Meaning: a periodic signal keeps repeating itself forever!

Example: a Sinusoid Consider the Sinusoid: It is periodic with period since for all n.

General Periodic Sinusoid Consider a Sinusoid of the form: It is periodic with period N since for all n. with k, N integers.

Consider the sinusoid: It is periodic with period since for all n. We can write it as: Example of Periodic Sinusoid

Consider a Complex Exponential of the form: for all n. It is periodic with period N since Periodic Complex Exponentials

Consider the Complex Exponential: We can write it as Example of a Periodic Complex Exponential and it is periodic with period N = 20.

Goal: We want to write all discrete time periodic signals in terms of a common set of “reference signals”. Reference Frames It is like the problem of representing a vector in a reference frame defined by an origin “0” reference vectors Reference Frame

Reference Frames in the Plane and in Space For example in the plane we need two reference vectors Reference Frame … while in space we need three reference vectors Reference Frame

A Reference Frame in the Plane If the reference vectors have unit length and they are perpendicular (orthogonal) to each other, then it is very simple: Where projection of along projection of along The plane is a 2 dimensional space.

A Reference Frame in the Space If the reference vectors have unit length and they are perpendicular (orthogonal) to each other, then it is very simple: Where projection of along projection of along The “space” is a 3 dimensional space.

Example: where am I ? N E Point “x” is 300m East and 200m North of point “0”.

Reference Frames for Signals We want to expand a generic signal into the sum of reference signals. The reference signals can be, for example, sinusoids or complex exponentials reference signals

Back to Periodic Signals A periodic signal x[n] with period N can be expanded in terms of N complex exponentials as

A Simple Example Take the periodic signal x[n] shown below: Notice that it is periodic with period N=2. Then the reference signals are We can easily verify that (try to believe!): for all n.

Another Simple Example Take another periodic signal x[n] with the same period (N=2): Then the reference signals are the same We can easily verify that (again try to believe!): for all n. Same reference signals, just different coefficients

Orthogonal Reference Signals Notice that, given any N, the reference signals are all orthogonal to each other, in the sense Since by the geometric sum

… apply it to the signal representation … and we can compute the coefficients. Call then

Discrete Fourier Series Given a periodic signal x[n] with period N we define the Discrete Fourier Series (DFS) as Since x[n] is periodic, we can sum over any period. The general definition of Discrete Fourier Series (DFS) is for any

Inverse Discrete Fourier Series The inverse operation is called Inverse Discrete Fourier Series (IDFS), defined as

Revisit the Simple Example Recall the periodic signal x[n] shown below, with period N=2: Then Therefore we can write the sequence as

Example of Discrete Fourier Series Consider this periodic signal The period is N=10. We compute the Discrete Fourier Series

… now plot the values …

Example of DFS Compute the DFS of the periodic signal Compute a few values of the sequence and we see the period is N=2. Then which yields

Signals of Finite Length All signals we collect in experiments have finite length Example: we have 30ms of data sampled at 20kHz (ie 20,000 samples/sec). Then we have

Series Expansion of Finite Data We want to determine a series expansion of a data set of length N. Very easy: just look at the data as one period of a periodic sequence with period N and use the DFS:

Discrete Fourier Transform (DFT) Given a finite interval of a data set of length N, we define the Discrete Fourier Transform (DFT) with the same expression as the Discrete Fourier Series (DFS): And its inverse

Signals of Finite Length All signals we collect in experiments have finite length in time Example: we have 30ms of data sampled at 20kHz (ie 20,000 samples/sec). Then we have

Series Expansion of Finite Data We want to determine a series expansion of a data set of length N. Very easy: just look at the data as one period of a periodic sequence with period N and use the DFS:

Discrete Fourier Transform (DFT) Given a finite of a data set of length N we define the Discrete Fourier Transform (DFT) with the same expression as the Discrete Fourier Series (DFS): and its inverse

Example of Discrete Fourier Transform Consider this signal The length is N=10. We compute the Discrete Fourier Transform

… now plot the values …

DFT of a Complex Exponential Consider a complex exponential of frequency rad. We take a finite data length … and its DFT How does it look like?

Recall Magnitude, Frequency and Phase 2. We represented it in terms of magnitude and phase: magnitude phase Recall the following: 1. We assume the frequency to be in the interval

Compute the DFT… Notice that it has a general form: where (use the geometric series)

See its general form:

… since:

… and plot the magnitude

Example Consider the sequence In this case Then its DFT becomes Let’s plot its magnitude:

... first plot this …

… and then see the plot of its DFT The max corresponds to frequency

Same Example in Matlab Generate the data: >> n=0:31; >>x=exp(j*0.3*pi*n); Compute the DFT (use the “Fast” Fourier Transform, FFT): >> X=fft(x); Plot its magnitude: >> plot(abs(X)) … and obtain the plot we saw in the previous slide.

Same Example in Matlab Generate the data: >> n=0:31; >>x=exp(j*0.3*pi*n); Compute the DFT (use the “Fast” Fourier Transform, FFT): >> X=fft(x); Plot its magnitude: >> plot(abs(X)) … and obtain the plot we saw in the previous slide.

Same Example (more data points) Consider the sequence In this case >> n=0:255; >>x=exp(j*0.3*pi*n); >> X=fft(x); >> plot(abs(X)) See the plot …

… and its magnitude plot

What does it mean? The max corresponds to frequency A peak at index means that you have a frequency

Example You take the FFT of a signal and you get this magnitude: There are two peaks corresponding to two frequencies:

DFT of a Sinusoid Consider a sinusoid with frequency rad. We take a finite data length … and its DFT How does it look like?

Sinusoid = sum of two exponentials Recall that a sinusoid is the sum of two complex exponentials magnitude phase

Use of positive frequencies Then the DFT of a sinusoid has two components … but we have seen that the frequencies we compute are positive. Therefore we replace the last exponential as follows:

Represent a sinusoid with positive freq. Then the DFT of a sinusoid has two components magnitude phase

Example Consider the sequence In this case Then its DFT becomes Let’s plot its magnitude:

... first plot this …

… and then see the plot of its DFT The first max corresponds to frequency This is NOT a frequency

Symmetry If the signal is real, then its DFT has a symmetry: In other words: Then the second half of the spectrum is redundant (it does not contain new information)

Back to the Example: If the signal is real we just need the first half of the spectrum, since the second half is redundant.

Plot half the spectrum If the signal is real we just need the first half of the spectrum, since the second half is redundant.

Same Example in Matlab Generate the data: >> n=0:31; >>x=cos(0.3*pi*n); Compute the DFT (use the “Fast” Fourier Transform, FFT): >> X=fft(x); Plot its magnitude: >> plot(abs(X)) … and obtain the plot we saw in the previous slide.

Same Example (more data points) Consider the sequence In this case >> n=0:255; >>x=cos(0.3*pi*n); >> X=fft(x); >> plot(abs(X)) See the plot …

… and its magnitude plot The first max corresponds to frequency

Example You take the FFT of a signal and you get this magnitude: There are two peaks corresponding to two frequencies:

Download ppt "Discrete Time Periodic Signals A discrete time signal x[n] is periodic with period N if and only if for all n. Definition: Meaning: a periodic signal keeps."

Similar presentations