Hello, I am looking for a way to get the minimum phase version of a FIR filter. I saw the tutorial in DSPguru.com: http://www.dspguru.com/howto/tech/minph.htm The question I have is specifically about the Homorphic filtering method. I've checked one of the sources for this Method (Discrete-Time Signal Processing by A. V. Oppenheim and R. W. Schafer) and there are several differences between what is shown in the Webpage and what the book says. Could anyone help me to clarify them? - 4.Calculate 0.25 * log(|H(k)|^2): Why is the Magnitude of input sequence squared? Also, why is the log multiplied by 0.25. Going by the book log(|H(k)|) is the operation that should be done. - 5.Calculate IDFT (with scaling factor) of the results: What is meant by scaling factor? 0.25? 1/0.25? There is no mention of such a thing in the book. - 6.Multiply pointwise by the homomorphic filter lmin[n] = 2u[n] - d[n]: This function is allright, but when doing this process with the DFT (or FFT) instead of using the DFTF some issues have to be taken in account, like periodicity. According to the book this function should be: lmin[n]: 1 if n=0, 2 if 1<=n<=N/2, 0 if N/2+1<=n<=N 10.Keep half of the results as the minimum phase filter: If in step one it is recommended that the input sequence should be zero padded up to four times the length of original one, to reduce effects of aliasing; then keeping half of the result won't leave my a sequence that is two times longer than the initial? I really appreaciate any help I can get. Thank you, Pepe

# Minimum-Phase FIR Filters Tutorial in DSPguru.com

On Wed, 20 Aug 2003 23:28:40 -0700, Pepe Barbe wrote:> I am looking for a way to get the minimum phase version of a FIR filter. > I saw the tutorial in DSPguru.com:Sorry I didn't reply to your email. It is sitting in my "to be replied to" folder, but I have been a little busy lately...> - 4.Calculate 0.25 * log(|H(k)|^2): Why is the Magnitude of input > sequence squared? Also, why is the log multiplied by 0.25. Going by the > book log(|H(k)|) is the operation that should be done.I think this results from a subtle difference between the applications, and also the fact that I am being a bit pedantic. O&S is assuming that the application is extracting the mp sequence from a generic sequence. My tutorial assumes filter design. With filter design, you start out with the H^2 response and generate the mp representation of the H response. This is where the ^2 comes from. To be honest, I can't remember where the 0.25 comes from right now.> - 5.Calculate IDFT (with scaling factor) of the results: What is meant > by scaling factor? 0.25? 1/0.25? There is no mention of such a thing in > the book.The scaling factor is the 1/N factor in the IDFT. Some IDFT routines leave this out, (FFTW does).> - 6.Multiply pointwise by the homomorphic filter lmin[n] = 2u[n] - d[n]: > This function is allright, but when doing this process with the DFT (or > FFT) instead of using the DFTF some issues have to be taken in account, > like periodicity. According to the book this function should be: > > lmin[n]: 1 if n=0, 2 if 1<=n<=N/2, 0 if N/2+1<=n<=NWhere is this in O&S? I don't have code handy, but I thought I used the equation as is.> 10.Keep half of the results as the minimum phase filter: If in step one > it is recommended that the input sequence should be zero padded up to > four times the length of original one, to reduce effects of aliasing; > then keeping half of the result won't leave my a sequence that is two > times longer than the initial?Bad wording on my part. Keep half of the length of the prototype filter, before zero padding. Basically, the process throws out half of the zeros, so the filter is half the length. If I can find any of my old code, I will send it to you. HTH -- Matthew Donadio (m.p.donadio@ieee.org)

Matthew Donadio wrote:>...> To be honest, I can't remember where the 0.25 comes from right now. >A guess: one square root because the mp response is the square root of the original H, the other, part of getting the magnitude. I should read the tutorial instead of guessing. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������