zamproject said:
Hi all
What type of filter/integrator can be used to have a good attenuation at 100kHz if the cut off is around 20kHz ?
2nd order should be good enough, 4th is being conservative. I like Bessel curves to minimize group delay as it's the most perceived distortion in filters but it does hurts the freq response specs.
I mean we need about 100dB to extract all PW noise.
No you don't, as the maximum attenuation shouldn't be 100%, but the ~20dB you allow for maximum range the noise is already lower, that's one of the things about not over estimating the range, then there is the fact that the noise is over the useful band, so you just need enough to avoid aliasing at the input and at the output some smoothing so the out of band energy doesn't cause troubles in the next stage. (slew rate issues for instance) Then the actual HF noise till it gets to the speakers has plenty stages to be loose in action.
I just do some (online) calculation with 3d order Sallen-Key at Fc=20kHz, it only cut 40dB at 100kHz introducing up to 20uS delay
Best
Zam
So the band of interest is 20kHz because we are audio noodles, and don't want to get over 50kHz as Rupert always wish. Then previous to the modulator we need to filter out anything that might bring problems to this. As the PWM freq is 100kHz, anything below 80kHz would mean a problem, we need an attenuation at 80kHz to get existing noise at 80kHz below (or equal to) the original noise at 20kHz. The signal we are starting with shouldn't have much content at 80kHz to start with. Let's account for a worst case broadband pink noise signal That's 12dB under the signal at 20kHz but even lower than the RMS signal, or the in band signal but the noise flor is flat. At 20kHz we are already 60dB under the 20Hz level, for 100dB dynamic range we need an attenuation at 80kHz of... 100dB-72dB=38dB, that's 2 octaves away from the frequency to conserve. There a 4th order filter is required.
I wouldn't expect such signal at the input and you have to account the input filtering of the device protecting from RFI and such, plus the compensation of the opamps, etc as filtering stages, In all of which you are probably loosing something at 80kHz. Then as I said I wouldn't expect to have that much signa at 80kHz to start nor be that worried of the S/N at 20kHz as lower in the band. So you can relax the filter specs a bit without worrying too much. Then there is the filter curve to choose, for better freq response specs Chebyshev filter gives the better figure to show in the paper but I don't like to hear filtered by Chebyshev filters. On the other extreme of the spectrum there are the Bessel filters which gives the worse freq response to show in paper but they are much nicer to listen to. Then there are many options in the middle to have a balance between them. You need to figure out how much attenuation you want at 80kHz and how much you already have in the system. 38dB seems too conservative, I'd probably be happy with anything over 30dB. Then how much you allow to hurt the band, in amplitude response and group delay/phase.
For the reconstruction it's even simpler, as you just need to limit the slew rate to a level to be close enough to the maximum expected signal slew rate. You don't need to allow rail to rail travel at max freq, slew rate figures for audio is another discussion but there are reference to go with or there's not so hard to come out with a figure. Then at 100kHz the travel will be half peak to peak minus the attenuation range (20dB max atten would give 0.45 max peak to peak level) and from there the numbers roll out.
You need passive filtering for the first stage and then be able to manage the slew rate, so a faster opamp doing that filtering is a good idea. The stage after the filter should be fine and have some extra attenuation and subsequent stages shouldn't mean a problem. I'd spect 1st order passive plus 2nd order filter to be plenty enough.
JS