1
$\begingroup$

My signal graph is as follows

I have < 10 reputation, thus cannot post the photo...

The graph are simply roughly the series of -5, 0, +5, 0, -5, 0, +5, 0.... but with sawtooth-like small peaks around the prominent peaks.

I am going to do the peak detection. But what I need to count is the "prominent peaks".

i.e. The "sawtooth" small peaks around the main peaks should not be counted.

I have known that the small peaks are due to high-freq noises.

My range of interest is 0~4Hz.

Thus, before counting the peak number, I have to low pass filter the signal first.

Being a beginner in signal processing, I have no idea which type of filter is the most proper. Chebyshev or Bessel or the classic Butterworth?

Thanks in advance!

$\endgroup$
  • $\begingroup$ link to the image and someone else will add it $\endgroup$ – endolith Jun 20 '13 at 20:29
2
$\begingroup$

There are 4 main types of LP filters, Butterworth, Chebyshev1, Chebyshev2, and Elliptic filter. Each differs from the other in the oscillations it has, and in which part of the spectre it is.

  1. Butter has the worst amplitude cutoff, eg the widest transition region, but no osclillations;

  2. Cheb1 has better transition range, but has oscillations in the pass region;

  3. Cheb2 is the opposite of Cheb1, has oscillations in the reject region, but not in the pass region;

  4. Elliptic has the narrowest transition, so therefore the best, but has oscillations in both the pass and no-pass zone.

Heres a picture to help you visualize:

http://i.stack.imgur.com/rJMQw.png

Now, seeing as you need a peek detector, you should use a flat filter for the pass zone, so Butter or Cheb2. I advise Cheb2, because you don't really care about the higher frequencies.

In matlab, the function is cheb2ap, and is used like this:

[z, p, k] = cheb2ap(N, La) 
% where La is the allowed ripple in the stopband (usually around 0-1.5 dB).

% And now the filter transfer function is acquired with:
b = k*poly(z);
a = poly(p); % b is the polynomial for zeroes, a is polynomial for poles
[H w] = freqz(b,a, N)  % N is the number of points for calculation

Now you have frequency response of your filter, H, and vector for its frequency, w, and you can plot the filter with plot(w, abs(H)).

Hope this helps :)

$\endgroup$
  • $\begingroup$ Yes. Chebyshev 2 is a good option. But I have to implement it as a class in Java. Any idea how to do this in java? $\endgroup$ – Sibbs Gambling Jun 2 '13 at 3:40
  • $\begingroup$ you forgot Bessel, which was in the question $\endgroup$ – endolith Jun 20 '13 at 20:29

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.