Pulse-code modulation: Difference between revisions

Content deleted Content added
m Reverted good faith edits by 2601:240:D900:FF00:24EA:72C7:85C3:6CB8 (talk): It was uniformly better before this edit.
m unpiped links using script
Line 32:
'''Pulse-code modulation''' ('''PCM''') is a method used to [[Digital signal (signal processing)|digitally]] represent [[analog signal]]s. It is the standard form of [[digital audio]] in computers, [[compact disc]]s, [[digital telephony]] and other digital audio applications. In a PCM [[Stream (computing)|stream]], the [[amplitude]] of the analog signal is [[Sampling (signal processing)|sampled]] at uniform intervals, and each sample is [[Quantization (signal processing)|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.<ref name="LOC_LPCM" /> This is in contrast to PCM encodings in which quantization levels vary as a function of amplitude (as with the [[A-law|A-law algorithm]] or the [[μ-law|μ-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 [[Audio bit depth|bit depth]], which determines the number of possible digital values that can be used to represent each sample.
Line 43:
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.<ref>{{cite patent |country=US |number=2272070}}</ref> By this time Reeves had started working at the [[Telecommunications Research Establishment]].<ref name=Vardalas/>
 
The first transmission of [[speech]] by digital techniques, the [[SIGSALY]] encryption equipment, conveyed high-level [[Allies of World War II|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-Packard|Ferranti Canada]] built a working PCM radio system that was able to transmit digitized radar data over long distances.<ref>{{cite book |author=Porter, Arthur |title=So Many Hills to Climb |date=2004 |publisher=Beckham Publications Group |isbn=9780931761188}}{{page needed|date=September 2017}}</ref>
 
PCM in the late 1940s and early 1950s used a [[Cathode ray tube|cathode-ray]] [[:File:US02632058 Gray.png|coding tube]] with a [[plate electrode]] having encoding perforations.<ref>{{cite book |url=https://archive.org/details/bstj27-1-44 |author=Sears, R. W. |work=Bell Systems Technical Journal |volume=27 |title=Electron Beam Deflection Tube for Pulse Code Modulation |pages=44–57 |publisher=[[Bell Labs]] |date=January 1948 |access-date=14 May 2017}}</ref> 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.<ref>{{cite book |url=https://archive.org/details/bstj30-1-33 |author=Goodall, W. M. |work=Bell Systems Technical Journal |volume=30 |title=Television by Pulse Code Modulation |pages=33–49 |publisher=[[Bell Labs]] |date=January 1951 |access-date=14 May 2017}}</ref>
Line 97:
{{Main|Digital audio|Digital recording}}
 
In 1967, the first PCM recorder was developed by [[NHK]]'s research facilities in Japan.<ref name="Fine">{{cite journal |author=Thomas Fine |year=2008 |title=The dawn of commercial digital recording |journal=[[Association for Recorded Sound Collections|ARSC Journal]] |volume=39 |issue=1 |pages=1–17 |url=http://www.aes.org/aeshc/pdf/fine_dawn-of-digital.pdf}}</ref> The 30&nbsp;kHz 12-bit device used a [[compander]] (similar to [[Dbx (noise reduction)|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&nbsp;kHz 13-bit resolution. In January 1971, using NHK's PCM recording system, engineers at [[Denon]] recorded the first commercial digital recordings.<ref group=note>Among the first recordings was ''Uzu: The World Of Stomu Yamash'ta 2'' by [[Stomu Yamashta]].</ref><ref name="Fine"/>
 
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&nbsp;kHz, 13-bit PCM audio.<ref group=note>The first recording with this new system was recorded in [[Tokyo]] during April 24–26, 1972.</ref> In 1977, Denon developed the portable PCM recording system, the DN-034R. Like the DN-023R, it recorded 8 channels at 47.25&nbsp;kHz, but it used 14-bits "with [[Emphasis (telecommunications)|emphasis]], making it equivalent to 15.5 bits."<ref name="Fine"/>
Line 118:
* [[LaserDisc]]s with digital sound have an LPCM track on the digital channel.
* On PCs, PCM and LPCM often refer to the format used in [[WAV]] (defined in 1991) and [[Audio Interchange File Format|AIFF]] audio container formats (defined in 1988). LPCM data may also be stored in other formats such as [[Au file format|AU]], [[raw audio format]] (header-less file) and various multimedia [[Digital container format|container formats]].
* LPCM has been defined as a part of the [[DVD]] (since 1995) and [[Blu-ray Disc|Blu-ray]] (since 2006) standards.<ref name="bd">{{citation |url=http://www.blu-raydisc.com/Assets/Downloadablefile/2b_bdrom_audiovisualapplication_0305-12955-15269.pdf |title=White paper Blu-ray Disc Format – 2.B Audio Visual Application Format Specifications for BD-ROM |author=Blu-ray Disc Association |date=March 2005 |access-date=2009-07-26}}</ref><ref>{{cite web |url=http://www.mpeg.org/MPEG/DVD/Book_B/Audio.html |title=DVD Technical Notes (DVD Video – "Book B") – Audio data specifications |date=1996-07-21 |access-date=2010-03-16}}</ref><ref>{{cite web |url=http://dvddemystified.com/dvdfaq.html#3.6.2 |title=DVD Frequently Asked Questions (and Answers) – Audio details of DVD-Video |author=Jim Taylor |access-date=2010-03-20}}</ref> It is also defined as a part of various digital video and audio storage formats (e.g. [[DV (video format)|DV]] since 1995,<ref>{{cite web |url=http://seaspray.trinity-bris.ac.uk/~altwfaq/graphics/video/1394/1394formats.html |title=How DV works |archive-url=https://web.archive.org/web/20071206032412/http://seaspray.trinity-bris.ac.uk/~altwfaq/graphics/video/1394/1394formats.html |archive-date=2007-12-06 |access-date=2010-03-21}}</ref> [[AVCHD]] since 2006<ref>{{cite web |url=http://www.avchd-info.org/format/index.html |title=AVCHD Information Website – AVCHD format specification overview |access-date=2010-03-21}}</ref>).
* LPCM 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.<ref>{{citation |url=http://tech.ebu.ch/docs/tech/tech3306-2009.pdf |title=EBU Tech 3306 – MBWF / RF64: An Extended File Format for Audio |date=July 2009 |author=EBU |access-date=2010-01-19 |archive-date=November 22, 2009 |archive-url=https://web.archive.org/web/20091122155436/http://tech.ebu.ch/docs/tech/tech3306-2009.pdf |url-status=dead }}</ref>
Line 137:
LPCM encodes a single sound channel. Support for multichannel audio depends on file format and relies on synchronization of multiple LPCM streams.<ref name=LOC_LPCM/><ref>{{Cite web|publisher=Library of Congress |url=https://www.loc.gov/preservation/digital/formats/fdd/fdd000016.shtml |title=PCM, Pulse Code Modulated Audio |date=April 6, 2022 |access-date=2022-09-05}}</ref> While two channels (stereo) is the most common format, systems can support up to 8 audio channels (7.1 surround)<ref name="rfc4856"/><ref name="rfc3190"/> or more.
 
Common sampling frequencies are 48 [[hertz|kHz]] as used with [[DVD]] format videos, or 44.1&nbsp;kHz as used in CDs. Sampling frequencies of 96&nbsp;kHz or 192&nbsp;kHz can be used on some equipment, but the benefits have been debated.<ref>{{Cite web|last=Christopher|first=Montgometry|title=24/192 Music Downloads, and why they do not make sense|url=http://people.xiph.org/~xiphmont/demo/neil-young.html|url-status=dead|archive-url=https://web.archive.org/web/20140906115306/http://people.xiph.org/~xiphmont/demo/neil-young.html|archive-date=2014-09-06|access-date=2013-03-16|publisher=Chris "Monty" Montgomery}}</ref>
 
==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&nbsp;[[Hertz|Hz]] to 3400&nbsp;Hz.<ref>https://www.its.bldrdoc.gov/fs-1037/dir-039/_5829.htm{{fv|reason=This source says 4k|date=August 2020}}</ref> For effective reconstruction of the voice signal, telephony applications therefore typically use an 8000&nbsp;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:
Line 151:
 
* Linear PCM (LPCM) is PCM with linear quantization.<ref name="LOC_LPCM" />
* [[DPCM|Differential PCM]] (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 differential pulse-code modulation]] (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 that uses one bit per sample to indicate whether the signal is increasing or decreasing compared to the previous sample.
Line 169:
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 bit]]s 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 [[pseudorandom|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.