Pulse-code modulation explained

Pulse-code modulation
Extension:.L16, .WAV, .AIFF, .AU, .PCM[1]
Mime:audio/L16, audio/L8,[2] audio/L20, audio/L24[3] [4]
Type Code:"AIFF" for L16, none
Magic:Varies
Type:Uncompressed audio
Contained By:Audio CD, AES3, WAV, AIFF, AU, M2TS, VOB, and many others
Open:Yes
Free:Yes[5]

Pulse-code modulation (PCM) is a method used to digitally represent analog signals. It is the standard form of digital audio in computers, compact discs, digital telephony and other digital audio applications. In a PCM stream, the amplitude of the analog signal is sampled at uniform intervals, and each sample is quantized to the nearest value within a range of digital steps.

Linear pulse-code modulation (LPCM) is a specific type of PCM in which the quantization levels are linearly uniform. This is in contrast to PCM encodings in which quantization levels vary as a function of amplitude (as with the A-law algorithm or the μ-law algorithm). Though PCM is a more general term, it is often used to describe data encoded as LPCM.

A PCM stream has two basic properties that determine the stream's 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 can be used to represent each sample.

History

Early electrical communications started to sample signals in order to multiplex samples from multiple telegraphy sources and to convey them over a single telegraph cable. The American inventor Moses G. Farmer conceived telegraph time-division multiplexing (TDM) as early as 1853. Electrical engineer W. M. Miner, in 1903, used an electro-mechanical commutator for time-division multiplexing multiple telegraph signals; he also applied this technology to telephony. He obtained intelligible speech from channels sampled at a rate above 3500–4300 Hz; lower rates proved unsatisfactory.

In 1920, the Bartlane cable picture transmission system used telegraph signaling of characters punched in paper tape to send samples of images quantized to 5 levels.[6] In 1926, Paul M. Rainey of Western Electric patented a facsimile machine that transmitted its signal using 5-bit PCM, encoded by an opto-mechanical analog-to-digital converter.[7] The machine did not go into production.

British engineer Alec Reeves, unaware of previous work, conceived the use of PCM for voice communication in 1937 while working for International Telephone and Telegraph in France. He described the theory and its advantages, but no practical application resulted. Reeves filed for a French patent in 1938, and his US patent was granted in 1943.[8] By this time Reeves had started working at the Telecommunications Research Establishment.

The first transmission of speech by digital techniques, the SIGSALY encryption equipment, conveyed high-level Allied communications during World War II. In 1943 the Bell Labs researchers who designed the SIGSALY system became aware of the use of PCM binary coding as already proposed by Reeves. In 1949, for the Canadian Navy's DATAR system, Ferranti Canada built a working PCM radio system that was able to transmit digitized radar data over long distances.[9]

PCM in the late 1940s and early 1950s used a cathode-ray coding tube with a plate electrode having encoding perforations.[10] As in an oscilloscope, the beam was swept horizontally at the sample rate while the vertical deflection was controlled by the input analog signal, causing the beam to pass through higher or lower portions of the perforated plate. The plate collected or passed the beam, producing current variations in binary code, one bit at a time. Rather than natural binary, the grid of Goodall's later tube was perforated to produce a glitch-free Gray code and produced all bits simultaneously by using a fan beam instead of a scanning beam.[11]

In the United States, the National Inventors Hall of Fame has honored Bernard M. Oliver[12] and Claude Shannon[13] as the inventors of PCM,[14] as described in "Communication System Employing Pulse Code Modulation", filed in 1946 and 1952, granted in 1956. Another patent by the same title was filed by John R. Pierce in 1945, and issued in 1948: . The three of them published "The Philosophy of PCM" in 1948.[15]

The T-carrier system, introduced in 1961, uses two twisted-pair transmission lines to carry 24 PCM telephone calls sampled at 8 kHz and 8-bit resolution. This development improved capacity and call quality compared to the previous frequency-division multiplexing schemes.

In 1973, adaptive differential pulse-code modulation (ADPCM) was developed, by P. Cummiskey, Nikil Jayant and James L. Flanagan.[16]

Digital audio recordings

See main article: Digital audio and Digital recording.

