SlideShare a Scribd company logo
1 of 9
Download to read offline
LABORATORY - FREQUENCY ANALYSIS OF DISCRETE-TIME SIGNALS
INTRODUCTION
        The objective of this lab is to explore many issues involved in sampling and
reconstructing signals, including analysis of the frequency content of sinusoidal signals
using the DFT.
        When the sequence x[n] is of finite duration, the frequency contents that are
contained in the sequence can be determined using the Discrete Fourier Transform (DFT).
The DFT is an approximation of the Discrete Time Fourier Transform (DTFT), which is
computed over an infinite duration. Computation of the DFT using only N data points may
exhibit the edge effect when the windowed periodic signal is nothing like the original
signal as shown in Fig. 1.

                           Windowed data
                     (a)




                     (b)




  Fig. 1 Edge effect of the windowed data. (a) original sinusoidal sequence. (b) windowed
                                        periodic signal.
Extracting a finite length of data can be thought of as multiplying the sequence with a
rectangular box of length N which has a sinc-like spectrum as shown in Fig. 2. The sinc-
like spectrum of the rectangular window makes the resulting spectrum of the windowed
sinusoid in Fig. 1 appear like a sinc-function, instead of an impulse as expected.




                      (a)                                    (b)
           Fig. 2 A rectangular window (a) Time domain (b) Frequency domain


INC 212 Signals & Systems                                                          SW-1
Fig. 3 Spectrum of windowed sinusoid

EXERCISE 1: EFFECT OF THE NUMBER OF POINTS IN THE FFT
       In this exercise, we will demonstrate the effect of data window and changing the
value of the number of points in the FFT, N, on the FFT of sinusoidal signals.

       1. Let us start by synthesising a cosine with 50 samples at 10 samples per period.

t=linspace(0,2,50);                      % vector of time variable
T=t(2)-t(1);                             % sampling period
x=cos(2*pi*t/(10*T));                    % the cosine with 50 samples at 10 samples/period

The plot of the sequence x[n] from n = 0 to 49 is shown in Fig. 4

stem([0:49],x); % plot of the sequence x[n]


                           1

                         0.8

                         0.6

                         0.4

                         0.2
                  x[n]




                           0

                         -0.2

                         -0.4

                         -0.6

                         -0.8

                           -1


                                0    5    10   15   20   25   30   35   40   45   50
                                                    Sample (n)
                 Fig. 4 A cosine with 50 samples at 10 samples per period



INC 212 Signals & Systems                                                              SW-2
Q1. What is the sampling period of x[n]?

Q2. What is the frequency of the cosine x[n] in Hz?

Q3. What kind of spectrum do you expect from this signal?

        2. The frequency contents of the sequence will be determined using the MATLAB
command FFT. The syntax for computing the FFT of a signal is FFT(x,N) where x is the
discrete signal x[n] you wish to transform and N is the number of points in the FFT. If N is
omitted, the FFT will generates the N-point FFT where N is the length of x.
            Define 3 different values of N, i.e. N=64, 128, and 256. Compute a set of N-
point FFT X(k) and plot the results from k=0-N/2.

% Define 3 different values of N
N1 = 64;
N2 = 128;
N3 = 256;

% Compute the magnitudes of FFT of x[n] for each of 3 values of N
X1 = abs(fft(x,N1));
X2 = abs(fft(x,N2));
X3 = abs(fft(x,N3));

% Frequency scaling to convert the discrete frequencies k to the
continuous frequency in Hz
fs=1/T; % sampling frequency in Hz
F1 = [0 : N1/2]/N1*fs;
F2 = [0 : N2/2]/N2*fs;
F3 = [0 : N3/2]/N3*fs;

% plot the transforms
figure;
subplot(3,1,1)
stem(F1,X1(1:N1/2+1),'filled'),title('N = 64'),axis([0 12.3 0 30])
subplot(3,1,2)
stem(F2,X2(1:N2/2+1),'filled'),title('N = 128'),axis([0 12.3 0 30])
subplot(3,1,3)
stem(F3,X3(1:N3/2+1),'filled'),title('N = 256'),axis([0 12.3 0 30])
xlabel('Frequency (Hz)')




INC 212 Signals & Systems                                                             SW-3
N = 64
         30

         20

         10

          0
              0        2           4           6           8          10         12
                                             N = 128
         30

         20

         10

          0
              0        2           4           6           8          10         12
                                             N = 256
         30

         20

         10

          0
              0        2           4           6           8          10         12
                                          Frequency (Hz)


                       Fig. 5 FFT of a cosine for N=60, 128 and 256

       Fig. 5 shows that the transforms all have a sinc-like appearance, which is a result of
data window, differing only in the number of samples used to approximate the sinc
function.

Q4. Record the frequencies at the peaks of all three spectra in Fig. 5. Compare these peak
frequencies with the frequency of the cosine x[n] and comment on the results.


EXERCISE 2: EFFECT OF DATA LENGTH
        In this part, we will consider impact of window data length on resolution of FFT as
the FFT length kept fixed. We choose to fix N=1024 points and vary the number of
repetitions of the repetitions of the fundamental period.

