sonia hingorany & liza cyriac ee113d – professor rajeev jain & ta rick huang– winter 2008

Download Sonia Hingorany & Liza Cyriac EE113D – Professor Rajeev Jain & TA Rick Huang– Winter 2008

If you can't read please download the document

Upload: richard-matthews

Post on 14-Dec-2015

218 views

Category:

Documents


2 download

TRANSCRIPT

  • Slide 1

Sonia Hingorany & Liza Cyriac EE113D Professor Rajeev Jain & TA Rick Huang Winter 2008 Slide 2 Hes Brought Sexy Back With Sound Distortion. In todays music industry, many songs contain distorted tunes and melodies. Popular songs such as Sexy Back by Justin Timberlake & Technologic by Daft Punk are examples. Slide 3 What Does This Have To Do With EE113D? Weve learned how to apply different filters to digital signals and map them in Experiments 1 & 2. Using a song as our input source, we wanted to apply these filters and play back the distorted song. Initial Dilemmas- We know how to filter them, but how do we distort them? Slide 4 Theoretical Algorithm 1.We first applied a Low Pass Filter to filter out audio frequencies above the Piano Frequency Range of 27.5- 4186 Hz along, which includes the Human Voice Frequency Range of 300-3400 Hz. 2.We then ran that output into an Amplitude Modulation block where we convolved the signal to a sinusoidal wave to generate a distorted signal. 3.Lastly we ran our AM output through another Low Pass Filter in order to filter out any added noise that was produced in the AM block that ran above the piano range in order to preserve our ears! Slide 5 What did we use? Texas Instruments TMS320C542 Chip Assembly Code Mp3 player, Speakers & Audio-Audio Cables Oscilloscope & Function Generator MATLAB Slide 6 MATLAB Coding In order to make sure our idea was feasible, we created a MATLAB program modeling our idea. Using Filter Design and Analysis Tool in MATLAB, we created our Low Pass filter Fpass= 4500 Hz =.583pi Fstop= 4800 Hz =.622pi Apass= 1 db Astop= 20 db Example Sound: Undistorted: Distorted: Slide 7 Fast Fourier Transforms A FFT is of great importance in digital signal processing for quick multiplication of large integers. Each of the following figures shows 7 plots: 1. FFT of the original signal 2. FFT of first low pass filter 3. FFT of the first low pass filter applied to original signal 4. FFT of amplitude modulator 5. FFT of amplitude modulator applied to original signal after it has gone through the first low pass filter 6. FFT of second low pass filter 7. FFT of final distorted output Slide 8 Input: Sine Wave VS Sound File Sine WaveSound Clip Slide 9 Assembly Coding Due to Assembly coding parameters, we applied circular addressing and the application of filter taps in order to implement the usage of Low Pass Filters and Amplitude Modulation. Low Pass Filter Design was something we had done previously in Experiment 2, however Amplitude Modulation was something we had to learn. Slide 10 Low Pass Filter Design Using the Low Pass Filter we designed in MATLAB, we exported the filter coefficients to create an Assembly lookup table with a total of 45 taps. Ex: L0.word -683 L1.word -711 L2.word 956 L3.word -678 L4.word -28 L5.word 412 L6.word -43 L45.word -683 We have a total number of 45 taps because when we created our LPF in MATLAB, the order number was 45. Slide 11 Filter Taps & Circular Addressing Filter Taps These values are essentially what were mapping our signal to. We have a certain number of taps according to the order of the filter designed. In our case, # taps=45 Circular Addressing We use the % sign as a modifier When the pointer reaches the end of the taps, circular addressing code tells us to repeat the instructions starting at the beginning. Slide 12 Whoops! When we first created our Low Pass filter, we made one of 186 order, so it had 186 taps. We tried our first filter we werent receiving an output that sounded anything like our song. So we tested our filter and saw that it responded like a Comb Filter. This was a big mistake that we went back and fixed our Low Pass Filter with an order of 45. Slide 13 Assembly In order to verify that our Low Pass Filter worked, we ran a frequency sweep from 200- 7000 Hz ( 200Hz) and generated a normalized plot. It works! Slide 14 Assembly Using the same idea as in Experiment 2, we took the digitized sound file, and ran it through the Low Pass Filter of 45 taps, at a sampling frequency (Fs) of 15432 Hz. In our ACInit File, we set our A & B Registers both to 18, or 112h and 212h respectively. Slide 15 Assembly Amplitude Modulation- Convolving the original signal by the carrier signal. In the AM Demo files provided to us, it convolved the file with a sine wave generated using the difference equation, however because we had generated a sine wave file using circular addressing of a lookup table of length 4 in Experiment 1, we decided to use that instead. Lookup Table.word 0,16384,0,-16384 ;;; AModulation ;;;.sect "data1" length.set 4 ; length of table (will be used ; in circular addressing) ;; A = #0 AR2 = #OUTPUT1 a = *AR2*(*AR3) ;multiply our Output1 from LPF1 ;with SineWav B = *AR3+% ;circular addressing so it ;continues multiplying. Our carrier frequency Fc, is equal to Fs/N. Slide 16 Assembly Second Low Pass Filter- We ran our AM signal through another Low Pass Filter with the same constraints in order to filter out any extra high frequency noise. We did this because when played into the speaker, we dont want to hear ALL noise. Output Amplitude - A = @OUTPUT