In 1967, the first PCM recorder was developed by NHK's research facilities in Japan.[17] The 30 kHz 12-bit device used a compander (similar to DBX Noise Reduction) to extend the dynamic range, and stored the signals on a video tape recorder. In 1969, NHK expanded the system's capabilities to 2-channel stereo and 32 kHz 13-bit resolution. In January 1971, using NHK's PCM recording system, engineers at Denon recorded the first commercial digital recordings.[18] [17]

In 1972, Denon unveiled the first 8-channel digital recorder, the DN-023R, which used a 4-head open reel broadcast video tape recorder to record in 47.25 kHz, 13-bit PCM audio.[19] In 1977, Denon developed the portable PCM recording system, the DN-034R. Like the DN-023R, it recorded 8 channels at 47.25 kHz, but it used 14-bits "with emphasis, making it equivalent to 15.5 bits."[17]

In 1979, the first digital pop album, Bop till You Drop, was recorded. It was recorded in 50 kHz, 16-bit linear PCM using a 3M digital tape recorder.[20]

The compact disc (CD) brought PCM to consumer audio applications with its introduction in 1982. The CD uses a 44,100 Hz sampling frequency and 16-bit resolution and stores up to 80 minutes of stereo audio per disc.

Digital telephony

The rapid development and wide adoption of PCM digital telephony was enabled by metal–oxide–semiconductor (MOS) switched capacitor (SC) circuit technology, developed in the early 1970s.[21] This led to the development of PCM codec-filter chips in the late 1970s.[21] [22] The silicon-gate CMOS (complementary MOS) PCM codec-filter chip, developed by David A. Hodges and W.C. Black in 1980,[21] has since been the industry standard for digital telephony.[21] [22] By the 1990s, telecommunication networks such as the public switched telephone network (PSTN) had been largely digitized with very-large-scale integration (VLSI) CMOS PCM codec-filters, widely used in electronic switching systems for telephone exchanges, user-end modems and a wide range of digital transmission applications such as the integrated services digital network (ISDN), cordless telephones and cell phones.[22]

Implementations

PCM is the method of encoding typically used for uncompressed digital audio.[23]

Modulation

In the diagram, a sine wave (red curve) is sampled and quantized for PCM. The sine wave is sampled at regular intervals, shown as vertical lines. For each sample, one of the available values (on the y-axis) is chosen. The PCM process is commonly implemented on a single integrated circuit called an analog-to-digital converter (ADC). This produces a fully discrete representation of the input signal (blue points) that can be easily encoded as digital data for storage or manipulation. Several PCM streams could also be multiplexed into a larger aggregate data stream, generally for transmission of multiple streams over a single physical link. One technique is called time-division multiplexing (TDM) and is widely used, notably in the modern public telephone system.

Demodulation

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 digital-to-analog converters (DACs). They produce a voltage or current (depending on type) that represents the value presented on their digital inputs. This output would then generally be filtered and amplified for use.

fs/2

).[29]

Standard sampling precision and rates

Common sample depths for LPCM are 8, 16, 20 or 24 bits per sample.[30]

LPCM encodes a single sound channel. Support for multichannel audio depends on file format and relies on synchronization of multiple LPCM streams.[5] [31] While two channels (stereo) is the most common format, systems can support up to 8 audio channels (7.1 surround)[2] [3] or more.

Common sampling frequencies are 48 kHz as used with DVD format videos, or 44.1 kHz as used in CDs. Sampling frequencies of 96 kHz or 192 kHz can be used on some equipment, but the benefits have been debated.[32]

Limitations

The Nyquist–Shannon sampling theorem shows PCM devices can operate without introducing distortions within their designed frequency bands if they provide a sampling frequency at least twice that of the highest frequency contained in the input signal. For example, in telephony, the usable voice frequency band ranges from approximately 300 Hz to 3400 Hz.[33] For effective reconstruction of the voice signal, telephony applications therefore typically use an 8000 Hz sampling frequency which is more than twice the highest usable voice frequency.

Regardless, there are potential sources of impairment implicit in any PCM system:

Processing and coding

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 analog-to-digital process; newer implementations do so in the digital domain. These simple techniques have been largely rendered obsolete by modern transform-based audio compression techniques, such as modified discrete cosine transform (MDCT) coding.