% Data generation
t=linspace(0,2,50);
T=t(2)-t(1);
x1=cos(2*pi*t/(10*T));        % 5 periods
x2=repmat(x1,1,2);            % 10 periods
x3=repmat(x1,1,5);            % 25 periods

N = 1024; % the number of FFT

% Compute the magnitudes of FFT of x[n] for each of 3 data lengths
X1 = abs(fft(x1,N));
X2 = abs(fft(x2,N));
X3 = abs(fft(x3,N));




INC 212 Signals & Systems                                                              SW-4
% Frequency scaling
fs=1/T; % sampling frequency in Hz
F = [0 : N/2]/N*fs;

% plot the transforms
figure;
subplot(3,1,1)
plot(F,X1(1:N/2+1)),title('5 periods')
subplot(3,1,2)
plot(F,X2(1:N/2+1)),title('10 periods')
subplot(3,1,3)
plot(F,X3(1:N/2+1)),title('25 periods')
xlabel('Frequency (Hz)')



                                          5 periods
        40


        20


         0
             0      2          4         6            8    10        12      14
                                         10 periods
        50




         0
             0      2          4         6            8    10        12      14
                                         25 periods
       200


       100


         0
             0      2          4         6         8       10        12      14
                                       Frequency (Hz)

                        Fig. 6 FFT of a cosine of 5, 10 and 25 periods

Q5. As x[n] is extended to a large number of periods, how does this affect the obtained
spectrum? Find the peak frequencies of spectra obtained from Fig. 6 and compare them
with the ones you get from Fig. 5.



EXERCISE 3: RECOVERING THE TIME-DOMAIN FUNCTION USING IFFT
Given the FFT of a signal, you can recover the time-domain function of the signal by using
IFFT. Here is how to do it.
   1. Generate the cosine function as in EXERCISE 1:

   t=linspace(0,2,50); % vector of time variable
   T=t(2)-t(1); % sampling period
   x=cos(2*pi*t/(10*T));


INC 212 Signals & Systems                                                           SW-5
2. Create the DFT of the signal and plot its magnitude and phase.

Xk=fft(x); % Discrete Fourier transform of x
figure
subplot(2,1,1),stem(abs(Xk),'.'), title('Magnitude of FFT');
subplot(2,1,2),stem(angle(Xk),'.'),title('Phase of FFT');




   3. Recover the time-domain function by using the inverse DFT.

xr = real(ifft(Xk));
figure
subplot(2,1,1), plot(t,x), title('Cosine before FFT');
subplot(2,1,2), plot(t,xr),title('Cosine after FFT and IFFT');




INC 212 Signals & Systems                                              SW-6
LAB ASSIGNMENT

TASK I: SAMPLING AND ALIASING
(Adapted from J.R. Buck et al, Computer Explorations in Signals and Systems using
Matlab, 2nd edition, Prentice Hall, New Jersey.)

Consider the sinusoidal signal x(t ) = sin(Ω 0 t ) . If x(t) is sampled with frequency
ω s = 2π (8192) rad/sec.
1) Assume Ω 0 = 2π (1000) rad/sec and define T=1/8192, create the vector n=[0:8191], so
that t=n*T contains the 8192 time samples of the interval 0 ≤ t < 1 . Create a vector x
which contains the samples of x(t ) at the time samples in t. The vector x represents the
discrete-time signal x[n] = sin(Ω 0 n) .
2) Use subplot to display the first fifty samples of x[n] versus n using stem and the first
fifty samples of x(t) versus the sampling time using plot.
3) Calculate the Fourier transform of x(t) using the sampled data x[n]. Plot the magnitude
of the spectrum versus the frequency vector in Hz.
4) Repeat Parts 1) – 3) for the sinusoidal frequencies Ω 0 = 2π (1500) and 2π (2000)
rad/sec. Is the magnitude of the spectrum of x nonzero for the expected frequencies?
5) Play each of the sampled signals created in Part 4) using soundsc(x,1/T). Does the
pitch of the tone that you hear increase with increasing frequency Ω0?
6) Now repeat Parts 1) – 3) for the sinusoidal frequencies Ω 0 = 2π (4000) , 2π (5000) and
 2π (6000) rad/sec. Also play each sample signal using soundsc. Does the pitch of the tone
that you hear increase with each increase in the frequency Ω0? If not, can you explain this
behaviour?

TASK II: DIAL TONE

          2


          1



          0



          -1



          -2
               0   0.2   0.4   0.6    0.8   1     1.2   1.4   1.6   1.8     2      2.2
                                             Sample                                4
                                                                                x 10
                                    Fig. 7 Dial tone signal
        In this task you will analyse a dial tone signal in Fig. 7. A dial tone was produced
each time the user pressed a telephone key. It consists of 0.5 sec of tone followed by 0.1
sec of silence, which is represented by a sequence of zeros. The dial signal in Fig. 7 was
recorded at 5 kHz sampling rate. Our objective is to determine which telephone buttons
were pressed.




