## linear classifier get its input from FFTfilter

Forum for discussion on different signal processing algorithms
southtimer
Posts: 2
Joined: 30 Mar 2011, 04:04

### linear classifier get its input from FFTfilter

Hi,
please could anyone help me to trace out the frequency boarders from the linear classifier code.For example,given 12Hz as the center frequency,how can we evaluate 9.5Hz and 13.5Hz from this?Please this time using the FFtfilter setting instead of the ARfilter.
Last edited by southtimer on 23 May 2011, 09:12, edited 1 time in total.

mellinger
Posts: 1052
Joined: 12 Feb 2003, 11:06

### Re: linear classifier with frequency boarder viewed from cod

Hi,

in your case, the linear classifier takes its input signal from the ARFilter. To resolve frequencies into element indices, it relies on the ElementUnit property of its input signal (lines 106 and 156 in LinearClassifier.cpp). This property is set by the ARFilter, according to the ARFilter's settings in BinWidth, FirstBinCenter, and LastBinCenter. When there is no bin with a center frequency of 10.5Hz, the linear classifier will use the nearest bin when 10.5Hz is specified as a frequency, and it will issue a warning that this does not exactly match an input bin frequency.

So in order for the linear classifier to use the amplitudes at exactly 9.5Hz and 10.5Hz, you will need to configure the ARFilter such that it has 9.5Hz and 10.5Hz as center frequencies for two of its output bins. E.g., you could use BinWidth= 1Hz, FirstBinCenter= 0.5Hz, LastBinCenter= 12.5Hz.

Edit: To respond to your edited post in which you ask about the FFTFilter rather than the ARFilter: You need to choose the FFTWindowLength parameter such that the FFT spectrum contains the frequencies in question. An FFT power spectrum contains half as many frequencies as there are samples in the window. So, if you have a sampling rate of 250Hz, a window length of 1s will result in a spectrum in which all frequencies from 0 to 125Hz are present. To increase resolution to 0.5Hz, you will need to specify a window length of 2s. Beware, however, that a window length of 2s will result in a signal delay of 1s on average, so you might not want to specify such a long window, and rather have a lower frequency resolution.

Regards,
Juergen

### Who is online

Users browsing this forum: No registered users and 1 guest