About The Applicability of Over-Sampling Theory

One fact which I have described in my blog, is that when Audio Engineers set the sampling rate at 44.1kHz, they were taking into account a maximum perceptible frequency of 20kHz, but that if the signal was converted from analog to digital format, or the other way around, directly at that sampling rate, they would obtain strong aliasing as their main feature. And so a concept which once existed was called ‘over-sampling’, in which then, the sample-rate was quadrupled, and by now, could simply be doubled, so that all the analog filters still have to be able to do, is suppress a frequency which is twice as high, as the frequencies which they need to pass.

The interpolation of the added samples, exists digitally as a low-pass filter, the highest-quality variety of which would be a sinc-filter.

All of this fun and wonderful technology has a main weakness. It actually needs to be incorporated into the devices, in order to have any bearing on them. That MP3-player, which you just bought at the dollar-store? It has no sinc-filter. And therefore, whatever a sinc-filter would have done, gets lost on the consumer.

Continue reading About The Applicability of Over-Sampling Theory

An Observation about the Daubechies Wavelet and PQF

In an earlier posting, I had written about what a wonderful thing Quadrature Mirror Filter was, and that it is better to apply the Daubechies Wavelet than the older Haar Wavelet. But the question remains less obvious, as to how the process can be reversed.

The concept was clear, that an input stream in the Time-Domain could first be passed through a low-pass filter, and then sub-sampled at (1/2) its original sampling rate. Simultaneously, the same stream can be passed through the corresponding band-pass filter, and then sub-sampled again, so that only frequencies above half the Nyquist Frequency are sub-sampled, thereby reversing them to below the new Nyquist Frequency.

A first approximation for how to reverse this might be, to duplicate each sample of the lower sub-band once, before super-sampling them, and to invert each sample of the upper side-band once, after expressing it positively, but we would not want playback-quality to drop to that of a Haar wavelet again ! And so we would apply the same wavelets to recombine the sub-bands. There is a detail to that which I left out.

We might want to multiply each sample of each sub-band by its entire wavelet, but only once for every second output-sample. And then one concern we might have could be, that the output-amplitude might not be constant. I suspect that one of the constraints which each of these wavelets satisfies would be, that their output-amplitude will actually be constant, if they are applied once per second output-sample.

Now, in the case of ‘Polyphase Quadrature Filter’, Engineers reduced the amount of computational effort, by not applying a band-pass filter, but only the low-pass filter. When encoding, the low sub-band is produced as before, but the high sub-band is simply produced as the difference between every second input-sample, and the result that was obtained when applying the low-pass filter. The question about this which is not obvious, is ‘How does one recombine that?’

And the best answer I can think of would be, to apply the low-pass wavelet to the low sub-band, and then to supply the sample from the high sub-band for two operations:

  1. The first sample from the output of the low-pass wavelet, plus the input sample.
  2. The second sample from the output of the low-pass wavelet, minus the same input sample, from the high sub-band.

Continue reading An Observation about the Daubechies Wavelet and PQF

Guessing at the Number of Coefficients Filters Might Need

There probably exist Mathematically-more-rigorous ways to derive the following information. But just in order to be able to understand concepts clearly, I often find that I need to do some estimating, that will give some idea, of how many zero-crossings, for example, a Sinc Filter should realistically have, on each side of its center sample. Or, of what kind of cutoff-performance the low-pass part of a Daubechies Wavelet will have, If it only has 8 coefficients…

If the idea is accepted that a low-pass filter is supposed to be of some type, based on the ‘Sinc Function’, including filters that only have 2x / 1-octave over-sampling, then a question which Electronics Experts will face, is what number of zero-crossings is appropriate. This question is especially difficult to find a precise answer to, because the series does not converge. It is a modified series of the form Infinite Sum (1/n) .

Just to orient ourselves within the Sinc Function when applied this way, the center sample is technically one of the zero-crossings, but is equal to 1, because it has the only coefficient of the form (0/0). After that, each coefficient twice removed is a zero-crossing, and the coefficients displaced from those are the standard non-zero examples.

Continue reading Guessing at the Number of Coefficients Filters Might Need

An Elaboration on Quadrature Mirror Filter

This was an earlier posting of mine, in which I wrote about a “Quadrature Mirror Filter”. But the above posting may not make it clear to all readers, why a QMF approach will actually result in two streams, each of which has half the sample-rate of the original stream.

A basic premise which gets used, is the Daubechies Wavelet, according to which there exists a Scaling Function that later gets named ‘H1′, and a corresponding Wavelet which gets named ‘H0′. It could also be thought that H1 is a low-pass filter with a corner frequency of 1/2 the Nyquist Frequency, while H0 is a Band-Pass Filter derived from H1. Also, because the upper cutoff frequency of H0 is the Nyquist Frequency, it is not clear to me either, why we would not just call that a High-Pass Filter. But the WiKi page calls that the Band-Pass Filter.

Alright, So we can start with a stream sampled at 44.1 kHz and derive two output streams, one which contains the lower half of frequencies, and the other of which contains the upper half. How do the sample-rates of either get halved?

The answer is that after we have filtered the original stream both ways, we pick out every second sample of each.

This is also what would get done if we were to use a (more expensive) Half-Band Filter based on ‘the Sinc Function’, to down-sample a stream. In contrast, if we are over-sampling a stream to the highest level of accuracy, we first repeat each sample once, and then apply the (better) low-pass filter.  (It should be noted however, that a 4-coefficient Daubechies Wavelet would be considered ‘deficient’. Those start to become interesting, at maybe 8 coefficients.)

But when it comes to Quadrature Mirror Filters, when we have down-sampled the stream, we have also halved its Nyquist Frequency – both times. But then in the case of ‘H0′ above, original frequency components above the Nyquist Frequency are subject to the phenomenon I mentioned in another posting, according to which they get mirrored back down, from the new, lower Nyquist Frequency, all the way to zero (DC). Hence, the output of H0 gets inverted in frequencies, when it is subsequently down-sampled.

Dirk

Continue reading An Elaboration on Quadrature Mirror Filter