Hello, I am filtering a test signal (Tsig) with a FIR and then calculating the RMS error against a reference signal (Ref). The FIR adds a group delay to my test signal which needs to be compensated before I can calculate the error. For an FIR, I believe that delay compensation should be N/2, where N is the number of taps, or filter order. After looking carefully at the waveforms I see that I can still fine tune the group delay compensation. Is there a way to mathematically find the perfect group delay compensation required? Can I use the correlation between Tsig and Ref to find out the best group compensation? If yes, how? cheers
Using correlation to find the right group delay compensation for a FIR
Started by ●November 21, 2007
Reply by ●November 21, 20072007-11-21
arturi wrote:> Hello, > > I am filtering a test signal (Tsig) with a FIR and then calculating the > RMS error against a reference signal (Ref). > > The FIR adds a group delay to my test signal which needs to be compensated > before I can calculate the error. > > For an FIR, I believe that delay compensation should be N/2, where N is > the number of taps, or filter order. > > After looking carefully at the waveforms I see that I can still fine tune > the group delay compensation. Is there a way to mathematically find the > perfect group delay compensation required? > > Can I use the correlation between Tsig and Ref to find out the best group > compensation? If yes, how?Only a symmetric FIR has a constant group delay. For any FIR, the delay is (N-1)/2. A symmetric FIR with an odd number of taps is needed to get an integer delay. For such a filter, the properly delayed signal is available at the middle tap. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●November 21, 20072007-11-21
Jerry Avins wrote: ...> Only a symmetric FIR has a constant group delay. For any FIR, the delayOnly a symmetric FIR has a constant group delay. For any such FIR, the delay ^^^^> is (N-1)/2. A symmetric FIR with an odd number of taps is needed to get > an integer delay. For such a filter, the properly delayed signal is > available at the middle tap. > > Jerry-- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●November 22, 20072007-11-22
My head hurts from too much thinking, so I use brute force: http://www.dsprelated.com/showarticle/26.php -mn
Reply by ●November 22, 20072007-11-22
>Jerry Avins wrote: > > ... > >> Only a symmetric FIR has a constant group delay. For any FIR, the delay> >Only a symmetric FIR has a constant group delay. For any such FIR, the >delay ^^^^ >> is (N-1)/2. A symmetric FIR with an odd number of taps is needed to get>> an integer delay. For such a filter, the properly delayed signal is >> available at the middle tap. >> >> Jerry > > >-- >Engineering is the art of making what you want from things you can get. >����������������������������������������������������������������������� >Thanks Jerry! I forgot to mention that my test signal is being zero order held before filtering. The ZOH is also inserting a group delay which needs to be compensated, that was actually confusing me. cheers
Reply by ●November 22, 20072007-11-22
arturi wrote:>> Jerry Avins wrote: >> >> ... >> >>> Only a symmetric FIR has a constant group delay. For any FIR, the delay > >> Only a symmetric FIR has a constant group delay. For any such FIR, the >> delay ^^^^ >>> is (N-1)/2. A symmetric FIR with an odd number of taps is needed to get > >>> an integer delay. For such a filter, the properly delayed signal is >>> available at the middle tap....> I forgot to mention that my test signal is being zero order held before > filtering. The ZOH is also inserting a group delay which needs to be > compensated, that was actually confusing me.What are you comparing against? If I'm thinking clearly, the ZOH is a half-sample delay. Are you comparing analog signals? If not an ADC's output, what is the ZOH for? Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������