# Filtering periodic signals

 Page 1 / 3
This development of these labs was supported by the National Science Foundation under Grant No. DUE-0511635. Any opinions, conclusions orrecommendations expressed in this material are those of the authors and do not necessarily reflect the views of the National Science Foundation.

## Introduction

In this lab, we will look at the effect of filtering signals using a frequency domain implementation of an LTI system, i.e., multiplying the Fourier transform of the input signal with the frequency response of the system. In particular, we will filter sound signals, and investigate both low-pass and high-pass filters. Recall that a low-pass filter filters out high frequencies, allowing only the low frequencies to pass through. A high-pass filter does the opposite.

## Matlab commands and resources

• `help<command>` , online help for a command.
• `fft` , Fast Fourier Transform.
• `ifft` , Inverse Fourier Transform.
• `sound` , plays sound unscaled (clips input to [-1,1]).
• `soundsc` , plays sound scaled (scales input to [-1,1]).
• `wavread` , reads in WAV file. The sampling rate of the WAV file can also be retrieved, for example, `[x, Fs] = wavread('filename.wav')` , where `x` is the sound vector and `Fs` is the sampling rate.

All of the sounds for this lab can be downloaded from the Sound Resources page.

## Transforming signals to the frequency domain and back

When working in MATLAB, the continuous-time Fourier transform cannot be done by the computer exactly, but a digital approximation is done instead. The approximation uses the discrete Fourier transform (more on that in EE 341). There are a couple important differences between the discrete Fourier transforms on the computer and the continuous Fourier transforms you are working with in class: finite frequency range and discrete frequency samples. The frequency range is related to the sampling frequency of the signal. In the example below, where we find the Fourier transform of the "fall" signal, the sampling frequency is `Fs=8000` , so the frequency range is [-4000,4000] Hz (or 2*pi times that for w in radians). The frequency resolution depends on the length of the signal (which is also the length of the frequency representation).

The MATLAB command for finding the Fourier transform of a signal is `fft` (for Fast Fourier Transform (FFT)). In this class, we only need the default version. `>>load fall %load in the signal>>x = fall;>>X = fft(x);` The `fft` command in MATLAB returns an uncentered result. To view the frequency content in the same way as we are used to seeing it in class, you need to plot only the first half of the result (positive frequencies only) OR use the MATLAB command `fftshift` which toggles between centered and uncentered versions of the frequency domain. The code below will allow you to view the frequency content both ways. ```>>N = length(x);>>pfreq = [0:N/2]*Fs/N; % index of positive frequencies in fft>>Xpos=X(1:N/2+1); % subset of fft values at positive frequencies>>plot(pfreq,abs(Xpos)); % plot magnitude of fft at positive frequencies>>figure;>>freq = [-(N/2-1):N/2]*Fs/N; % index of positive AND negative freqs>>plot(freq,abs(fftshift(X))); % fftshift actually SWAPS halves of X here. See help. % Convince yourself of why it does this to match up with freq!``` Note that we are using `abs` in the plot to view the magnitude since the Fourier transform of the signal is complex valued. (Type `X(2)` to see this. Note that X(1) is the DC term, so this will be real valued.)

How we are making nano material?
what is a peer
What is meant by 'nano scale'?
What is STMs full form?
LITNING
scanning tunneling microscope
Sahil
what is Nano technology ?
write examples of Nano molecule?
Bob
The nanotechnology is as new science, to scale nanometric
brayan
nanotechnology is the study, desing, synthesis, manipulation and application of materials and functional systems through control of matter at nanoscale
Damian
Is there any normative that regulates the use of silver nanoparticles?
what king of growth are you checking .?
Renato
What fields keep nano created devices from performing or assimulating ? Magnetic fields ? Are do they assimilate ?
why we need to study biomolecules, molecular biology in nanotechnology?
?
Kyle
yes I'm doing my masters in nanotechnology, we are being studying all these domains as well..
why?
what school?
Kyle
biomolecules are e building blocks of every organics and inorganic materials.
Joe
anyone know any internet site where one can find nanotechnology papers?
research.net
kanaga
sciencedirect big data base
Ernesto
Introduction about quantum dots in nanotechnology
what does nano mean?
nano basically means 10^(-9). nanometer is a unit to measure length.
Bharti
do you think it's worthwhile in the long term to study the effects and possibilities of nanotechnology on viral treatment?
absolutely yes
Daniel
how to know photocatalytic properties of tio2 nanoparticles...what to do now
it is a goid question and i want to know the answer as well
Maciej
Abigail
for teaching engĺish at school how nano technology help us
Anassong
How can I make nanorobot?
Lily
Do somebody tell me a best nano engineering book for beginners?
there is no specific books for beginners but there is book called principle of nanotechnology
NANO
how can I make nanorobot?
Lily
what is fullerene does it is used to make bukky balls
are you nano engineer ?
s.
fullerene is a bucky ball aka Carbon 60 molecule. It was name by the architect Fuller. He design the geodesic dome. it resembles a soccer ball.
Tarell
what is the actual application of fullerenes nowadays?
Damian
That is a great question Damian. best way to answer that question is to Google it. there are hundreds of applications for buck minister fullerenes, from medical to aerospace. you can also find plenty of research papers that will give you great detail on the potential applications of fullerenes.
Tarell
what is the Synthesis, properties,and applications of carbon nano chemistry
Mostly, they use nano carbon for electronics and for materials to be strengthened.
Virgil
is Bucky paper clear?
CYNTHIA
carbon nanotubes has various application in fuel cells membrane, current research on cancer drug,and in electronics MEMS and NEMS etc
NANO
how did you get the value of 2000N.What calculations are needed to arrive at it
Privacy Information Security Software Version 1.1a
Good
Got questions? Join the online conversation and get instant answers!          