In telephony, a standard audio signal for a single phone call is encoded as 8,000 samples per second, of 8 bits each, giving a 64 kbit/s digital signal known as DS0. The default signal 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.

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.

Audio coding formats and audio codecs have been developed to achieve further compression. Some of these techniques have been standardized and patented. Advanced compression techniques, such as modified discrete cosine transform (MDCT) and linear predictive coding (LPC), are now widely used in mobile phones, voice over IP (VoIP) and streaming media.

Encoding for serial transmission

See main article: Line code.

See also: T-carrier and E-carrier.

PCM 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.[36]

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 guarantees at least occasional symbol transitions.

Another technique used to control ones-density is the use of a scrambler on the data, which will tend to turn the data stream into a stream that looks pseudo-random, but where the data can be recovered exactly by a complementary descrambler. In this case, long runs of zeroes or ones are still possible on the output but are considered unlikely enough to allow reliable synchronization.

In other cases, the long term DC value of the modulated signal is important, as building up a DC bias will tend to move communications circuits out of their operating range. In this case, special measures are taken to keep a count of the cumulative DC bias and to modify the codes if necessary to make the DC bias 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.

Nomenclature

The word pulse in the term pulse-code modulation refers to the pulses to be found in the transmission line. This perhaps is a natural consequence of this technique having evolved alongside two analog methods, pulse-width modulation and pulse-position modulation, in which the information to be encoded is represented by discrete signal pulses of varying width or position, respectively. In this respect, PCM bears little resemblance to these other forms of signal encoding, except that all can be used in time-division multiplexing, and the numbers of the PCM codes are represented as electrical pulses.

See also

Further reading

External links

