0% found this document useful (0 votes)
90 views4 pages

Title:: Abdullah FA16-BCE-132

1) The document describes an experiment using a DSP kit to analyze the effects of aliasing and quantization noise on real-time audio signals. 2) The experiment involves configuring an AIC23 codec through CCS to sample audio signals at different rates, then measuring the effects of downsampling and reducing the quantization bit depth on the signals. 3) The objectives are to assemble the experiment using real-time audio on a DSK 6713 board, learn how the codec samples and converts analog signals, and observe the effects of aliasing and quantization noise.

Uploaded by

Abdullah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
90 views4 pages

Title:: Abdullah FA16-BCE-132

1) The document describes an experiment using a DSP kit to analyze the effects of aliasing and quantization noise on real-time audio signals. 2) The experiment involves configuring an AIC23 codec through CCS to sample audio signals at different rates, then measuring the effects of downsampling and reducing the quantization bit depth on the signals. 3) The objectives are to assemble the experiment using real-time audio on a DSK 6713 board, learn how the codec samples and converts analog signals, and observe the effects of aliasing and quantization noise.

Uploaded by

Abdullah
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

ABDULLAH

FA16-BCE-132

LAB 9

Title:
To assemble the experiment of Sampling and Quantization of real time Audio Signals on DSP Kit
TMS320C6713; analyze the effect of Aliasing and Quantization Noise

Objective:
 To assemble the experiment of sampling theorem using real time audio signal on DSK 6713
 To measure the effect of quantization using real time audio signal on DSK 6713

Methodology:
In prelab task, AIC23 codec is configured (through CCS) to operate at one of the above
sampling rates fs. Each collected sample is converted to a 16-bit two’s complement integer (a short data
type in C). The codec actually samples the audio input in stereo, that is, it collects two samples for the left
and right channels. At each sampling instant, the codec combines the two 16-bit left/right samples into a
single 32-bit unsigned integer word and ships it over to a 32-bit receive register of the multichannel
buffered serial port (McBSP) of the C6713 processor. The ADC part of the codec is implemented as a
multi-bit third-order noise-shaping delta-sigma converter that allows a variety of oversampling ratios that
can realize the above choices of fs. The corresponding oversampling decimation filters act as anti-aliasing
pre filters that limit the spectrum of the input analog signals effectively to the Nyquist interval
[−fs/2,fs/2].
In lab task1, we implemented the kit on the computer and then learned about the AI23
codec is configure through the CCS to operate at one of the above sampling rate. Each collected sample is
converted to a 16-bit twos compliment integer. It actually samples the audio after that ADC is used in this
kit, which is implemented as a multi bit third order noise shaping delta sigma converter that allows a
variety of oversampling ratios that can realize the above choice.

In lab task2, Copy the template files into your temporary working directory, edit the
project’s directory as describe above, and build the project in CCS. Connect your MP3 player to the line
input of the DSK board and play your favorite song, or, you may play one of the wave files in the
directory:c:\dsplab\wav. Review the template project’s build options using the menu commands:Project
-> Build Options. In particular, review the Basic, Advanced, and Preprocessor options for the Compiler,
and note that the optimization level was set to none. In future experiments, this may be changed to -o2or-
o3. For the Linker options, review the Basic and Advanced settings. In particular, note that the default
output name (a.out) can be changed to anything else. The run-time library must always be included. The
board support library (BSL) contains functions for managing the DSK board peripherals, such as the
codec.
The chip support library (CSL) has functions for managing the DSP chip’s features, such as
reading and writing data to the chip’s McBSP. The user manuals for these may be found on the TI web
site listed on the lab’s web page. c. The gain parameter ‘g’ can be controlled in real-time in two ways:
using a watch window, or using a Quick Watch and enter the variable ‘g’ and add it to the opened watch
window using the item (Add) to Watch. Run the program and click on the g variable in the watch window
and enter a new value, such Close the watch window and open the GEL file, template. gel, with the menu
File -> Load GEL. In the GEL menu of CCS a new item called “gain” has appeared. Choose it to open the
gain slider. Run the program and move the slider to different positions.
Actually, the slider does not represent the gain g itself, but rather the integer increment steps.
The gain g changes by 1/10 at each step. Open the GEL file to see how it is structured. You may use that
as a template for other cases. e. Modify the template program so that the output pans between the left and
right speakers every 2 seconds, i.e., the left speaker plays for 2 sec, and then switches to the right speaker
for another 2 sec, and so on. There are many ways of doing this, for example, you may replace your ISR
function by

In lab task3, Copy the template programs to your working directory. Set the sampling rate to
8 kHz and select line input. Modify the template program to output every other sample, with zero values
in-between. This can be accomplished in different ways, but a simple one is to define a “sampling pulse”
periodic signal whose values alternate between 1 and 0, i.e., the sequence[1,0,1,0,1,0,... ] and multiply the
input samples by that sequence. Rebuild the new program with CCS. Open MATLAB and generate three
sinusoids of frequencies (f1=1 kHz, f2=3 kHz, f3=1 kHz) each of duration of one second, and concatenate
them to form a 3-second signal.
Then play this out of the PCs sound card using the sound() function. Connect the sound
card’s audio output to the line-input of the DSK and rebuild/run the CCS down sampling program. This
disables the down sampling operation. Send the above-concatenated sinusoids to the DSK input. You
should hear three distinct 1-sec segments, with the middle one having a higher frequency. Next,
uncomment the above line so that down sampling takes place and rebuild/run the program. Send the
concatenated sinusoids to the DSK and you should hear all three segments as though they have the same
frequency.
You may also play your favorite song to hear the aliasing distortions, e.g., out of tune vocals.
Set the codec sampling rate to 44 kHz and repeat the previous two steps. To confirm the antialiasing pre-
filtering action of the codec, replace the first two lines of the above Now, the middle sinusoid has
frequency of 5 kHz and it should be cutoff by the antialiasing pre-filter. Set the sampling rate to 8 kHz,
turn off the down sampling operation, rebuild and run your program, and send this signal through the
DSK.
In task4, modify the basic template program so that the output samples are re quantized to B
bits, where 1≤
B≤16. This requires right/left shifting by L=16−Bbits, and can be implemented very simply in C as
follows:
yL = (xL >> L) << L;
yR = (xR >> L) << L;
Start with B=16, set the sampling rate to 8 kHz, and rebuild/run the program. Send a wave file as input
and listen to the output. Repeat with the following values like B=8, 6, 4, 2, 1, and listen to the gradual
increase in the quantization noise.

Conclusion:
In this lab, we learn to connect the Kit to the computer and then used the audio ports that
were used to give input to the board and to the computer where the song was played and realized the
effect on the Software on the computer. Learned about the Tc and t/Tc during each sample instant. We
will become familiar with the effect of Sampling, Quantization and with Aliasing.

You might also like