A circuit which was invented ‘in the analog days’, a Correlation Cancellation Loop, has numerous uses even today. This is the basic diagram:
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 … )
(As Of 07/08/2018 : )
One main caveat to how this circuit works is, that the integrator defines both what the minimum signal-frequency is, as well as what the agility is with which the reference signal can be adapted, when the degree of initial correlation changes. We might want very agile behavior, so that correlation can be made to cancel in the shortest-possible term, but increasing the cutoff-frequency / decreasing the time-constant, has as additional effect, that below some frequency the circuit will just not transmit any components of the main input, if the reference input has some positive component below that frequency as well.
Another caveat is, that because the discriminator will only give a non-zero value, when the sine-waves which are contained in both inputs are in-phase, the possibility exists, that the inputs contain the same frequency-component, only 90⁰ out-of-phase to begin with, so that the discriminator would not detect it. If this needed to be suppressed at all costs, I suppose that two such circuits could be chained, with the output from the first forming the main input of the second, but with the reference signal already applied to the first, being phase-shifted by 90⁰, before being applied as the reference input of the second instance. But, In some practical usage scenarios, it’s actually desirable only to cancel the in-phase component, of the reference, from the main input.
This circuit is extremely easy to discretize – i.e. to produce a digital, time-domain algorithm for. The discriminator can simply be replaced with a multiplier-stage, the outputs of which will instantaneously be non-zero throughout. But, because the integrator is also acting as a low-pass filter, short-term outputs from a simple signal-multiplier, will be attenuated – assuming that the time-constant of the integrator has been chosen appropriately – while long-term, consistent outputs are amplified and made part of the negative feedback-loop.
The real corner-frequency of the circuit is the frequency at which the open-loop gain reaches (1), and not the corner-frequency of the low-pass filter. But an integrator / low-pass filter is also extremely easy to discretize.
In some applications, such as the case which I blogged about according to the link above, this type of loop will act to assure, that when given audio inputs that have in-phase and out-of-phase components, a derived signal results, which only contain the ±90⁰ out-of-phase componentS, simultaneously.
(Edit : )
I suppose that this type of circuit has another caveat which I should point out. If the discriminator had as output, only the instantaneous product between its two sources of input-samples, then the output would be in amplitude units squared – i.e., in Volt2. The problem with this would be, that the input-amplitudes to the whole circuit might not be normalized in any way – i.e., may vary over a wide range – and yet, the output of the discriminator should be in straight units, so that if it gets multiplied by the (Voltage) amplitudes of the reference input, the results will be to-scale again, with the Voltage-amplitudes of the main input.
The way this type of problem would be solved is with another component-block, which is not diagrammed above. This component would take the most-reliable input-stream – such as the main input – and would just square its instantaneous sample-values by themselves, to arrive at another set of values in Volt2. Then, this additional component would pass the result through a low-pass filter, the corner-point of which matches that of the whole circuit, so that the output from the discriminator can be divided by this reference-value. Volt2 / Volt2 == Unit / Unit.
(Update 07/18/2018, 20h35 : )
Of course, as is the case with many circuits, which once had to be implemented as circuits, but which can be replaced today with algorithms, there is a basic way to improve the above circuit.
Two input streams can be named the ‘Main Input’ and the ‘Reference Input’. Each input stream can be subdivided into overlapping sampling-windows, even though no Fourier Transform is to be computed. And then the correlation between two sampling windows can be computed (in the time domain), such that the corresponding product of the ‘Reference Input’ sampling-windows, when subtracted from the corresponding sampling-windows in the ‘Main Input’, result in a correlation of zero.
The main advantage of doing it that way would be, that even given relatively long sampling-windows, the response would be closer to instantaneous, whereas before, the speed of the result would have been subject to that of a low-pass filter.