Understanding DC offset

Posted on Posted in Articles


 What is DC off set?

In A Nutshell

A DC (direct or continuous current) offset is often good for changing the baseline of an audio file (e.g. wav) in order to compensate for electrical mismatches between your audio card and the input device, and thus obtaining a louder amplitude after normalization. If DC off set exists, getting more loudness in the mix maybe a problem.

 

DC offset occurs when hardware, such as a sound card, adds DC current to a recorded audio signal. This current results in a recorded waveform that is not centered around the baseline (-infinity). In some cases, when DC-Offset is present, glitches and other unexpected results can occur when sound effects are applied to the audio file. You can compensate for this DC offset by adding a constant value to the samples in the sound file.

In the example above, the red line represents the baseline. The lower waveform exhibits DC offset; note that the waveform is centered approximately 2 dB above the baseline.
In the example above the red line represents the baseline. The lower waveform exhibits DC offset; note that the waveform is centered by approximately 2 dB above the baseline.

An easy way to spot DC offset is to zoom in to a silent section of your sound file. If the silent waveform matches the center line in the waveform display, your file does not contain DC offset. Also, DC Offset shouldn’t be confused with uneven pulse positive, pulse negative audio waveforms or “lop-sided waveforms”.

Technical Explanation

DC offset is an offsetting of a signal from zero. The term originated in electronics, where it refers to a direct current voltage, but the concept has been extended to any representation of a waveform. DC offset is the mean amplitude of the waveform; if the mean amplitude is zero, there is no DC offset.

DC offset is usually undesirable. For example, in audio processing, a sound that has DC offset will not be at its loudest possible volume when normalized (because the offset consumes headroom), and this problem can possibly extend to the mix as a whole, since a sound with DC offset and a sound without DC offset will have DC offset when mixed. It may also cause other artifacts depending on what is being done with the signal.

DC offset can be reduced in real-time by a one-pole one-zero high-pass filter. When one already has the entire waveform, subtracting the mean amplitude from each sample will remove the offset. Often, very low frequencies are called “slowly changing DC”. While not technically accurate, a high-pass filter can remove such a “changing offset” better because its cutoff does not extend to as low a bandwidth as the above method.

When describing a periodic function in the frequency domain, the term DC coefficient or DC component refers to the mean value of the waveform (possibly scaled according to the norm of the corresponding basis function of the frequency analysis filter bank). The name comes from the middle 20th century design of electrical line codes for use with transmission channels unable to transmit a DC voltage or current. In such usage, this coefficient represents the useless DC, whilst the coefficients representing various other frequencies are analogous to superimposed AC voltages or currents.

A waveform with a zero DC component is known as a DC-balanced waveform. DC-balanced waveforms are useful in communications systems, since they can be used on AC-coupled electrical connections to avoid voltage imbalance problems between connected systems or components. For this reason, most line codes are designed to produce DC-balanced waveforms. The most common classes of DC balanced line codes are constant-weight codes and paired-disparity codes.

Recommended Reading:

One thought on “Understanding DC offset

  1. Hi,
    Thank You, a very informative discussion on DC offsets.
    Yes I understand they have just about the same value as an ant at a picnic or a 3rd armpit. I am continually removing them while editing songs I download. But, what I’m wondering is, Who in the world is putting them in. I can’t believe they’re inserted in new recordings whether they’re originally vinyl, tape or CD.
    Thanks, for listening,

Leave a Reply

Your email address will not be published. Required fields are marked *