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

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

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 6 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 6 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 6 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 2006 Fourier Series and Filtering Periodic Signals Lab 04 by Robert Throne (base on a lab by M. Yoder) 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 periodid 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 and functions in MATLAB, and 2. Write a function that will sum several complex exponential terms. 3. Understand how Fourier series coefficients are changed when a periodic signal goes through a system. 4. 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 A: Efficient Synthesis of x(t) The way your program Complex_Fourier_Series.m computes ()xtis very inefficient, and we are going to try and speed this up and take advantage of Matlab’s strengths. In what follows, remember we want to compute ()okNjk tkkNxt ceω==−≈∑ To do this we need to do the following: a) Copy Complex_Fourier_Series.m to a new file, Lab4.m, or something similar. You do not want to write over code that is already working! b) Define an array[]0000 0( 1) ... 0 ... ( 1)WN N N N0ωωωω ω=− − − − −ω which we can write as []( 1) ... 1 0 1 ... ( 1)oWNN N Nω=− − − − − c) In order to use this sum, we need the array (1) 1 0 1 1[ ... ... ]NNNCc c c cc c c−−− − −=N Page 1 of 6ECE 300 Signals and Systems Fall 2006 What we have is and the array . Use these arrays and the properties of the coefficients to construct the array . Your method of construction should work for any sized array. The Matlab commands fliplr and conj will be very helpful here. Constructing C should require one statement in Matlab, and, of course, must occur after and are available. 0c11[ ... ]NNcc c c−=Cc0c d) Remove (comment out) the for loop that determines the Fourier estimate of ()xt, i.e., the synthesis part of the code. e) Now write a function sum_exp which takes as arguments W, C, and t, where t is an array of the times we want to find x at. The command est = sum_exp(C,W,t) should return the vector est evaluated at all times t. To understand how we are going to do this, let’s consider the following situation: Assume we want to know at three times and we are going to use up to the second harmonic in the Fourier series representation (()est t2N=), so we have for Assume we have a row vector of the three times 22()oikjk tikkest t c eω==−=∑1, 2, 3i =[]123tttt=, the row vector []00 020W02ωωω=− −ω of the required frequencies, and the row vector []21012Cc c ccc−−= . First let’s form []00102001021230010200102222111000111222Tjt jt jtjt jt jtjW t j t t tjt jt jtjt jt jtωωωωωωωωωωωω−−−⎡⎤ ⎡⎢⎥ ⎢−−−⎢⎥ ⎢⎢⎥ ⎢==⎢⎥ ⎢⎢⎥ ⎢⎢⎥ ⎢⎣⎦ ⎣030303032102ωωωω−⎤⎥−⎥⎥⎥⎥⎥⎦ Then 01 02 0301 02 0301 02 0301 02 03222111111222111Tjt jt jtjt jt jtjW tjt jt jtjt jt jteeeeeeeeeeeeeωω ωωωωωωωωω ω−− −−−−=⎡⎤⎢⎥⎢⎥⎢⎥⎢⎥⎢⎥⎢⎥⎣⎦ Finally, by premultiplying by C we will get the desired result. The function sum_exp should actually consist of one line of code. The Matlab command transpose may also be of some help here. f) Plot the following function and the Fourier series representation of the function using 50 terms. Include this figure in your lab notebook and have it checked off before you go on. You have already determined a Fourier series representation for this function on your homework. Page 2 of 6ECE 300 Signals and Systems Fall 2006 0211 2()32 303 4ttfttt1−≤<−⎧⎪−≤<⎪=⎨≤<⎪⎪≤<⎩ Instructor Verification (see last page) Procedure B: 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. Recall from phasor analysis that if the input to a LTI system is 0() cos( )xt A tωφ=+ the steady state output will be 00 0() | ( )|cos( ( ) )yt A H j t H jωωω=+∠φ+ Let’s rewrite the periodic input signal()xt using Euler’s identity, 00() ()()22jt jtAAxt e eωφωφ+−+=+ We can rewrite the output as 00 00(()) ((00|( )| |( )|()22jt Hj jt HjAHj AHjyt e eωφ ω ωφ ω))ωω++∠ − ++∠=+ Using the properties that for a real system 0|( )||( )Hj H j0|ωω=− (the magnitude is an even function) and 0() (Hj H j0)ωω∠=−∠− (the phase is an odd function) , we get 0000() ( )() (00| ( )| | ( )|()22jHj jH jjt jtAHj e AH j eyt e eωω)ωφωωω∠∠φ−+−+−=+ Now if we recognize the above expression for ()xt as its Fourier series representation, with coefficients 101022jjAe Aecccφφ−−=== we can write 00010 10 1 1() ( ) ( )0jtjtjtytcHje cHje be bejtωωωωω−−−−=− + = +ω In general then, if ()xt has the (finite) Fourier series representation ()okNjk tkkNxt ceω==−≈∑ Page 3 of 6ECE 300 Signals and Systems Fall 2006 then the steady state output will be given by ()okNjk tkkNyt beω==−≈∑ where 0()kkbcHjkω= We are now ready to modify Lab4.m so we can filter signals. a) We will start with a simple filter, ()Hjjωω=. This filter computes the derivative of the input. For this filter, determine a new vector 00 0[( )((1))...(0)...((1))(H H jN H j N H H j N H jN0)]ωωω=− −− −ω b) Construct the new vector (this should be easy to do) 0(1) 0 0 1 0 0[ ( ) ( ( 1) ) ... (0) ... ( ( 1) ) ( )]NN N NBcHjN c HjN cH cHjN cHjNωωω−−− −=− −− −ω c) Plot the output vector using its Fourier series representation. 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. Include a good plot in your lab notebook. Describe what you see (think about the derivative of the step function…). Have this part checked off before you go on. ()yt Instructor Verification (see last page)


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?