Download presentation

Presentation is loading. Please wait.

1
Lab8 (Signal & System) Instructor: Anan Osothsilp Date: 17 April 07

2
Anan OsothsilpPage 1 Lab8 Objective: Learn how to obtain frequency response plot using fast Fourier transform Date: 17 April 07

3
Anan OsothsilpPage 2 Lab8 To obtain Frequency response plot of the signal, we need Find length of signal & measurement period (given) Identify number of sampling point Remove DC bias Load signal file Calculate output FFT Find frequency range from FFT point and measuring period Find Magnitude vector of output FFT Plot frequency versus Magnitude Date: 17 April 07

4
Anan OsothsilpPage 3 Lab8 To obtain Frequency response plot of the signal, we need Step2: Find length of signal & measurement period (given) L = length(data); Step 3: Find and Remove DC bias Step1: Load signal file load heart.txt ; data = heart; % find dc bias of input signal average_data = sum(data)/length(data); %3 remove dc bias of input signal input = data - average_data; Date: 17 April 07

5
Anan OsothsilpPage 4 Lab8 To obtain Frequency response plot of the signal, we need Step 4: Identify number of sampling point Calculate output FFT N = L; N = 1024; %number of point for fft N1 = N/2; %number of half spectrum fs = 100; %sampling frequency at 100 Hz input_fft = fft(input,N); %spectrum vector of input signal Date: 17 April 07

6
Anan OsothsilpPage 5 Lab8 To obtain Frequency response plot of the signal, we need Step 5:Find frequency range from FFT point and measuring period Step 6: Find Magnitude vector of output FFT w = ([0:N1-1]/N1)*(fs/2); abs_input_fft = abs(input_fft(1:N1))*2/N; Date: 17 April 07

7
Anan OsothsilpPage 6 Lab8 To obtain Frequency response plot of the signal, we need plot(w,abs_input_fft,'b' ); xlabel('Frequency(Hz)'); ylabel('Mag. of Fourier transform'); grid; Step 7: Frequency response plot Date: 17 April 07

8
Anan OsothsilpPage 7 Lab8 Exercise1: - Follow 7 steps to obtain frequency plot of given data, by writing Matlab code to remove dc bias calculate FFT of the signal calculate magnitude of FFT plot the magnitude of FFT versus frequency range Identify fundamental frequency of the signal Date: 17 April 07

Similar presentations

© 2020 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google