INC 212 Signals & Systems                                                                SW-7
1. You are to write a programme which analyses which telephone keys were
pressed by the use of the FFT analysis. The touch-tone telephone tones are shown in Table
1.

                          Table 1. Touch-tone telephone tones
                 Frequencies     1209 Hz       1336 Hz        1447 Hz
                   697 Hz           1              2             3
                   770 Hz           4              5             6
                   852 Hz           7              8             9
                   941 Hz           -              0             -

        The dial tone file ‘dial.mat’ can be downloaded from the course website. The data
can be loaded into MATLAB by typing load dial as long as the file is in your MATLAB
PATH. The file contains the touch-tone signal, dial, which contains the sequence of touch-
tones representing a phone number of 9 digits.
        You may want to extract each 0.5-sec touch tone for each digit from the touch-tone
signal and analyse its spectrum by turn. The analysing process need not be automatic. You
need to detect the peak frequencies and convert them to continuous-time frequencies in Hz,
then use Table 1 to analyse the tone. Full explanation of how you get the seven pressed
keys must be provided. Include plots to confirm your results.
        2. Extra credit: You are to write a function ttdecode(x) to decode phone
numbers automatically from the touch-tones. The function accepts as its input a touch-tone
signal and returns as its output a vector containing the number. For example, if the vector
phone contained the touch-tones for the number 02-470-9096, you should get the following
output:
>> digits=ttdecode(phone);
>> digits
digits =
0 2 4 7 0 9 0 9 6
       The first line of the m-file you write to implement the function should read

                            function digits = ttdecode(x);

        Test your function by using dial as input and verify that it returns the same phone
number as you obtained in Part 1.
        NB:
        i)        You will get full mark from the extra credit if your programme can work
                  with touch-tone signals where the digits and silences can have varying
                  lengths. It is assumed that the recorded signals are noise-free. Provide an
                  example to prove that your programme does work as expected.
        ii)       Seventy percent of full mark will be given if you programme can work
                  with a touch-tone signal in the format used in Part 1, i.e. 0.5 sec of touch-
                  tone for each digit, separated by 0.1 sec of silence.
        In your report, you must specify what your programme can do, including necessary
information that the user should know, e.g. the usable format of touch-tone signals, in order
to use your programme.




INC 212 Signals & Systems                                                               SW-8
TASK III: Signal Extraction
        A common use of Fourier transforms is to find the frequency components of a
signal buried in a noisy time domain signal. In this task you will explore two approaches of
noise removal by the use of the Fourier analysis of a signal. When you load the tested file
‘data.mat’, you will get two data sets: ‘x’ is a sound signal, composed of three frequency
components and ‘y’ is the sound signal ‘x’ corrupted by a white noise. The data were
sampled with sampling rate 10 kHz for 1 second.

       Signal extraction: Method I: Fourier series-based
1. Create and observe the DFT of the noisy data ‘y’.
2. From the DFT, estimate the Fourier coefficients of those three frequency components.
                                                                 ˆ
Write down the Fourier series of the estimated noise-free signal x1 in the trigonometric
form.



3. Generate the estimated signal with the same data length as ‘x’, according to the function
obtained in 2, using the same sampling frequency.
4. Create a figure with subplots: the noise-free signal superimposed with the estimated
                                                    ˆ
signal and the estimated error of method 1: e = x − x1 .

        Signal extraction: Method II: FFT-based low-pass filtering
1. Create and observe the DFT of the noisy data ‘y’.
2. From the DFT, observe the significant frequency components. Eliminate the noise
by setting the DFT of all non-significant frequency components to zeros, and then perform
                                                   ˆ
the IFFT. This will become your filtered signal x 2 .
3. Create a figure with subplots: the noisy signal superimposed with the filtered signal
                                              ˆ
and the estimated error of method 2: e = x − x 2 .

Compare and comment on the performance of the two approaches.


REPORT
     -     You are encouraged to discuss the lab with each other, but your solutions must
           be independently written using you own words and formulations.
       -   Your report must be concise, but complete. Include comments, i.e. discussions
           of how your results compare to your expectations, and conclusions to all of the
           assignments.
       -   Include any plots or images you need to justify your conclusions.
       -   Include a representative collection of the code(s) that you used as the appendix.
       -   Make sure to include comments in your code explaining what it does.
       -   Provide a CD with the m-file ttdecode.m if you decide to do the Extra Credit
           task.




INC 212 Signals & Systems                                                              SW-9

More Related Content

What's hot

Instrumentation Engineering : Signals & systems, THE GATE ACADEMY
Instrumentation Engineering : Signals & systems, THE GATE ACADEMYInstrumentation Engineering : Signals & systems, THE GATE ACADEMY
Instrumentation Engineering : Signals & systems, THE GATE ACADEMYklirantga
 
DSP_FOEHU - Lec 09 - Fast Fourier Transform
DSP_FOEHU - Lec 09 - Fast Fourier TransformDSP_FOEHU - Lec 09 - Fast Fourier Transform
DSP_FOEHU - Lec 09 - Fast Fourier TransformAmr E. Mohamed
 
Signal fundamentals
Signal fundamentalsSignal fundamentals
Signal fundamentalsLalit Kanoje
 
Digital Signal Processing
Digital Signal ProcessingDigital Signal Processing
Digital Signal ProcessingSandip Ladi
 
