1
$\begingroup$

I have some (well lots) of data signals which are measurements of current pulses. The current pulses are the result of spark breakdowns (20 kV + 700 pF capacitor so quite energetic) and my problem is that noise, and displacement current signals are clouding the underlying current pulse.

The noise and the displacement current signals are quite high frequency. The actual pulse, is much lower so I am wanting a low pass filter. I use Origin Labs and in there I can apply a low pass FFT filter and I find that for the most part, a cut off of about 7 MHz does the trick for some of the more well defined pulses, sometimes I have to use something higher like 15 MHz.

I have a lot of measurements and would like to speed this process up by getting Matlab to do it for me.

The data files should all be the same length and all the same resolution (A cursory looks says each file has 9900 points, with a time step of 4e-10 seconds, so about 4 uS of data).

I just don't have a clue where to start with this in Matlab. I don't need anything fancy, I merely want to pull out an approximate value of the current. I have tried something simple like performing the FFT and then making all values above a certain frequency = 0 then doing the inverse FFT but that appears to do nothing at all!

I can't post a picture of the signal, apparently I need some reputation on here or something first. But I may be able to host it on my Flickr page if needs be.

$\endgroup$
  • 4
    $\begingroup$ There's no need to use FFTs to implement the filter that you seek. Fast filtering methods do often use FFTs, but trying to go straight to that implementation will probably just be more confusing. Start with a look at the filter design functions in MATLAB, like fir1. You can then design filter coefficients that you can convolve with your signal to realize the lowpass filter effect. $\endgroup$ – Jason R May 30 '13 at 13:51
  • $\begingroup$ Ok will have a look at that. Just trying to see my way round the Filter Design and Analysis tool at the moment. Its a bit nicer to play with and see what happens. I am noticing however a time lag? or shift of the results I get from that. i.e. if the raw data showed a pulse at 0.5 us, the filtered data shows a pulse at 1.5 us. Haven't decided where that is critical really so long as all are shifted by the same amount. Anyway to combat that? $\endgroup$ – Alex Mason May 31 '13 at 15:10
  • $\begingroup$ You're observing the filter's delay, which you can't get rid of, but you can precalculate it and adjust your expectations accordingly. The easiest way to do this is with a linear-phase (i.e. symmetric) FIR filter, where the delay is $\frac{N-1}{2}$ samples, where $N$ is the length of the filter. Most of the FIR design methods in MATLAB's fdatool will give you linear-phase filters. It can also generate plots of the filter delay for you. $\endgroup$ – Jason R May 31 '13 at 15:18
  • $\begingroup$ Ok good stuff. I am using OriginLabs at the moment to do this filtering. In there you get a window with the frequency domain at the bottom with a slider to choose the cut off freq. At the top you can see the result of the IFFT once everything has been calculated using that cut off. I don't know what maths is going on in their little function but it sorts out the phase lag as well so the two signals overlap and the peaks are at the same place. I think I will continue to use this while I understand how to get Matlab to do the same. Thanks for the heads up on the lag info, this will help me loads $\endgroup$ – Alex Mason Jun 3 '13 at 11:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.