Implement and Design Filter: Fig1: Simulink Schematic Filters
Implement and Design Filter: Fig1: Simulink Schematic Filters
Name Lab Partner(s): Lab Date: Thinh Nguyen Van May 24, 2011 Repetition:
Introduction: What is the purpose of this lab? Implement and design: 1. Low pass filter 2. High pass filter 3. Band pass filter
Hypothesis: (Predict the outcome(s) of the experiment) 1. In low pass filter, only signals whose frequency is below the cutoff frequency can pass. 2. In high pass filter, only signals whose frequency is above the cutoff frequency can pass 3. In band pass filter, signals whose frequency is in between two frequencies can pass
Procedures: (What steps did you take to accomplish this lab assignment?) I do this experiment in two ways: Simulink and *.m file. Method1: Using Simulink: Design the Simulink diagram as following figure:
The parameters of low pass filter, high pass filter, band pass filter is set :
lowpass filter with less than 0 to 40 Hz, and at least 60dB from 150Hz to Nyquist response.
heighpass filter with less 150 Hz, and at least 60dB of from 0-40 Hz to Nyquist response.
3. Band pass filter: % Design a bandpass filter with passband of 60Hz to 200Hz with less than % 3dB of ripple in the passband, and 40dB attenuation in the stopbands % that are 50Hz wide on both sides of the passband. Wp=[60 200]/500; Rp=3; Rs=60; Ws=[10 250]/500; [n,Wn]=buttord(Wp,Ws,Rp,Rs) [b,a]=butter(n,Wn) freqz(b,a,512,1000) Method 3: Using FDAtool In matlab command window, type the command fdatool for opening the filter design and analysis tool. Fill the parameters in to design a filter. I design a filter with parameters as follow: Response Design Filter Density Fs Fpass Fstop Apass Astop type method order factor Low pass FIR Minimum 20 4800 200 800 1dB 80dB Equiripple order The Filter design and analysis tool window shown should be:
Results: (Show your results) 1. Method1 (Simulink result): a. Low pass filter: Tested Source Comment Signal
Source frequency
range W<=1047
frequency w= 1000
1047<W <1570
w=1200
Signal is attenuated
w>1570
w=1600
b. High pass filter: Source frequency W<1047 Tested source frequency w=1000 Comment signal
Signal is stopped.
1047<W<1570
w=1200
Signal attenuate.
w>1570
w=1600
Signal is conserved
c.
Signal is stopped.
523<w<1047
W=1000
1047<w<1570
w=1200
1570<w<2355
W=2000
w>2355
W=2500
Signal is stopped.
Conclusion:
(What did you learn? What conclusions can you draw form the results of this lab assignment? Compare the results of the experiment with you hypothesis.) The result in Matlab simulation is match with the prediction in hypothesis part. The low pass filter is used to take away the signal whose frequency is greater than cutoff frequency. In contrast, high pass filter is used to take away the frequency that smaller cutoff frequency. The band pass filter is the combination of both low pass filter and band pass filter. By using matlab simulation, we can design the filters as be shown in previous parts.