Audio Sampling - PowerPoint PPT Presentation

1 / 54
About This Presentation
Title:

Audio Sampling

Description:

Chapter 3 of optional text has excellent material that complements the ... Plug and chug: fs = 2 x 440 Hz = 880 Hz. Take your telephone used for voice, mostly ... – PowerPoint PPT presentation

Number of Views:26
Avg rating:3.0/5.0
Slides: 55
Provided by: McMor6
Category:
Tags: audio | chug | sampling

less

Transcript and Presenter's Notes

Title: Audio Sampling


1
Audio Sampling
  • Read Chapter 11 in text book!
  • Chapter 3 of optional text has excellent material
    that complements the required text
  • Chapter 10 of text provides some additional
    information you may find useful (In other words,
    read the chapter)
  • We will cover in some detail exactly how
    continuously variable (analog) signals become
    digital (discrete) binary code

2
Background
  • Audio signal (sound) reflects the motion of air
    particles in space
  • Microphone converts this motion of air particles
    into an electrical signal
  • Audio signals have frequency components that are
    complex
  • In other words, most audio signals are made up of
    many different frequencies, combining to make the
    sound we recognize (I just saved you from Fourier)

3
Audio Signal
  • Audio signals have certain characteristics that
    are well known
  • Human voice varies from about 100 Hz to 4000 Hz
  • Piano Concert A above Middle C is 440 Hz
  • Hertz (Hz) means cycles per second
  • Sound varies in a manner similar to a Sine Wave
  • Concert A varies 440 times per second
  • My voice sounds different than a pianoWhy?

4
Characteristics of Signals
5
Signal with Twice of Frequency
6
Audio Signal Components
Concert A on a vibraphone
The different frequency components which are
added together to produce a complex waveform are
called the frequency spectrum of that waveform.
Every sound wave is the sum of simple pure tones.
7
Voice Signal Components
8
Highest Frequency Requirement
  • Fortunately, we do not need to know the specific
    frequency content of a signal to digitize it.
  • We only need to know the highest frequency signal
    in a sample.

9
More information
  • Bandwidth
  • Is often represented by the highest frequency
    signal in a sample. But in common usage is used
    to describe the data rate a channel supports
  • Can be thought of as the range of frequencies
    some transmission medium (air, water, cable,
    fiber optics) can support
  • Concert A has a bandwidth of 440 Hz
  • A human voice has a varying bandwidthbut we said
    that we well know that the average humans
    highest frequency component is 3000 Hz
    (3kHz)What is the bandwidth?

10
Two Step Process To Digitizing Audio
  • Continuous function of time
  • Infinite amount of information
  • Must choose particular instants of time

STEP 1
STEP 2
Continuous Audio Signal
Quantized into a Series of Binary Digits
Made Discrete In Time
11
Periods Signal and Sampling
  • Take the 440 Hz Concert Ahow long is one cycle?
  • Ts 1/fs ? Ts 1/440 Hz 0.00227 sec
  • Also fs 1/Ts ? fs 1/ 0.00227 sec 440 Hz
  • In English The Time period of one cycle is
    equal to the inverse of the frequency of the
    signal in Hz
  • Problem now is that the Concert A is a
    continuously variable signal, and we want to
    digitize it
  • How often should we sample the signal?

12
Nyquist
  • Harry Nyquist, working at Bell Labs (youve heard
    that before, havent you?) developed what has
    become known as the Nyquist Sampling Theorem
  • In order to be perfectly represented by its
    samples, a signal must be sampled at a sampling
    rate equal to at least twice its highest
    frequency component
  • fs 2f
  • Also represented as
  • fs 2B Hz where B is bandlimited to a
    highest
  • frequency
  • Note that fs here is frequency of sampling, not
    the frequency of the sample

