all about analog and digital signals

Upload: sni-sethi

Post on 04-Apr-2018

226 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/30/2019 All About Analog and Digital Signals

    1/18

  • 7/30/2019 All About Analog and Digital Signals

    2/18

    Analog Signals

    Sound is naturally an analog signal.

    An analog signal is continuous, meaning that there

    are no breaks or interruptions. One moment flowsinto the next.

    If you were to hum a descending note, people hearingyou would be able to detect the change in pitch, but

    not point to specific moments when the pitch jumpedfrom one note to the next.

  • 7/30/2019 All About Analog and Digital Signals

    3/18

    Digital Signals Digital signals are not continuous.

    They use specific values to represent information. In

    the case of sound, that means representing a soundwave as a series of values that represent pitch andvolume over the length of the recording

  • 7/30/2019 All About Analog and Digital Signals

    4/18

    Some History

    Phonograph :

    Thomas Edison is credited with

    creating the first device for recording and playing backsounds in 1877. His approach used a very simplemechanism to store an analog wave mechanically.

    In Edison's original phonograph, a diaphragm directlycontrolled a needle, and the needle scratched an analogsignal onto a tinfoil cylinder.

    http://electronics.howstuffworks.com/analog-digital1.htm

    http://electronics.howstuffworks.com/analog-digital1.htmhttp://electronics.howstuffworks.com/analog-digital1.htmhttp://electronics.howstuffworks.com/analog-digital1.htmhttp://electronics.howstuffworks.com/analog-digital1.htm
  • 7/30/2019 All About Analog and Digital Signals

    5/18

    For Recording :

    You spoke into Edison's device while rotating thecylinder, and the needle "recorded" what you said ontothe tin. That is, as the diaphragm vibrated, so did theneedle, and those vibrations impressed themselves ontothe tin.

    For playing:

    To play the sound back, the needle moved over thegroove scratched during recording. During playback, the

    vibrations pressed into the tin caused the needle tovibrate, causing the diaphragm to vibrate and play the

    sound.

  • 7/30/2019 All About Analog and Digital Signals

    6/18

    This is an analog wave representingthe vibrations created by your voice.For example, here is a graph showingthe analog wave created by saying the

    word "hello.

    The storage and playback of an analog wave can be very simple --scratching onto tin is certainly a direct and straightforward approach.The problem with the simple approach is that the fidelityis not verygood. For example, when you use Edison's phonograph, there is a lot of

    scratchy noise stored with the intended signal, and the signal isdistorted in several different ways.Also, if you play a phonograph repeatedly, eventually it will wear out --

    when the needle passes over the groove it changes it slightly (andeventually erases it).

  • 7/30/2019 All About Analog and Digital Signals

    7/18

    DIGITAL DATA

    In a CD (and any other digital recording technology),the goal is to create a recording with veryhighfidelity(very high similarity between the originalsignal and the reproduced signal) and perfect

    reproduction (the recording sounds the same everysingle time you play it no matter how many times youplay it).

    To accomplish these two goals, digital recording

    converts the analog wave into a stream of numbers andrecords the numbers instead of the wave. Theconversion is done by a device called an analog-to-digital converter (ADC).

  • 7/30/2019 All About Analog and Digital Signals

    8/18

    To play back the music, the stream of numbers isconverted back to an analog wave by a digital-to-analog converter (DAC).

    The analog wave produced by the DACis amplified and fed to the speakers to produce thesound.

    The analog wave produced by the DAC will be thesame every time, as long as the numbers are notcorrupted.

    The analog wave produced by the DAC will also be very

    similar to the original analog wave if the analog-to-digital converter sampled at a high rate and producedaccurate numbers.

  • 7/30/2019 All About Analog and Digital Signals

    9/18

    SAMPLING ANALOG WAVE USING ADC

    When you sample the wave with an analog-to-digitalconverter, you have control over two variables:

    The sampling rate - Controls how many samples aretaken per second

    The sampling precision - Controls how many differentgradations (quantization levels) are possible whentaking the sample

  • 7/30/2019 All About Analog and Digital Signals

    10/18

    In the following figure, let'sassume that the sampling rate is

    1,000 per second and theprecision is 10:The green rectangles representsamples.

    Every one-thousandth of asecond, the ADC looks at the

    wave and picks the closestnumber between 0 and 9.

    The number chosen is shownalong the bottom of the figure. These numbers are a digital

    representation of the originalwave.

  • 7/30/2019 All About Analog and Digital Signals

    11/18

    When the DAC recreates the wave from these numbers, you getthe blue line shown in the above figure:You can see that the blue line lost quite a bit of the detail

    originally found in the red line, and that means the fidelity ofthe reproduced wave is not very good. This is the samplingerror.You reduce sampling error by increasing both the samplingrate and the precision.

  • 7/30/2019 All About Analog and Digital Signals

    12/18

    In the following figure, both the rate and the

    precision have been improved by a factor of 2 (20gradations at a rate of 2,000 samples per second):

  • 7/30/2019 All About Analog and Digital Signals

    13/18

    In the following figure, the rate and the precision have beendoubled again (40 gradations at 4,000 samples per second):

  • 7/30/2019 All About Analog and Digital Signals

    14/18

    ConclusionYou can see that as the rate and precision increase, the

    fidelity (the similarity between the original wave andthe DAC's output) improves.

    In the case of CD sound, fidelity is an important goal,so the sampling rate is 44,100 samples per second andthe number of gradations is 65,536.

    At this level, the output of the DAC so closely matchesthe original waveform that the sound is essentially"perfect" to most human ears.

  • 7/30/2019 All About Analog and Digital Signals

    15/18

    A vinyl record is an analog recording, and CD and DVDs are digitalrecordings. Take a look at the graph below.

    Original sound is analog by definition. A digital recording takessnapshots of the analog signal at a certain rate (for CDs it is 44,100times per second) and measures each snapshot with a certain accuracy(for CDs it is 16-bit, which means the value must be one of 65,536possible values).

  • 7/30/2019 All About Analog and Digital Signals

    16/18

    This means that, by definition, a digital recording isnot capturing the complete sound wave. It isapproximating it with a series of steps. Some sounds

    that have very quick transitions, such as a drum beat ora trumpet's tone, will be distorted because they changetoo quickly for the sample rate.

    In your home stereo the CD or DVD player takes thisdigital recording and converts it to an analog signal,which is fed to your amplifier. The amplifier thenraises the voltage of the signal to a level powerfulenough to drive your speaker.

    A vinyl record has a groove carved into it that mirrors

    the original sound's waveform. This means that noinformation is lost. The output of a record player isanalog. It can be fed directly to your amplifier with noconversion.

  • 7/30/2019 All About Analog and Digital Signals

    17/18

    This means that the waveforms from a vinyl recording canbe much more accurate, and that can be heard in therichness of the sound.

    But there is a downside, any specks of dust or damage tothe disc can be heard as noise or static.

    During quiet spots in songs this noise may be heard overthe music.

    Digital recordings don't degrade over time, and if the

    digital recording contains silence, then there will be nonoise. From the graph above you can see that CD quality audio

    does not do a very good job of replicating the originalsignal. The main ways to improve the quality of a digital

    recording are to increase the sampling rate and to increasethe accuracy of the sampling. The recording industry has a new standard for DVD audio

    discs that will greatly improve the sound quality.

  • 7/30/2019 All About Analog and Digital Signals

    18/18

    The table below lists the sampling rate and the accuracy for CDrecordings, and the maximum sampling rate and accuracy for DVDrecordings. DVDs can hold 74 minutes of music at their highest quality

    level. CDs can also hold 74 minutes of music. By lowering either thesampling rate or the accuracy, DVDs can hold more music. For instancea DVD can hold almost 7 hours of CD quality audio.

    CD AudioDVD Audio

    Sampling Rate 44.1 kHz 192 kHz

    Samples persecond

    44,100 192,000

    SamplingAccuracy 16-bit 24-bit

    Number ofPossible OutputLevels

    65,536 16,777,216