What is a Correlation Cancellation Loop?

A circuit which was invented ‘in the analog days’, a Correlation Cancellation Loop, has numerous uses even today. This is the basic diagram:

ccl_1-svg

What this circuit attempts to do, is to provide an output, which is approximately equal to the main input, with the modification being applied, that the output should not correlate with the ‘reference input’ (in my terminology). Due to the origin of this circuit, it has a very basic way of operating. A phase-discriminator monitors the output as well as the reference input, and determines by how much they correlate.

Here, the type of discriminator which was once used had as property, to output a voltage of zero, if fed two sine-waves that were 90⁰ phase-shifted. For any other phase-shift, a non-zero output voltage resulted. A discriminator was also used for RF purposes, as part of a Frequency-Modulation Demodulator. But a CCL did not tend to be used at RF frequencies.

The output from the discriminator was then fed into an integrator, where practical integrators are actually first-order low-pass filters. Electrical Engineers don’t really want the output-gain to go to infinity, just because the input-frequency was low, or because the input was consistently non-zero. And so below some frequency, the response-curve of practical integrators levels off. But for conceptual purposes, they are operated as integrators, somewhere along their -6db /Octave falloff curve.

The intent is, for the non-zero correlation of the output to modulate the reference signal – positively or negatively – such that the modulated result gets added to the main input, eventually to result in a correlation of zero. Hence, it was assumed that the two inputs had some amount of correlation to begin with, so that some product of the reference input could either be added to or subtracted from the main input, to achieve a hypothetical absence of the signal at the reference input, from the output.

(Updated 07/18/2018, 20h35 … )

Continue reading What is a Correlation Cancellation Loop?

Emphasizing a Presumed Difference between OGG and MP3 Sound Compression

In this posting from some time ago, I wrote down certain details I had learned about MP3 sound compression. I suppose that while I did write, that the Discreet Cosine Transform coefficients get scaled, I may have missed to mention in that same posting, that they also get quantized. But I did imply it, and I also made up for the omission in this posting.

But one subject which I did mention over several postings, was my own disagreement with the practice, of culling frequency-coefficients which are deemed inaudible, thus setting those to zero, just to reduce the bit-rate in one step, hoping to get better results, ‘because a lower initial bit-rate also means that the user can select a higher final bit-rate…’

In fact, I think that some technical observers have confused two separate processes that take place in MP3:

  1. An audibility threshold is determined, so that coefficients which are lower than that are set to zero.
  2. The non-zero coefficients are quantized, in such a way that the highest of them fits inside a fixed maximum, quantized value. Since a scale-factor is computed for one frequency sub-band, this also implies that close to strong frequency coefficients, weaker ones are just quantized more.

In principle, concept (1) above disagrees with me, while concept (2) seems perfectly fine.

And so based on that I also need to emphasize, that with MP3, first a Fast-Fourier Transform is computed, the exact implementation of which is not critical for the correct playback of the stream, but the only purpose of which is to determine audibility thresholds for the DCT transform coefficients, the frequency-sub-bands of which must fit the standard exactly, since the DCT is actually used to compress the sound, and then to play it back.

This FFT can serve a second purpose in Stereo. Since this transform is assumed to produce complex numbers – unlike the DCT – it is possible to determine whether the Left-Minus-Right channel correlates positively or negatively with the Left-Plus-Right channel, regarding their phase. The way to do this effectively, is to compute the dot-product between two complex numbers, and to see whether this dot-product is positive or negative. The imaginary component of one of the sources needs to be inverted for that to work.

But then negative or positive correlation can be recorded once for each sub-band of the DCT as one bit. This will tell, whether a positive difference-signal, is positive when the left channel is more so, or positive if the right channel is more so.

You see, in addition to the need to store this information, potentially with each coefficient, there is the need to measure this information somehow first.

But an alternative approach is possible, in which no initial FFT is computed, but in which only the DCT is computed, once for each Stereo channel. This might even have been done, to reduce the required coding effort. And in that case, the DCT would need to be computed for each channel separately, before a later encoding stage decides to store the sum and the difference for each coefficient. In that case, it is not possible first to determine, whether the time-domain streams correlate positively or negatively.

This would also imply, that close to strong frequency-components, the weaker ones are only quantized more, not culled.

So, partially because of what I read, and partially because of my own idea of how I might do things, I am hoping that OGG sound compression takes this latter approach.

Dirk

Continue reading Emphasizing a Presumed Difference between OGG and MP3 Sound Compression