13
For Example
  • Take Concert A 440 Hz
  • What would be the minimum sampling rate needed to
    accurately capture this signal?
  • Plug and chug fs 2 x 440 Hz 880 Hz
  • Take your telephone ? used for voice, mostly
  • Highest voice component is 3000 Hz
  • Minimum sampling rate fs 2 x 3000 Hz
    6000 Hz
  • Bell Labs built in some slop ? real telephone
    digitization is done at 8000 Hz sampling rate
    (supporting a 4 kHz bandwidth). Why? Remember
    that Nyquist said equal to at least twice

14
Example Speech Waveform
15
Nyquists Revenge
  • If you oversample (exceed the Nyquist rate), we
    create more bits to store and to transmit than is
    necessary to accurately send the signal to the
    distant end
  • But, moderate oversampling can work to our
    advantage, making the system more robust and
    easier to implement ? Thats why Bell Labs
    decided to sample at 8 kHz vice 6 kHz

16
Nyquists Revenge, Cont
  • If you undersample (sample at less than the
    Nyquist rate), you run the danger of aliasing
  • Aliasing is when the signal you decode is not the
    signal you encoded
  • Aliasing then, is bad!

17
UndersamplingA Very Bad Thing
Thanks to http//euphoria.org/home/help/nyquist.h
tml
18
Quantization
  • Read Chapters 12 and 14 in text book!
  • Chapter 3 of optional text has excellent material
    that complements the required text
  • Chapter 10 of text provides some additional
    information you may find useful (In other words,
    read the chapter)
  • We will cover in some detail exactly how
    continuously variable (analog) signals become
    digital (discrete) binary code

19
Quantization
  • Audio Signals Continuous in time and amplitude
  • Digitization of Audio Signals Must be made
    discrete in time and amplitude
  • Weve learned how to make Continuous signals
    discrete in Time Sampling (Dont forget about
    Nyquist!)
  • To make Continuous signals discrete in Amplitude,
    we Quantize

Step 1 Sampling
Step 2 Quantization
The two step digitization process
20
What is Quantization?
  • Quantization establishes a range of values of the
    continuous function that we say can be
    represented by a particular binary code
  • Looking at it another way We round things off
  • For example We can say that the continuous
    temperature range 40.0 to 40.1 degrees F can be
    represented by one binary code (lets just say
    0110010000)--The temperature obviously can vary
    over 40.0 to 40.1 (temp might actually be
    40.00987 degrees), but we say that measuring to
    within a tenth of a degree is OK

21
Picking the Code
  • We have a trade-off to make (recurring theme)
  • Number of bits we want to use versus precision of
    digitization (What does that mean?)
  • Go back to when you were Thermometer Engineers
    We want to measure -40º F to 140º F (over 180º F)
  • We decided to implement an 8 bit code at first
  • If we use all the bits, what degree of precision
    do we achieve?

22
Precision of Quantization
  • 8 bit code can represent 256 codewords
  • Our thermometer can measure to
  • (Range of Measurement)/Number of Codewords
  • Or 180º F/256 Codewords 0.703º F per codeword
  • The text on p. 174 uses an example of sampling a
    voltage that ranges from -10V to 10V
  • The range measured is over 20V, encoded with 4
    bits
  • Or 20V/16 Codewords 1.25V per codeword
  • For the text example, lets look at the
    Quantization Codetable

23
A Time Quantized Audio Waveform
24
Problems with Quantization
  • Some information is lost
  • Error is introduced (Noise is introduced)
  • Codetable on p. 174 uses the Range Center as the
    value of quantization to minimize both effects
    (Noise and Error)

25
Problems with Quantization Cont.
  • Difference between the actual value of signal and
    the quantized value is the Quantization Error
  • In book example Say actual voltage value when
    sampled (a point in time) is 8.5V
  • Error is 8.5V - 8.125V 0.375V
  • Another example Actual voltage is 7.75V
  • Error is 7.75V - 8.125V -0.375V

26
Quantizing and Re-Constructing the Signal
  • Analog-to-Digital Converter (ADC) provides the
    sampled and quantized binary code
  • Digital-to-Analog Converter (DAC) converts the
    quantized binary code back into an approximation
    of the analog signal by clocking the code to the
    same sample rate as the ADC conversion
  • Quantize and Reconstruct the analog signal
    Example on the next couple of slides

