Maybe you can use FFT and peak detection on FFT bin magnitude to identify
the location of fundamental frequency on each waveform. This way you don't
need the bandpass filter.
camdmag <> wrote:
I am new to the group and in fact new to signal processing and
filtering and was wondering if anyone could help me with a problem I
have filtering in MATLAB.
Firstly I should say that I have a large number of waveforms (>5000)
and from each wish to extract the fundamental and second harmonic
waveform components. Ultimately I really need to fully automate the
process as there are so many waveforms.
I am trying to construct an N-th order bandpass digital elliptic
filter using the command: [B,A] = ELLIP(N,Rp,Rs,Wn) where Wn is a two-
element vector, Wn = [W1 W2] with 0.0 < Wn < 1.0, with 1.0
corresponding to the Nyquist frequency.
The parameters Rp and Rs respectively define the Passband ripple, in
decibels and the Stopband attenuation, in decibels. Can someone
please explain to me what this actually means and how I go about
identifying values for Rp and Rs?
Perhaps if I can successfully generate a filter for one waveform the
process will become clearer to me and I can then think about
automating the procedure. Will that be possible? I guess I will
need to be able to calculate appropriate values for the parameters
N,Rp,Rs and Wn for each waveform. I can see how to calculate Wn for
the different waveforms, as this will just be the width of the window
I choose, and N can be derived using the ELLIPORD function. However,
calculating Rp and Rs for each waveform is not at all clear.
All my waveforms have a fundamental frequency between 1 and 10MHz so
that the maximum value of the second harmonic is approximately 20MHz.
Thanks in advance.
Calum Macdonald _____________________________________
Note: If you do a simple "reply" with your email client, only the author of this
message will receive your answer. You need to do a "reply all" if you want your
answer to be distributed to the entire group.
About this discussion group:
More DSP-Related Groups: http://www.dsprelated.com/groups.php3