Notes and References

  1. Harald Tveit . Alvestrand . Salsman . James . RFC 2586 – The Audio/L16 MIME content type . May 1999 . The Internet Society . 10.17487/RFC2586 . 2010-03-16.
  2. S. . Casner . RFC 4856 – Media Type Registration of Payload Formats in the RTP Profile for Audio and Video Conferences – Registration of Media Type audio/L8 . March 2007 . The IETF Trust . 10.17487/RFC4856 . 2010-03-16.
  3. Bormann . C. . Casner . S. . Kobayashi . K. . Ogawa . A.. RFC 3190 – RTP Payload Format for 12-bit DAT Audio and 20- and 24-bit Linear Sampled Audio . January 2002 . The Internet Society . 10.17487/RFC3190 . 2010-03-16. free .
  4. Web site: Audio Media Types . Internet Assigned Numbers Authority . 2010-03-16.
  5. Web site: Linear Pulse Code Modulated Audio (LPCM) . April 19, 2022 . . 2022-09-05.
  6. Web site: The Bartlane Transmission System . DigicamHistory.com . 7 January 2010. https://web.archive.org/web/20100210053055/http://www.digicamhistory.com/1906_1920.html. February 10, 2010.
  7. U.S. patent number 1,608,527; also see p. 8, Data conversion handbook, Walter Allan Kester, ed., Newnes, 2005, .
  8. US . 2272070.
  9. Book: Porter, Arthur . So Many Hills to Climb . 2004 . Beckham Publications Group . 9780931761188.
  10. Book: Electron Beam Deflection Tube for Pulse Code Modulation . Sears, R. W. . Bell Systems Technical Journal . 27 . 44–57 . . January 1948 . 14 May 2017.
  11. Book: Television by Pulse Code Modulation . Goodall, W. M. . Bell Systems Technical Journal . 30 . 33–49 . . January 1951 . 14 May 2017.
  12. Web site: Bernard Oliver . National Inventor's Hall of Fame . February 6, 2011 . dead . https://web.archive.org/web/20101205235415/http://www.invent.org/hall_of_fame/211.html . December 5, 2010 . mdy-all.
  13. Web site: Claude Shannon . National Inventor's Hall of Fame . February 6, 2011 . dead . https://web.archive.org/web/20101206045917/http://www.invent.org/hall_of_fame/212.html . December 6, 2010 . mdy-all.
  14. Web site: National Inventors Hall of Fame announces 2004 class of inventors . Science Blog . February 11, 2004 . February 6, 2011 .
  15. Proceedings of the IRE . The Philosophy of PCM . B. M. Oliver . J. R. Pierce . C. E. Shannon . amp . 36 . 11 . 1324–1331 . 0096-8390 . Nov 1948 . 10.1109/JRPROC.1948.231941 . 51663786 .
  16. P. Cummiskey, N. S. Jayant, and J. L. Flanagan, "Adaptive quantization in differential PCM coding of speech," Bell Syst. Tech. J., vol. 52, pp. 1105–1118, Sept. 1973.
  17. Thomas Fine . 2008 . The dawn of commercial digital recording . . 39 . 1 . 1–17 .
  18. Among the first recordings was Uzu: The World Of Stomu Yamash'ta 2 by Stomu Yamashta.
  19. The first recording with this new system was recorded in Tokyo during April 24–26, 1972.
  20. Web site: Roger Nichols . I Can't Keep Up With All The Formats II . https://web.archive.org/web/20021020102042/http://rogernichols.com/EQ/EQ_2001_08.html . 2002-10-20 . The Ry Cooder Bop Till You Drop album was the first digitally recorded pop album.
  21. Book: Allstot . David J. . Switched Capacitor Filters . Maloberti . Franco . Davies . Anthony C. . A Short History of Circuits and Systems: From Green, Mobile, Pervasive Networking to Big Data Computing . 2016 . . 9788793609860 . 105–110 . https://ieee-cas.org/sites/default/files/a_short_history_of_circuits_and_systems-_ebook-_web.pdf . November 29, 2019 . September 30, 2021 . https://web.archive.org/web/20210930151716/https://ieee-cas.org/sites/default/files/a_short_history_of_circuits_and_systems-_ebook-_web.pdf . dead .
  22. Book: Floyd . Michael D. . Hillman . Garth D. . Pulse-Code Modulation Codec-Filters . The Communications Handbook . 2nd . 8 October 2018 . 1st pub. 2000 . 26-1, 26-2, 26-3 . . 9781420041163 . https://books.google.com/books?id=Tokk5bZxB0MC&pg=SA26-PA1.
  23. Other methods exist such as pulse-density modulation used also on Super Audio CD.
  24. Book: Cambron, G. Keith . Global Networks: Engineering, Operations and Design . 345 . John Wiley & Sons . Oct 17, 2012.
  25. Web site: DVD Technical Notes (DVD Video – "Book B") – Audio data specifications . 1996-07-21 . 2010-03-16.
  26. Web site: DVD Frequently Asked Questions (and Answers) – Audio details of DVD-Video . Jim Taylor . 2010-03-20.
  27. Web site: How DV works . https://web.archive.org/web/20071206032412/http://seaspray.trinity-bris.ac.uk/~altwfaq/graphics/video/1394/1394formats.html . 2007-12-06 . 2010-03-21.
  28. Web site: AVCHD Information Website – AVCHD format specification overview . 2010-03-21.
  29. Some systems use digital filtering to remove some of the aliasing, converting the signal from digital to analog at a higher sample rate such that the analog anti-aliasing filter is much simpler. In some systems, no explicit filtering is done at all; as it is 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.
  30. RFC 3108 – Conventions for the use of the Session Description Protocol (SDP) for ATM Bearer Connections . May 2001 . 2010-03-16. Mostafa . Mohamed . Kumar . Rajesh . 10.17487/RFC3108 .
  31. Web site: Library of Congress . PCM, Pulse Code Modulated Audio . April 6, 2022 . 2022-09-05.
  32. Web site: Christopher. Montgometry. 24/192 Music Downloads, and why they do not make sense. dead. https://web.archive.org/web/20140906115306/http://people.xiph.org/~xiphmont/demo/neil-young.html. 2014-09-06. 2013-03-16. Chris "Monty" Montgomery.
  33. https://www.its.bldrdoc.gov/fs-1037/dir-039/_5829.htm{{fv|reason=This source says 4k|date=August 2020}}
  34. Quantization error swings between -q/2 and q/2. In the ideal case (with a fully linear ADC and signal level >> q) it is uniformly distributed over this interval, with zero mean and variance of q2/12.
  35. 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 contains significant jitter, however.
  36. Stallings, William, Digital Signaling Techniques, December 1984, Vol. 22, No. 12, IEEE Communications Magazine