27
Quantizing
28
Reconstructing
29
Another Example
30
Data Rate, Decibels, Signal-to-Noise Ratio,
Channel Capacity (Shannons Law)
  • You really should read the sections of Chapter 8
    of the optional textbook
  • Nyquist is only part of the equation when you are
    developing a digital transmission system
  • Nyquist tells you how often you should sample,
    but not how much information a channel (a medium
    through which data moves) can support

31
Little Background on Data Rate
  • There is a difference between signal rate and
    data rate
  • The unit of measure for signal rate is baud
  • The unit of measure for data rate is bits per
    second
  • The difference? A signal rate is equal to the
    number of signal events in a period of time.
  • One bit per signal event--baud rate and bit rate
    are the same!
  • More than one bit per signal event--bit rate
    exceeds baud rate!
  • Dont believe me? Lets go to the next two charts

32
One Bit per Signal Event
Amplitude (V)
1 -- V1
Why arent the vertical lines vertical?
How many signal events here and here?
0 -- V0
time
One signal event--one bit sent per signal event
33
Signal Events with More than One Bit
Amplitude (V)
111 -- V7
110 -- V6
101 -- V5
100 -- V4
011 -- V3
010 -- V2
001 -- V1
000 -- V0
time
One signal event--three bits sent per signal event
34
Channel Noise and Decoding
Little noise decoding with M8 More noise
results in error The same amount of noise but
decoding with M2
35
Relating Baud to Data Rate
  • The signal transmission rate (baud rate) can be
    related to the data rate
  • We have to know the baud rate (signals per
    second)
  • We have to know how many bits are being sent per
    signal event, then know how many symbols this
    number of bits can take on (optional text refers
    to this as M-ary transmission--more in the
    modulation lecture)
  • We have to know how to take log2 of a value
  • log2 x log10 x/log10 2
  • We have to know D R log2 M bps
  • Where D is data rate, R is baud rate and M is
    number of symbols per signal event

36
For Example
  • A system signals at 1 baud, 1 bit per signal
    event (2 symbols per event)
  • D R log2 M bps --gt D 1 log2 2 bps 1
    bps
  • A system signals at 75 baud, 8 bits per signal
    event (256 symbols per event)
  • D R log2 M bps --gt D 75 log2 256 bps
    600 bps
  • A system signals at 4000 baud, 8 bits per signal
    event (256 symbols per event)
  • D R log2 M bps --gt D 4000 log2 256 bps
    32000 bps

37
Decibels
  • Whats a decibel?
  • In electronics and communications, the decibel
    (abbreviated as dB) is a logarithmic expression
    of the ratio between two signal power, voltage,
    or current levels. In acoustics, the decibel is
    used as an absolute indicator of sound power per
    unit area. A decibel is one-tenth of a Bel, a
    seldom-used unit named for Alexander Graham Bell,
    inventor of the telephone (What is)
  • Power (unit of measurement watts (W))
  • dB 10 log P2/P1
  • Voltage or Amperage
  • dB 20 log V2/V1
  • dB 20 log A2/A1

Important! Note that dB are log base 10, not base
2!
38
For Example
  • You want to express in dB the power relationship
    between your stereo and the TV (roommate fight)
  • Stereo has 200W of power, TV has 50W of power
  • dBW 10 log 200/50 6.02 dBW
  • Stereo wins this battle
  • Note the other way-- Roomies TV has 50W, Stereo
    200W
  • dBW 10 log 50/200 -6.02 dBW
  • Roomies TV loses the battle

39
Signal-to-Noise Ratio
  • S/N is normally measured in dB, as a relationship
    between the signal you want versus the noise that
    you dont but is in the medium (to include your
    radioheat causes noiseever notice that your
    radio warms up when it is on?)
  • It can be thought of as a fractional relationship
    (that is, before you take the log of it)
  • 1000W of power v. 20W of noise is either
  • 50 (unitless!)
  • or about 17 dBW gt 10 log 1000/20 16.9897
    dBW

