Technical discussions related to Audio Signal Processing (digital effects, acoustics, noise reduction, musical signal processing, etc).
Hi, I have been using a recursive Butterworth filter with lag compensation implemented in Excel. It works very well in my data application in a non-real time application. I want to use the same filter in realtime while capturing data, however, since the indices look ahead, that's not possible. With a non-recursive filter, the filter indices can be made to operate only on the current data and previous samples thus making it causal. In this application, I don't not see how to do this. Can anybody in this group offer a suggestion? The Excel file I started working from as well as information about the file can be found at the websites below. Thanks, Art http://users.wfu.edu/keadjr3/Biomechanics/Project/Menu.htm http://users.wfu.edu/keadjr3/Gait_DATA.xls
From: <djtrader10@djtr...> > I have been using a recursive Butterworth filter with lag > compensation implemented in Excel. It works very well in > my data application in a non-real time application. I want to > use the same filter in realtime while capturing data, however, > since the indices look ahead, that's not possible. With a non- > recursive filter, the filter indices can be made to operate only > on the current data and previous samples thus making it > causal. In this application, I don't not see how to do this. There are two issues here. First, the webpage says that you run the filter once in each time direction*. This means that the effective impulse response is infinite in both directions; hence you need to window the effective response to get an implementable FIR filter. I once found Harris' classic window survey paper (citation in [1]) online but can't relocate it. I'll send you the PDF if you want. If you use it, note the papers correcting typos in that article also cited in [1]. In any case, search the comp.dsp newsgroup for discussion of FIR windowing. Second, once you have a filter of finite extent into the future, you use it online by simply shifting it to be causal and relabeling time in the output sequence. Mind the startup transient, though. * I guess that's what "lag compensation" means to you. People in other fields, especially audio, might take that to be just realigning signals from parallel processing paths with different delay. [1] http://www.faqs.org/faqs/dsp-faq/part1/ , section 1.1.4 Martin
From: "Art Zikorus" <djtrader10@djtr...> > Thanks for your reply and comments. I must be missing it, > but I don't see how to rearrange the indices in this filter for > causal operation. I experimented with indices and could not > get back to the zero lag ( zero phase shift between input and > second pass output) after the second pass in the non-causal > case. Seems that both the first and second pass indices > should simply be offset, however, it doesn't seem to work > correctly. If you can help out here, I would greatly appreciate > it and if possible, please make changes directly to the Excel > file cited in my earlier post. I don't have Excel, so I can only say that the same filter applied in both directions should give a zero-phase result whatever the offset, causal or not. Maybe you can show what you've done in pseudocode or equation form? Martin