(EDIT: This question follows from Extracting Binary Magnetic-Strip Card Data from raw WAV)
Here is my signal (top line) and a basic IIR filter applied (bottom line)
(EDIT: my task is to break the signal into binary 0 (frequency F) and binary 1 (frequency 2F) -- that's why it is called F2F. So I need to process it in such a way that guarantees no false peaks. While the screenshot makes it look trivial, there is a potential problem of getting a double peak, and also of getting false positives in the trough between real peaks.)
My question is, what methods are available for smoothing this signal? Is IIR my best bet?
I can see at least three possibilities:
IIR y[n] = 0.9*y[n-1] + 0.1*x[n] where y[x] =0 when x < 0
Moving / windowed average -- place a Bell curve with area 1.0 over the surrounding say w=10 samples each side and integrate bellSmooth(x) = integral[x-w,x+w] { bell(k).samp(k) }dk
Determine the expected frequency and FFT / remove higher order bins / reverse FFT
I may have answered my own question, but probably this is incomplete and I'm sure I am using the wrong terminology. Also I can't really predict the pros and cons. The last method is less attractive as it requires knowledge of the basic signal frequency. But then so does the second method; I need to choose an appropriate window length.
Are there any other methods?
No comments:
Post a Comment