SlideShare a Scribd company logo
CS 414 - Spring 2009
CS 414 – Multimedia Systems Design
Lecture 3 – Digital Audio
Representation
Klara Nahrstedt
Spring 2009
CS 414 - Spring 2009
Administrative
 Form Groups for MPs
Deadline January 26 to email TA
Key Questions
 How can a continuous wave form be
converted into discrete samples?
 How can discrete samples be converted
back into a continuous form?
CS 414 - Spring 2009
Characteristics of Sound
 Amplitude
 Wavelength (w)
 Frequency ( )
 Timbre
 Hearing: [20Hz – 20KHz]
 Speech: [200Hz – 8KHz]

Digital Representation of Audio
 Must convert wave
form to digital
 sample
 quantize
 compress
Sampling (in time)
 Measure amplitude at regular intervals
 How many times should we sample?
CS 414 - Spring 2009
Example
 Suppose we have a sound wave with a
frequency of 1 cycle per second
-1.5
-1
-0.5
0
0.5
1
1.5
CS 414 - Spring 2009
Example
 If we sample at one cycle per second,
where would the sample points fall?
-1.5
-1
-0.5
0
0.5
1
1.5
CS 414 - Spring 2009
Example
 If we sample at 1.5 cycles per second,
where will the sample points fall?
-1.5
-1
-0.5
0
0.5
1
1.5
CS 414 - Spring 2009
Sampling - Example
 If we sample at two cycles per second,
where do the sample points fall?
-1.5
-1
-0.5
0
0.5
1
1.5
CS 414 - Spring 2009
Nyquist Theorem
For lossless digitization, the sampling rate
should be at least twice the maximum
frequency response.
 In mathematical terms:
fs > 2*fm
 where fs is sampling frequency and fm is
the maximum frequency in the signal
CS 414 - Spring 2009
Nyquist Limit
 max data rate = 2 H log2V bits/second, where
H = bandwidth (in Hz)
V = discrete levels (bits per signal change)
 Shows the maximum number of bits that can be sent
per second on a noiseless channel with a bandwidth
of H, if V bits are sent per signal
 Example: what is the maximum data rate for a 3kHz
channel that transmits data using 2 levels (binary) ?
 (2x3,000xln2=6,000bits/second)
CS 414 - Spring 2009
Limited Sampling
 But what if one cannot sample fast
enough?
CS 414 - Spring 2009
Limited Sampling
 Reduce signal frequency to half of
maximum sampling frequency
low-pass filter removes higher-frequencies
e.g., if max sampling frequency is 22kHz,
must low-pass filter a signal down to 11kHz
CS 414 - Spring 2009
Sampling Ranges
 Auditory range 20Hz to 22.05 kHz
must sample up to to 44.1kHz
common examples are 8.000 kHz, 11.025
kHz, 16.000 kHz, 22.05 kHz, and 44.1 KHz
 Speech frequency [200 Hz, 8 kHz]
sample up to 16 kHz
but typically 4 kHz to 11 kHz is used
CS 414 - Spring 2009
CS 414 - Spring 2009
Quantization
-1.5
-1
-0.5
0
0.5
1
1.5
CS 414 - Spring 2009
Quantization
 Typically use
8 bits = 256 levels
16 bits = 65,536 levels
 How should the levels be distributed?
Linearly? (PCM)
Perceptually? (u-Law)
Differential? (DPCM)
Adaptively? (ADPCM)
CS 414 - Spring 2009
Pulse Code Modulation
 Pulse modulation
Use discrete time samples of analog signals
Transmission is composed of analog
information sent at different times
Variation of pulse amplitude or pulse timing
allowed to vary continuously over all values
 PCM
Analog signal is quantized into a number of
discrete levels
CS 414 - Spring 2009
PCM Quantization and Digitization
CS 414 - Spring 2009
Digitization
Quantization
Linear Quantization (PCM)
 Divide amplitude spectrum into N units (for
log2N bit quantization)
0
50
100
150
200
250
300
0 50 100 150 200 250 300
Sound Intensity
Quantization
Index
CS 414 - Spring 2009
Non-uniform Quantization
CS 414 - Spring 2009
Perceptual Quantization (u-Law)
 Want intensity values logarithmically
mapped over N quantization units
0
50
100
150
200
250
300
0 50 100 150 200 250 300
Sound Intensity
Quantization
Index
CS 414 - Spring 2009
Differential Pulse Code
Modulation (DPCM)
 What if we look at sample differences, not
