This document describes a lab experiment on filtering a non-stationary signal. The objective is to understand the effect of poles and zeros on frequency response using MATLAB. A signal containing 10Hz, 65Hz and 200Hz sinusoids is generated. Low pass, band pass and high pass filters are designed to extract each component. FIR filters provide linear phase but are slower while IIR filters are faster but do not provide linear phase. The lab demonstrates how to extract desired information from a signal using different filter types.
UNIT-V FMM.HYDRAULIC TURBINE - Construction and working
filtering of non stationary signal
1. 1
Lab 06:
Filtering a Non-stationary Signal
Submitted By :
Syed Abuzar Hussain Shah
SP15-BEE-096
Uzair Ahmed
SP15-BEE-106
Syed Hasnain Shah
SP15-BEE-100
Submitted To: Sir Usman
Class: BEE-5A
Dated: 27/04/2017
2. 2
Objective:
In today’s lab the objective will be to understand the effect of pole and zeros on
frequency response using MATLAB.
Statement of Problem:
1. Generate a unit step function as you have done in Lab II.
2. Generate the following signal keeping simulation frequency as 1000 and
index as -2000:3000. Where t=index/fs.
3. 𝑥(𝑡)= sin(2𝜋(10)𝑡)𝑢(−𝑡)+ 5cos(2𝜋(65)𝑡)𝑢(𝑡)+ 2sin(2𝜋(200)𝑡)( 𝑢(𝑡 + 1)−
𝑢(𝑡-2)).
4. Plot the signal and its Fourier Transform.
5. Now design a filter using fdatool that provides you only the 10 Hz signal.
6. Now using the following code apply filter to the generated signal.
Hd = f1_lab6;
y=filter(Hd,x);
7. Now repeat step 6 to 8 to attain 65 Hz signal and 200 Hz signal,
respectively.
Procedure:
clc
clear all
close all
index= -2000:3000;
fs=1000;
N=5000;
t=index/fs;
u=sin(2*pi*10*t).*heaviside(-t);
v=5*cos(2*pi*65*t).*heaviside(t);
w=2*sin(2*pi*200*t).*(heaviside(t+1)-heaviside(t-2));
x=u+v+w;
subplot(121)
plot(t,x);
title('input signal')
xlabel('t (sec)')
ylabel('x(t)')
grid on;
11. 11
Questions:
Q1: While designing your filter which filter did you choose FIR or IIR?
Ans: We designed our filter using IIR.
Q2: What was the effect of using an FIR filter?
Ans: Using FIR, it gives us linear phase and constant group delay but the order
of the system is high so speed of processing is slow and it is time consuming.
Q3: What was the effect of using an IIR Filter?
Ans: Using IIR, order of the system is low and processing of the system is fast
but it doesn’t give us constant group delay and linear phase.
Q4: Explain in which case you used Low-pass, high-pass or bandpass and
also describe the pole zero placement for each case.
Ans: In the 1st
case for filtering data we use low pass filter with cutoff at 10Hz.
In 2nd
case we use bandpass filter with cutoff at 65Hz and in 3rd
case we use
highpass filter with cutoff at 200Hz.
Conclusion:
In this lab we analyse the bahaviour of the time varying signal after passing
through filters of certain cutoff value. We learn to extract our desired
information form the signal using lowpass, bandpass and highpass filters.
Also we learn to design filter according to our required situation.
We use FIR filter where we compromise on cost and speed and IIR filters where
we compromise on phase.