0
$\begingroup$

I am trying to convert a zero phase spectrum (magnidue response curve with zero phases) to a minimum phase spectrum, because I need a totally causal impulse response for FFT spectral filtering, and having an IR devoid of anticausal components allows me to implement a zero latency partitioned scheme.

By now I experimented with two similar methods based on the real cepstrum but my question is inherent to the second method.

In the first method you compute the cepstrum by taking the ifft of the log of the magnitude curve, negate the second half of the cepstrum (actually I rather use a cosine function to have a more graceful transition and less ringing artifacts), take the fft of the result and then instead of computing the exp of the resulting spectrum I simply keep the phase combining it with the original magnitude. This method works well enough despite the resulting IR doesn't always fade to zero.

In the second method you zero the second half of the cepstrum instead of negating it (here too I rather prefer a rised cosine for a more graceful transition), double the result, take the fft and then exponentiate the result. Here is the problem. The resulting spectrum is uniformly scaled by a variable amount which seems depending on the shape of the original magnitude spectrum, so I cannot compensate by scaling by a fixed value because I don't know the relationship between the resulting scaling factor and the original magnitude spectrum, and I can't definitely have a global level which is dependent on it! I searched but I found very little information around about the min phase cepstrum method. How can I scale the final result properly? I realize this may be a very specialistic topic. Thanks

$\endgroup$
0
$\begingroup$

One possibility is to take the FFT magnitude of both, run a linear regression between the two magnitude vectors, and adjust the gain until the slope of the regression fit is 1.

$\endgroup$
1
  • $\begingroup$ unfortunately I am not expert with LR, I tried to simply compute the max level m of the original magnitude vector and of the resulting one m', and scale the result by m/m' and it does a nice job but not perfect, suggesting that the relationship is not trivial at all... the very fact of scaling the cepstrum by a non uniform amount creates this strange relationship which my math skills aren't deep enough to formalize $\endgroup$ – elena Mar 27 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.