0% found this document useful (0 votes)
334 views13 pages

Pulse Code PCM

Pulse code modulation (PCM) is a technique for digitizing analog signals by sampling and quantizing the signal to discrete values. PCM samples an analog signal regularly at intervals, assigning each sample one of several possible digital values. The sampling rate and number of possible values determine fidelity. PCM is used widely in digital audio and telephone systems, encoding audio signals into streams of binary data for storage or transmission.

Uploaded by

umerisahfaq
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
334 views13 pages

Pulse Code PCM

Pulse code modulation (PCM) is a technique for digitizing analog signals by sampling and quantizing the signal to discrete values. PCM samples an analog signal regularly at intervals, assigning each sample one of several possible digital values. The sampling rate and number of possible values determine fidelity. PCM is used widely in digital audio and telephone systems, encoding audio signals into streams of binary data for storage or transmission.

Uploaded by

umerisahfaq
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 13

pulse code modulation

Last modified: Tuesday, April 08, 2008 

Short for pulse  code modulation, a sampling technique for digitizing analog signals,


especially audio signals. PCM samples the signal 8000 times a second; each sample is
represented by 8 bits for a total of 64 Kbps. There are two standards for coding the sample
level. The Mu-Law standard is used in North America and Japan while the A-Lawstandard
is use in most other countries.

PCM is used with T-1 and T-3 carrier systems. These carrier systems combine the PCM
signals from many lines and transmit them over a single cable or other medium.

PCM is also the usual digital method used for music audio playback of music CDs. While
supported by DVDs, DVDs have a greater volume so they use Linear PCM, which has a
higher sampling rate — up to 24-bit at a sampling rate of 96 kHz.

"PCM" redirects here. For other uses, see  PCM (disambiguation).

Pulse-code modulation (PCM) is a method used to digitally represent sampled analog signals, which was invented

by Alec Reeves in 1937. It is the standard form for digital audio in computers and various Compact

Disc and DVD formats, as well as other uses such as digital telephone systems. A PCM stream is a digital

representation of an analog signal, in where the magnitude of the analogue signal is sampled regularly at uniform

intervals, with each sample being quantized to the nearest value within a range of digital steps.

PCM streams have two basic properties that determine their fidelity to the original analog signal: the sampling rate,

which is the number of times per second that samples are taken; and the bit-depth, which determines the number of

possible digital values that each sample can take.

[edit]Modulation

Sampling and quantization of a signal (red) for 4-bit PCM


In the diagram, a sine wave (red curve) is sampled and quantized for pulse code modulation. The sine wave is

sampled at regular intervals, shown as ticks on the x-axis. For each sample, one of the available values (ticks on the

y-axis) is chosen by some algorithm (in this case, the floor function is used). This produces a fully discrete

representation of the input signal (shaded area) that can be easily encoded as digital data for storage or

manipulation. For the sine wave example at right, we can verify that the quantized values at the sampling moments

are 7, 9, 11, 12, 13, 14, 14, 15, 15, 15, 14, etc. Encoding these values as binary numbers would result in the following

set ofnibbles: 0111, 1001, 1011, 1100, 1101, 1110, 1110, 1111, 1111, 1111, 1110, etc. These digital values could

then be further processed or analyzed by a purpose-specific digital signal processor or general purpose DSP. Several

Pulse Code Modulation streams could also bemultiplexed into a larger aggregate data stream, generally for

transmission of multiple streams over a single physical link. One technique is called time-division multiplexing, or

TDM, and is widely used, notably in the modern public telephone system. Another technique is called Frequency-

division multiplexing, where the signal is assigned a frequency in a spectrum, and transmitted along with other signals

inside that spectrum. Currently, TDM is much more widely used than FDM because of its natural compatibility with

digital communication, and generally lower bandwidth requirements.

There are many ways to implement a real device that performs this task. In real systems, such a device is commonly

implemented on a single integrated circuit that lacks only the clock necessary for sampling, and is generally referred

to as an ADC (Analog-to-Digital converter). These devices will produce on their output a binary representation of the

input whenever they are triggered by a clock signal, which would then be read by a processor of some sort.

[edit]Demodulation

To produce output from the sampled data, the procedure of modulation is applied in reverse. After each sampling

period has passed, the next value is read and a signal is shifted to the new value. As a result of these transitions, the

signal will have a significant amount of high-frequency energy. To smooth out the signal and remove these

undesirable aliasing frequencies, the signal would be passed through analog filters that suppress energy outside the
expected frequency range (that is, greater than the Nyquist frequency fs / 2). Some systems usedigital filtering to

remove some of the aliasing, converting the signal from digital to analog at a higher sample rate such that the analog