Lecture2 Signal and Systems
Lecture2 Signal and SystemsLecture2 Signal and Systems
Lecture2 Signal and Systemsbabak danyal
 
3.Properties of signals
3.Properties of signals3.Properties of signals
3.Properties of signalsINDIAN NAVY
 
Convolution discrete and continuous time-difference equaion and system proper...
Convolution discrete and continuous time-difference equaion and system proper...Convolution discrete and continuous time-difference equaion and system proper...
Convolution discrete and continuous time-difference equaion and system proper...Vinod Sharma
 
Signal Prosessing Lab Mannual
Signal Prosessing Lab Mannual Signal Prosessing Lab Mannual
Signal Prosessing Lab Mannual Jitendra Jangid
 
Digital Signal Processing[ECEG-3171]-Ch1_L05
Digital Signal Processing[ECEG-3171]-Ch1_L05Digital Signal Processing[ECEG-3171]-Ch1_L05
Digital Signal Processing[ECEG-3171]-Ch1_L05Rediet Moges
 
Fourier3
Fourier3Fourier3
Fourier3bubud75
 
5. convolution and correlation of discrete time signals
5. convolution and correlation of discrete time signals 5. convolution and correlation of discrete time signals
5. convolution and correlation of discrete time signals MdFazleRabbi18
 
Fourier transforms & fft algorithm (paul heckbert, 1998) by tantanoid
Fourier transforms & fft algorithm (paul heckbert, 1998) by tantanoidFourier transforms & fft algorithm (paul heckbert, 1998) by tantanoid
Fourier transforms & fft algorithm (paul heckbert, 1998) by tantanoidXavier Davias
 
Digital Signal Processing[ECEG-3171]-Ch1_L02
Digital Signal Processing[ECEG-3171]-Ch1_L02Digital Signal Processing[ECEG-3171]-Ch1_L02
Digital Signal Processing[ECEG-3171]-Ch1_L02Rediet Moges
 
signal and system solution Quiz2
signal and system solution Quiz2signal and system solution Quiz2
signal and system solution Quiz2iqbal ahmad
 

What's hot (20)

Solved problems
Solved problemsSolved problems
Solved problems
 
Instrumentation Engineering : Signals & systems, THE GATE ACADEMY
Instrumentation Engineering : Signals & systems, THE GATE ACADEMYInstrumentation Engineering : Signals & systems, THE GATE ACADEMY
Instrumentation Engineering : Signals & systems, THE GATE ACADEMY
 
DSP_FOEHU - Lec 09 - Fast Fourier Transform
DSP_FOEHU - Lec 09 - Fast Fourier TransformDSP_FOEHU - Lec 09 - Fast Fourier Transform
DSP_FOEHU - Lec 09 - Fast Fourier Transform
 
Signal fundamentals
Signal fundamentalsSignal fundamentals
Signal fundamentals
 
Hw4sol
Hw4solHw4sol
Hw4sol
 
Dsp3
Dsp3Dsp3
Dsp3
 
Digital Signal Processing
Digital Signal ProcessingDigital Signal Processing
Digital Signal Processing
 
Lecture13
Lecture13Lecture13
Lecture13
 
Lecture2 Signal and Systems
Lecture2 Signal and SystemsLecture2 Signal and Systems
Lecture2 Signal and Systems
 
3.Properties of signals
3.Properties of signals3.Properties of signals
3.Properties of signals
 
Dsp Lab Record
Dsp Lab RecordDsp Lab Record
Dsp Lab Record
 
Dif fft
Dif fftDif fft
Dif fft
 
Convolution discrete and continuous time-difference equaion and system proper...
Convolution discrete and continuous time-difference equaion and system proper...Convolution discrete and continuous time-difference equaion and system proper...
Convolution discrete and continuous time-difference equaion and system proper...
 
Signal Prosessing Lab Mannual
Signal Prosessing Lab Mannual Signal Prosessing Lab Mannual
Signal Prosessing Lab Mannual
 
Digital Signal Processing[ECEG-3171]-Ch1_L05
Digital Signal Processing[ECEG-3171]-Ch1_L05Digital Signal Processing[ECEG-3171]-Ch1_L05
Digital Signal Processing[ECEG-3171]-Ch1_L05
 
Fourier3
Fourier3Fourier3
Fourier3
 
5. convolution and correlation of discrete time signals
5. convolution and correlation of discrete time signals 5. convolution and correlation of discrete time signals
5. convolution and correlation of discrete time signals
 
Fourier transforms & fft algorithm (paul heckbert, 1998) by tantanoid
Fourier transforms & fft algorithm (paul heckbert, 1998) by tantanoidFourier transforms & fft algorithm (paul heckbert, 1998) by tantanoid
Fourier transforms & fft algorithm (paul heckbert, 1998) by tantanoid
 
Digital Signal Processing[ECEG-3171]-Ch1_L02
Digital Signal Processing[ECEG-3171]-Ch1_L02Digital Signal Processing[ECEG-3171]-Ch1_L02
Digital Signal Processing[ECEG-3171]-Ch1_L02
 
signal and system solution Quiz2
signal and system solution Quiz2signal and system solution Quiz2
signal and system solution Quiz2
 