the samples themselves?
dt = xt-xt-1
Differences tend to be smaller
 Use 4 bits instead of 12, maybe?
CS 414 - Spring 2009
Differential Quantization
(DPCM)
 Changes between adjacent samples small
 Send value, then relative changes
 value uses full bits, changes use fewer bits
 E.g., 220, 218, 221, 219, 220, 221, 222, 218,.. (all
values between 218 and 222)
 Difference sequence sent: 220, +2, -3, 2, -1, -1, 3, ..
 Result: originally for encoding sequence 0..255
numbers need 8 bits;
 Difference coding: need only 3 bits
CS 414 - Spring 2009
Adaptive Differential Pulse Code
Modulation (ADPCM)
 Adaptive similar to DPCM, but adjusts the width of the
quantization steps
 Encode difference in 4 bits, but vary the mapping of bits
to difference dynamically
 If rapid change, use large differences
 If slow change, use small differences
CS 414 - Spring 2009
Signal-to-Noise Ratio
CS 414 - Spring 2009
Signal To Noise Ratio
 Measures strength of signal to noise
SNR (in DB)=
 Given sound form with amplitude in [-A, A]
 Signal energy =
)
(
log
10 10
energy
Noise
energy
Signal
-1
-0.75
-0.5
-0.25
0
0.25
0.5
0.75
1
A
0
-A
2
2
A
CS 414 - Spring 2009
Quantization Error
 Difference between actual and sampled value
 amplitude between [-A, A]
 quantization levels = N
 e.g., if A = 1,
N = 8, = 1/4
N
A
2


-0.5
-0.25
0
0.25
0.5
0.75
1


CS 414 - Spring 2009
Compute Signal to Noise Ratio
 Signal energy = ; Noise energy = ;
 Noise energy =
 Signal to noise =
 Every bit increases SNR by ~ 6 decibels
12
2

N
A
2


2
2
3 N
A

2
3
log
10
2
N
2
2
A
CS 414 - Spring 2009
Example
 Consider a full load sinusoidal modulating signal of
amplitude A, which utilizes all the representation levels
provided
 The average signal power is P= A2/2
 The total range of quantizer is 2A because modulating
signal swings between –A and A. Therefore, if it is N=16
(4-bit quantizer), Δ = 2A/24 = A/8
 The quantization noise is Δ2/12 = A2/768
 The S/N ratio is (A2/2)/(A2/768) = 384; SNR (in dB) 25.8
dB
CS 414 - Spring 2009
Data Rates
 Data rate = sample rate * quantization * channel
 Compare rates for CD vs. mono audio
 8000 samples/second * 8 bits/sample * 1 channel
= 8 kBytes / second
 44,100 samples/second * 16 bits/sample *
2 channel = 176 kBytes / second ~= 10MB / minute
CS 414 - Spring 2009
Comparison and
Sampling/Coding Techniques
CS 414 - Spring 2009
Summary
CS 414 - Spring 2009

More Related Content

Similar to lect03-audio-representation.ppt

lecture-14-dcn.ppt
lecture-14-dcn.pptlecture-14-dcn.ppt
lecture-14-dcn.ppt
ThandekaMthupha1
 
Communication systems week 2
Communication systems week 2Communication systems week 2
Communication systems week 2babak danyal
 
Analog to Digital Converters
Analog to Digital ConvertersAnalog to Digital Converters
Analog to Digital Converters
Anas Smarty
 
TeleCom Lecture 07.ppt
TeleCom Lecture 07.pptTeleCom Lecture 07.ppt
TeleCom Lecture 07.ppt
RiyaBatool
 
Basic Communication systems overview.ppt
Basic Communication systems overview.pptBasic Communication systems overview.ppt
Basic Communication systems overview.ppt
ginanjaradi2
 
The application wavelet transform algorithm in testing adc effective number o...
The application wavelet transform algorithm in testing adc effective number o...The application wavelet transform algorithm in testing adc effective number o...
The application wavelet transform algorithm in testing adc effective number o...
ijcsit
 
Ch4 1 Data communication and networking by neha g. kurale
Ch4 1 Data communication and networking by neha g. kuraleCh4 1 Data communication and networking by neha g. kurale
Ch4 1 Data communication and networking by neha g. kurale
Neha Kurale
 
Ch1_Modulation.pdf
Ch1_Modulation.pdfCh1_Modulation.pdf
Ch1_Modulation.pdf
AnamikaParagPatel
 
Comm-system.ppt
Comm-system.pptComm-system.ppt
Comm-system.ppt
rajalakshmi769433
 
Comm-system.ppt
Comm-system.pptComm-system.ppt
Comm-system.ppt
PayagenAndres
 
Basic of Communication System, Dsescribe
Basic of Communication System, DsescribeBasic of Communication System, Dsescribe
Basic of Communication System, Dsescribe
idanantha1
 
ece477_7.ppt
ece477_7.pptece477_7.ppt
ece477_7.ppt
srividyaL1
 
Baud rate is the number of change in signal
Baud rate is the number of change in signalBaud rate is the number of change in signal
Baud rate is the number of change in signal
Abhishek Pathak
 
Baud rate is the number of change in signal
Baud rate is the number of change in signalBaud rate is the number of change in signal
Baud rate is the number of change in signal
Abhishek Pathak
 
Lecture7 encodingmodulation
Lecture7 encodingmodulationLecture7 encodingmodulation
Lecture7 encodingmodulationH K
 
The analog to digital conversion process
The analog to digital conversion processThe analog to digital conversion process
The analog to digital conversion process
DJNila
 
Data Encoding
Data EncodingData Encoding
Data EncodingLuka M G
 

Similar to lect03-audio-representation.ppt (20)

lecture-14-dcn.ppt
lecture-14-dcn.pptlecture-14-dcn.ppt
lecture-14-dcn.ppt
 
SAR_ADC__Resumo
SAR_ADC__ResumoSAR_ADC__Resumo
SAR_ADC__Resumo
 
Communication systems week 2
Communication systems week 2Communication systems week 2
Communication systems week 2
 
Analog to Digital Converters
Analog to Digital ConvertersAnalog to Digital Converters
Analog to Digital Converters
 
TeleCom Lecture 07.ppt
TeleCom Lecture 07.pptTeleCom Lecture 07.ppt
TeleCom Lecture 07.ppt
 
Basic Communication systems overview.ppt
Basic Communication systems overview.pptBasic Communication systems overview.ppt
Basic Communication systems overview.ppt
 
The application wavelet transform algorithm in testing adc effective number o...
The application wavelet transform algorithm in testing adc effective number o...The application wavelet transform algorithm in testing adc effective number o...
The application wavelet transform algorithm in testing adc effective number o...
 
Ch4 1 Data communication and networking by neha g. kurale
Ch4 1 Data communication and networking by neha g. kuraleCh4 1 Data communication and networking by neha g. kurale
Ch4 1 Data communication and networking by neha g. kurale
 
Channel impairments
Channel impairmentsChannel impairments
Channel impairments
 
Ch1_Modulation.pdf
Ch1_Modulation.pdfCh1_Modulation.pdf
Ch1_Modulation.pdf
 
Comm-system.ppt
Comm-system.pptComm-system.ppt
Comm-system.ppt
 
Comm-system.ppt
Comm-system.pptComm-system.ppt
Comm-system.ppt
 
Basic of Communication System, Dsescribe
Basic of Communication System, DsescribeBasic of Communication System, Dsescribe
Basic of Communication System, Dsescribe
 
ece477_7.ppt
ece477_7.pptece477_7.ppt
ece477_7.ppt
 
Baud rate is the number of change in signal
Baud rate is the number of change in signalBaud rate is the number of change in signal
Baud rate is the number of change in signal
 
Baud rate is the number of change in signal
Baud rate is the number of change in signalBaud rate is the number of change in signal
Baud rate is the number of change in signal
 
Lecture7 encodingmodulation
Lecture7 encodingmodulationLecture7 encodingmodulation
Lecture7 encodingmodulation
 
Ch 03
Ch 03Ch 03
Ch 03
 
The analog to digital conversion process
The analog to digital conversion processThe analog to digital conversion process
The analog to digital conversion process
 
Data Encoding
Data EncodingData Encoding
Data Encoding
 

Recently uploaded

ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
Kamal Acharya
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
Jayaprasanna4
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
ShahidSultan24
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
FluxPrime1
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Sreedhar Chowdam
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
Massimo Talia
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
VENKATESHvenky89705
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
AJAYKUMARPUND1
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
R&R Consult
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
Kamal Acharya
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
MuhammadTufail242431
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
MdTanvirMahtab2
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
obonagu
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
seandesed
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 

Recently uploaded (20)

ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
Courier management system project report.pdf
Courier management system project report.pdfCourier management system project report.pdf
Courier management system project report.pdf
 
ethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.pptethical hacking-mobile hacking methods.ppt
ethical hacking-mobile hacking methods.ppt
 
addressing modes in computer architecture
addressing modes  in computer architectureaddressing modes  in computer architecture
addressing modes in computer architecture
 
DESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docxDESIGN A COTTON SEED SEPARATION MACHINE.docx
DESIGN A COTTON SEED SEPARATION MACHINE.docx
 
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&BDesign and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
Design and Analysis of Algorithms-DP,Backtracking,Graphs,B&B
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024Nuclear Power Economics and Structuring 2024
Nuclear Power Economics and Structuring 2024
 
road safety engineering r s e unit 3.pdf
road safety engineering  r s e unit 3.pdfroad safety engineering  r s e unit 3.pdf
road safety engineering r s e unit 3.pdf
 
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
Pile Foundation by Venkatesh Taduvai (Sub Geotechnical Engineering II)-conver...
 
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptxCFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
CFD Simulation of By-pass Flow in a HRSG module by R&R Consult.pptx
 
Final project report on grocery store management system..pdf
Final project report on grocery store management system..pdfFinal project report on grocery store management system..pdf
Final project report on grocery store management system..pdf
 
Halogenation process of chemical process industries
Halogenation process of chemical process industriesHalogenation process of chemical process industries
Halogenation process of chemical process industries
 
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
Industrial Training at Shahjalal Fertilizer Company Limited (SFCL)
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
在线办理(ANU毕业证书)澳洲国立大学毕业证录取通知书一模一样
 
Architectural Portfolio Sean Lockwood
Architectural Portfolio Sean LockwoodArchitectural Portfolio Sean Lockwood
Architectural Portfolio Sean Lockwood
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 

lect03-audio-representation.ppt

  • 1. CS 414 - Spring 2009 CS 414 – Multimedia Systems Design Lecture 3 – Digital Audio Representation Klara Nahrstedt Spring 2009
  • 2. CS 414 - Spring 2009 Administrative  Form Groups for MPs Deadline January 26 to email TA
  • 3. Key Questions  How can a continuous wave form be converted into discrete samples?  How can discrete samples be converted back into a continuous form? CS 414 - Spring 2009
  • 4. Characteristics of Sound  Amplitude  Wavelength (w)  Frequency ( )  Timbre  Hearing: [20Hz – 20KHz]  Speech: [200Hz – 8KHz] 
  • 5. Digital Representation of Audio  Must convert wave form to digital  sample  quantize  compress
  • 6. Sampling (in time)  Measure amplitude at regular intervals  How many times should we sample? CS 414 - Spring 2009
  • 7. Example  Suppose we have a sound wave with a frequency of 1 cycle per second -1.5 -1 -0.5 0 0.5 1 1.5 CS 414 - Spring 2009
  • 8. Example  If we sample at one cycle per second, where would the sample points fall? -1.5 -1 -0.5 0 0.5 1 1.5 CS 414 - Spring 2009
  • 9. Example  If we sample at 1.5 cycles per second, where will the sample points fall? -1.5 -1 -0.5 0 0.5 1 1.5 CS 414 - Spring 2009
  • 10. Sampling - Example  If we sample at two cycles per second, where do the sample points fall? -1.5 -1 -0.5 0 0.5 1 1.5 CS 414 - Spring 2009
  • 11. Nyquist Theorem For lossless digitization, the sampling rate should be at least twice the maximum frequency response.  In mathematical terms: fs > 2*fm  where fs is sampling frequency and fm is the maximum frequency in the signal CS 414 - Spring 2009
  • 12. Nyquist Limit  max data rate = 2 H log2V bits/second, where H = bandwidth (in Hz) V = discrete levels (bits per signal change)  Shows the maximum number of bits that can be sent per second on a noiseless channel with a bandwidth of H, if V bits are sent per signal  Example: what is the maximum data rate for a 3kHz channel that transmits data using 2 levels (binary) ?  (2x3,000xln2=6,000bits/second) CS 414 - Spring 2009
  • 13. Limited Sampling  But what if one cannot sample fast enough? CS 414 - Spring 2009
  • 14. Limited Sampling  Reduce signal frequency to half of maximum sampling frequency low-pass filter removes higher-frequencies e.g., if max sampling frequency is 22kHz, must low-pass filter a signal down to 11kHz CS 414 - Spring 2009
  • 15. Sampling Ranges  Auditory range 20Hz to 22.05 kHz must sample up to to 44.1kHz common examples are 8.000 kHz, 11.025 kHz, 16.000 kHz, 22.05 kHz, and 44.1 KHz  Speech frequency [200 Hz, 8 kHz] sample up to 16 kHz but typically 4 kHz to 11 kHz is used CS 414 - Spring 2009
  • 16. CS 414 - Spring 2009
  • 18. Quantization  Typically use 8 bits = 256 levels 16 bits = 65,536 levels  How should the levels be distributed? Linearly? (PCM) Perceptually? (u-Law) Differential? (DPCM) Adaptively? (ADPCM) CS 414 - Spring 2009
  • 19. Pulse Code Modulation  Pulse modulation Use discrete time samples of analog signals Transmission is composed of analog information sent at different times Variation of pulse amplitude or pulse timing allowed to vary continuously over all values  PCM Analog signal is quantized into a number of discrete levels CS 414 - Spring 2009
  • 20. PCM Quantization and Digitization CS 414 - Spring 2009 Digitization Quantization
  • 21. Linear Quantization (PCM)  Divide amplitude spectrum into N units (for log2N bit quantization) 0 50 100 150 200 250 300 0 50 100 150 200 250 300 Sound Intensity Quantization Index CS 414 - Spring 2009
  • 23. Perceptual Quantization (u-Law)  Want intensity values logarithmically mapped over N quantization units 0 50 100 150 200 250 300 0 50 100 150 200 250 300 Sound Intensity Quantization Index CS 414 - Spring 2009
  • 24. Differential Pulse Code Modulation (DPCM)  What if we look at sample differences, not the samples themselves? dt = xt-xt-1 Differences tend to be smaller  Use 4 bits instead of 12, maybe? CS 414 - Spring 2009
  • 25. Differential Quantization (DPCM)  Changes between adjacent samples small  Send value, then relative changes  value uses full bits, changes use fewer bits  E.g., 220, 218, 221, 219, 220, 221, 222, 218,.. (all values between 218 and 222)  Difference sequence sent: 220, +2, -3, 2, -1, -1, 3, ..  Result: originally for encoding sequence 0..255 numbers need 8 bits;  Difference coding: need only 3 bits CS 414 - Spring 2009
  • 26. Adaptive Differential Pulse Code Modulation (ADPCM)  Adaptive similar to DPCM, but adjusts the width of the quantization steps  Encode difference in 4 bits, but vary the mapping of bits to difference dynamically  If rapid change, use large differences  If slow change, use small differences CS 414 - Spring 2009
  • 28. Signal To Noise Ratio  Measures strength of signal to noise SNR (in DB)=  Given sound form with amplitude in [-A, A]  Signal energy = ) ( log 10 10 energy Noise energy Signal -1 -0.75 -0.5 -0.25 0 0.25 0.5 0.75 1 A 0 -A 2 2 A CS 414 - Spring 2009
  • 29. Quantization Error  Difference between actual and sampled value  amplitude between [-A, A]  quantization levels = N  e.g., if A = 1, N = 8, = 1/4 N A 2   -0.5 -0.25 0 0.25 0.5 0.75 1   CS 414 - Spring 2009
  • 30. Compute Signal to Noise Ratio  Signal energy = ; Noise energy = ;  Noise energy =  Signal to noise =  Every bit increases SNR by ~ 6 decibels 12 2  N A 2   2 2 3 N A  2 3 log 10 2 N 2 2 A CS 414 - Spring 2009
  • 31. Example  Consider a full load sinusoidal modulating signal of amplitude A, which utilizes all the representation levels provided  The average signal power is P= A2/2  The total range of quantizer is 2A because modulating signal swings between –A and A. Therefore, if it is N=16 (4-bit quantizer), Δ = 2A/24 = A/8  The quantization noise is Δ2/12 = A2/768  The S/N ratio is (A2/2)/(A2/768) = 384; SNR (in dB) 25.8 dB CS 414 - Spring 2009
  • 32. Data Rates  Data rate = sample rate * quantization * channel  Compare rates for CD vs. mono audio  8000 samples/second * 8 bits/sample * 1 channel = 8 kBytes / second  44,100 samples/second * 16 bits/sample * 2 channel = 176 kBytes / second ~= 10MB / minute CS 414 - Spring 2009
  • 34. Summary CS 414 - Spring 2009