Sampling Terminology f 0 is the fundamental frequency (Hz) of the signal –Speech: f 0 = vocal cord vibration frequency (>=80Hz) –Speech signals contain.

Slides:



Advertisements
Similar presentations
EET260: A/D and D/A conversion
Advertisements

Digital Signal Processing
Digital Coding of Analog Signal Prepared By: Amit Degada Teaching Assistant Electronics Engineering Department, Sardar Vallabhbhai National Institute of.
Analogue to Digital Conversion (PCM and DM)
Motivation Application driven -- VoD, Information on Demand (WWW), education, telemedicine, videoconference, videophone Storage capacity Large capacity.
LSU 06/04/2007Electronics 71 Analog to Digital Converters Electronics Unit – Lecture 7 Representing a continuously varying physical quantity by a sequence.
TRANSMISSION FUNDAMENTALS Review
Sampling and quantization Seminary 2. Problem 2.1 Typical errors in reconstruction: Leaking and aliasing We have a transmission system with f s =8 kHz.
Interfacing Analog and Digital Circuits
Quantization Prof. Siripong Potisuk.
Introduction to Data Conversion
M68K Assembly Language Programming Bob Britton Chapter 12 IEEE Floating Point Notice: Chapter slides in this series originally provided by B.Britton. This.
William Stallings Data and Computer Communications 7th Edition (Selected slides used for lectures at Bina Nusantara University) Data, Signal.
Floating Point Numbers
Data Acquisition. Data Acquisition System Analog Signal Signal Conditioner ADC Digital Processing Communication.
Fundamentals of Digital Audio. The Central Problem n Waves in nature, including sound waves, are continuous: Between any two points on the curve, no matter.
Digital Audio Multimedia Systems (Module 1 Lesson 1)
Computer Science 101 Introduction to Programming with Sounds.
Random Processes and LSI Systems What happedns when a random signal is processed by an LSI system? This is illustrated below, where x(n) and y(n) are random.
Digital audio. In digital audio, the purpose of binary numbers is to express the values of samples that represent analog sound. (contrasted to MIDI binary.
LE 460 L Acoustics and Experimental Phonetics L-13
Computer Science 121 Scientific Computing Winter 2014 Chapter 13 Sounds and Signals.
Ni.com Data Analysis: Time and Frequency Domain. ni.com Typical Data Acquisition System.
DSP Techniques for Software Radio DSP Front End Processing Dr. Jamil Ahmad.
DIGITAL VOICE NETWORKS ECE 421E Tuesday, October 02, 2012.
Lab #8 Follow-Up: Sounds and Signals* * Figures from Kaplan, D. (2003) Introduction to Scientific Computation and Programming CLI Engineering.
Digital Audio Watermarking: Properties, characteristics of audio signals, and measuring the performance of a watermarking system نيما خادمي کلانتري
Lecture 1 Signals in the Time and Frequency Domains
(2.1) Fundamentals  Terms for magnitudes – logarithms and logarithmic graphs  Digital representations – Binary numbers – Text – Analog information 
Simple Data Type Representation and conversion of numbers
Computer Arithmetic Nizamettin AYDIN
CSC361/661 Digital Media Spring 2002
ACOE2551 Microprocessors Data Converters Analog to Digital Converters (ADC) –Convert an analog quantity (voltage, current) into a digital code Digital.
Media Representations - Audio
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI 230 Information Representation: Negative and Floating Point.
Fixed-Point Arithmetics: Part II
Data Representation and Computer Arithmetic
Digital Signal Processing
Fixed and Floating Point Numbers Lesson 3 Ioan Despi.
CSC 221 Computer Organization and Assembly Language
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI CSCI N305 Information Representation: Floating Point Representation.
1 Introduction to Information Technology LECTURE 6 AUDIO AS INFORMATION IT 101 – Section 3 Spring, 2005.
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 3 – Digital Audio Representation Klara Nahrstedt Spring 2009.
Binary Arithmetic.
CS Spring 2014 CS 414 – Multimedia Systems Design Lecture 3 – Digital Audio Representation Klara Nahrstedt Spring 2014.
COMPANDING - is the process of compressing and then expanding
DEPARTMENTT OF ECE TECHNICAL QUIZ-1 AY Sub Code/Name: EC6502/Principles of digital Signal Processing Topic: Unit 1 & Unit 3 Sem/year: V/III.
1 What is Multimedia? Multimedia can have a many definitions Multimedia means that computer information can be represented through media types: – Text.
ECE 101 An Introduction to Information Technology Analog to Digital Conversion.
Digital Audio I. Acknowledgement Some part of this lecture note has been taken from multimedia course made by Asst.Prof.Dr. William Bares and from Paul.
Fundamentals of Multimedia Chapter 6 Basics of Digital Audio Ze-Nian Li and Mark S. Drew 건국대학교 인터넷미디어공학부 임 창 훈.
ESO 208A/ESO 218 LECTURE 2 JULY 31, ERRORS MODELING OUTPUTS QUANTIFICATION TRUE VALUE APPROXIMATE VALUE.
Lecture 6: Floating Point Number Representation Information Representation: Floating Point Number Representation Lecture # 7.
Introduction to Data Conversion EE174 – SJSU Tan Nguyen.
ΨΗΦΙΑΚΟΣ ΕΛΕΓΧΟΣ (22Δ802) Β΄ ΕΞΑΜΗΝΟ Καθηγητής Πέτρος Π. Γρουμπός  Ώρες Γραφείου: Τετάρτη Πέμπτη Παρασκευή 11:00- 12:00 Γραφείο: 1.
Digital Signal Processing
بسم الله الرحمن الرحيم Digital Signal Processing Lecture 2 Analog to Digital Conversion University of Khartoum Department of Electrical and Electronic.
Lifecycle from Sound to Digital to Sound. Characteristics of Sound Amplitude Wavelength (w) Frequency ( ) Timbre Hearing: [20Hz – 20KHz] Speech: [200Hz.
Fourier Analysis Patrice Koehl Department of Biological Sciences National University of Singapore
MATH Lesson 2 Binary arithmetic.
Data analysis and modeling: the tools of the trade
COMPUTER NETWORKS and INTERNETS
Analog to digital conversion
Multimedia Systems and Applications
Chapter 3 Sampling.
Sampling rate conversion by a rational factor
4.2 Digital Transmission Pulse Modulation (Part 2.1)
Chapter 3: PCM Noise and Companding
COMS 161 Introduction to Computing
Presentation transcript:

Sampling Terminology f 0 is the fundamental frequency (Hz) of the signal –Speech: f 0 = vocal cord vibration frequency (>=80Hz) –Speech signals contain harmonics of 5 KHz or less –The upper limit of human hearing is about 22 KHz f s = sampling frequency in measurements per second t s is the sampling period (t s = 1/f s ) x[n] x n = amplitude of the n th signal measurement (sample) X[f] or X f = amplitude of the f th frequency component (bin) X(f) or x(n) = continuous signal frequency and time domains

Quantization Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, 2011.

Measurements Terminology –We normally measure continuous signals at discrete times –Quantization (bits) converts measurements to numeric values –Sample rate (samples per second) = time between measurements Measurement error (| measured value - true value| ) –Precision: quality of a single measurement Half of the least significant digit Random noise eliminated by averaging many measurements –Accuracy: quality of the result Repeat experiment and average the results Ex: Sample the ocean floor 1000 times to determine the depth. Poor accuracy indicates poor repeatability or bad calibration

Quantization Errors Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, 2011.

Quantization errors effect on frequency domain Time domain quantization errors Frequency domain

Analog-to-digital Converters (A-D) The A-D Conversion process –Converts a stream of varying air pressure into voltages –The A-D converter samples the voltage at regular intervals –Convert each sample to an integer of a fixed bit size Insufficient Quantization (Not enough quantization bits) –Different perceived sounds convert to the same value Limits of quantization (Signal-to-noise ratio (SNR)) –If SNR is small, the lower bits simply measure noise Quantization types –Linear: output varies linearly with input –Non-linear: logarithmic conversion from input to output Quantize continuous signals to streams of discrete integers

Linear Encoding Example: Values has an 8 bit resolution. –Measurement range: -64 to 63 decibels –Voltage resolution: (2 7 -0)/2 8 = ½ decibel The output values relates linearly to the input values Decibels  Amplitude 

Non-linear Encoding Algorithms Uses (ex: telephony – voice over distance) –Use limited bandwidth channels –Convert from 12 or 16 -> 8 bits –Logarithmic representation Formulae –Mu-law algorithm (North America, Japan) μ = 255, x normalized between [-1,1] -1<=x<=1; y=ln(1+μx) / ln(1+μ) –A-LAW algorithm (Europe, world wide) A = 87.6, x normalized between [-1,1] IF |x|<=1/A; y=Ax/(1+ln A) IF 1/A<=|x|<=1; y=(1+lnAx)/(1+lnA) Humans hear sounds up to 120db with a sensitivity of about 1db Therefore 8 bit samples should be sufficient

Fixed Point Representation Advantages –Very fast add, multiply, and subtract operation –Shift operations for extremely fast power of two operations Disadvantages –Division operations convert to use floating point circuitry –Cannot represent very large or very small numbers –Represents a fixed range of numbers –Loss of precision during division –Scaling between precisions is very cumbersome Example –Scale values 0 to 10.5 using 64 bit integers –The value zero maps to zero. –The value 10.5 maps to –The resolution is 10.5 / 2 65 The decimal point is at a fixed position

Floating Point Representation Represents numbers in scientific notation –Decimal: = * 10 2 –Hexadecimal: 89a.bcd = 8.9abcd * 16 2 –Contains an exponent and a base (mantissa) Advantages –A sliding window of precision –Represents an extremely large range of numbers Disadvantages –Add, multiply, and subtract operations are slower –Shift operations cannot be used –Holes in the number line A sliding decimal point according to the size of the number

Floating Point Formats Exa mple: Convert to 32 bit floating point 1.Convert to binary: 329 -> ( ) Fractional portion: * 2 = > * 2 = > * 2 = > * 2 = > * 2 = 0.5 -> * 2 = 1 -> 1 (no fraction left, so we are done) 2.Convert to binary scientific notation: * Add the exponent to the bias: = 135 ( ) 4.Answer: Special Values –Zero: Exponent = Fraction = 0 –± Infinity: sign * (Exponent all 1s, faction = 0) –NaN: Exponent all 1s and fraction ≠ 0 SignExponentFractionBias Single1[31]8[23->30]23[0-22]127 Double1[63]11[52-62]52[0-51]1023

Recommendations for Human Speech Processing Computers are not as good as the human ear Most humans cannot hear frequencies above 20 kHz. Human Hearing Sensitivity –Most speech is encoded in frequencies < 8kHZ –Maximum sensitivity is approximately 22kHZ –Hearing loss occurs at the high end of the range –We are more sensitive to frequencies at the low end of the range –Sensitivity follows a logarithmic curve Quantization –Linear: Bits per sample >=12 –Non-linear: Bits per sample = 8 Common audio CD formats: 44.1, 22.05, and kHz

Aliasing When does this occur? – Frequencies (f >N ) present that are above Nyquist Frequency(f N ) – If f ∆ = f >N – f N, then f N +f ∆ is indistinguishable from f N -f ∆. What do we do about it? – Place an anti-aliasing filter to eliminate high frequencies – This CANNOT be done in software Example of aliasing - Take a picture of sun every 23 hours 24 x 23 = 552 hours between sunrises Sun appears to move from west to east Different frequencies become indistinguishable

Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, 2011.

7khz appears as 1khz 4khz appears as -2khz, or 2khz out of phase

Aliasing and Filtering Alias is out of phase in this example

Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, 2011.

Low Pass Filtered Signal Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, 2011.

Nyquist Theorem Nyquist Frequency (f N ) = highest detectible frequency Sampling Frequency (f s ) = samples per time period Maximum Signal Frequency of Interest (f max ) Theorem: f N = 2 * f max ; f s >= f N Inadequate Sampling Adequate Sampling How many cycles per second do we need?

Sampling formulae 0 th sample: x 0 = sin(2 πf X 0t s ) 1 st sample: x 1 = sin(2 πf x 1t s ) … n th sample: x n = sin(2 πf x nt s ) Note: Sinewave of (f x +kf s ) Hz aliases sinewaves of f 0 Hz sin( 2 πf x nt s ) = sin( 2 πf x nt s + 2 πm) ; where m is any positive or negative integer = sin( 2 πf x nt s + 2 πm(nt s )/(nt s )) ; multiply 2 nd term by one = sin( 2 πnt s (f x +m/(nt s )) ; we factor 2 πnt s from both terms = sin( 2 πnt s (f x +k/t s ) ; Let k = m/n ratio = sin( 2 πnt s (f x +kf s ) ; because f s = 1/t s A sinusoid cycle from 0 to is equivalent to 2 π radians Note: f x is some frequency less than the sampling rate f s

Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, Using Carrier Frequencies Goal: Choose optimal f s > 2B

Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, 2011.

Choosing Sampling Frequencies Goal: Bring band of frequency between –f s and + f s Solution: Pick largest m such that f s >= 2*B Choosing f s that maintains the spectral direction m f s = 2 (f c – B/2) f s = (2 f c – B)/m Example: If f c =20000, B = 5 m=1,2,3,4 Then f s =35,17.5,11.25, 8.75 Choosing fs that reverses the spectral direction (m+1) f s = 2 (f c + B/2) f s = (2f c + B)/(m+1) Example: If f c =20000, B = 5 m=1,2,3 Then f s =22.5,15,7.5 Restore spectral direction x[n] = (-1) n * x[n]

Understanding Digital Signal Processing, Third Edition, Richard Lyons ( ) © Pearson Education, 2011.

SNR Degradation