Building on the above, here's the simplest IIR filter function I could find:-
ET(n) =
+ 26403/65536 * ET(n-2)
+ 30334/65536 * P(n+2)
+ 12794/65536 * P(n+1)
- 4093/65536 * P(n)
where ET(n) is the Estimated Toshiba ouptut sample at time=n and P(n) is the Pioneer (or "pure"
) input sample at time=n. This model has a latency of two samples (ie: looks ahead at the input) and also takes feedback from its own output two samples prior.
Edit: Letting the recursion act on ET(n-1) instead of ET(n-2), the P(n) coefficient drops out altogether and an even simpler approximation is obtained:-
ET(n) =
+ 41596/65536 * ET(n-1)
+ 30331/65536 * P(n+2)
- 6451/65536 * P(n+1)
The "minus one" issue appears to be related to the arithmetic precision of the filter calculation and truncation to a final integer value. There are various ways to approximate it, such as:-
Output(n) = ET(n) - 1
Output(n) = int( ET(n) - 0.1 )
Output(n) = int( 16*ET(n) )/16 to simulate 20-bit arithmetic
etc. etc.
This has to be done as a separate operation to the calculation of ET(n) though, to prevent the rounding errors feeding into the recursion.
I figured it's all being done in integer arithmetic so I converted the coefficients to 16-bit fractions. In fact, the approximation improved when all the output samples were truncated to integers with no rounding. Not perfect, but very close (within +/-1 everywhere I looked).
This filter takes about 6 samples to stabilize but with a bit of reverse engineering I found that by sticking a dummy sample of 235 at the front of the Pioneer data (at time=0) and allowing the estimator function to start at time=-2, the filter accurately predicted the Toshiba's output from the first data point (at time=1). I've no idea how to derive the boundary condition but at least I now understand how the Toshiba comes up with 181 for the first sample when the disc data says 27.
jefemeister has already beaten me to the white noise analysis but for the sake of confirmation:-
The "Difference" graph shown here is the inversion of the filter response, which is -3dB at at 3.5kHz, -6dB at 7kHz and -9dB from 16kHz up. That's quite a roll-off in the treble (should be easily audible).
jefemeister, my phase graph came up quite differently to yours. I'm guessing you measured T(n) against P(n+2), which is quite reasonable given the latency of the filter. [Also gives the cleanest graph, since P(n+2) has the heaviest weighting. My phase graph is a bit dirty, so I'll show mercy and refrain from posting it for the moment.
]
If the analog stage of the Toshiba counteracts this digital filter, one wonders what benefit is gained...