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
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 2005 RDT Fourier Series and Filtering Periodic Signals Lab 04 by Robert Throne based on a Lab by Mark 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 In this lab we will explore some analytical techniques for generating waveforms by summing complex exponentials The two 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 Pre Lab Do the following before coming to lab Record the results in your lab notebook and hand in a photocopy of your pre lab a Work the following matrix algebra problems by hand 1 2 6 4 2 1 3 4 5 3 1 5 6 1 2 6 4 2 2 3 4 5 3 1 5 6 b In MATLAB a process called implicit type assignment can automatically create a matrix when it is called for in a computation For example in the computation below MATLAB would understand that the result of the command cos x results in a matrix as shown Find the result of the commands listed by hand cos a cos b a b x cos x c d cos c cos d 1 e jx 2 xe jx Page 1 of 7 ECE 300 Signals and Systems Fall 2005 c Write a function that performs the same task as the following without using a for loop and paste the code and verification that it works in your notebook function Z replacez A REPLACEZ Function that replaces the positive elements of a matrix with 1 usage Z replacez A A input matrix whose positive elements are to be replaced with 1 M N size A for i 1 M for j 1 N if A i j 0 Z i j 1 else Z i j A i j end end end MATLAB hint The MATLAB logical operators may be helpful in completing this exercise Use help to understand what these commands do Procedure A Efficient Synthesis of x t The way the program Fourier Series m computes x t is 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 x t k N ce k N jk o t k To do this we need to do the following a Just after the period T is defined write an expression for 0 the natural frequency b Define an array W N 0 N 1 0 0 which we can write as W N 0 0 N 1 0 N 0 N 1 1 0 1 N 1 N o c In order to use this sum we need the array C c N c N 1 c 1 c0 c1 cN 1 cN What we have is c0 and the array c c1 cN 1 cN Use these arrays and the properties of the coefficients to construct the array C 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 c and c0 are available Page 2 of 7 ECE 300 Signals and Systems Fall 2005 d Remove delete the following inefficient lines of code m 1 est T c 1 conj feval periodic t T conj c 1 feval periodic t for i 2 N m i est est T c i conj feval periodic t est est T conj c i feval periodic t end est est c0 e Now write a routine 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 x sum exp C W t should return the vector x 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 x t at three times and we are going to use up to the second harmonic in the Fourier series representation N 2 so we have x ti i 1 2 3 Assume we have a row vector of the three times t t1 t2 W 2 0 C c 2 0 c 1 c0 0 0 k 2 c e k 2 k jk o ti for t3 the row vector 2 0 of the required frequencies and the row vector c1 c2 First let s form 2 0 1 0 T jW t j 0 t1 t2 0 2 0 j 2 0t1 j1 t 0 1 t3 0 j1 0t1 j 2 0t1 j 2 0t2 j1 0t2 0 j1 0t2 j 2 0t2 j 2 0t3 j1 0t3 0 j1 0t3 j 2 0t3 Then e j 2 0t1 j1 0t1 e jW T t 1 e j1 0t1 e e j 2 0t1 e j 2 0t2 e j1 0t2 1 j1 0t2 e e j 2 0t2 e j 2 0t3 e j1 0t3 1 j1 0t3 e j 2 0t3 e Finally by premultiplying by C we will get the desired result The function sum exp should actually consist of one line of code f Plot the original function and the Fourier Series representation of the function using 50 terms The function is defined over the period 2 to 4 Include this figure in your lab notebook and have it checked off before you go on The function you should be plotting is Page 3 of 7 ECE 300 Signals and Systems Fall 2005 0 2 t 1 1 1 t 2 f 3 t 3 2 t 3 0 3 t 4 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 x t Recall from phasor analysis that if the input to a LTI system is x t A cos 0t the steady state output will be y t A H j 0 cos 0t H j 0 Let s rewrite the periodic input signal x t using Euler s identity x t A j 0t A j 0t e e 2 2 We can rewrite the output as A H j 0 j 0t H j 0 A H j 0 j 0t H j 0 e e 2 2 Using the properties that for a real system H j 0 H j 0 the magnitude is an even y t function and H j 0 H j 0 the phase is an odd function we get A H j 0 e j H j 0 j 0t A H j 0 e j H j 0 j …


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 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?