Forums

DAC resolution vs. smoothing filter cutoff-freq

Started by vkj November 29, 2011
Usually the smoothing filter after the DAC is supposed to have a cut-off
freq. <= 1/2 sampling freq.  So, eg., if one were to re-construct an audio
sinewave of 100Hz, but provide samples at say 1000Hz, then you would need a
smoothing filter with Fc: 100Hz <= Fc <= 500Hz.  But if the DAC resolution
is low, a number of successive samples will be of the same magnitude. The
input to the DAC would look as if it was sampled at a lower rate.  Wouldn't
that in effect be the same as if the sampling freq. were lower?  

What is the relationship between the smoothing filter cutoff frequency and
the resolution of the DAC?

Thanks,

vkj	   
					
---------------------------------------		
Posted through http://www.Electronics-Related.com
On 11/28/2011 11:07 PM, vkj wrote:
> Usually the smoothing filter after the DAC is supposed to have a cut-off > freq. <= 1/2 sampling freq. So, eg., if one were to re-construct an audio > sinewave of 100Hz, but provide samples at say 1000Hz, then you would need a > smoothing filter with Fc: 100Hz <= Fc <= 500Hz. But if the DAC resolution > is low, a number of successive samples will be of the same magnitude. The > input to the DAC would look as if it was sampled at a lower rate. Wouldn't > that in effect be the same as if the sampling freq. were lower? > > What is the relationship between the smoothing filter cutoff frequency and > the resolution of the DAC? > > Thanks, > > vkj > > --------------------------------------- > Posted through http://www.Electronics-Related.com
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: http://www.analog.com/static/imported-files/application_notes/60452436005220859872700115159829353257206974259641368301086579520703792632610264805090AN282.pdf 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.
In article <ztadnT5L3vMAx0nTnZ2dnUVZ_g-dnZ2d@giganews.com>,

vkj <tranquine@n_o_s_p_a_m.n_o_s_p_a_m.gmail.com> wrote:
>Usually the smoothing filter after the DAC is supposed to have a cut-off >freq. <= 1/2 sampling freq. So, eg., if one were to re-construct an audio >sinewave of 100Hz, but provide samples at say 1000Hz, then you would need a >smoothing filter with Fc: 100Hz <= Fc <= 500Hz. But if the DAC resolution >is low, a number of successive samples will be of the same magnitude. The >input to the DAC would look as if it was sampled at a lower rate. Wouldn't >that in effect be the same as if the sampling freq. were lower?
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.
>What is the relationship between the smoothing filter cutoff frequency and >the resolution of the DAC?
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 <dplatt@radagast.org> 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!
On Tue, 29 Nov 2011 14:06:47 -0800, Dave Platt wrote:

> In article <ztadnT5L3vMAx0nTnZ2dnUVZ_g-dnZ2d@giganews.com>, > > vkj <tranquine@n_o_s_p_a_m.n_o_s_p_a_m.gmail.com> wrote: >>Usually the smoothing filter after the DAC is supposed to have a cut-off >>freq. <= 1/2 sampling freq. So, eg., if one were to re-construct an >>audio sinewave of 100Hz, but provide samples at say 1000Hz, then you >>would need a smoothing filter with Fc: 100Hz <= Fc <= 500Hz. But if the >>DAC resolution is low, a number of successive samples will be of the >>same magnitude. The input to the DAC would look as if it was sampled at >>a lower rate. Wouldn't that in effect be the same as if the sampling >>freq. were lower? > > 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. > >>What is the relationship between the smoothing filter cutoff frequency >>and the resolution of the DAC? > > 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.
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
In article <nZ6dnQ-lG6tU7UjTnZ2dnUVZ_r-dnZ2d@web-ster.com>,
Tim Wescott  <tim@seemywebsite.com> wrote:

>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.
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 <dplatt@radagast.org> 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!
>On 11/28/2011 11:07 PM, vkj wrote: >> Usually the smoothing filter after the DAC is supposed to have a
cut-off
>> freq. <= 1/2 sampling freq. So, eg., if one were to re-construct an
audio
>> sinewave of 100Hz, but provide samples at say 1000Hz, then you would
need a
>> smoothing filter with Fc: 100Hz <= Fc <= 500Hz. But if the DAC
resolution
>> is low, a number of successive samples will be of the same magnitude.
The
>> input to the DAC would look as if it was sampled at a lower rate.
Wouldn't
>> that in effect be the same as if the sampling freq. were lower? >> >> What is the relationship between the smoothing filter cutoff frequency
and
>> the resolution of the DAC? >> >> Thanks, >> >> vkj >> >> --------------------------------------- >> Posted through http://www.Electronics-Related.com > >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: > >http://www.analog.com/static/imported-files/application_notes/60452436005220859872700115159829353257206974259641368301086579520703792632610264805090AN282.pdf > >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. >
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 http://www.Electronics-Related.com
On Dec 2, 7:26=A0pm, "vkj" <tranquine@n_o_s_p_a_m.n_o_s_p_a_m.gmail.com>
wrote:
> >On 11/28/2011 11:07 PM, vkj wrote: > >> Usually the smoothing filter after the DAC is supposed to have a > cut-off > >> freq. <=3D 1/2 sampling freq. =A0So, eg., if one were to re-construct =
an
> audio > >> sinewave of 100Hz, but provide samples at say 1000Hz, then you would > need a > >> smoothing filter with Fc: 100Hz <=3D Fc <=3D 500Hz. =A0But if the DAC > resolution > >> is low, a number of successive samples will be of the same magnitude. > The > >> input to the DAC would look as if it was sampled at a lower rate. > Wouldn't > >> that in effect be the same as if the sampling freq. were lower? > > >> What is the relationship between the smoothing filter cutoff frequency > and > >> the resolution of the DAC? > > >> Thanks, > > >> vkj > > >> --------------------------------------- > >> Posted throughhttp://www.Electronics-Related.com > > >I think what you're talking about is quantization noise. =A0Both > >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. =A0If 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: > > >http://www.analog.com/static/imported-files/application_notes/6045243... > > >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. =A0Basically the > >equation means that if you want a certain dynamic range in the DAC > >passband, the response of the anti-aliasing filter must be =A0down 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. > > Thanks for your reply. =A0I 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. =A0=
Here
> the relationshipe between the DAC resolution and the sampling frequency i=
s
> clearly explained. =A0Intutively, the "steps" in the DAC/FOH output cause=
s
> spikes in the frequency domain, and these spikes become more "spread out" > and smaller as you increase the resolution. This is the quantization nois=
e.
> Increasing the sampling frequency causes this noise to also flatten and > spread out over the larger freq interval. =A0There is actually a simple > equation relating these in the tutorial: > =A0 SQR =3D 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 throughhttp://www.Electronics-Related.com
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
>On Dec 2, 7:26=A0pm, "vkj" <tranquine@n_o_s_p_a_m.n_o_s_p_a_m.gmail.com> >wrote: >> >On 11/28/2011 11:07 PM, vkj wrote: >> >> Usually the smoothing filter after the DAC is supposed to have a >> cut-off >> >> freq. <=3D 1/2 sampling freq. =A0So, eg., if one were to re-construct
=
>an >> audio >> >> sinewave of 100Hz, but provide samples at say 1000Hz, then you would >> need a >> >> smoothing filter with Fc: 100Hz <=3D Fc <=3D 500Hz. =A0But if the
DAC
>> resolution >> >> is low, a number of successive samples will be of the same
magnitude.
>> The >> >> input to the DAC would look as if it was sampled at a lower rate. >> Wouldn't >> >> that in effect be the same as if the sampling freq. were lower? >> >> >> What is the relationship between the smoothing filter cutoff
frequency
>> and >> >> the resolution of the DAC? >> >> >> Thanks, >> >> >> vkj >> >> >> --------------------------------------- >> >> Posted throughhttp://www.Electronics-Related.com >> >> >I think what you're talking about is quantization noise. =A0Both >> >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. =A0If 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: >> >> >http://www.analog.com/static/imported-files/application_notes/6045243... >> >> >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. =A0Basically the >> >equation means that if you want a certain dynamic range in the DAC >> >passband, the response of the anti-aliasing filter must be =A0down 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. >> >> Thanks for your reply. =A0I 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.
=A0=
>Here >> the relationshipe between the DAC resolution and the sampling frequency
i=
>s >> clearly explained. =A0Intutively, the "steps" in the DAC/FOH output
cause=
>s >> spikes in the frequency domain, and these spikes become more "spread
out"
>> and smaller as you increase the resolution. This is the quantization
nois=
>e. >> Increasing the sampling frequency causes this noise to also flatten and >> spread out over the larger freq interval. =A0There is actually a simple >> equation relating these in the tutorial: >> =A0 SQR =3D 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 throughhttp://www.Electronics-Related.com > >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 >
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 http://www.Electronics-Related.com
On Dec 11, 7:51=A0pm, "vkj"
<tranquine@n_o_s_p_a_m.n_o_s_p_a_m.gmail.com> wrote:
> >On Dec 2, 7:26=3DA0pm, "vkj" <tranquine@n_o_s_p_a_m.n_o_s_p_a_m.gmail.co=
m>
> >wrote: > >> >On 11/28/2011 11:07 PM, vkj wrote: > >> >> Usually the smoothing filter after the DAC is supposed to have a > >> cut-off > >> >> freq. <=3D3D 1/2 sampling freq. =3DA0So, eg., if one were to re-con=
struct
> =3D > >an > >> audio > >> >> sinewave of 100Hz, but provide samples at say 1000Hz, then you woul=
d
> >> need a > >> >> smoothing filter with Fc: 100Hz <=3D3D Fc <=3D3D 500Hz. =3DA0But if=
the
> DAC > >> resolution > >> >> is low, a number of successive samples will be of the same > magnitude. > >> The > >> >> input to the DAC would look as if it was sampled at a lower rate. > >> Wouldn't > >> >> that in effect be the same as if the sampling freq. were lower? > > >> >> What is the relationship between the smoothing filter cutoff > frequency > >> and > >> >> the resolution of the DAC? > > >> >> Thanks, > > >> >> vkj > > >> >> --------------------------------------- > >> >> Posted throughhttp://www.Electronics-Related.com > > >> >I think what you're talking about is quantization noise. =3DA0Both > >> >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. =3DA0If you consi=
der
> >> >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: > > >http://www.analog.com/static/imported-files/application_notes/6045243... > > >> >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. =3DA0Basically th=
e
> >> >equation means that if you want a certain dynamic range in the DAC > >> >passband, the response of the anti-aliasing filter must be =3DA0down =
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. > > >> Thanks for your reply. =3DA0I took a look at AN-282, and then searched=
the
> =3D > >A-D > >> website for more, and found an even better source: a Tutorial on DDS. > =3DA0=3D > >Here > >> the relationshipe between the DAC resolution and the sampling frequenc=
y
> i=3D > >s > >> clearly explained. =3DA0Intutively, the "steps" in the DAC/FOH output > cause=3D > >s > >> spikes in the frequency domain, and these spikes become more "spread > out" > >> and smaller as you increase the resolution. This is the quantization > nois=3D > >e. > >> Increasing the sampling frequency causes this noise to also flatten an=
d
> >> spread out over the larger freq interval. =3DA0There is actually a sim=
ple
> >> equation relating these in the tutorial: > >> =3DA0 SQR =3D3D 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 throughhttp://www.Electronics-Related.com > > >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 =3D3D 1, 0dB > >7kHz =3D3D 0.96, -0.4dB > >10kHz =3D3D 0.92, -0.75dB > >20kHz =3D3D 0.69, -3.2dB > > >However, recreating the sound by using a linear ramp between sample > >points makes the spectral response worse: > >DC =3D3D 1, 0dB > >7kHz =3D3D 0.92, -0.73dB > >10kHz =3D3D 0.84, -1.5dB > >20kHz =3D3D 0.48, -6.3dB > > >Note: values were calculated using following formulas. > > x=3D3Dpi*f/44100 > >For stair step > > A(f) =3D3D sin(x)/x > >For ramp > > B(f)=3D3DA*A > > Interesting stuff. =A0I vaguely recall that in sampled data control syste=
ms,
> 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"? =A0Not sure how this relates to the sampling frequency since your > sampling freq. is fixed at the Nyquist rate. =A0Since all frequencies are > present in the input, difficult to say how aliasing has impacted each fre=
q.
> component that you have listed. > > vkj. > > --------------------------------------- > Posted throughhttp://www.Electronics-Related.com
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.