40
Shannons Law(Shannons Limit for Information
Capacity)
  • Claude Shannon at Bell Labs (where else?) figured
    out how much information a channel could
    theoretically carry
  • I B log2 (1 S/N)
  • Where I is Information Capacity in bps
  • B is bandwidth in Hz
  • S/N is Signal-to-Noise ratio (unitlessdont make
    into dB)

Note we are back to log base 2!
41
Shannon in Action
  • You have a telephone system with a 3 kHz
    bandwidth and a S/N ratio of 1000 (very good
    indeed!)
  • I B log2 (1 S/N) --gt I 3000 Hz log2 (1
    1000) I 3000 Hz log2 1001 --gt 29902 bps
    (29.9 kbps)
  • You have a telephone system with a 3 kHz
    bandwidth and a S/N ratio of 10 (very bad!)
  • I B log2 (1 S/N) --gt I 3000 log2 (1 10)
    I 3000 log2 (11) --gt 10378 bps
    (10.4 kbps)

42
Shannons Law Caveats
  • In order to achieve the theoretical Shannon
    limit, the transmission system is not binary, it
    is some form of M-ary (i.e. more than one bit is
    sent per signal event)
  • You see that in order to increase capacity, you
    must either increase the bandwidth of the channel
    or increase the S/N ratio (make the signal
    stronger or reduce the noise on the channel)

43
Modulation
  • Re-read Section 14.7 of the text
  • Modulation is process of impressing a
    low-frequency information signal onto a higher
    frequency carrier signal
  • Modulation is done to bring information signals
    up to the Radio Frequency (or higher) signal
  • Some systems even have two stage modulation,
    where the information is brought up to an
    Intermediate Frequency (IF), and then increased
    to the transmission frequency

44
Some Definitions
  • Baseband Signal is a term used to describe the
    unmodulated signalor in other words, the
    information signal
  • Carrier Signal is what the information signal is
    combined with to form the new modulated
    signalthe frequency of the carrier is described
    as the center frequency of the signal

45
Types of Analog or Traditional Modulation
  • Amplitude Modulation (AM)
  • Information signal is added and subtracted to and
    from a carrier signal
  • Frequency Modulation (FM)
  • Information signal varies a constant amplitude
    carrier signals frequency directly in proportion
    to the informations frequency
  • Phase Modulation (PM)
  • Information signal varies a constant amplitude
    carrier signals phase directly in proportion to
    the informations frequency
  • Both FM and PM are forms of Angle Modulation

46
Amplitude Modulation
Carrier
Baseband
Modulated
47
AM Continued
  • Note that my diagram is highly out of scale
  • Carrier Signal is centered on one frequency, and
    has a bandwidth (like 1000 kHz, 5 kHz)
  • Baseband Signal varies from 0 -- some value Hz
    (human voice 0 -- 4 kHz)
  • AM naturally has two sidebands, but only one
    sideband is needed to get back all the
    information
  • Two bands? 1000 kHz 3 kHz 997 kHz and 1003
    kHz
  • Figure 14.14 shows this in another way

48
AM Modulation and AM Channels
49
Frequency Modulation
50
FM Continued
  • Same scale issues on diagram
  • FM is constant amplitude--another way of thinking
    about it FM always has the same bandwidth
  • FM signal varies around the maximum and minimum
    deviations of the baseband signal
  • Modulated signal is more compressed around the
    maximum deviationmore spread out around the
    minimum deviation
  • In other words, the variance of the frequency of
    the constant amplitude carrier is directly
    proportional to the amplitude of the modulating
    signal at a rate equal to the frequency of the
    modulating signal

51
FM Modulation and FM Channels
52
Phase Modulation
  • It differs from FM in the time domain, given the
    same baseband and carrier signals, but is
    otherwise identical
  • Will see it next

53
Summary
Lets compare them
54
Frequency Shift Key
  • Similar to FM
  • A low frequency for a time means 0
  • A high frequency for a time means 1
  • Derived from TTY days Shift and Mark

0 1 0 1
0 0 1 1
Write a Comment
User Comments (0)
About PowerShow.com