Similar to signal homework

DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformAmr E. Mohamed
 
DIGITAL SIGNAL PROCESSING: Sampling and Reconstruction on MATLAB
DIGITAL SIGNAL PROCESSING: Sampling and Reconstruction on MATLABDIGITAL SIGNAL PROCESSING: Sampling and Reconstruction on MATLAB
DIGITAL SIGNAL PROCESSING: Sampling and Reconstruction on MATLABMartin Wachiye Wafula
 
Speech signal time frequency representation
Speech signal time frequency representationSpeech signal time frequency representation
Speech signal time frequency representationNikolay Karpov
 
UNIT-2 DSP.ppt
UNIT-2 DSP.pptUNIT-2 DSP.ppt
UNIT-2 DSP.pptshailaja68
 
Time-Frequency Representation of Microseismic Signals using the SST
Time-Frequency Representation of Microseismic Signals using the SSTTime-Frequency Representation of Microseismic Signals using the SST
Time-Frequency Representation of Microseismic Signals using the SSTUT Technology
 
PPT Chapter-1-V1.pptx__26715_1_1539251776000.pptx.pptx
PPT Chapter-1-V1.pptx__26715_1_1539251776000.pptx.pptxPPT Chapter-1-V1.pptx__26715_1_1539251776000.pptx.pptx
PPT Chapter-1-V1.pptx__26715_1_1539251776000.pptx.pptxidrissaeed
 
Fourier series example
Fourier series exampleFourier series example
Fourier series exampleAbi finni
 
EC8553 Discrete time signal processing
EC8553 Discrete time signal processing EC8553 Discrete time signal processing
EC8553 Discrete time signal processing ssuser2797e4
 
Fast Fourier Transform (FFT) Algorithms in DSP
Fast Fourier Transform (FFT) Algorithms in DSPFast Fourier Transform (FFT) Algorithms in DSP
Fast Fourier Transform (FFT) Algorithms in DSProykousik2020
 
Find the compact trigonometric Fourier series for the periodic signal.pdf
Find the compact trigonometric Fourier series for the periodic signal.pdfFind the compact trigonometric Fourier series for the periodic signal.pdf
Find the compact trigonometric Fourier series for the periodic signal.pdfarihantelectronics
 
Note and assignment mis3 5.3
Note and assignment mis3 5.3Note and assignment mis3 5.3
Note and assignment mis3 5.3RoshanTushar1
 

Similar to signal homework (20)

DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier TransformDSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
DSP_2018_FOEHU - Lec 08 - The Discrete Fourier Transform
 
DIGITAL SIGNAL PROCESSING: Sampling and Reconstruction on MATLAB
DIGITAL SIGNAL PROCESSING: Sampling and Reconstruction on MATLABDIGITAL SIGNAL PROCESSING: Sampling and Reconstruction on MATLAB
DIGITAL SIGNAL PROCESSING: Sampling and Reconstruction on MATLAB
 
RES701 Research Methodology_FFT
RES701 Research Methodology_FFTRES701 Research Methodology_FFT
RES701 Research Methodology_FFT
 
Speech signal time frequency representation
Speech signal time frequency representationSpeech signal time frequency representation
Speech signal time frequency representation
 
DSP Lab 1-6.pdf
DSP Lab 1-6.pdfDSP Lab 1-6.pdf
DSP Lab 1-6.pdf
 
UNIT-2 DSP.ppt
UNIT-2 DSP.pptUNIT-2 DSP.ppt
UNIT-2 DSP.ppt
 
Time-Frequency Representation of Microseismic Signals using the SST
Time-Frequency Representation of Microseismic Signals using the SSTTime-Frequency Representation of Microseismic Signals using the SST
Time-Frequency Representation of Microseismic Signals using the SST
 
PPT Chapter-1-V1.pptx__26715_1_1539251776000.pptx.pptx
PPT Chapter-1-V1.pptx__26715_1_1539251776000.pptx.pptxPPT Chapter-1-V1.pptx__26715_1_1539251776000.pptx.pptx
PPT Chapter-1-V1.pptx__26715_1_1539251776000.pptx.pptx
 
zeropadding
zeropaddingzeropadding
zeropadding
 
Dsp manual
Dsp manualDsp manual
Dsp manual
 
Unit 8
Unit 8Unit 8
Unit 8
 
Fourier series example
Fourier series exampleFourier series example
Fourier series example
 
EC8553 Discrete time signal processing
EC8553 Discrete time signal processing EC8553 Discrete time signal processing
EC8553 Discrete time signal processing
 
Fast Fourier Transform (FFT) Algorithms in DSP
Fast Fourier Transform (FFT) Algorithms in DSPFast Fourier Transform (FFT) Algorithms in DSP
Fast Fourier Transform (FFT) Algorithms in DSP
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Chapter 2
Chapter 2Chapter 2
Chapter 2
 
Find the compact trigonometric Fourier series for the periodic signal.pdf
Find the compact trigonometric Fourier series for the periodic signal.pdfFind the compact trigonometric Fourier series for the periodic signal.pdf
Find the compact trigonometric Fourier series for the periodic signal.pdf
 
