DOC PREVIEW
Rose-Hulman ECE 300 - Fourier Series and Filtering Periodic Signals

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 Fall 2008 Fourier Series and Filtering Periodic Signals Lab 06 by Robert Throne Objectives A variety of interesting waveforms can be expressed as sums of complex exponentials of different frequencies. The pulse trains used in communication systems, speech waveforms, and the waveforms produced by musical instruments can be modeled in this way. It is also important to determine how these periodic signals are modified when they are the input to a linear time invariant system. The four main objectives of this lab are: 1. Improve your knowledge of programs in MATLAB, and 2. Understand how Fourier series coefficients are changed when a periodic signal goes through a system. 3. Review filtering of signals and develop an understanding of the relationship between the phase of a system and the time delay in the output signal. Procedure 1: Plotting a Periodic Signal using the Complex Fourier Series Copy your file Complex_Fourier_Series.m to a new file lab6.m. Be sure to delete anything that is not necessary in this code, since part of your grade will be based on your code. Plot the Complex Fourier series representation of the following periodic function (defined over one period) using 20 terms of the series. 0211 2()32 303 4ttxttt1−≤<−⎧⎪−≤<⎪=⎨≤<⎪⎪≤<⎩ Note that the function does not start at zero, be sure your quadl function does not assume this! Page 1 of 1ECE 300 Signals and Systems Fall 2008 Procedure 2: Filtering Periodic Signals One of the reasons for using a Fourier Series representation of a periodic signal instead of a different type of representation is that we get a frequency domain representation of the original signal()xt . If ()xt()xt is a periodic signal with periodT , then it has the Fourier series representation okjk tkkceω=∞=−∞=∑where 02Tπω= and 1()ojk tkTcxteTω−=∫dtk. Using the fact that the magnitude of the is even and the phase of the is odd, we can rewrite the complex Fourier series as a Fourier cosine series kckc1() 2| |cos( )okkjk tko kokkxtcec cktωω=∞ =∞=−∞ ===+ +∑∑(c Assume next we have a periodic signal 0() cos( )xt A tωφ=+ . We can represent this as a phasor Aφ=X ( . Assume this signal is the input to an LTI system with transfer function (Hj)ω. We know we are only interested in the response of the transfer function at the same frequency as the input, so we want 0(Hj )ω. Again we can represent the transfer function as the phasor 0)|0|(Hj ( )Hjωω=H ( . The output of the system in steady state is then []00|( )| ( )AHj Hjωφω== +YHX (( Going back from phasor notation to the time domain, we have the steady state output is 00() | ( )|cos( ( ))yt A H j t H j0ωωφ ω=++∠ Now assume we have two inputs to the system 111122() cos( )2( ) cos( )xt A txt A t2ωφωφ=+=+ We can represent these two inputs as phasors 11122AA2φφ==XX(( For each input, the corresponding output will be 111 1 1 1222 2 2 2where | ( ) | ( )where | ( ) | ( )Hj HjHj Hjωωωω====YHX HYHX H(( The steady state output due to each input is then Page 2 of 2ECE 300 Signals and Systems Fall 2008 1111 11 12222 22 2() | ( )|cos( ( )) () | ( )|cos( ( )) yt AH j t Hjyt A H j t Hjωωφ ωωωφ ω=++∠=++∠ If the input is12() () ()xtxtxt=+, then by linearity our output will be 12 111 11 1222 22 2() () () | ( )|cos( ( )) + | ( )|cos( ( )) yt y t y t A H j t H j A H j t H jωωφ ω ω ωφ ω=+= ++∠ ++∠ Now assume we have a periodic signal ( )xt as the input to an LTI system with transfer function (Hj)ω. Since this signal is periodic it has a Fourier series representation: 1() 2| |cos( )okkjk tko kokkkxtcec cktωω=∞ =∞=−∞ ===+ +∑∑(c0 Extending our analysis above, the steady state output of the system will be 001() (0) 2| || ( )|cos( ( ))kkokkyt cH c H jk k t c H jkωωω=∞==+ ++∑(( a) Modify your code in lab6.m to produce the output signal for a filtered signal. We will actually only be looking at the first N terms in the Fourier series, as we have been. We will start with a simple filter,()Hj jωω=. This filter computes the derivative of the input. In order to do this so we can reuse the code, we will break this up into two pieces. Let’s define the variable H0 to be the value of the transfer function at 0ω=, and the variable (array) H to be the value of the transfer function at the discrete frequencies 000,2 , 3 ,..., N0ωωω ωo. It is probably easiest to assign these frequencies to a variable (array) W = [1:N]*ω; b) For the periodic signal you determined the complex Fourier series of in part a, plot the Fourier series representation of both the input signal and the output signal using different line types and a legend. Start with N = 5 and gradually increase N until you see what is happening (and you get a good graph). If N becomes too large you will not be able to see much. Print out a good plot and attach it to the worksheet at the end of this lab. Describe what you see (think about the derivative of the step function…). Have this part checked off before you go on. Instructor Verification (see last page) Page 3 of 3ECE 300 Signals and Systems Fall 2008 Procedure 3: Slope of Phase and Delay in the Time Response a) Now we want look at using Matlab to generate filter coefficients. 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......NNBbbAa aa==b 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. b) We now again need to find the variable H0 = 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 =


View Full Document

Rose-Hulman ECE 300 - Fourier Series and Filtering Periodic Signals

Documents in this Course
Exam 2

Exam 2

8 pages

Load more
Download Fourier Series and Filtering Periodic Signals
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 Fourier Series and Filtering Periodic Signals 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 Fourier Series and Filtering Periodic Signals 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?