Вы находитесь на странице: 1из 51

Practical Audio Experiments using the TMS320C5505 USB Stick

TMS320C5505 USB Stick


Teaching Materials
Texas Instruments University Programme
Teaching Materials

2010 Texas Instruments Inc

0-1

Introduction

2010 Texas Instruments Inc

Introduction - Slide 2

TMS320C5505 USB Stick


A very low-cost $49 student price
Microphone / line in and headphones out for
learning audio Digital Signal Processing (DSP)
Upgrade path to C5515 ($75) and DSKs ($400).

2010 Texas Instruments Inc

Introduction - Slide 3

About the TMS320C5505


The TMS320C5505 is a 16-bit fixed-point DSP
It has been optimised for low-power operation e.g.
for battery operated portable devices.

2010 Texas Instruments Inc

Introduction - Slide 4

Code Composer Studio (CCS)


Each TMS320C5505 USB Stick is provided with a CD
containing Code Composer Studio Integrated
Development Environment (IDE).

2010 Texas Instruments Inc

Introduction - Slide 5

Using CCS
With CCS you can:
Write programs
Download programs to the hardware
Run the programs on the hardware
Debug the programs.

2010 Texas Instruments Inc

Introduction - Slide 6

Teaching Materials

2010 Texas Instruments Inc

Introduction - Slide 7

Teaching Material
Consists of 20 hands-on audio applications
Focus is on practical experiments rather than pure
theory
Fully functioning high-level C code provided for each
application
Emphasis on real-time and low-power operation.

2010 Texas Instruments Inc

Introduction - Slide 8

Target Audience
This teaching material is aimed at beginners to DSP
It can be used either in class or for self-study
Some basic knowledge of C programming is
required
As the lessons progress, more knowledge of DSP is
required. It is therefore recommended that the
student reads some of the material given in the
reference sections.

2010 Texas Instruments Inc

Introduction - Slide 9

Other Equipment Required


Microphone or output from MP4 player
Headphones or computer speakers
A frequency meter or multi-meter is useful.

2010 Texas Instruments Inc

Introduction - Slide 10

Format of a Typical
Application

2010 Texas Instruments Inc

Introduction - Slide 11

Format of Each Application


Each of the 20 applications contain:
A Powerpoint presentation
A working C code example to run on the
TMS320C5505 USB Stick
A brief outline of a typical application now follows.

2010 Texas Instruments Inc

Introduction - Slide 12

Echo Step 1 - Description


Echo is audible because the
speed of sound is relatively
slow, about 400 meters per
second
Click on icon to listen to echo.

Sound Source

Direct
Sound
Echo

Listener
2010 Texas Instruments Inc

Introduction - Slide 13

Echo Step 2 - Block Diagram


Output = Input + Delayed Input
Simplified Echo
Input

Output

+
+
Delay

Gain
Delayed Input

Because of losses in the delayed path, Gain < 1.

2010 Texas Instruments Inc

Introduction - Slide 14

Echo Step 3 Derive Equation


Simplified Echo
x(n)

y(n)

+
+
z-N

G.x(n).z -N

y (n) x(n) Gx(n) z


x(n)(1 Gz
2010 Texas Instruments Inc

)
Introduction - Slide 15

Echo Step 4 - Matlab Model


The frequency response of echo can be calculated using the
following Matlab .m file.

2010 Texas Instruments Inc

Introduction - Slide 16

Echo Step 5 System Response

2010 Texas Instruments Inc

Introduction - Slide 17

Step 6 C Code
Full C code is provided for
each application
Uses the Texas Instruments
Code Support Library (CSL)
to simplify the design
process.

2010 Texas Instruments Inc

Introduction - Slide 18

Echo Step 7 Run code on USB Stick

USB to PC
Microphone
Headphones

2010 Texas Instruments Inc

Introduction - Slide 19

Echo Step 8 Experiments

How code can be improved and expanded on by the


student
Main points and critical issues e.g. echo is always
stable
How this simple principle can used in other more
complex DSP applications. Echo is an example of a
Finite Impulse Response (FIR) filter.

2010 Texas Instruments Inc

Introduction - Slide 20

Echo Step 9 - Questions


Self-test questions on key points
Answers are to be found in the presentation.

2010 Texas Instruments Inc

Introduction - Slide 21

Some Other Applications

2010 Texas Instruments Inc

Introduction - Slide 22

Reverberation

2010 Texas Instruments Inc

Introduction - Slide 23

Reverberation
Reverberation is similar to echo, but uses a slightly different configuration
Click on the icon to hear reverberation.

