DAC resolution vs. smoothing filter cutoff-freq

Usually the smoothing filter after the DAC is supposed to have a cut-off freq.

Reply to
vkj
Loading thread data ...

I think what you're talking about is quantization noise. Both decreasing bit depth and having an inadequately sharp passband filter will affect the final DAC signal to noise ratio, the former through quantization noise and the latter through aliasing. If you consider both sources of noise equivalent, all else being equal I guess you could say that with respect to SNR reducing the bit depth of the DAC is equivalent to introducing aliasing by decreasing the sampling rate, assuming the AA filter cutoff remains the same.

Take a look at the equation on page 3:

formatting link

The theoretical limit on the SNR due to quantization noise in an ADC or DAC is approximately 6dB times the number of bits of the converter, but that doesn't take noise from aliasing into account. Basically the equation means that if you want a certain dynamic range in the DAC passband, the response of the anti-aliasing filter must be down at least that amount by half the sample rate. In practice almost all audio DACs and ADCs are oversampled, which makes the analog filter requirements much less stringent.

Reply to
Bitrex

No, it would not (in general). Although you may be able to create some very special cases in which the two look equivalent or similar, the two thinks you are talking about are actually separate effects and have different results on the integrity of the signal that you are reconstructing.

Consider: if you reduce the sampling to a lower rate, then all of the changes between sample values occur on a rougher time-scale. You literally cannot change the signal AT ALL on any faster schedule... and this means that you can't transfer any of the higher frequencies that you used to be able to handle. However, if you haven't reduced the sampling resolution, you can still be very accurate at to the amplitude of the signals that you do transfer.

Conversely, if you reduce the DAC resolution but not the sampling rate, you can still carry all of the same frequencies you used to be able to. You just can't convey them as accurately... you are using a "coarser yardstick" to measure their amplitude.

The relationship is complex!

There are actually three things involved:

- The anti-aliasing filter (during the recording/sampling process). This is needed to filter out any components in the signal which lie above Fs/2, before the sampling and quantization takes place. If you don't do this, any frequencies which lie above the proper cutoff frequency will be "folded back" into the data. That is (in your example above) if you have a 600 Hz component in your original signal, and you fail to filter it out, and you sample at 1000 s/sec (500 Hz Nyquist limit), then this signal will "fold back" into the data at 400 Hz. That is, its effect on the samples you take will be indistinguishable (after sampling) from the effect of an equivalent 400 Hz signal component. You can't filter them out afterwards, as they lie within your desired signal bandwidth.

- The resolution to which you quantize your samples.

- The "smoothing" (reconstruction) filter, which converts the pulse train (or step wave, if you prefer) coming out of the DAC into a smooth waveform. This one, also, is supposed to have a nominal cutoff frequency of Fs/2. If you don't do this one right, you end up with "images" of the signal, at higher and higher frequencies... "ultrasonic noise" if you wish. Doing less than a perfect job of any of these (and any real implementation is always lees than perfect!) results in some form of noise or distortion in the signal. However, the types of distortion and noise you get, will be different in each case.

--
Dave Platt                                    AE6EO
Friends of Jade Warrior home page:  http://www.radagast.org/jade-warrior
  I do _not_ wish to receive unsolicited commercial email, and I will
     boycott any company which has the gall to send me such ads!
Reply to
Dave Platt

To complicate things further, you can dither your DAC output to shape the frequency spectrum of the quantization noise -- so with a healthy enough oversampling ratio you could improve the system performance.

--
My liberal friends think I'm a conservative kook.
My conservative friends think I'm a liberal kook.
Why am I not happy that they have found common ground?

Tim Wescott, Communications, Control, Circuits & Software
http://www.wescottdesign.com
Reply to
Tim Wescott

True - "noise shaping" DACs are very common and can deliver very high performance.

Properly dithering the input signal, prior to quantization, is also critically important.

