Forums

How to get rid of resampling artifacts ?

Started by John McDermick November 23, 2010
On Nov 24, 12:49&#2013266080;am, John McDermick <johnthedsp...@gmail.com> wrote:
> > John, this filter doesn't look all that great: > > Why does the filter look bad? What is it exactly that you are looking > at that makes you say that the filter looks bad?
well, the frequency response of the filter with coefficient you give is consistent with the spectrum you show where the spectral lines of images are only reduced by 60 or 70 dB. you understand that quantizing the coefficients will change your frequency response "slightly". from a dB perspective, the degradation of frequency response will be more noticeable in the stopband where a small numerical error results in more dB relative to the stopband energy level. the other part of the noisy-looking part of spectrum is probably from the roundoff error. i dunno where the odd-harmonic distortion comes from. r b-j
On Nov 23, 6:06&#2013266080;pm, John McDermick <johnthedsp...@gmail.com> wrote:
> >Try plotting the fixed > >point output of the impulse input vs. the average of the fixed point > >output. &#2013266080;That will show the noise floor in a relative way, but still > >not in an absolute way. > > Do you mean plotting X - mean(X) &#2013266080;??? &#2013266080;...where X contains the > magnitudes expressed in dB > > If so, here is the plot: > > http://img593.imageshack.us/img593/6756/fig4.png
I meant plotting X/mean(X). Or just plot X. That is what Randy did for you. That tells you how well your filter works. Using the ratio to the floating point filter just shows you where the floating point filter is really good (or more accurately, ideal) rather than showing where the fixed point filter is bad. Each of the peaks in your initial graph corresponds to a null in the filter. So the floating point filter does a better job of making nulls which results in the peaks in your comparison graph. Do you really care about the nulls? As Randy was saying, a stopband of -60 dB is not so fantastic. But if that is good enough for your needs, I'd say you are done. Rick
robert bristow-johnson <rbj@audioimagination.com> writes:
> [...] > the other part of the noisy-looking part of spectrum is probably from > the roundoff error. i dunno where the odd-harmonic distortion comes > from.
Yeah, I couldn't figure that out either. Perhaps it's requantization error. -- Randy Yates % "So now it's getting late, Digital Signal Labs % and those who hesitate mailto://yates@ieee.org % got no one..." http://www.digitalsignallabs.com % 'Waterfall', *Face The Music*, ELO
John McDermick <johnthedspguy@gmail.com> writes:

>> John, this filter doesn't look all that great: >> > > Why does the filter look bad? What is it exactly that you are looking > at that makes you say that the filter looks bad?
The fact that the stopband is 70 dB or so. If you need your images to be attenuated more than that, you'll have to come up with a better filter. I was assuming the images at N * 16 kHz, +/- 440 Hz (N > 0), are what you were referring to as "resampling artifacts" - perhaps I am mistaken. Please clarify which part(s) of that spectrum constitute the "artifacts" you are referring to. -- Randy Yates % "Remember the good old 1980's, when Digital Signal Labs % things were so uncomplicated?" mailto://yates@ieee.org % 'Ticket To The Moon' http://www.digitalsignallabs.com % *Time*, Electric Light Orchestra
Randy Yates <yates@ieee.org> writes:
> [...] > The fact that the stopband is 70 dB or so.
Woops - I mis-stated that number. Eyeballing my graph again I'd say 55 or 60 dB. -- Randy Yates % "Midnight, on the water... Digital Signal Labs % I saw... the ocean's daughter." mailto://yates@ieee.org % 'Can't Get It Out Of My Head' http://www.digitalsignallabs.com % *El Dorado*, Electric Light Orchestra