2010 Texas Instruments Inc

Introduction - Slide 24

Reverberation on Stage
Sound reaches the microphone from both the
performer and the the loudspeakers.

Loudspeaker

Loudspeaker
Performer

Microphone

2010 Texas Instruments Inc

Introduction - Slide 25

Reverberation Frequency Response

2010 Texas Instruments Inc

Introduction - Slide 26

Important Points about Reverberation


The output is derived from both the input and the previous output
Can become unstable (the poles lie on the unit circle)
Reverberation is an example of an Infinite Impulse Response (IIR) filter.

2010 Texas Instruments Inc

Introduction - Slide 27

Alien Voices

2010 Texas Instruments Inc

Introduction - Slide 28

Alien Voices
Multiply audio input by a sine wave. This is
known as ring modulation
Output contains sum and difference frequencies,
but not those you started with
To listen to ring modulation, click on the icon
below.

2010 Texas Instruments Inc

Introduction - Slide 29

Waveforms of Ring Modulation

2010 Texas Instruments Inc

Introduction - Slide 30

Dual Tone Multi Frequency


Generation (DTMF)

2010 Texas Instruments Inc

Introduction - Slide 31

Touch Pad Telephone


A standard touch pad phone generates the
following tones:

2010 Texas Instruments Inc

Introduction - Slide 32

Dual Tone Multi Frequency (DTMF)

Each tone in fact consists of pairs of defined


single tones
Every time a button is pressed, a dual tone is
generated.

2010 Texas Instruments Inc

Introduction - Slide 33

Goertzel Algorithm

2010 Texas Instruments Inc

Introduction - Slide 34

Piano Player with Perfect Pitch


If you sing a note, a musician with perfect pitch
can tell you exactly what note you sang you
sang the note B-flat.

2010 Texas Instruments Inc

Introduction - Slide 35

Goertzel Algorithm
The Goertzel Algorithm is the musician with
perfect pitch in DSP form
It listens to the DTMF tones from the touch
phone
Filters out pairs of individual tones
Determines which button was pressed.

2010 Texas Instruments Inc

Introduction - Slide 36

Guitar Effects

2010 Texas Instruments Inc

Introduction - Slide 37

Guitar Effects
Can play an electric guitar through the USB Stick.
Enhance the sound using:
Fuzz
Valve / Tube sound
Reverberation
Flanging / Phasing

2010 Texas Instruments Inc

Introduction - Slide 38

USB Stick Setup for Guitar


USB to PC

Headphones

2010 Texas Instruments Inc

Electric Guitar

Introduction - Slide 39

Adaptive Noise Reduction

2010 Texas Instruments Inc

Introduction - Slide 40

Adaptive Noise Reduction


Used in headphones for pilots to remove aircraft
noise
Based on Least Mean Squares (LMS) algorithm.

2010 Texas Instruments Inc

Introduction - Slide 41

Graphic Equaliser Analogy


An adaptive filter can be thought of as a selfadjusting graphic equaliser:

Input

Output

Automatic slider adjustment based on the error


2010 Texas Instruments Inc

Introduction - Slide 42

Effect of Noise Reduction

Input

Output

2010 Texas Instruments Inc

Introduction - Slide 43

Speech Compression

2010 Texas Instruments Inc

Introduction - Slide 44

Voice Recorder
Speak into the microphone and record the sound
Play back the sound can store up to 5 seconds
of speech
Implement another version, this time using some
form of speech compression algorithm e.g. G.711
Play back the sound this time can store up to
10 seconds of speech.

2010 Texas Instruments Inc

Introduction - Slide 45

Wavelets

2010 Texas Instruments Inc

Introduction - Slide 46

Wavelet Analysis
Analyse audio signal by breaking it down into
discrete packets known as wavelets.

Narrow Frequency Band


2010 Texas Instruments Inc

Wide Frequency Band


Introduction - Slide 47

Wavelet Decomposition - Example

2010 Texas Instruments Inc

Introduction - Slide 48

Summary

2010 Texas Instruments Inc

Introduction - Slide 49

Summary of Applications
Applications have been chosen to illustrate a
range of DSP techniques
Emphasis on hands-on rather than just theory
Working real-time C code supplied as a starting
point for laboratories.

2010 Texas Instruments Inc

Introduction - Slide 50

Next Steps
Find an application you like from those provided.
Load the project onto the TMS320C5505 USB Stick.
Run the project and experiment with it!

2010 Texas Instruments Inc

Introduction - Slide 51

Вам также может понравиться