Note and assignment mis3 5.3
Note and assignment mis3 5.3Note and assignment mis3 5.3
Note and assignment mis3 5.3
 
ch3-2
ch3-2ch3-2
ch3-2
 
Lecture1
Lecture1Lecture1
Lecture1
 

More from sokok22867

Weekly report template 7
Weekly report template 7Weekly report template 7
Weekly report template 7sokok22867
 
Weekly report template 6
Weekly report template 6Weekly report template 6
Weekly report template 6sokok22867
 
Weekly report template 5
Weekly report template 5Weekly report template 5
Weekly report template 5sokok22867
 
Weekly report 2
Weekly report 2Weekly report 2
Weekly report 2sokok22867
 
Weekly report template
Weekly report templateWeekly report template
Weekly report templatesokok22867
 
วันที่ 8 ธันวาคม 2554
วันที่ 8 ธันวาคม 2554วันที่ 8 ธันวาคม 2554
วันที่ 8 ธันวาคม 2554sokok22867
 

More from sokok22867 (7)

Weekly report template 7
Weekly report template 7Weekly report template 7
Weekly report template 7
 
Weekly report template 6
Weekly report template 6Weekly report template 6
Weekly report template 6
 
Weekly report template 5
Weekly report template 5Weekly report template 5
Weekly report template 5
 
Report4
Report4Report4
Report4
 
Weekly report 2
Weekly report 2Weekly report 2
Weekly report 2
 
Weekly report template
Weekly report templateWeekly report template
Weekly report template
 
วันที่ 8 ธันวาคม 2554
วันที่ 8 ธันวาคม 2554วันที่ 8 ธันวาคม 2554
วันที่ 8 ธันวาคม 2554
 

Recently uploaded

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 

Recently uploaded (20)

Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Pigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food ManufacturingPigging Solutions in Pet Food Manufacturing
Pigging Solutions in Pet Food Manufacturing
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The transition to renewables in India.pdf
The transition to renewables in India.pdfThe transition to renewables in India.pdf
The transition to renewables in India.pdf
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 

