<< Chapter < Page Chapter >> Page >

Questions or comments concerning this laboratory should be directedto Prof. Charles A. Bouman, School of Electrical and Computer Engineering, Purdue University, West Lafayette IN 47907;(765) 494-0340; bouman@ecn.purdue.edu

Introduction

This is the second week of a two week laboratory that covers the Discrete Fourier Transform (DFT) and Fast Fourier Transform (FFT).The first week introduced the DFT and associated samplingand windowing effects. This laboratory will continue the discussion of the DFTand will introduce the FFT.

Continuation of dft analysis

This section continues the analysis of the DFT started in the previous week's laboratory.

(DFT) X N ( k ) = n = 0 N - 1 x ( n ) e - j 2 π k n / N (inverse DFT) x ( n ) = 1 N k = 0 N - 1 X N ( k ) e j 2 π k n / N

Shifting the frequency range

In this section, we will illustrate a representation for the DFT of [link] that is a bit more intuitive. First create a Hamming window x of length N = 20 , using the Matlab command x = hamming(20) . Then use your Matlab function DFTsum to compute the 20 point DFT of x . Plot the magnitude of the DFT, | X 20 ( k ) | , versus the index k . Remember that the DFT index k starts at 0 not 1!

Hand in the plot of the | X 20 ( k ) | . Circle the regions of the plot corresponding to low frequency components.

Our plot of the DFT has two disadvantages. First, the DFT values are plotted against k rather then the frequency ω . Second, the arrangement of frequency samples in the DFTgoes from 0 to 2 π rather than from - π to π , as is conventional with the DTFT.In order to plot the DFT values similar to a conventional DTFT plot, we must compute the vector of frequencies in radians per sample,and then “rotate” the plot to produce the more familiar range, - π to π .

Let's first consider the vector w of frequencies in radians per sample.Each element of w should be the frequency of thecorresponding DFT sample X ( k ) , which can be computed by

ω = 2 π k / N k [ 0 , , N - 1 ] .

However, the frequencies should also lie in the range from - π to π . Therefore, if ω π , then it should be set to ω - 2 π . An easy way of making this change in Matlab 5.1 is w(w>=pi) = w(w>=pi)-2*pi .

The resulting vectors X and ware correct, but out of order. To reorder them,we must swap the first and second halves of the vectors. Fortunately, Matlab provides a function specifically forthis purpose, called fftshift .

Write a Matlab function to compute samples of the DTFT and their corresponding frequencies in the range - π to π . Use the syntax

[X,w] = DTFTsamples(x)

where x is an N point vector, X is the length N vector of DTFT samples, and w is the length N vector of corresponding radial frequencies.Your function DTFTsamples should call your function DFTsum and use the Matlab function fftshift .

Use your function DTFTsamples to compute DTFT samples of the Hamming window of length N = 20 . Plot the magnitude of these DTFT samples versus frequencyin rad/sample.

Hand in the code for your function DTFTsamples . Also hand in the plot of the magnitude of the DTFT samples.

Zero padding

The spacing between samples of the DTFT is determined by the number of points in the DFT.This can lead to surprising results when the number of samples is too small.In order to illustrate this effect, consider the finite-duration signal

Questions & Answers

what is defense mechanism
Chinaza Reply
what is defense mechanisms
Chinaza
I'm interested in biological psychology and cognitive psychology
Tanya Reply
what does preconceived mean
sammie Reply
physiological Psychology
Nwosu Reply
How can I develope my cognitive domain
Amanyire Reply
why is communication effective
Dakolo Reply
Communication is effective because it allows individuals to share ideas, thoughts, and information with others.
effective communication can lead to improved outcomes in various settings, including personal relationships, business environments, and educational settings. By communicating effectively, individuals can negotiate effectively, solve problems collaboratively, and work towards common goals.
it starts up serve and return practice/assessments.it helps find voice talking therapy also assessments through relaxed conversation.
miss
Every time someone flushes a toilet in the apartment building, the person begins to jumb back automatically after hearing the flush, before the water temperature changes. Identify the types of learning, if it is classical conditioning identify the NS, UCS, CS and CR. If it is operant conditioning, identify the type of consequence positive reinforcement, negative reinforcement or punishment
Wekolamo Reply
please i need answer
Wekolamo
because it helps many people around the world to understand how to interact with other people and understand them well, for example at work (job).
Manix Reply
Agreed 👍 There are many parts of our brains and behaviors, we really need to get to know. Blessings for everyone and happy Sunday!
ARC
A child is a member of community not society elucidate ?
JESSY Reply
Isn't practices worldwide, be it psychology, be it science. isn't much just a false belief of control over something the mind cannot truly comprehend?
Simon Reply
compare and contrast skinner's perspective on personality development on freud
namakula Reply
Skinner skipped the whole unconscious phenomenon and rather emphasized on classical conditioning
war
explain how nature and nurture affect the development and later the productivity of an individual.
Amesalu Reply
nature is an hereditary factor while nurture is an environmental factor which constitute an individual personality. so if an individual's parent has a deviant behavior and was also brought up in an deviant environment, observation of the behavior and the inborn trait we make the individual deviant.
Samuel
I am taking this course because I am hoping that I could somehow learn more about my chosen field of interest and due to the fact that being a PsyD really ignites my passion as an individual the more I hope to learn about developing and literally explore the complexity of my critical thinking skills
Zyryn Reply
good👍
Jonathan
and having a good philosophy of the world is like a sandwich and a peanut butter 👍
Jonathan
generally amnesi how long yrs memory loss
Kelu Reply
interpersonal relationships
Abdulfatai Reply
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Purdue digital signal processing labs (ece 438). OpenStax CNX. Sep 14, 2009 Download for free at http://cnx.org/content/col10593/1.4
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Purdue digital signal processing labs (ece 438)' conversation and receive update notifications?

Ask