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.