Digital Filter Software
Digital Filter Software
(OP)
What is the best software to do filter. I need create an 8th order low pass butterworth filter.
Also from what I remember from by signal processing class (which was a long time ago) that filtering causes a time delay and phase shift. What is the best way of eliminating it or reduce the affects from it.
Thanks in advance.
rh142
Also from what I remember from by signal processing class (which was a long time ago) that filtering causes a time delay and phase shift. What is the best way of eliminating it or reduce the affects from it.
Thanks in advance.
rh142





RE: Digital Filter Software
Dan - Owner

http://www.Hi-TecDesigns.com
RE: Digital Filter Software
To clarify a little more. I am a structural engineer and the "signal" I want to filter is from a numerical analysis which is giving time vs acceleration data. The data is in two columns with sampling rate of 10,000 Hz and the cutoff frequency I want to use is 180 Hz.
Thanks,
rh142
RE: Digital Filter Software
My coworker showed me the Fourier Analysis extension for MS-Excel. Using this package, he can go back and forth between time and frequency domains. We use this for testing RF transmission lines.
Once you're in the frequency domain, you could almost draw the desired filter response and cut and paste the result. (I think...
RE: Digital Filter Software
http://www.eng-tips.com/viewthread.cfm?qid=208160
If you use this method, you should use a little bit of a smooth transition from pass-band to stop band rather than abrupt.
There are of course many different ways to do digital filtering. For example www.dspguide.com
I have a Kaiser Bessel filter function that I wrote in excel vba. It is customizeable with respect to transistion width and how close the stop/pass bands are to 0 / 1. It processes in the time domain and cuts a little bit off the front and back of the signal. It requires installation of the vba analysis tookpak (and a little more hocus pocus to add it to your library) in order to get the bessel functions. Let me know if you are interested in that.
=====================================
Eng-tips forums: The best place on the web for engineering discussions.
RE: Digital Filter Software
=====================================
Eng-tips forums: The best place on the web for engineering discussions.
RE: Digital Filter Software
The free alternatives are called Octave and Scilab. Of the two Scilab is generally faster, but Octave's syntax is almost identical to matlb's, so if you find some matlab code on the web you can usually get it running very easily.
Excel's FFT routine is fine so far as it goes but would not be my choice for analysing much data.
If you specifically want a 8th Butterworth filter then you are in luck, matlab has it built in, in the signal processing toolbox, I suspect the other two do as well.
Incidentally if you 'decimate' your data first then you will be handling much smaller files.
it really dpeends on hwo muchbdat you have, I have 60 files, and 3 hours of 80 channels, so tend to have to think about different solutions than if you've got 2 channels for 10 seconds.
Cheers
Greg Locock
SIG:Please see FAQ731-376: Eng-Tips.com Forum Policies for tips on how to make the best use of Eng-Tips.
RE: Digital Filter Software
Peter
RE: Digital Filter Software
Thanks, Octave was already available on our system since we have red hat. So I was able to use it.
I am following a published paper for the analysis and filter they used is an 8th order butterworth filter, so I want to use an 8th order butterworth filter. The paper also states that the time delay or phase shift produced by the filter in the filtered signal was eliminated by performing a backward filtering after the normal forward filtering. What does it mean?
Thanks,
rh142
RE: Digital Filter Software
Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...
RE: Digital Filter Software
FFT or filter? Assuming filter, I should flip the filtered response then filter again. Then flip it back? Is this my final filtered response or do I need to add it to the first filtered response and average.
Thanks,
rh142
RE: Digital Filter Software
Gunnar Englund
www.gke.org
--------------------------------------
100 % recycled posting: Electrons, ideas, finger-tips have been used over and over again...
RE: Digital Filter Software
How about this. Do a on-time expreiment of sending an impulse at time=0 through your filter. Look at the output and use it to figure out the time delay of your filter. Then whenever you do any further filtering, just shift the final signal by the known about of the time delay.
=====================================
Eng-tips forums: The best place on the web for engineering discussions.
RE: Digital Filter Software
Anyway, to the OP: What is your plan for implementation of your 8th order filter? With a filter order that high, there are a number of caveates regarding implementation. For one, are you planning on implementing in floating point or fixed point? Are you planning on breaking it into second order sections? What form of sclaing to do you plan to use between the sections? What form architecture are you planning on using, etc, etc.
Another very important factor to consider is are you interested in the frequency domain (frequency content) or time domain (wave shape) of the response? A butterworth filter, or any other filter with a non-linear phase response will cause time domain distortion such as ringing and overshoot.
RE: Digital Filter Software
I am more interested in the wave shape, which is why I was wondering about backwards filtering to reduce the effects of time delay and phase shift.
I created a filter in octave using the butter (generates the b and a arrays) and filtfilt (which does forward and backwards filtering). I do see ringing though.
I hadn't specifically specified floating or fixed, I guess Octave uses whichever is default.
Also second order sections is new to me, I'll have investigate it and see how to implement it. I am assuming that this will help with the ringing.
Thanks,
rh142
RE: Digital Filter Software
Octave will use floating point arithmetic. The fixed versus floating point concerns your implementation, if for example you are implementing your algorithm on a fixed point micro-controller.
If you implement your algorithm in fixed point (or integer) format, there are several things to watch for. Three big ones are: 1 - that as the order goes up, the w0 term will get vanishingly small, which makes scaling an issue, 2 - depending on the form you choose (DF1, DF2, DF2 transposed, etc), you can have significant overflow issues. 3- the finite precision of your limited number of bits becomes a problem that causes errors in the frequency domain and / or limit cycle oscillations in the output.
If I recall correctly, you want to implement an 8th order filter, which can be tough. By breaking the filter into cascaded second order sections you can avoid many of the pitfalls. Look at an analog filter cookbook that uses op-amps. The filters are designed as cascaded second order sections and you will want to do something similar. Ideally, you will match the pole-zero co-effecients (yes you will have zero's in the z-domain even if your analog prototype is an all pole filter) that are closest together and then use something like Norm-infinity scaling (which I haven't figured out how to do in Octave).
RE: Digital Filter Software
Dan - Owner

http://www.Hi-TecDesigns.com