signal homework

  • 1. LABORATORY - FREQUENCY ANALYSIS OF DISCRETE-TIME SIGNALS INTRODUCTION The objective of this lab is to explore many issues involved in sampling and reconstructing signals, including analysis of the frequency content of sinusoidal signals using the DFT. When the sequence x[n] is of finite duration, the frequency contents that are contained in the sequence can be determined using the Discrete Fourier Transform (DFT). The DFT is an approximation of the Discrete Time Fourier Transform (DTFT), which is computed over an infinite duration. Computation of the DFT using only N data points may exhibit the edge effect when the windowed periodic signal is nothing like the original signal as shown in Fig. 1. Windowed data (a) (b) Fig. 1 Edge effect of the windowed data. (a) original sinusoidal sequence. (b) windowed periodic signal. Extracting a finite length of data can be thought of as multiplying the sequence with a rectangular box of length N which has a sinc-like spectrum as shown in Fig. 2. The sinc- like spectrum of the rectangular window makes the resulting spectrum of the windowed sinusoid in Fig. 1 appear like a sinc-function, instead of an impulse as expected. (a) (b) Fig. 2 A rectangular window (a) Time domain (b) Frequency domain INC 212 Signals & Systems SW-1
  • 2. Fig. 3 Spectrum of windowed sinusoid EXERCISE 1: EFFECT OF THE NUMBER OF POINTS IN THE FFT In this exercise, we will demonstrate the effect of data window and changing the value of the number of points in the FFT, N, on the FFT of sinusoidal signals. 1. Let us start by synthesising a cosine with 50 samples at 10 samples per period. t=linspace(0,2,50); % vector of time variable T=t(2)-t(1); % sampling period x=cos(2*pi*t/(10*T)); % the cosine with 50 samples at 10 samples/period The plot of the sequence x[n] from n = 0 to 49 is shown in Fig. 4 stem([0:49],x); % plot of the sequence x[n] 1 0.8 0.6 0.4 0.2 x[n] 0 -0.2 -0.4 -0.6 -0.8 -1 0 5 10 15 20 25 30 35 40 45 50 Sample (n) Fig. 4 A cosine with 50 samples at 10 samples per period INC 212 Signals & Systems SW-2
  • 3. Q1. What is the sampling period of x[n]? Q2. What is the frequency of the cosine x[n] in Hz? Q3. What kind of spectrum do you expect from this signal? 2. The frequency contents of the sequence will be determined using the MATLAB command FFT. The syntax for computing the FFT of a signal is FFT(x,N) where x is the discrete signal x[n] you wish to transform and N is the number of points in the FFT. If N is omitted, the FFT will generates the N-point FFT where N is the length of x. Define 3 different values of N, i.e. N=64, 128, and 256. Compute a set of N- point FFT X(k) and plot the results from k=0-N/2. % Define 3 different values of N N1 = 64; N2 = 128; N3 = 256; % Compute the magnitudes of FFT of x[n] for each of 3 values of N X1 = abs(fft(x,N1)); X2 = abs(fft(x,N2)); X3 = abs(fft(x,N3)); % Frequency scaling to convert the discrete frequencies k to the continuous frequency in Hz fs=1/T; % sampling frequency in Hz F1 = [0 : N1/2]/N1*fs; F2 = [0 : N2/2]/N2*fs; F3 = [0 : N3/2]/N3*fs; % plot the transforms figure; subplot(3,1,1) stem(F1,X1(1:N1/2+1),'filled'),title('N = 64'),axis([0 12.3 0 30]) subplot(3,1,2) stem(F2,X2(1:N2/2+1),'filled'),title('N = 128'),axis([0 12.3 0 30]) subplot(3,1,3) stem(F3,X3(1:N3/2+1),'filled'),title('N = 256'),axis([0 12.3 0 30]) xlabel('Frequency (Hz)') INC 212 Signals & Systems SW-3
  • 4. N = 64 30 20 10 0 0 2 4 6 8 10 12 N = 128 30 20 10 0 0 2 4 6 8 10 12 N = 256 30 20 10 0 0 2 4 6 8 10 12 Frequency (Hz) Fig. 5 FFT of a cosine for N=60, 128 and 256 Fig. 5 shows that the transforms all have a sinc-like appearance, which is a result of data window, differing only in the number of samples used to approximate the sinc function. Q4. Record the frequencies at the peaks of all three spectra in Fig. 5. Compare these peak frequencies with the frequency of the cosine x[n] and comment on the results. EXERCISE 2: EFFECT OF DATA LENGTH In this part, we will consider impact of window data length on resolution of FFT as the FFT length kept fixed. We choose to fix N=1024 points and vary the number of repetitions of the repetitions of the fundamental period. % Data generation t=linspace(0,2,50); T=t(2)-t(1); x1=cos(2*pi*t/(10*T)); % 5 periods x2=repmat(x1,1,2); % 10 periods x3=repmat(x1,1,5); % 25 periods N = 1024; % the number of FFT % Compute the magnitudes of FFT of x[n] for each of 3 data lengths X1 = abs(fft(x1,N)); X2 = abs(fft(x2,N)); X3 = abs(fft(x3,N)); INC 212 Signals & Systems SW-4
  • 5. % Frequency scaling fs=1/T; % sampling frequency in Hz F = [0 : N/2]/N*fs; % plot the transforms figure; subplot(3,1,1) plot(F,X1(1:N/2+1)),title('5 periods') subplot(3,1,2) plot(F,X2(1:N/2+1)),title('10 periods') subplot(3,1,3) plot(F,X3(1:N/2+1)),title('25 periods') xlabel('Frequency (Hz)') 5 periods 40 20 0 0 2 4 6 8 10 12 14 10 periods 50 0 0 2 4 6 8 10 12 14 25 periods 200 100 0 0 2 4 6 8 10 12 14 Frequency (Hz) Fig. 6 FFT of a cosine of 5, 10 and 25 periods Q5. As x[n] is extended to a large number of periods, how does this affect the obtained spectrum? Find the peak frequencies of spectra obtained from Fig. 6 and compare them with the ones you get from Fig. 5. EXERCISE 3: RECOVERING THE TIME-DOMAIN FUNCTION USING IFFT Given the FFT of a signal, you can recover the time-domain function of the signal by using IFFT. Here is how to do it. 1. Generate the cosine function as in EXERCISE 1: t=linspace(0,2,50); % vector of time variable T=t(2)-t(1); % sampling period x=cos(2*pi*t/(10*T)); INC 212 Signals & Systems SW-5
  • 6. 2. Create the DFT of the signal and plot its magnitude and phase. Xk=fft(x); % Discrete Fourier transform of x figure subplot(2,1,1),stem(abs(Xk),'.'), title('Magnitude of FFT'); subplot(2,1,2),stem(angle(Xk),'.'),title('Phase of FFT'); 3. Recover the time-domain function by using the inverse DFT. xr = real(ifft(Xk)); figure subplot(2,1,1), plot(t,x), title('Cosine before FFT'); subplot(2,1,2), plot(t,xr),title('Cosine after FFT and IFFT'); INC 212 Signals & Systems SW-6
  • 7. LAB ASSIGNMENT TASK I: SAMPLING AND ALIASING (Adapted from J.R. Buck et al, Computer Explorations in Signals and Systems using Matlab, 2nd edition, Prentice Hall, New Jersey.) Consider the sinusoidal signal x(t ) = sin(Ω 0 t ) . If x(t) is sampled with frequency ω s = 2π (8192) rad/sec. 1) Assume Ω 0 = 2π (1000) rad/sec and define T=1/8192, create the vector n=[0:8191], so that t=n*T contains the 8192 time samples of the interval 0 ≤ t < 1 . Create a vector x which contains the samples of x(t ) at the time samples in t. The vector x represents the discrete-time signal x[n] = sin(Ω 0 n) . 2) Use subplot to display the first fifty samples of x[n] versus n using stem and the first fifty samples of x(t) versus the sampling time using plot. 3) Calculate the Fourier transform of x(t) using the sampled data x[n]. Plot the magnitude of the spectrum versus the frequency vector in Hz. 4) Repeat Parts 1) – 3) for the sinusoidal frequencies Ω 0 = 2π (1500) and 2π (2000) rad/sec. Is the magnitude of the spectrum of x nonzero for the expected frequencies? 5) Play each of the sampled signals created in Part 4) using soundsc(x,1/T). Does the pitch of the tone that you hear increase with increasing frequency Ω0? 6) Now repeat Parts 1) – 3) for the sinusoidal frequencies Ω 0 = 2π (4000) , 2π (5000) and 2π (6000) rad/sec. Also play each sample signal using soundsc. Does the pitch of the tone that you hear increase with each increase in the frequency Ω0? If not, can you explain this behaviour? TASK II: DIAL TONE 2 1 0 -1 -2 0 0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2 2.2 Sample 4 x 10 Fig. 7 Dial tone signal In this task you will analyse a dial tone signal in Fig. 7. A dial tone was produced each time the user pressed a telephone key. It consists of 0.5 sec of tone followed by 0.1 sec of silence, which is represented by a sequence of zeros. The dial signal in Fig. 7 was recorded at 5 kHz sampling rate. Our objective is to determine which telephone buttons were pressed. INC 212 Signals & Systems SW-7
  • 8. 1. You are to write a programme which analyses which telephone keys were pressed by the use of the FFT analysis. The touch-tone telephone tones are shown in Table 1. Table 1. Touch-tone telephone tones Frequencies 1209 Hz 1336 Hz 1447 Hz 697 Hz 1 2 3 770 Hz 4 5 6 852 Hz 7 8 9 941 Hz - 0 - The dial tone file ‘dial.mat’ can be downloaded from the course website. The data can be loaded into MATLAB by typing load dial as long as the file is in your MATLAB PATH. The file contains the touch-tone signal, dial, which contains the sequence of touch- tones representing a phone number of 9 digits. You may want to extract each 0.5-sec touch tone for each digit from the touch-tone signal and analyse its spectrum by turn. The analysing process need not be automatic. You need to detect the peak frequencies and convert them to continuous-time frequencies in Hz, then use Table 1 to analyse the tone. Full explanation of how you get the seven pressed keys must be provided. Include plots to confirm your results. 2. Extra credit: You are to write a function ttdecode(x) to decode phone numbers automatically from the touch-tones. The function accepts as its input a touch-tone signal and returns as its output a vector containing the number. For example, if the vector phone contained the touch-tones for the number 02-470-9096, you should get the following output: >> digits=ttdecode(phone); >> digits digits = 0 2 4 7 0 9 0 9 6 The first line of the m-file you write to implement the function should read function digits = ttdecode(x); Test your function by using dial as input and verify that it returns the same phone number as you obtained in Part 1. NB: i) You will get full mark from the extra credit if your programme can work with touch-tone signals where the digits and silences can have varying lengths. It is assumed that the recorded signals are noise-free. Provide an example to prove that your programme does work as expected. ii) Seventy percent of full mark will be given if you programme can work with a touch-tone signal in the format used in Part 1, i.e. 0.5 sec of touch- tone for each digit, separated by 0.1 sec of silence. In your report, you must specify what your programme can do, including necessary information that the user should know, e.g. the usable format of touch-tone signals, in order to use your programme. INC 212 Signals & Systems SW-8
  • 9. TASK III: Signal Extraction A common use of Fourier transforms is to find the frequency components of a signal buried in a noisy time domain signal. In this task you will explore two approaches of noise removal by the use of the Fourier analysis of a signal. When you load the tested file ‘data.mat’, you will get two data sets: ‘x’ is a sound signal, composed of three frequency components and ‘y’ is the sound signal ‘x’ corrupted by a white noise. The data were sampled with sampling rate 10 kHz for 1 second. Signal extraction: Method I: Fourier series-based 1. Create and observe the DFT of the noisy data ‘y’. 2. From the DFT, estimate the Fourier coefficients of those three frequency components. ˆ Write down the Fourier series of the estimated noise-free signal x1 in the trigonometric form. 3. Generate the estimated signal with the same data length as ‘x’, according to the function obtained in 2, using the same sampling frequency. 4. Create a figure with subplots: the noise-free signal superimposed with the estimated ˆ signal and the estimated error of method 1: e = x − x1 . Signal extraction: Method II: FFT-based low-pass filtering 1. Create and observe the DFT of the noisy data ‘y’. 2. From the DFT, observe the significant frequency components. Eliminate the noise by setting the DFT of all non-significant frequency components to zeros, and then perform ˆ the IFFT. This will become your filtered signal x 2 . 3. Create a figure with subplots: the noisy signal superimposed with the filtered signal ˆ and the estimated error of method 2: e = x − x 2 . Compare and comment on the performance of the two approaches. REPORT - You are encouraged to discuss the lab with each other, but your solutions must be independently written using you own words and formulations. - Your report must be concise, but complete. Include comments, i.e. discussions of how your results compare to your expectations, and conclusions to all of the assignments. - Include any plots or images you need to justify your conclusions. - Include a representative collection of the code(s) that you used as the appendix. - Make sure to include comments in your code explaining what it does. - Provide a CD with the m-file ttdecode.m if you decide to do the Extra Credit task. INC 212 Signals & Systems SW-9