DOC PREVIEW
Columbia CSEE 4840 - Number One Real Time Spectrum Analyzer MAX

This preview shows page 1-2-3-4-24-25-26-50-51-52-53 out of 53 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 53 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 53 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 53 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 53 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 53 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 53 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 53 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 53 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 53 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 53 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 53 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 53 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Nortsam NumberOneRealTimeSpectrumAnalyzerMAX Joshua Mackler([email protected]) Tecuan Flores([email protected]) Philip Coakley([email protected]) 1Table of Contents 1. Project Overview 3 2. Project Design 3 2.1. The Hopeful 3 2.2. The Actual 4 3. Design Components 6 3.1. Hardware Block Diagram 6 3.2. Hardware Description 7 3.3. Software Description 9 4. Benchmarks 10 5. Work Distribution 11 5.1. Joshua Mackler 11 5.2. Tecuan Flores 11 5.3. Philip Coakley 11 6. Future Advice 11 7. VHDL Code 12 7.1. NORTSAM Coprocessor 12 7.2. AK4565 Audio Codec Interface 23 8. C Code 32 8.1. main.c 32 8.2. isr.c 35 8.3. fft.c 36 8.4. graphics.c 39 8.5. coeff2048.c 44 9. Other Files 50 9.1. system.mhs 50 21. Project Overview The purpose of this project was to create a 31-band Audio Spectrum Analyzer. A real time audio spectrum analyzer (sometimes called an RTA) is an invaluable tool for any audiophile. The ability to visualize the relative amplitude of discrete frequency ranges affords an objective measure by which to fine-tune a hi-fi audio system. Audio Spectrum Analyzers are also very common in commercial applications for the visualization of audio signals. Nortsam uses the SpartanIIE FPGA on the XSB-300E Board with the on-board audio and video peripherals. The on-board audio input accepts an external analog stereo line-level signal through the 1/8” mini jack. The signal undergoes Analog-to-Digital conversion with the assistance of the on-board AK4565 (audio codec). A Fast Fourier Transform is applied in order to appropriately isolate independent ranges in the frequency domain. The results of the FFT are pipelined into a graphics visualization function and then sent to the video hardware to produce a proper visualization. The end result is a dynamic VGA bar graph style display. The FPGA itself is used to implement the computations of the stereo FFT, and video frame buffer hardware. The display output consists of 31 discrete bands, each ranging 1/3 octave. Each band corresponds to a third octave segment on the range from 20 Hz to 20 KHz. 2. Project Design 2.1. The Hopeful To achieve our goal, a suitable design plan was constructed. In our original Project Proposal, audio signal from the audio source is fed to the stereo-in port, where it is processed by the audio codec. Once processed, the sampled audio data is buffered by the FPGA and sent to the Fast Fourier Transform (FFT) for further processing. In the meantime, a second buffer is filling with new audio data to be processed by the FFT upon completion of the previous data. The determination on how to process the audio required much background research. First, a simple Fast Fourier Transform (FFT) with 32 bins was thought to be sufficient. Unfortunately, since our desired bands are based on an exponential scale (the 1/3 octave scale), and FFT precision needs to be higher in order for the lower frequencies to be distinctive, it turned out that many more FFT bins would be needed. The implications are, even if a moderately large FFT were used, of size 512, each component of the FFT result (FFT bins), of which there are 256 due to mirroring in the frequency domain, would correspond to roughly 100 Hz, causing the first 7 frequency bands to be calculated from a single FFT result bin. Conversely, the final band would have about 40 bins associated with its’ range. To solve this problem, a staged approach was decided upon. Instead of calculating all the bands in one FFT, band segments could be calculated separately. It is known that the audio codec samples at the rate of 48 kHz. If a FFT of size 256 is used, the bottom 128 bins would be related to the positive frequency range of 0 to 24 kHz, or half the sampling rate. Knowing the center frequency for each of the bands, it was found that the accuracy of the FFT would only be suitable for approximately the top 312 bands. At the thirteenth band, less than one bin separates each band from the previous, resulting in increasing inaccuracy. This would be the cutoff point where a new FFT would begin, which contains only the nineteenth (1.25kHz band, thirteenth from top) band and below. To reach the second FFT, two signal processing steps are needed. First, to avoid the effects of the higher frequencies, the samples would have to be filtered. The new sampling rate needs to be at least twice as high as the highest frequency sampled (Nyquist Sampling rate) to avoid aliasing. This would cause the frequency range of the new FFT to be from only 0 to 3 kHz. A second order Infinite Impulse Response Filter was designed for this purpose. Secondly, the samples would have to be downsampled, or decimated, after the filter to achieve the 3 kHz range. This translates into a 16x down-sample of the incoming samples at 48 kHz. For a 256 bin FFT, 4096 samples would be needed. The range from 0 to 3 kHz only gives suitable accuracy down until about the 125 Hz center frequency, at about 12 Hz per bin. Although this leaves the 8 lower bands still inaccurate, any additional down-sampling would increase the number of samples needed to unacceptable limits. For example, to have more than one bin separating 20 Hz from 25 Hz, 128x downsample is needed, which mean 32768 samples are needed. At this rate it would take close to a second for there to be enough data to even begin calculating the audio spectrum. Once all the necessary bins are calculated, a suitable average will be made for each band according to the appropriate bins, and the results will be displayed on the screen. For the display, previous lab setups will help in achieving the correct timing to display images. 2.2. The Actual As can be found in many cases, the boundary between the theoretical and the attainable can be difficult to cross. Many design choices gave way to more practical and attainable goals. Our preliminary design was composed largely of hardware blocks which would do the majority of the signal processing, leaving the software end solely for the visualization aspects. Our design plan quickly changed when we realized the magnitude and complexity of work needed in such an elaborate hardware design. As an alternative, we chose to perform the majority of the control aspects in signal processing with the Microblaze processor, using hardware only for the most computationally expensive tasks. The software approach yielded to a much simpler interface with the SRAM, so those design


View Full Document

Columbia CSEE 4840 - Number One Real Time Spectrum Analyzer MAX

Documents in this Course
SPYCAM

SPYCAM

91 pages

PAC-XON

PAC-XON

105 pages

lab 1

lab 1

6 pages

memory

memory

3 pages

Structure

Structure

12 pages

Video

Video

3 pages

pacman

pacman

4 pages

Lab 1

Lab 1

6 pages

Scorched

Scorched

64 pages

lab 1

lab 1

3 pages

Video

Video

22 pages

Memory

Memory

23 pages

DVoiceR

DVoiceR

29 pages

MAZE

MAZE

56 pages

PAC XON

PAC XON

13 pages

PACXON

PACXON

13 pages

MP3 Player

MP3 Player

133 pages

Load more
Download Number One Real Time Spectrum Analyzer MAX
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 Number One Real Time Spectrum Analyzer MAX 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 Number One Real Time Spectrum Analyzer MAX 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?