Regarding K(f), I have a question about its practical impact on the system behavior.
It seems that applying K(f) increases the relative level of the close-in SSB components with respect to the carrier, and this may potentially interfere with the atan2-based phase detector.
n of the L-R channel.
However, this characteristic is precisely what enables the atan2 phase detector
to operate reliably at all, without requiring an extremely narrow pre-filter.
However, this raises a couple of structural questions about the processing chain:
My current pipeline is:
IF → BPF → mixdown → atan2 → NCO output
and in parallel:
IF → mixdown → DSB demod → LPF → L-R extraction
...
Where would the inverse K(f) be correctly applied in this structure?
I would suggest the following structure:
composite(real) → M'
composite(real) → mixer(real x complex) → lowpass → [ optionally down-sample ] → atan2 → PLL loop filter → VCO(complex) → back to mixer
composite(real) → mixer(real x complex) → extract real part → S'
M' → 15 kHz lowpass → de-emphasis → M
S' → K
-1(f) → 15 kHz lowpass → de-emphasis → S
The ordering of cascaded filters is irrelevant in linear system theory; however, structural rearrangement is often driven by practical implementation constraints. So feel free to re-arrange. Furthermore, because K(s) · K⁻¹(s) = 1, introducing a compensation delay in the M path is unnecessary, provided that K⁻¹(s) is realized as an analog or digital IIR filter.
In the flowchart above, I replaced the band-pass filter in front of the loop with a low-pass filter inside the PLL loop. For a loop bandwidth of less than 10 Hz, the loop should still remain stable despite the phase margin reduction introduced by the low-pass filter.
The optional down-sampling step reduces the computational overhead of the atan2 operation and PLL updates by eliminating the need for per-sample execution. Additionally, if the low-pass stage is a FIR filter, the computational complexity is significantly minimized when the filter calculation is combined with down-sampling. This can be implemented as a polyphase decimator, or, if the down-sampling factor equals the filter length, it even becomes a highly efficient block filter.
Particularly in the block filter configuration, the FIR approach is significantly more efficient than an IIR filter. Nevertheless, I am still investigating whether a 3rd-order critically damped IIR filter could be used for the non-down-sampled case.
Since K(f) has a non-trivial frequency-dependent phase response, it affects not only magnitude but also the phase structure of the L-R component.
Does this imply that the inverse filter must reproduce both magnitude and phase characteristics of K(f) very accurately in order to preserve correct stereo separation? Otherwise, could this introduce additional separation errors between channels?
Yes, I would say so. In the analog domain, you can undo it exactly using a simple R1, R2, C filter and a 5x gain stage. In the digital domain, you need to check how well the magnitude and phase responses of the bilinear transform of K⁻¹(s) match those of the continuous-time K⁻¹(s). Maybe K⁻¹(z) needs to be tweaked a bit. [ Well, I said 'exact,' but in reality, analog also suffer from component tolerances. ]
EDIT:
Nevertheless, I am still investigating whether a 3rd-order critically damped IIR filter could be used for the non-down-sampled case.
The following IIR filter also seems to work ffine for me.
Tau is the same as for K(f). We need 3rd order, in order to get > 100 dB for 15kHz mono components.
% phase detector pre-filter
[b3,a3] = bilinear(1, [tau^3, 3*(tau^2), 3*tau, 1], 1/Fs);