--
Dave Platt                                    AE6EO
Friends of Jade Warrior home page:  http://www.radagast.org/jade-warrior
  I do _not_ wish to receive unsolicited commercial email, and I will
     boycott any company which has the gall to send me such ads!
Reply to
Dave Platt

cut-off

need a

The

Wouldn't

and

Thanks for your reply. I took a look at AN-282, and then searched the A-D website for more, and found an even better source: a Tutorial on DDS. Here the relationshipe between the DAC resolution and the sampling frequency is clearly explained. Intutively, the "steps" in the DAC/FOH output causes spikes in the frequency domain, and these spikes become more "spread out" and smaller as you increase the resolution. This is the quantization noise. Increasing the sampling frequency causes this noise to also flatten and spread out over the larger freq interval. There is actually a simple equation relating these in the tutorial: SQR = 1.76 + 6.02B + 20 log(FFS) + 10 log(Fos/Fs) where SQR is the quant. noise power, B is DAC resol. in bits, FFS is fraction od full scale, and Fos/Fs is the oversmapling ratio.

Thanks for your help.

vkj.

--------------------------------------- Posted through

formatting link

Reply to
vkj

A-D

Here

s
s

e.

Haven't looked at Analog App Note, but in response to your first post about 'smoothing' filter

BE VERY, VERY CAREFUL about smoothing filters, they, by their very nature, distort the spectrum being recreated. To understand the impact of a smoothing filter, first assume the DAC resolution is huge and quantization noise can be ignored. [However, it is possible to get very close to an undistorted spectrum if your system can stand tremendous latency by running the samples through a 'proper' filter.]

The results of a smoothing filter can be great! For example, visually, compare two scope traces, one where the value is held until the new value is updated, and the other, a simple linear ramp between adjacent data points. The first trace looks like little stair steps and the second looks like a much better recreation of the original data. However, in the second trace the distortion to the frequency spectrum is doubled! Conclusion: match the smoothing filter to the desired effect. If the recreated waveform is for the eyes and looking pretty is important, filter away. but if for the ears and spectral purity is important, be careful, because the ears are frequency sensitive devices and as such are likely to hear the difference.

Assume you're sampling a 'flat' audio spectrum at 44100 S/s: With the Nyquist cutoff at 22.05kHz, it would seem the 'oversampling' rate should not unduly distort the spectrum ...by too much.

Recreating the sound by using a stair step lowers higher frequency spectrum: DC =3D 1, 0dB

7kHz =3D 0.96, -0.4dB 10kHz =3D 0.92, -0.75dB 20kHz =3D 0.69, -3.2dB

However, recreating the sound by using a linear ramp between sample points makes the spectral response worse: DC =3D 1, 0dB

7kHz =3D 0.92, -0.73dB 10kHz =3D 0.84, -1.5dB 20kHz =3D 0.48, -6.3dB

Note: values were calculated using following formulas. x=3Dpi*f/44100 For stair step A(f) =3D sin(x)/x For ramp B(f)=3DA*A

Reply to
Robert Macy

magnitude.

frequency

could

or

but

audio

=

=A0=

i=

cause=

out"

nois=

Interesting stuff. I vaguely recall that in sampled data control systems, the ramp-type S and H, called First order hold (FOH) is supposed to be better than the ZOH.

By "flat-type" audio spectrum, I assume you mean band-limited "white noise"? Not sure how this relates to the sampling frequency since your sampling freq. is fixed at the Nyquist rate. Since all frequencies are present in the input, difficult to say how aliasing has impacted each freq. component that you have listed.

vkj.

--------------------------------------- Posted through

formatting link

Reply to
vkj

d

der

e

at

the

y
d

ple

ms,

q.

Seems reasonable that for motor control, you would want the first derivative ot any error response to exist, else end up 'banging' the motor.

I don't understand your last paragraph. Flat spectral response meant, 'desired' spectral response. Signal out is an exact duplicate of signal in. Noise, that's another matter.

Reply to
Robert Macy

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.