Hi everybody thanks to the support I received on a previous post I have been able to get working my implementation of a 90 degrees phase shifter, all I need now is a good guy which can calculate and post for me the coefficients for a 67 order Hilbert with Hamming windowing, because my tool just reach 35, or some reference to a free tool on the net for this job. ( I'm not planning to buy a 1K$ one) Thank you in advance. Giuseppe
Disperately seeking Hilbert filter coefficients
Started by ●July 3, 2005
Reply by ●July 3, 20052005-07-03
Giuseppe Sbarra wrote:> Hi everybody > thanks to the support I received on a previous post I have been able to get > working my implementation of a 90 degrees phase shifter, > all I need now is a good guy which can calculate and post for me the > coefficients for a 67 order Hilbert with Hamming windowing, because my tool > just reach 35, or some reference to a free tool on the net for this job. > ( I'm not planning to buy a 1K$ one) > > Thank you in advance. > GiuseppeHave you tried to build one in the frequency domain and then take an inverse FFT? John
Reply by ●July 3, 20052005-07-03
Giuseppe Sbarra wrote:> Hi everybody > thanks to the support I received on a previous post I have been able to get > working my implementation of a 90 degrees phase shifter, > all I need now is a good guy which can calculate and post for me the > coefficients for a 67 order Hilbert with Hamming windowing, because my tool > just reach 35, or some reference to a free tool on the net for this job. > ( I'm not planning to buy a 1K$ one) > > Thank you in advance. > GiuseppeNumber the taps from -33 to +33, with n = 0 in the middle. Set all even-numbered taps equal to zero and the others to 1/n, including sign. Apply a good widow -- I like Nuttall for this -- and a gain factor that you can determine experimentally. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●July 3, 20052005-07-03
"Jerry Avins" <jya@ieee.org> ha scritto nel messaggio news:Os2dnWiA2_aKpVXfRVn-gA@rcn.net...> Giuseppe Sbarra wrote: > > Hi everybody > > thanks to the support I received on a previous post I have been able toget> > working my implementation of a 90 degrees phase shifter, > > all I need now is a good guy which can calculate and post for me the > > coefficients for a 67 order Hilbert with Hamming windowing, because mytool> > just reach 35, or some reference to a free tool on the net for this job. > > ( I'm not planning to buy a 1K$ one) > > > > Thank you in advance. > > Giuseppe > > Number the taps from -33 to +33, with n = 0 in the middle. Set all > even-numbered taps equal to zero and the others to 1/n, including sign. > Apply a good widow -- I like Nuttall for this -- and a gain factor that > you can determine experimentally. > > Jerry > -- > Engineering is the art of making what you want from things you can get. >Clear and useful, but I have no idea on how calculate windowing. Please, a little more help. Thank Giuseppe
Reply by ●July 4, 20052005-07-04
Jerry Avins wrote:> Number the taps from -33 to +33, with n = 0 in the middle. Set > all even-numbered taps equal to zero and the others to 1/n, > including sign. Apply a good widow -- I like Nuttall for this -- > and a gain factor that you can determine experimentally.I hope you have good old Mrs. Nuttall's consent! SCNR, and thanks for the actual content ;) -- Quidquid latine dictum sit, altum viditur.
Reply by ●July 4, 20052005-07-04
Giuseppe Sbarra wrote:> ... I have no idea on how calculate windowing. > Please, a little more help. > Thank > GiuseppeFor hand calculation, a von Hann window is a good compromise. Counting from the beginning this time, w[k+1] = 0.5 * ( 1 - cos( 2*pi*k/(n-1) ), k = 0, 1, .. n-1 Compute the window for n = 69 and discard the zero-value end points. Note that the values of w[k] are symmetric about the center and that half the filter's coefficients are zero. You therefore need to compute only 17 -- did I get that right? -- window coefficients. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●July 4, 20052005-07-04
Martin Eisenberg wrote:> Jerry Avins wrote: > > >>Number the taps from -33 to +33, with n = 0 in the middle. Set >>all even-numbered taps equal to zero and the others to 1/n, >>including sign. Apply a good widow -- I like Nuttall for this -- >>and a gain factor that you can determine experimentally. > > > I hope you have good old Mrs. Nuttall's consent! > > SCNR, and thanks for the actual content ;)Oops! Window; window. What's "SCNR"? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●July 4, 20052005-07-04
Jerry Avins wrote:> Giuseppe Sbarra wrote: > >> ... I have no idea on how calculate windowing. >> Please, a little more help. >> Thank >> Giuseppe > > > For hand calculation, a von Hann window is a good compromise. Counting > from the beginning this time, > > w[k+1] = 0.5 * ( 1 - cos( 2*pi*k/(n-1) ), k = 0, 1, .. n-1 > > Compute the window for n = 69 and discard the zero-value end points. > Note that the values of w[k] are symmetric about the center and that > half the filter's coefficients are zero. You therefore need to compute > only 17 -- did I get that right? -- window coefficients.See http://www.lohninger.com/helpcsuite/weightingwindow.htm for other windows. Those further down the list (more terms) will show less ripple in the passband. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●July 4, 20052005-07-04
Jerry Avins wrote:> Martin Eisenberg wrote: > >> Jerry Avins wrote: >> >> >>> Number the taps from -33 to +33, with n = 0 in the middle. Set >>> all even-numbered taps equal to zero and the others to 1/n, >>> including sign. Apply a good widow -- I like Nuttall for this -- >>> and a gain factor that you can determine experimentally. >> >> >> >> I hope you have good old Mrs. Nuttall's consent! >> >> SCNR, and thanks for the actual content ;) > > > Oops! Window; window. What's "SCNR"? > > JerryI guess widowing must have something to do with military DSP. :-) Steve
Reply by ●July 4, 20052005-07-04
Giuseppe Sbarra wrote:> Hi everybody > thanks to the support I received on a previous post I have been able to get > working my implementation of a 90 degrees phase shifter, > all I need now is a good guy which can calculate and post for me the > coefficients for a 67 order Hilbert with Hamming windowing, because my tool > just reach 35, or some reference to a free tool on the net for this job. > ( I'm not planning to buy a 1K$ one) > > Thank you in advance. > GiuseppeI assume, from what you have written, that you are monitoring mains power. A snag with what you are trying to do is you need to make the Hilbert transform very precise in its 90 degree shift. If, say, you want 0.5% (consumer grade metering) accuracy at 0.5PF you need the shift to be within about 0.02 degrees of 90 degrees. For industrial metering it needs to be rather better than that. One common way to deal with this problem is to phase lock to the voltage waveform. It is fairly straightforward to get the loop to lock rather precisely. It is then trivial to obtain a signal shifted 90 degrees from the voltage waveform. However, mirroring any distortion in the original signal is less easy. The voltage waveform seldom has much distortion, but it can have a little. Another method is to measure the mains frequency accurately. It doesn't change very fast, so there are several trivially complex ways to do this. Then you can calculate the exact number of samples delay which represent a 90 degree shift at the current frequency, and delay by that much. The delay will consist of a whole number of samples, which a simple pipeline will give you, and a fraction, which a single step FIR will give you. The frequency response of the single step FIR is not flat, but this is seldom of consequence for power measurements. The voltage waveform seldom has significant high harmonic content. You can simply store a table of FIR coefficients for the various fractional delays you will need for varying mains frequencies. The compute requirement for this is far lower than for your Hilbert approach, and the results are generally superior. If you are using an MCU, rather than a DSP, (the normal case for power measurement) you will have no problems with the compute load of this method. Regards, Steve