filter required for anti-aliasing is much simpler. In some systems, no explicit filtering is done at all; as it's impossible

for any system to reproduce a signal with infinite bandwidth, inherent losses in the system compensate for the

artifacts — or the system simply does not require much precision. The sampling theorem suggests that practical PCM

devices, provided a sampling frequency that is sufficiently greater than that of the input signal, can operate without

introducing significant distortions within their designed frequency bands.

The electronics involved in producing an accurate analog signal from the discrete data are similar to those used for

generating the digital signal. These devices are DACs (digital-to-analog converters), and operate similarly to ADCs.

They produce on their output a voltage or current (depending on type) that represents the value presented on their

inputs. This output would then generally be filtered and amplified for use.
[edit]Limitations

There are two sources of impairment implicit in any PCM system:

 Choosing a discrete value near the analog signal for each sample (quantization error)

The quantization error swings between   to  . In the ideal case (with a fully linear ADC) it is equally distributed

over this interval thus with   follows   equals zero while

the   equals to 

 Between samples no measurement of the signal is made; due to the sampling theorem this results in any

frequency above or equal to   (fs being the sampling frequency) being distorted or lost completely

(aliasing error). (One half the sampling frequency is known as the Nyquist frequency.)

As samples are dependent on time, an accurate clock is required for accurate reproduction. If either the encoding or

decoding clock is not stable, its frequency drift will directly affect the output quality of the device. A slight difference

between the encoding and decoding clock frequencies is not generally a major concern; a small constant error is not

noticeable. Clock error does become a major issue if the clock is not stable, however. A drifting clock, even with a

relatively small error, will cause very obvious distortions in audio and video signals, for example.

Extra information: PCM data from a master with a clock frequency that can not be influenced requires an exact clock

at the decoding side to ensure that all the data is used in a continuous stream without buffer underrun or buffer

overflow. Any frequency difference will be audible at the output since the number of samples per time interval can not

be correct. The data speed in a compact disk can be steered by means of a servo that controls the rotation speed of

the disk; here the output clock is the master clock. For all "external master" systems like DAB the output stream must

be decoded with a regenerated and exact synchronous clock. When the wanted output sample rate differs from the

incoming data stream clock then a sample rate converter must be inserted in the chain to convert the samples to the

new clock domain.

[edit]Digitization as part of the PCM process

In conventional PCM, the analog signal may be processed (e.g. by amplitude compression) before being digitized.

Once the signal is digitized, the PCM signal is usually subjected to further processing (e.g. digital data compression).

PCM with linear quantization is known as Linear PCM (LPCM).[1]


Some forms of PCM combine signal processing with coding. Older versions of these systems applied the processing

in the analog domain as part of the A/D process; newer implementations do so in the digital domain. These simple

techniques have been largely rendered obsolete by modern transform-based audio compression techniques.

 DPCM encodes the PCM values as differences between the current and the predicted value. An algorithm

predicts the next sample based on the previous samples, and the encoder stores only the difference between

this prediction and the actual value. If the prediction is reasonable, fewer bits can be used to represent the same

information. For audio, this type of encoding reduces the number of bits required per sample by about 25%

compared to PCM.

 Adaptive DPCM (ADPCM) is a variant of DPCM that varies the size of the quantization step, to allow further

reduction of the required bandwidth for a given signal-to-noise ratio.

 Delta modulation is a form of DPCM which uses one bit per sample.

In telephony, a standard audio signal for a single phone call is encoded as 8000 analog samples per second, of 8 bits

each, giving a 64 kbit/s digital signal known as DS0. The defaultsignal compression encoding on a DS0 is either μ-

law (mu-law) PCM (North America and Japan) or A-law PCM (Europe and most of the rest of the world). These are

logarithmic compression systems where a 12 or 13-bit linear PCM sample number is mapped into an 8-bit value. This

system is described by international standard G.711. An alternative proposal for a floating point representation, with

5-bit mantissa and 3-bit radix, was abandoned.

Where circuit costs are high and loss of voice quality is acceptable, it sometimes makes sense to compress the voice

signal even further. An ADPCM algorithm is used to map a series of 8-bit µ-law or A-law PCM samples into a series

of 4-bit ADPCM samples. In this way, the capacity of the line is doubled. The technique is detailed in

the G.726 standard.

Later it was found that even further compression was possible and additional standards were published. Some of
these international standards describe systems and ideas which are covered by privately owned patents and thus use

of these standards requires payments to the patent holders.

Some ADPCM techniques are used in Voice over IP communications.

[edit]Encoding for transmission


Main article: Line code

