DOC PREVIEW
Rose-Hulman ECE 300 - Basic Signal Spectra

This preview shows page 1 out of 4 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 4 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 2007 Basic Signal Spectra Lab 7 by Bruce A. Ferguson Edited by Mario Simoni W06-07 Shortened by Robert Throne for S07 Objectives • To review various tools for estimating and measuring the power spectrum of a periodic signal. • To introduce the FFT as a discrete-time method for estimating the spectrum of a signal, whether or not the signal is periodic • To review Matlab script and plotting functions Equipment Agilent 4402B Spectrum Analyzer Agilent Function Generator Background In the previous lab, we learned to view the Fourier Series representation of a signal in the frequency domain using a spectrum analyzer. We called this display of signal power vs frequency the power spectrum of the signal. In this lab, we will review several of these tools to confirm our understanding of what a signal spectrum tells us about a signal. The FFT, or Fast Fourier Transform, is an estimate of the signal spectrum computed using an algorithm based on the concept of the Fourier Series. Technically, the FFT is not the same as the Fourier Transform. Often, however, we accept the fft output as a display of the signal’s true spectrum, although care must be taken that the fft algorithm is set up properly and that it displays results in the units we expect. Since those details will be covered in ECE 380, we will focus today on the use of the fft as a means of displaying the signal spectrum, and not worry so much about the finer points of its calculation and interpretation. Recall that the “power spectrum” of a periodic signal was found by creating a two-sided spectrum with the “height” of each spectral component equal to the square of the corresponding ak. A one-sided spectrum was then created by displaying only DC and positive frequencies, and doubling the power of each positive frequency component (i.e. 2|ak|2). The same can be done using the FFT of a signal. We will be focusing on one-sided spectra throughout this lab. There is no Prelab for this Lab Page 1 of 4ECE 300 Signals and Systems Spring 2007 Procedure Visualizing Signal Spectra 1. Use the file Complex_Fourier_Series.m to calculate the Fourier series coefficients for the triangle waveform shown in the figure below. This waveform can be described by the following equation over one period, which is 10μs.: , 0, 1, 2, , 11kak=±± ±… 56 656 6( ) (1.25 10 )( 4 10 )[ ( ) ( 8 10 )] (5 10 )( 9 10 )[ ( 8 10 ) ( 1 10 )]xt t ut ut t ut ut−− −−=× −× −−× −× −× −×−−×5−0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5x 10-5-0.5-0.4-0.3-0.2-0.100.10.20.30.40.5Waveform from the Function Generatortime (s)V Calculate the values of the one-sided power spectrum for this signal in dBmV for these harmonics. Plot the magnitude of the one-sided power spectrum with the x-axis in harmonics and the y-axis in units of dBmV. Print out your plot and turn it in with the lab. 2. Using one of the function generators, produce the signal x(t). Display this signal on the oscilloscope to verify that the signal has proper amplitude, offset, and frequency. Some of the properties of this triangle waveform that will help you setup the function generator are: • Rising for 80% of the period (NOTE: this is an asymmetrical triangle wave) • Peak-peak amplitude of 1V • Frequency is 100kHz 3. Display the signal spectrum for the signal x(t) on the spectrum analyzer. (HINT: You might have to change something on the function generator after measuring it on the oscilloscope to make the signal going into the Spectrum Analyzer be the same as x(t) above. ( Use your procedure write up from last week’s lab to help you out.) Print the one-sided power spectrum from the display of the Spectrum Analyzer, once you are sure it is correct. Page 2 of 4ECE 300 Signals and Systems Spring 2007 Using the MATLAB FFT Tools to View Signal Spectra 4. Copy the file triWav.txt (located on the class website) to your directory. Write a Matlab script to load the data file into Matlab using the load command, then use the provided MATLAB function baf_fft.m (located on the class website) to compute the FFT of x(t), which is essentially the Fourier Transform of x(t). We are mostly concerned with the magnitude spectrum here, not the phase spectrum. The “dt” argument for baf_fft.m corresponding to the given triangle wave is 2.5x10-7 . View the comment lines in the m-file to understand the correct usage of the function. Be sure to label your axes on the graph. Print out the two-sided magnitude spectrum of X(ω). 5. Add to your MATLAB script so it also displays (in a different figure) a one-sided power spectrum given the magnitude of the two-sided spectrum calculated by the baf_fft.m function. The values of the terms should be expressed in dBmV. Use the axis command to limit the output to the frequency range from 0 to frq/2 Hz, and from 0 to 50 dBmV. Because Matlab will have difficulty taking the logarithm of a negative number, you may need the following bit of code before you take the logarithm, which essentially sets all magnitude values less than tol to 1e-8. tol = 1e-8; XX = Xmag < tol; X = Xmag.*(~XX)+XX*tol; Compare these results to the power spectrum that was calculated from the Fourier Coefficients. Be sure to label your axes on the graph. Print out this estimate of the signal power spectrum. Print out your script. Page 3 of 4ECE 300 Signals and Systems Spring 2007 Lab 07 Instructor Verification Sheet Names___________________________Date:___________ You should have attached to this the following plots/screen captures: • The single sided power spectrum of the Fourier Coefficients from Matlab (part 1) • The single sided power spectrum from the Spectrum Analyzer (part 3) • The two-sided magnitude spectrum and the single-sided power spectrum from the FFT from Matlab (parts 4 and 5) • Your Matlab script file Table I: Estiamted and Measured Power in Fourier Series Coefficients Harmonic Estimated Power (in dBmV) Measured Power (in dBmV) Error (dBmV) Frequency (kHz) 1 2 3 4 5 6 7 8 9 10 11 Page 4 of


View Full Document

Rose-Hulman ECE 300 - Basic Signal Spectra

Documents in this Course
Exam 2

Exam 2

8 pages

Load more
Download Basic Signal Spectra
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 Basic Signal Spectra 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 Basic Signal Spectra 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?