I'm trying to model a transfer function for a noisy audio system, specifically to measure delayed system response. Before I can confidently apply control, I need to verify that I can exert control over the system by broadcasting a signal and listening for the delayed (and potentially noisy) feedback.
I suspect I can add or subtract a unique signal to pink noise to simultaneously calibrate my transfer function as well as verify that the system is responding to my input.
Is there any prior art on this? Is pink noise the right approach here?
Current Plan:
- Generate a second of pink noise and calculate its FFT.
- Generate a second of unique signal and calculate its FFT. Maybe this can be a simple square wave at 5kHz.
- Sum the noise and carrier signal together as test signal. Split the signal into five 200ms chunks, calculate the FFT of the noise
- Record a second of (noisy) silence.
- Start broadcasting the combined test signal, while still recording.
- Take the FFTs of the "empty" and "full" signals. The difference should be the ambient noise.
- Look for the source spectrum distribution.
- Given that we found the distribution we were looking for, cross-correlate the recording with the source signal to find the delay at
k
samples.
Does this sound about right? When I'm done, I should know the average ambient noise, the system delay and the harmonic distortion (maybe I need to sweep frequency for this?).
For calibration, performance doesn't have to be real-time. Is there a more complicated sweep function I can use to find a more accurate delay and response?