Skip to main content

Pulse Code Modulation: Steps for Signal Integrity

Key Takeaways

  • Pulse code modulation comprises an encoding of a continuous analog signal to discrete, quantized levels.

  • Pulse code modulation quality depends on a few factors: bit depth, sampling rate, and signal integrity regarding board layout.

  • Depending on the probability density of the input signal, different processing methods are available to minimize quantization error.

ADCs are an example of pulse code modulation.

ADCs are an example of pulse code modulation.

Translating between the analog and digital realms of data representation is at the heart of several sensors and applications – notably audio – that make these circuits ubiquitous. An essential theory driving analog-to-digital conversion is pulse code modulation, which stipulates all of the parameters necessary for a level of acceptable signal reconstruction from the source. The performance of pulse code modulation hinges on the general signal integrity of the system, yet an understanding of the levels of the technique will give designers an idea of how to optimize the layout at the system level.

Signal Processing With Pulse Code Modulation

Linear

“Standard” PCM where quantization occurs on a linear scale.

Differential

A method stores the difference between the actual and expected values of the encoding to save on the number of bit representations.

Adaptive differential

Varies the size of the quantization step to improve the quantization error.

Delta modulation

An extremely compact transmission format that indicates whether the encoded values are increasing or decreasing; fidelity is minimal.

An Introduction to Pulse Code Modulation

Pulse code modulation (PCM) is a method of digitally representing analog signals by sampling the amplitude at uniform time intervals. There are three stages to PCM:

  • Sampling - Transformation of the continuous-time signal to a discrete-time signal; the quality of the sampled signal depends on the sampling rate and bit depth.
  • Quantization - The exact sample corresponds to the closest value allowed by the precision of the modulator. Typically, quantization is a uniform process where the possible values (and any errors) occur at equal intervals. Quantization is noninvertible (encounters data loss) and irreversible (the original signal is nonrecoverable from the output). 
  • Encoding - The accepted values from the quantization process use a number system encoding (usually binary) for transmission. The transmission needs to indicate stopping points between discrete data elements to prevent errors on transmission or receipt; framing bits or cryptographic methods can achieve this.

Sampling must balance a few factors to convey the original signal's information content accurately, most notably adherence to the Nyquist frequency to prevent distortions in the output. Simply put, the Nyquist frequency necessitates a sampling rate twice that of the highest desired frequency of the original signal; this value is a vital cutoff because it ensures the integrity of the band below the Nyquist frequency while also preventing the recovery of higher-frequency noise post-sampling. The Nyquist frequency will also act as the cutoff frequency to remove high-energy signals after demodulation.

The signal integrity of the clock will greatly impact the sampling quality. Sampling must occur at a pre-defined rate, and deviations from this period can lead to sections of the recreated signal that do not correspond to the values of the original signal. For the clock signal, provide ample space between nearby traces (especially high-speed) or other fast-switching components (like inductors in power circuitry) to prevent interference. Additionally, a continuous ground plane will minimize return paths and current loops, keeping the magnetic field strength of nearby traces small while and EMI. Avoid split planes if possible, and ensure any routing does not cross over split-plane boundaries or plane gaps.

However, the process of encoding an analog signal poses other noise sources. Representing an uncountable set of frequencies with a countable set implies some rounding and truncation during mapping (this process is similarly valid for the more general ADC implementation). The resulting quantization error is unavoidable but mitigable by increasing the bit depth of the sampling – greater bit depths can encode more information and allow for a truer reconstruction of the original signal. An assessment of quantization error is possible with the signal-quantization-to-noise ratio (SQNR) provided by the manufacturer or calculated in-circuit.

Methods for Improving Modulation

The assumption of PCM has thus far utilized a uniform subdivision during quantization to limit errors; this is only beneficial when the original signal expresses (or approximates) uniform distribution across its set of values. Nonuniform PCM offers can offer better performance by allocating more accuracy (meaning smaller quantization intervals) to smaller magnitude values, creating a logarithmic ratio between the quantization step size and value. Intuitively, this reflects the signal's probability density function (PDF) – quantization levels should be smaller where signal density is higher to reflect a denser spread of values better, and vice versa. However, optimizing a circuit for signal quantization can be difficult when the PDF experiences high variance or changes over time. 

To combat the limitations of nonuniform PCM, circuit designers can employ sequential non-linear compression before uniform quantization to achieve similar results. The originating signal will undergo compression before uniform pulse code modulation with a mirrored decoding and expansion step before output, which reconstructs the signal based on its inverse characteristics. The technical term for simultaneously adjusting the output dynamic range is companding – a portmanteau of compression and expansion. There are various logarithmic compression implementations to consider:

  • Floating point - Offers a high amount of precision with the drawback that many values are repeated on the output, limiting the mapping of the input. 
  • µ-law - An 8-bit telecommunications system that increases dynamic range significantly over a linearly-quantized signal; it requires a 14-bit resolution for compression.
  • A-law - An alternative to µ-law outside the US and Japan and an international default that trades dynamic range for better distortion response on small signals.

Cadence Solutions for Mixed-Signal Systems

Pulse code modulation, both the general technique and specific applications, requires an understanding of how analog data encounters loss through conversion. While some amount of error is unavoidable, it is the system designer's job (and those overseeing the software implementation) to minimize these vectors. Signal integrity best practices must first exist at the design level and corroborate with simulation data before product designers can comfortably submit devices to expensive EMI testing facilities. Cadence’s  PCB Design and Analysis Software suite offers designers an all-in-one ECAD system from proof-of-concept to product. Modeling results easily transfer to OrCAD PCB Designer for an accelerated development cycle that combines utility, speed, and usability.

Leading electronics providers rely on Cadence products to optimize power, space, and energy needs for a wide variety of market applications. To learn more about our innovative solutions, talk to our team of experts or subscribe to our YouTube channel.