Pulse-code modulation can be either return-to-zero (RZ) or non-return-to-zero (NRZ). For a NRZ system to be

synchronized using in-band information, there must not be long sequences of identical symbols, such as ones or

zeroes. For binary PCM systems, the density of 1-symbols is called ones-density.[2]

Ones-density is often controlled using precoding techniques such as Run Length Limited encoding, where the PCM

code is expanded into a slightly longer code with a guaranteed bound on ones-density before modulation into the
channel. In other cases, extra framing bits are added into the stream which guarantee at least occasional symbol

transitions.

Another technique used to control ones-density is the use of a scrambler polynomial on the raw data which will tend

to turn the raw data stream into a stream that looks pseudo-random, but where the raw stream can be recovered

exactly by reversing the effect of the polynomial. In this case, long runs of zeroes or ones are still possible on the

output, but are considered unlikely enough to be within normal engineering tolerance.

In other cases, the long term DC value of the modulated signal is important, as building up a DC offset will tend to

bias detector circuits out of their operating range. In this case special measures are taken to keep a count of the

cumulative DC offset, and to modify the codes if necessary to make the DC offset always tend back to zero.

Many of these codes are bipolar codes, where the pulses can be positive, negative or absent. In the typical alternate

mark inversion code, non-zero pulses alternate between being positive and negative. These rules may be violated to

generate special symbols used for framing or other special purposes.

standard

Linear pulse code modulation


From Wikipedia, the free encyclopedia

Linear pulse code modulation

Filename .L16, .WAV, .AIFF,[1].AU, .PCM,


extension and many others

Internet media audio/L16, audio/L8,[2],


type audio/L20, audio/L24[3][4]

Type code "AIFF" for L16,[1] none[3]

Magic number none

Type of format uncompressed audio

Contained by Audio CD, AES3, WAV, AIFF, AU,M2TS, VOB, and many others


Extended from PCM

Linear pulse code modulation (LPCM) is a method of encoding audio information digitally. The term also refers

collectively to formats using this method of encoding. The term Pulse-code modulation (PCM), though strictly more

general, is often used to describe data encoded as LPCM.

Contents

 [hide]

1 Description

2 Implementations

3 Standard sampling resolutions and

rates

4 DVD standards

5 See also

6 References

7 External links

[edit]Description

LPCM is a particular method of pulse code modulation which represents an audio waveform as a sequence of

amplitude values recorded at a sequence of times. LPCM is PCM with linear quantization.[5]

LPCM represents sample amplitudes on a linear scale.[6] LPCM specifies that the values stored are proportional to

the amplitudes, rather than representing say the logarithm of the amplitude (e.g. companding - A-law/u-law), or being

related in some other manner (e.g. DPCM or ADPCM).[6] In practice these values will be quantized.

