DOC PREVIEW
Rose-Hulman ECE 300 - Filter Design and Measurement

This preview shows page 1-2 out of 7 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 7 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

ROSE-HULMAN INSTITUTE OF TECHNOLOGY Department of Electrical and Computer Engineering ECE 300 Signals and Systems Spring 2009 Filter Design and Measurement Lab 09 by Bruce A. Black, Robert Throne, and Mario Simoni Objectives In this lab we will examine filters in different ways. We will first investigate three different kinds of lowpass filters and the properties they possess. These filters illustrate the types of trade-offs we must make when designing a system. Finally we will use a filter to measure the relevant “bandwidth” of a signal and look at the effects of filtering on a “real-world” signal.Background A periodic signal can be represented by the complex exponential form of the Fourier series. When a periodic signal is applied to the input of a filter, each of the harmonic components of the input signal experiences an amplitude and phase change caused by the filter. At the filter output the harmonic components add together to produce the output waveform. The amplitude and phase changes experienced by each of the input components combine to make the output signal different from the input signal in a predictable way. This difference between the input and output waveform is called distortion. Stated mathematically, suppose x(t) is a periodic input signal with period T0, H(ω) is the frequency response of the filter (i.e. the Fourier transform of its input response h(t)), and y(t) is the filter output. Then the input x(t) can be written ()000, where 2jk tkkxtaeωωπ∞=−∞==∑T. As the input signal passes through the filter, the input coefficients ak become altered by the filter to become the output coefficients bk, where ()0kkbHk aω=. The output y(t) is then given by () ( )000jk t jk tkkkkyt be Hk aeωωω∞∞=−∞ =−∞==∑∑ In practice there is not usually an infinite number of components to be added to produce either x(t) or y(t); only components with significant amplitudes need to be included. Pre-Lab Review Lab 6. Page 1 of 7ECE 300 Signals and Systems Part 1: Filtering Periodic Signals This is a continuation of the work you did in Lab 6. Now we are going to concentrate a bit more on the filters and examine some trade-offs between different common types of lowpass filters. Much of what follows is the same as for Lab 6, but there are a few changes at the end when we use different types of filters. a) Use your code from Lab 6 to determine the Complex Fourier series representation using 20 terms of the following periodic function (defined over one period). 0211 2()32 303 4ttxttt1−≤<−⎧⎪−≤<⎪=⎨≤<⎪⎪≤<⎩ b) For the majority of the filters it uses, Matlab assumes filter has the form 1212112121()NNNNNNNNbs b s bs bs bHsas a s as as a−−−−00+++ + +=+++ + +"" Hence, in order to represent any filter, Matlab just uses an array for the b coefficients and an array for the a coefficients. For example, we might have two variables (arrays) B and A to store the coefficients. These variables would be [][]1010......NNBbbbAaa== a Let’s assume we want to use a 10th order Butterworth lowpass filter with a frequency cutoff of 200ω. Use the help command to look up the Matlab function butter. You should return the coefficients in two arrays, i.e. your command should be [B,A] = butter(…..); Note that we are constructing an analog filter here, so read all of the description for the butter command. c) We now again need to find the variable H0 = and the variable (array) (0)H[]00( ) ( 2 ) ... ( )HHj Hj HjN0ωωω=. To find we use the fact that (0)H 00(0)bHa= If the b and a coefficients are stored in arrays B and A, we can write H0 = B(end)/A(end); Where end tells Matlab to get the last element of the array. The command freqs will be helpful for finding the variable (array) H. Page 2 of 7ECE 300 Signals and Systems d) Plot the Fourier series representation for both the input signal ()xt and the output signal on the same graph for N=25 terms, using different line types and a legend. The title of your graph should indicate that you are using a Butterworth filter. If you have done everything correctly your graph should look like that in Figure 1. Print out this graph and attach it to the worksheet at the end of this lab. ()yt-2 -1 0 1 2 3 4-1-0.500.511.522.533.5Time (sec)Butterworth Filter, Number of Terms = 25OriginalInputOutput Figure 1. Input and Fourier series representation of the input and output using a 10th order Butterworth filter. It will be useful to look at a frequency response plot of the filter you are using. You will need to make three plots on one page using the subplot command. Type orient tall before any of the plotting so you can use more of the page. e) The first plot is the magnitude of the transfer function as a function of frequency. You will need to use the abs command. You should also put a grid on your figure. f) The second plot is the phase of the transfer function (in degrees) as a function of frequency. In order to see the phenomena we want to see use the sequence of commands unwrap(angle(H))*180/pi. The most important command here is unwrap, which allows angles of more than 180 degrees g) The third plot is the magnitude of the transfer function (in dB) as a function of frequency. Here you need to use the commands semilogx and log10. Be sure to include the type of filter you are using in your title. If you have done everything correctly, you should get a plot like that shown in Figure 2. Print out this graph and attach it to the worksheet at the end of the lab. Page 3 of 7ECE 300 Signals and Systems 5 10 15 20 250.51Frequency (rad/sec)|H(ω)|Butterworth Filter5 10 15 20 25-500-400-300-200-100Frequency (rad/sec)Phase (deg)100101102-20-100Frequency (rad/sec)HdB Figure 2. Frequency response of the 10th order Butterworth filter. h) If the phase of the filter is exactly linear then we should have the relationship ( sec)slope of filter in time delay−= Using a straight edge (or ruler), draw a line on your graph between the initial point on the phase graph and the value of the phase at about 200ω. Estimate the delay between the input and output signal (use Matlab to zoom in on the signal and measure this accurately, don’t just eyeball it!) and compare this to the predicted delay. Fill in the table on the worksheet. i) Repeats parts b-h using a Bessel filter (use the command besself). Note that for this filter the frequency you specify can be


View Full Document

Rose-Hulman ECE 300 - Filter Design and Measurement

Documents in this Course
Exam 2

Exam 2

8 pages

Load more
Download Filter Design and Measurement
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Filter Design and Measurement and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Filter Design and Measurement 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?