Fred Marshall wrote:> "Rune Allnor" <allnor@tele.ntnu.no> wrote in message > news:f56893ae.0311020443.7b0bf86b@posting.google.com... > >>allnor@tele.ntnu.no (Rune Allnor) wrote in message > > news:<f56893ae.0310310733.7b32304f@posting.google.com>... > >>>"Matt Timmermans" <mt0000@sympatico.nospam-remove.ca> wrote in message > > news:<P9kob.4987$Nz5.422060@news20.bellglobal.com>... > > ,,,,,,,,,,,,,,,,,,,,,,,,,,,, > > >>One way of doing this would be to formulate the magnitude spectrum H(z), >>inverse transform the spectrum to find the non-causal imulse tranform >>of the filter and then use the coefficients of the spectrum as >>coefficients of the filter difference equation and solve for the roots >>of that equation. Accepting only the roots z_m such that |z_m| < 1, >>we now should be able to find the coefficients of the "half filter" >>G(z), which in turn could be cascaded by itself to find H(z). >> >>This could work if the number of coefficients in the FIR filter is >>"sufficiently small", whatever that may mean, as I think most of the >>work and most of the inaccuracy would be concerned with rooting the >>polynomial. > > > > Rune, > > There are a multiplicity of filters with the same magnitude response - > depending on which zeros are inside and which zeros are outside the unit > circle. Any pair of zeros with the same real part and imaginary parts of > opposite sign can be replaced by a pair of zeros (switching to polar > coordinates) with the same value for rho and with distance from the orgin of > 1/L where L is the original distance. > > To get minimum phase from the same magnitude response, all you have to do is > replace the zeros that are outside the unit circle with zeros (as above) > that are inside the unit circle ... that are conjugate to the ones being > replaced. > > FredAs a practical matter, you can do pretty well by approximating the log frequency response with piecewise linear segments whose slopes are integer multiples of 20 dB/decade, then writing the up breaks as poles and the down breaks as zeros. That's a graphical way to approximate the Hilbert relation between frequency and minimum phase. It's encapsulated in the Bode plot. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Minimum Phase Impulse Response
Started by ●October 29, 2003
Reply by ●November 2, 20032003-11-02
Reply by ●November 2, 20032003-11-02
"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message news:<IdadneNuWJlF3ziiRVn-sg@centurytel.net>...> "Rune Allnor" <allnor@tele.ntnu.no> wrote in message > news:f56893ae.0311020443.7b0bf86b@posting.google.com... > > allnor@tele.ntnu.no (Rune Allnor) wrote in message > news:<f56893ae.0310310733.7b32304f@posting.google.com>... > > > "Matt Timmermans" <mt0000@sympatico.nospam-remove.ca> wrote in message > news:<P9kob.4987$Nz5.422060@news20.bellglobal.com>... > > > > ,,,,,,,,,,,,,,,,,,,,,,,,,,,, > > > One way of doing this would be to formulate the magnitude spectrum H(z), > > inverse transform the spectrum to find the non-causal imulse tranform > > of the filter and then use the coefficients of the spectrum as > > coefficients of the filter difference equation and solve for the roots > > of that equation. Accepting only the roots z_m such that |z_m| < 1, > > we now should be able to find the coefficients of the "half filter" > > G(z), which in turn could be cascaded by itself to find H(z). > > > > This could work if the number of coefficients in the FIR filter is > > "sufficiently small", whatever that may mean, as I think most of the > > work and most of the inaccuracy would be concerned with rooting the > > polynomial. > > > Rune, > > There are a multiplicity of filters with the same magnitude response - > depending on which zeros are inside and which zeros are outside the unit > circle. Any pair of zeros with the same real part and imaginary parts of > opposite sign can be replaced by a pair of zeros (switching to polar > coordinates) with the same value for rho and with distance from the orgin of > 1/L where L is the original distance. > > To get minimum phase from the same magnitude response, all you have to do is > replace the zeros that are outside the unit circle with zeros (as above) > that are inside the unit circle ... that are conjugate to the ones being > replaced.Eh... I'm not sure if I understand what you mean. Let's see... apparently we agree that half of the zeros ensure linear phase (by being the reciprocals of the zeros that "define" the filter response) while half of the zeros ensure that the filter is noncausal... by being the *conjugates* of the "defining" zeros. And these two halves are not the same. Is that what you are saying? In that case my approach go nowhere, because my filter would be munimum phase but noncausal. Right? OK, the lesson learned is "Don't do DSP at 9 AM sunday morning"... ;) Rune
Reply by ●November 2, 20032003-11-02
Rune Allnor wrote: ...> > > Eh... I'm not sure if I understand what you mean. Let's see... apparently > we agree that half of the zeros ensure linear phase (by being the > reciprocals of the zeros that "define" the filter response) while half > of the zeros ensure that the filter is noncausal... by being the > *conjugates* of the "defining" zeros. And these two halves are not the > same. Is that what you are saying? > > In that case my approach go nowhere, because my filter would be munimum > phase but noncausal. Right? > > OK, the lesson learned is "Don't do DSP at 9 AM sunday morning"... ;) > > RuneI think he means to keep all the zeros, but to reflect the ones outside the unit circle to the inside Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●November 2, 20032003-11-02
"Jerry Avins" <jya@ieee.org> wrote in message news:bo431e$sp8$1@bob.news.rcn.net...> Rune Allnor wrote: > > ... > > > > > > Eh... I'm not sure if I understand what you mean. Let's see...apparently> > we agree that half of the zeros ensure linear phase (by being the > > reciprocals of the zeros that "define" the filter response) while half > > of the zeros ensure that the filter is noncausal... by being the > > *conjugates* of the "defining" zeros. And these two halves are not the > > same. Is that what you are saying? > > > > In that case my approach go nowhere, because my filter would be munimum > > phase but noncausal. Right? > > > > OK, the lesson learned is "Don't do DSP at 9 AM sunday morning"... ;) > > > > Rune > > I think he means to keep all the zeros, but to reflect the ones outside > the unit circle to the insideLike he (Jerry) sez. You need to keep them all or the magnitude response changes. Any zero pair, as those I defined, contribute to the response. If all the zeros are outside the unit circle, you get maximum phase. If all the zeros are inside the unit circle, you get minimum phase. If you have a mix, then something in between re: phase. Fred
Reply by ●November 3, 20032003-11-03
"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message news:<BsSdnaJA6oskLziiRVn-sg@centurytel.net>...> "Jerry Avins" <jya@ieee.org> wrote in message > news:bo431e$sp8$1@bob.news.rcn.net... > > Rune Allnor wrote: > > > > ... > > > > > > > > > Eh... I'm not sure if I understand what you mean. Let's see... > apparently > > > we agree that half of the zeros ensure linear phase (by being the > > > reciprocals of the zeros that "define" the filter response) while half > > > of the zeros ensure that the filter is noncausal... by being the > > > *conjugates* of the "defining" zeros. And these two halves are not the > > > same. Is that what you are saying? > > > > > > In that case my approach go nowhere, because my filter would be munimum > > > phase but noncausal. Right? > > > > > > OK, the lesson learned is "Don't do DSP at 9 AM sunday morning"... ;) > > > > > > Rune > > > > I think he means to keep all the zeros, but to reflect the ones outside > > the unit circle to the inside > > Like he (Jerry) sez. > > You need to keep them all or the magnitude response changes. > Any zero pair, as those I defined, contribute to the response. > If all the zeros are outside the unit circle, you get maximum phase. > If all the zeros are inside the unit circle, you get minimum phase. > If you have a mix, then something in between re: phase.So if I abandon that "noncausal argument", and instead design a causal linear phase FIR filter (which essentially amounts to delay the impulse response by a filter half-length) and find its roots, I end up with a total response as |H(z)| = |G(z)*G'(z)| where G contains all the roots inside the unit circle and G' contains all the roots outside the unit circle. I interpret that as the total filter H(z) implemented as a cascade coupling of one minimum phase filter G(z) and a maximum phase filter G'(z). Do we agree that the same magnitude spectrum H(z) can be implemented as a cascade of two similar minimum phase filters, G(z) and G(z) such that |H(z)| = |G(z)*G(z)| which appears to meet the specs, H(z)=G^2(z) is causal and also minimum phase? If so, I think Matt's original problem in principle can be solved, though with the already stated practical caveat about finding roots of "large" polynomials. Rune
Reply by ●November 3, 20032003-11-03
"Rune Allnor" <allnor@tele.ntnu.no> wrote in message news:f56893ae.0311030528.52ac968d@posting.google.com...> "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in messagenews:<BsSdnaJA6oskLziiRVn-sg@centurytel.net>...> > "Jerry Avins" <jya@ieee.org> wrote in message > > news:bo431e$sp8$1@bob.news.rcn.net... > > > Rune Allnor wrote: > > > > > > ... > > > > > > > > > > > > Eh... I'm not sure if I understand what you mean. Let's see... > > apparently > > > > we agree that half of the zeros ensure linear phase (by being the > > > > reciprocals of the zeros that "define" the filter response) whilehalf> > > > of the zeros ensure that the filter is noncausal... by being the > > > > *conjugates* of the "defining" zeros. And these two halves are notthe> > > > same. Is that what you are saying? > > > > > > > > In that case my approach go nowhere, because my filter would bemunimum> > > > phase but noncausal. Right? > > > > > > > > OK, the lesson learned is "Don't do DSP at 9 AM sunday morning"...;)> > > > > > > > Rune > > > > > > I think he means to keep all the zeros, but to reflect the onesoutside> > > the unit circle to the inside > > > > Like he (Jerry) sez. > > > > You need to keep them all or the magnitude response changes. > > Any zero pair, as those I defined, contribute to the response. > > If all the zeros are outside the unit circle, you get maximum phase. > > If all the zeros are inside the unit circle, you get minimum phase. > > If you have a mix, then something in between re: phase. > > So if I abandon that "noncausal argument", and instead design a causal > linear phase FIR filter (which essentially amounts to delay the impulse > response by a filter half-length) and find its roots, I end up with a > total response as > > |H(z)| = |G(z)*G'(z)| > > where G contains all the roots inside the unit circle and G' contains all > the roots outside the unit circle. I interpret that as the total filter > H(z) implemented as a cascade coupling of one minimum phase filter G(z) > and a maximum phase filter G'(z). Do we agree that the same magnitude > spectrum H(z) can be implemented as a cascade of two similar minimum > phase filters, G(z) and G(z) such that > > |H(z)| = |G(z)*G(z)| >Rune, I'd start here just to be complete I guess: |H(z)| = |G(z)*F(z)| where G contains all the roots inside the unit circle and F contains all the roots outside the unit circle with radii Li. (I don't yet want to say that G and F are somehow related). So, G is minimum phase and F is maximum phase. Now, it is also correct, subject to the comment below about zeros *on* the unit circle, that: |H(z)| = |G(z)*F'(z)| which is a cascade of two minimum phase filters and is also minimum phase. where we have replaced F(z) with F'(z) which has polar locations for zeros at radii 1/Li (inside the unit circle). So far, so good. Now, since F(z)=G'(z) and G(z)=F'(z) for a linear phase filter, then what you say is *also* correct with one minor change. If there are any zeros *on* the unit circle, you need to include them in either G or F for this to make sense. Only if there are no zeros on the unit circle can you say: |H(z)| = |G(z)*G(z)| because now F'(z)=G(z) Otherwise it's going to be |H(z)| = |G(z)*F'(z)| because F'(z) <> G(z) .... one of them has the unit circle zeros included in it. Oppenheim & Schafer deal with all this pretty well. Fred
Reply by ●November 3, 20032003-11-03
allnor@tele.ntnu.no (Rune Allnor) wrote in message news:<f56893ae.0311030528.52ac968d@posting.google.com>...> "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message news:<BsSdnaJA6oskLziiRVn-sg@centurytel.net>... > > "Jerry Avins" <jya@ieee.org> wrote in message > > news:bo431e$sp8$1@bob.news.rcn.net... > > > Rune Allnor wrote: > > > > > > ... > > > > > > > > > > > > Eh... I'm not sure if I understand what you mean. Let's see... > apparently > > > > we agree that half of the zeros ensure linear phase (by being the > > > > reciprocals of the zeros that "define" the filter response) while half > > > > of the zeros ensure that the filter is noncausal... by being the > > > > *conjugates* of the "defining" zeros. And these two halves are not the > > > > same. Is that what you are saying? > > > > > > > > In that case my approach go nowhere, because my filter would be munimum > > > > phase but noncausal. Right? > > > > > > > > OK, the lesson learned is "Don't do DSP at 9 AM sunday morning"... ;) > > > > > > > > Rune > > > > > > I think he means to keep all the zeros, but to reflect the ones outside > > > the unit circle to the inside > > > > Like he (Jerry) sez. > > > > You need to keep them all or the magnitude response changes. > > Any zero pair, as those I defined, contribute to the response. > > If all the zeros are outside the unit circle, you get maximum phase. > > If all the zeros are inside the unit circle, you get minimum phase. > > If you have a mix, then something in between re: phase. > > So if I abandon that "noncausal argument", and instead design a causal > linear phase FIR filter (which essentially amounts to delay the impulse > response by a filter half-length) and find its roots, I end up with a > total response as > > |H(z)| = |G(z)*G'(z)| > > where G contains all the roots inside the unit circle and G' contains all > the roots outside the unit circle. I interpret that as the total filter > H(z) implemented as a cascade coupling of one minimum phase filter G(z) > and a maximum phase filter G'(z). Do we agree that the same magnitude > spectrum H(z) can be implemented as a cascade of two similar minimum > phase filters, G(z) and G(z) such that > > |H(z)| = |G(z)*G(z)| > > which appears to meet the specs, H(z)=G^2(z) is causal and also minimum > phase? > > If so, I think Matt's original problem in principle can be solved, though > with the already stated practical caveat about finding roots of "large" > polynomials. > > RuneI guess apart from root finding there are other difficulties while constructing the filter back to coefficient form.It is about numerical stability of the filter.It becomes worser as the number of roots i.e number co-efficients of the filter(or degree of ploynomial) increases. I googled sometimes back to find one efficient method to design minimum phase filter using "Hilbert transform".It needs couple of FFT/IFFT functions,log/sin functions and weight multiplications.It seems it provides adequate numerical stability.But I am not sure how best is a design when number of filter taps exceeds 10 ? I have never dealt with minimum phase filter design requirement with filter taps more than 10 - I think some reader can give a way out! santosh
Reply by ●November 3, 20032003-11-03
santosh nath wrote:> allnor@tele.ntnu.no (Rune Allnor) wrote in message news:<f56893ae.0311030528.52ac968d@posting.google.com>... > >>"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message news:<BsSdnaJA6oskLziiRVn-sg@centurytel.net>... >> >>>"Jerry Avins" <jya@ieee.org> wrote in message >>>news:bo431e$sp8$1@bob.news.rcn.net... >>> >>>>Rune Allnor wrote: >>>> >>>> ... >>>> >>>>> >>>>>Eh... I'm not sure if I understand what you mean. Let's see... >> >> apparently >> >>>>>we agree that half of the zeros ensure linear phase (by being the >>>>>reciprocals of the zeros that "define" the filter response) while half >>>>>of the zeros ensure that the filter is noncausal... by being the >>>>>*conjugates* of the "defining" zeros. And these two halves are not the >>>>>same. Is that what you are saying? >>>>> >>>>>In that case my approach go nowhere, because my filter would be munimum >>>>>phase but noncausal. Right? >>>>> >>>>>OK, the lesson learned is "Don't do DSP at 9 AM sunday morning"... ;) >>>>> >>>>>Rune >>>> >>>>I think he means to keep all the zeros, but to reflect the ones outside >>>>the unit circle to the inside >>> >>>Like he (Jerry) sez. >>> >>>You need to keep them all or the magnitude response changes. >>>Any zero pair, as those I defined, contribute to the response. >>>If all the zeros are outside the unit circle, you get maximum phase. >>>If all the zeros are inside the unit circle, you get minimum phase. >>>If you have a mix, then something in between re: phase. >> >>So if I abandon that "noncausal argument", and instead design a causal >>linear phase FIR filter (which essentially amounts to delay the impulse >>response by a filter half-length) and find its roots, I end up with a >>total response as >> >> |H(z)| = |G(z)*G'(z)| >> >>where G contains all the roots inside the unit circle and G' contains all >>the roots outside the unit circle. I interpret that as the total filter >>H(z) implemented as a cascade coupling of one minimum phase filter G(z) >>and a maximum phase filter G'(z). Do we agree that the same magnitude >>spectrum H(z) can be implemented as a cascade of two similar minimum >>phase filters, G(z) and G(z) such that >> >> |H(z)| = |G(z)*G(z)| >> >>which appears to meet the specs, H(z)=G^2(z) is causal and also minimum >>phase? >> >>If so, I think Matt's original problem in principle can be solved, though >>with the already stated practical caveat about finding roots of "large" >>polynomials. >> >>Rune > > > I guess apart from root finding there are other difficulties while > constructing > the filter back to coefficient form.It is about numerical stability of > the filter.It becomes worser as the number of roots i.e number > co-efficients of the filter(or degree of ploynomial) increases. > > I googled sometimes back to find one efficient method to design > minimum phase filter using "Hilbert transform".It needs couple of > FFT/IFFT functions,log/sin functions and weight multiplications.It > seems it provides adequate numerical stability.But I am not sure how > best is a design when number of filter taps exceeds 10 ? I have never > dealt with minimum phase filter design requirement with filter taps > more than 10 - I think some reader can give a way out! > > santoshHere's the cookbook way to convert a filter whose algebraic representation you know to minimum phase: Check that the poles are strictly inside the unit circle of the Z plane, or canceled by a zero of mathematical identity. (Canceled by a constructed zero isn't good enough. Nothing is that perfect.) Lay down the zeros on the same plot. To all those outside the unit circle, draw radii. Replace the outside zero with another on that radius so located that the product of its radial distance and the radial distance of the original zero is unity. (The "reciprocal zero inside the unit circle.") The new poles and zeros yield the same magnitude response as the original, but the phase is minimum. I don't remember why, but I have it on reliable authority (O&S?). Let's see: reciprocating a zero doesn't alter the frequency response. (I think I see that.) Of zeros at the same angle, those with shorter radii create less phase shift. Q.E.D.! Is there a z-plane spirule? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●November 4, 20032003-11-04
Jerry Avins <jya@ieee.org> wrote in message news:<bo6q8i$f3k$1@bob.news.rcn.net>...> The new poles and zeros yield the same magnitude response as the > original, but the phase is minimum. I don't remember why, but I have > it on reliable authority (O&S?).With all due respect, Jerry, I get "bad itches" by that sort of argument. Please don't misunderstand! I think you are right and I'm not capable of doing better myself. Nevertheless, refering an argument to "higher authority" is the absolutely last way out, and when I see those kinds of things I get instantly suspicious about whatever argument is presented. A couple of days ago there was a review of a book on "Science History" or "Science Philosophy" on the site www.forskning.no (The Norwegian word "forskning" can best be translated as "research", although "science" can also be used). In the book review the reviewer mentions an affair which is elabortated somewhat on the page http://www.math.ntnu.no/~hanche/blog/trell/ as one way of *not* conducting a scientific dispute. The dispute goes over a "simple proof of Fermat's last theorem" (what else...). Harald Hanche-Olsen, who made the page referenced above and disputes the existence of such a proof, is a mathematician while the people who claim they have a simple proof are non-mathematicians. What struck me was that the "proof of the pudding" by the non-mathematicians apparently relies on the "authority" of one person: "Most of the article is classical argumentation by authority, attempting to establish the credibility of journals like Algebras, Groups and Geometries and its publisher, Hadronic Press, the publishing company of "the world spanning elite scientist institution Institute for Basic Research, led by the Master Mind of our times, Ruggero Maria Santilli". (No, I am not making up the "Master Mind" bit.)" (Cut'n paste from Hanche-Olsen's blog, one of the first entries near the bottom of the page) When things get as pointed as is the case in this dispute, it's more fun than anything else (as long as one does not get involved!), but I think it's an issue worth being aware of. This "academic hubris" thing has been mentioned once or twice here during the past year or so. Things can get really destructive when people get infected by the "hubris disease" and don't want to listen to critique of the ideas they "know" to be true. It may not come as a surprise that I have prepared for a boat trip that will take all day tomorrow, by getting some books by Thomas S. Kuhn and Karl Popper.> Let's see: reciprocating a zero doesn't > alter the frequency response. (I think I see that.)I see that too. I think.> Of zeros at the same > angle, those with shorter radii create less phase shift. Q.E.D.!This is one of those things I never understood. I "learned" this from the Proakis/Manolakis book many years ago, but somehow I failed to make sense of their exposition. I must, with great shame and reluctance, admit that I accept the "all zeros inside the unit circle implies minimum phase" argument solely on the basis of the authority of those who present it...> Is there a z-plane spirule?Spirule? Couldn't find that word in my dictionary? Rune
Reply by ●November 4, 20032003-11-04
In article f56893ae.0311032343.312d19a7@posting.google.com, Rune Allnor at allnor@tele.ntnu.no wrote on 11/04/2003 02:43:> Jerry Avins <jya@ieee.org> wrote in message > news:<bo6q8i$f3k$1@bob.news.rcn.net>......>> Let's see: reciprocating a zero doesn't >> alter the frequency response. (I think I see that.) > > I see that too. I think. > >> Of zeros at the same >> angle, those with shorter radii create less phase shift. Q.E.D.! > > This is one of those things I never understood. I "learned" this > from the Proakis/Manolakis book many years ago, but somehow I failed > to make sense of their exposition. I must, with great shame and reluctance, > admit that I accept the "all zeros inside the unit circle implies minimum > phase" argument solely on the basis of the authority of those who > present it...Rune, do you understand why it is true for the analog s-plane? why does an analog filter that has its zeros all on the left half-plane have less phase shift than one with some reflected to the right half-plane? let q > 0 and real. zero in left half-plane: arg{j*w - -q)} = arg{q + j*w} = arctan(w/q} zero in right half-plane: arg{j*w - q} = arg{-q + j*w} = pi - arctan(w/q} since |arctan(w/q)| <= pi/2 then pi - arctan(w/q} >= arctan(w/q} and arg{j*w - -q)} <= arg{j*w - q} so the zero in the left half-plane has less phase shift. now, to go discrete-time and the z-plane, think BiLinear Transform (zeros in the left-half s-plane get mapped to the interior of the unit circle under BLT) and the magnitude and phase are preserved, but at different frequencies. the hard question is: how come, for min-phase filters, the natural log of gain and phase in radians are a Hilbert transform pair? that's a hard one to prove. r b-j