LPCM audio is coded using a combination of various parameters - such as resolution/sample size (e.g. 8, 16, 20, 24

bit, etc), frequency/sample rate (e.g. 8000, 11025, 16000, 22050, 24000, 32000, 44100, 48000 Hz / "samples per

second", etc), sign (signed or unsigned), number of channels (monaural, stereo, quadrophonic, etc) and interleaving

of channels, byte order (little endian, big endian).[7] If the sample is 16-bit signed, the sample range is from -32768 to

32767, with a centerpoint of 0.[8] (For example, signed LPCM data is used on Audio CD, DVD Video, 16-bit LPCM in

WAV, audio/L16, etc.) If the sample is 16-bit unsigned, the sample range is from 0 to 65535, with a centerpoint of

32768.[7]

[edit]Implementations

LPCM is the method of encoding generally used for uncompressed audio, although there are other methods such

as Pulse density modulation (used also on Super Audio CD).


 LPCM is used for the lossless encoding of audio data in the compact disc Red Book standard (introduced in

1982).

 AES3 (specified in 1985) is a particular format using LPCM.

 On PCs, the term PCM and LPCM often refer to the format used in WAV (defined in 1991) and AIFF audio

container formats (defined in 1988). LPCM data may also be stored in other formats such as AU, raw audio

format (header-less file) and various multimedia container formats.

 LPCM has been defined as a part of the DVD (since 1995) and Blu-ray (since 2006) standards.[9][10][11] It is

also defined as a part of various digital video and audio storage formats (e.g. DV since 1995[12], AVCHD since

2006[13]).

 Linear pulse code modulation is used by HDMI (defined in 2002), a single-cable digital audio/video

connector interface for transmitting uncompressed digital data.

 RF64 container format (defined in 2007) uses LPCM and also allows non-PCM bitstream storage: various

compression formats contained in the RF64 file as data bursts (Dolby E, Dolby AC3, DTS, MPEG-1/MPEG-2

Audio) can be "disguised" as PCM linear.[14]

[edit]Standard sampling resolutions and rates

Common sample resolutions for LPCM are 8, 16, 20 or 24 bits per sample.[1][2][3][15]

LPCM encodes a single sound channel. Support for multichannel audio depends on file format and relies on

interweaving or synchronization of LPCM streams.[16][17] While two channels (stereo) is the most common format,

some can support up to 8 audio channels (7.1 surround).[2][3]

Common sampling frequencies are 48 kHz as used with DVD format videos, or 44.1 kHz as used in compact discs.

Sampling frequencies of 96 kHz or 192 kHz can be used on some newer equipment, with the higher value equating to

6.144 megabit per second for two channels at 16-bit per sample value. The bitrate limit for LPCM audio on DVD-

Video is also 6.144 Mbit/s, allowing 8 channels (7.1 surround) x 48 kHz x 16-bit per sample = 6144 kbit/s.

[ Back ] [ Home ] [ Up ] [ Next ]

Pulse-Code Modulation

PULSE-CODE MODULATION (pcm) refers to a system in which the standard values of


a QUANTIZED WAVE (explained in the following paragraphs) are indicated by a
series of coded pulses. When these pulses are decoded, they indicate the
standard values of the original quantized wave. These codes may be binary, in
which the symbol for each quantized element will consist of pulses and
spaces:ternary, where the code for each element consists of any one of three
distinct kinds of values (such as positive pulses, negative pulses, and
spaces); or n-ary, in which the code for each element consists of nay number
(n) of distinct values. This discussion will be based on the binary pcm
system. All of the pulse-modulation systems discussed previously provide
methods of converting analog wave shapes to digital wave shapes (pulses
occurring at discrete intervals, some characteristic of which is varied as a
continuous function of the analog wave). The entire range of amplitude
(frequency or phase) values of the analog wave can be arbitrarily divided into
a series of standard values. Each pulse of a pulse train [figure 2-48, view
(B)] takes the standard value nearest its actual value when modulated. The
modulating wave can be faithfully reproduced, as shown in views (C) and (D).
The amplitude range has been divided into 5 standard values in view (C). Each
pulse is given whatever standard value is nearest its actual instantaneous
value. In view (D), the same amplitude range has been divided into 10 standard
levels. The curve of view (D) is a much closer approximation of the modulating
wave, view (A), than is the 5-level quantized curve in view (C). From this you
should see that the greater the number of standard levels used, the more
closely the quantized wave approximates the original. This is also made
evident by the fact that an infinite number of standard levels exactly
duplicates the conditions of nonquantization (the original analog waveform).

Figure 2-48A. - Quantization levels. MODULATION

Figure 2-48B. - Quantization levels. TIMING

Figure 2-48C. - Quantization levels. QUANTIZED 5-LEVEL

Figure 2-48D. - Quantization levels. QUANTIZED 10-LEVEL


Although the quantization curves of figure 2-48 are based on 5- and 10-level
quantization, in actual practice the levels are usually established at some
exponential value of 2, such as 4(22), 8(23), 16(24), 32(25) . . . N(2n). The
reason for selecting levels at exponential values of 2 will become evident in
the discussion of pcm. Quantized fm is similar in every way to quantized AM.
That is, the range of frequency deviation is divided into a finite number of
standard values of deviation. Each sampling pulse results in a deviation equal
to the standard value nearest the actual deviation at the sampling instant.
Similarly, for phase modulation, quantization establishes a set of standard
values. Quantization is used mostly in amplitude- and frequency-modulated
pulse systems.

Figure 2-49 shows the relationship between decimal numbers, binary numbers,
and a pulse-code waveform that represents the numbers. The table is for a 16-
level code; that is, 16 standard values of a quantized wave could be
represented by these pulse groups. Only the presence or absence of the pulses
are important. The next step up would be a 32-level code, with each decimal
number represented by a series of five binary digits, rather than the four
digits of figure 2-49. Six-digit groups would provide a 64-level code, seven
digits a 128-level code, and so forth. Figure 2-50 shows the application of
pulse-coded groups to the standard values of a quantized wave.

Figure 2-49. - Binary numbers and pulse-code equivalents.


Figure 2-50. - Pulse-code modulation of a quantized wave (128 bits).

In figure 2-50 the solid curve represents the unquantized values of a


modulating sinusoid. The dashed curve is reconstructed from the quantized
values taken at the sampling interval and shows a very close agreement with
the original curve. Figure 2-51 is identical to figure 2-50 except that the
sampling interval is four times as great and the reconstructed curve is not
faithful to the original. As previously stated, the sampling rate of a pulsed
system must be at least twice the highest modulating frequency to get a usable
reconstructed modulation curve. At the sampling rate of figure 2-50 and with a
4-element binary code, 128 bits (presence or absence of pulses) must be
transmitted for each cycle of the modulating frequency. At the sampling rate
of figure 2-51, only 32 bits are required; at the minimum sampling rate, only
8 bits are required.

Figure 2-51. - Pulse-code modulation of a quantized wave (32 bits).

As a matter of convenience, especially to simplify the demodulation of pcm,


the pulse trains actually transmitted are reversed from those shown in figures
2-49, 2-50, and 2-51; that is, the pulse with the lowest binary value (least
significant digit) is transmitted first and the succeeding pulses have
increasing binary values up to the code limit (most significant digit). Pulse
coding can be performed in a number of ways using conventional circuitry or by
means of special cathode ray coding tubes. One form of coding circuit is shown
in figure 2-52. In this case, the pulse samples are applied to a holding
circuit (a capacitor which stores pulse amplitude information) and the
modulator converts pam to pdm. The pdm pulses are then used to gate the output
of a precision pulse generator that controls the number of pulses applied to a
binary counter. The duration of the gate pulse is not necessarily an integral
number of the repetition pulses from the precisely timed clock-pulse
generator. Therefore, the clock pulses gated into the binary counter by the
pdm pulse may be a number of pulses plus the leading edge of an additional
pulse. This "partial" pulse may have sufficient duration to trigger the
counter, or it may not. The counter thus responds only to integral numbers,
effectively quantizing the signal while, at the same time, encoding it. Each
bistable stage of the counter stores ZERO or a ONE for each binary digit it
represents (binary 1110 or decimal 14 is shown in figure 2-52). An electronic
commutator samples the 20, 21, 22, and 23 digit positions in sequence and
transmits a mark or space bit (pulse or no pulse) in accordance with the state
of each counter stage. The holding circuit is always discharged and reset to
zero before initiation of the sequence for the next pulse sample.

Figure 2-52. - Block diagram of quantizer and pcm coder.


The pcm demodulator will reproduce the correct standard amplitude represented
by the pulse-code group. However, it will reproduce the correct standard only
if it is able to recognize correctly the presence or absence of pulses in each
position. For this reason, noise introduces no error at all if the signal-to-
noise ration is such that the largest peaks of noise are not mistaken for
pulses. When the noise is random (circuit and tube noise), the probability of
the appearance of a noise peak comparable in amplitude to the pulses can be
determined. This probability can be determined mathematically for any ration
of signal-to-average-noise power. When this is done for 105 pulses per second,
the approximate error rate for three values of signal power to average noise
power is:

17 dB - 10 errors per second 


20 dB - 1 error every 20 minutes 
22 dB - 1 error every 2,000 hours

Above a threshold of signal-to-noise ration of approximately 20 dB, virtually


no errors occur. In all other systems of modulation, even with signal-to-noise
ratios as high as 60 dB, the noise will have some effect. Moreover, the pcm
signal can be retransmitted, as in a multiple relay link system, as many times
as desired, without the introduction of additional noise effects; that is,
noise is not cumulative at relay stations as it is with other modulation
systems.

The system does, of course, have some distortion introduced by quantizing the
signal. Both the standard values selected and the sampling interval tend to
make the reconstructed wave depart from the original. This distortion, called
QUANTIZING NOISE, is initially introduced at the quantizing and coding
modulator and remains fixed throughout the transmission and retransmission
processes. Its magnitude can be reduced by making the standard quantizing
levels closer together. The relationship of the quantizing noise to the number
of digits in the binary code is given by the following standard relationship:

Where:

n is the number of digits in the binary code

Thus, with the 4-digit code of figure 2-50 and 2-51, the quantizing noise will
be about 35 dB weaker than the peak signal which the channel will accommodate.

The advantages of pcm are two-fold. First, noise interference is almost


completely eliminated when the pulse signals exceed noise levels by a value of
20 dB or more. Second, the signal may be received and retransmitted as many
times as may be desired without introducing distortion into the signal.

Q.27 Pulse-code modulation requires the use of approximations of value that


are obtained by what process? 
Q.28 If a modulating wave is sampled 10 times per cycle with a 5-element
binary code, how many bits of information are required to transmit the
signal? 
Q.29 What is the primary advantage of pulse-modulation systems? 

Older DVD players only support 48 kHz/16-bit capability. Recent players have built-in 96 kHz/24-bit capabilities.

The DVD-Audio standard supports 192 kHz/24-bit playback.

You might also like