Bandpass FIR Filter

Started by Nitesh Gupta September 10, 2003
I have a basic doubt regarding FIR Filter implementation. 
The input to my FIR filter is the data(16-bit out from ADC sampled at
20 KHz).
i.e this data represents the amplitude of the sampled input signal.
 
My doubt is 
"whether the output of the FIR filter denotes the amplitude or
frequency of  the filtered data?

Please clarify
Regards,
Nitesh
"Nitesh Gupta" <gupta_nitesh@indiatimes.com> wrote in message
news:3cee77d1.0309100715.12d70fc3@posting.google.com...
> I have a basic doubt regarding FIR Filter implementation. > The input to my FIR filter is the data(16-bit out from ADC sampled at > 20 KHz). > i.e this data represents the amplitude of the sampled input signal. > > My doubt is > "whether the output of the FIR filter denotes the amplitude or > frequency of the filtered data?
Both. The data from the A/D is also both.
> > Please clarify > Regards, > Nitesh
"Bhaskar Thiagarajan" <bhaskart@deja.com> wrote in message
news:bjnjte$kt045$1@ID-82263.news.uni-berlin.de...
> "Nitesh Gupta" <gupta_nitesh@indiatimes.com> wrote in message > news:3cee77d1.0309100715.12d70fc3@posting.google.com... > > I have a basic doubt regarding FIR Filter implementation. > > The input to my FIR filter is the data(16-bit out from ADC sampled at > > 20 KHz). > > i.e this data represents the amplitude of the sampled input signal. > > > > My doubt is > > "whether the output of the FIR filter denotes the amplitude or > > frequency of the filtered data? > > Both. > The data from the A/D is also both. >
I don't see how..... The output of the FIR filter is a series of samples in time that represent amplitudes. There is no frequency information explicit there. In order to assess frequencies, you have to do some sort of transform on the data. The output of the FIR filter are real values of amplitude - that is all. Fred
"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message
news:y_N7b.1275$v22.1018379@feed2.centurytel.net...
> > "Bhaskar Thiagarajan" <bhaskart@deja.com> wrote in message > news:bjnjte$kt045$1@ID-82263.news.uni-berlin.de... > > "Nitesh Gupta" <gupta_nitesh@indiatimes.com> wrote in message > > news:3cee77d1.0309100715.12d70fc3@posting.google.com... > > > I have a basic doubt regarding FIR Filter implementation. > > > The input to my FIR filter is the data(16-bit out from ADC sampled at > > > 20 KHz). > > > i.e this data represents the amplitude of the sampled input signal. > > > > > > My doubt is > > > "whether the output of the FIR filter denotes the amplitude or > > > frequency of the filtered data? > > > > Both. > > The data from the A/D is also both. > > > > I don't see how..... The output of the FIR filter is a series of samples
in
> time that represent amplitudes.
My bad - I guess I was thinking that the samples have spectral information (because you can extract it by performing a transform) and hence concluded it has frequency information. I interpreted amplitude information to be 'envelope' of the signal. Fred'd interpretation (and answer) is what the OP was looking for.
> There is no frequency information explicit > there. In order to assess frequencies, you have to do some sort of > transform on the data. > > The output of the FIR filter are real values of amplitude - that is all. > > Fred > >
Bhaskar Thiagarajan wrote:
> > "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message > news:y_N7b.1275$v22.1018379@feed2.centurytel.net... > > > > "Bhaskar Thiagarajan" <bhaskart@deja.com> wrote in message > > news:bjnjte$kt045$1@ID-82263.news.uni-berlin.de... > > > "Nitesh Gupta" <gupta_nitesh@indiatimes.com> wrote in message > > > news:3cee77d1.0309100715.12d70fc3@posting.google.com... > > > > I have a basic doubt regarding FIR Filter implementation. > > > > The input to my FIR filter is the data(16-bit out from ADC sampled at > > > > 20 KHz). > > > > i.e this data represents the amplitude of the sampled input signal. > > > > > > > > My doubt is > > > > "whether the output of the FIR filter denotes the amplitude or > > > > frequency of the filtered data? > > > > > > Both. > > > The data from the A/D is also both. > > > > > > > I don't see how..... The output of the FIR filter is a series of samples > in > > time that represent amplitudes. > > My bad - I guess I was thinking that the samples have spectral information > (because you can extract it by performing a transform) and hence concluded > it has frequency information. I interpreted amplitude information to be > 'envelope' of the signal. > Fred'd interpretation (and answer) is what the OP was looking for. > > > There is no frequency information explicit > > there. In order to assess frequencies, you have to do some sort of > > transform on the data. > > > > The output of the FIR filter are real values of amplitude - that is all. > > > > Fred > > > >
But you are both talking over Nitesh's head now. Bhaskar's first answer was to the point, but I'll expand on it: The output of the A/D is a series of numbers that represent the amplitude of the signal at successive instants. Their changes from one to the next contain the frequency content of the signal. The filter modifies that frequency content, usually attenuating parts while leaving other parts unaffected. The filter's output is a sequence of numbers that has the same relation to the filter's output that the A/D's output has to the original signal. Jerry -- Engineering is the art of making what you want from things you can get. &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
"Jerry Avins" <jya@ieee.org> wrote in message
news:3F60CDDA.511BCF23@ieee.org...
> Bhaskar Thiagarajan wrote: > > > > "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message > > news:y_N7b.1275$v22.1018379@feed2.centurytel.net... > > > > > > "Bhaskar Thiagarajan" <bhaskart@deja.com> wrote in message > > > news:bjnjte$kt045$1@ID-82263.news.uni-berlin.de... > > > > "Nitesh Gupta" <gupta_nitesh@indiatimes.com> wrote in message > > > > news:3cee77d1.0309100715.12d70fc3@posting.google.com... > > > > > I have a basic doubt regarding FIR Filter implementation. > > > > > The input to my FIR filter is the data(16-bit out from ADC sampled
at
> > > > > 20 KHz). > > > > > i.e this data represents the amplitude of the sampled input
signal.
> > > > > > > > > > My doubt is > > > > > "whether the output of the FIR filter denotes the amplitude or > > > > > frequency of the filtered data? > > > > > > > > Both. > > > > The data from the A/D is also both. > > > > > > > > > > I don't see how..... The output of the FIR filter is a series of
samples
> > in > > > time that represent amplitudes. > > > > My bad - I guess I was thinking that the samples have spectral
information
> > (because you can extract it by performing a transform) and hence
concluded
> > it has frequency information. I interpreted amplitude information to be > > 'envelope' of the signal. > > Fred'd interpretation (and answer) is what the OP was looking for. > > > > > There is no frequency information explicit > > > there. In order to assess frequencies, you have to do some sort of > > > transform on the data. > > > > > > The output of the FIR filter are real values of amplitude - that is
all.
> > > > > > Fred > > > > > > > > But you are both talking over Nitesh's head now. Bhaskar's first answer > was to the point, but I'll expand on it: > > The output of the A/D is a series of numbers that represent the > amplitude of the signal at successive instants. Their changes from one > to the next contain the frequency content of the signal. The filter > modifies that frequency content, usually attenuating parts while leaving > other parts unaffected. The filter's output is a sequence of numbers > that has the same relation to the filter's output that the A/D's output > has to the original signal.
Jerry, First I've heard that taking the first difference was a way to get frequency information. I did say "explicit" and will stick with that. I'm not well enough equipped to make it simpler. I don't get your last sentence about "relation to".... Of course, if there were frequency information explicit in the sequence then your comment about the effect of the filter would be appropriate. It's still appropriate if you keep the discussion in the time domain - otherwise there is implied analysis which, I suggest, makes the discussion more complicated. The OP's question was "what do these numbers represent?" There's only one answer to this question. Anything beyond assumes analysis of those numbers. He didn't say that this was a lowpass filter with the lowest possible cutoff frequency so that the output effectively represents the dc component of the input - which would be a special case and frequency would be part of the answer. So, one might say: the filter's output could have more rapid changes or less rapid changes depending on the type of filter: high-pass or low-pass respectively. At that, there's some frequency jargon involved but even that could be put in the time domain if necessary. But, that would be overkill to make a point. Fred
Fred Marshall wrote:
> > "Jerry Avins" <jya@ieee.org> wrote in message > news:3F60CDDA.511BCF23@ieee.org... > > Bhaskar Thiagarajan wrote: > > > > > > "Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message > > > news:y_N7b.1275$v22.1018379@feed2.centurytel.net... > > > > > > > > "Bhaskar Thiagarajan" <bhaskart@deja.com> wrote in message > > > > news:bjnjte$kt045$1@ID-82263.news.uni-berlin.de... > > > > > "Nitesh Gupta" <gupta_nitesh@indiatimes.com> wrote in message > > > > > news:3cee77d1.0309100715.12d70fc3@posting.google.com... > > > > > > I have a basic doubt regarding FIR Filter implementation. > > > > > > The input to my FIR filter is the data(16-bit out from ADC sampled > at > > > > > > 20 KHz). > > > > > > i.e this data represents the amplitude of the sampled input > signal. > > > > > > > > > > > > My doubt is > > > > > > "whether the output of the FIR filter denotes the amplitude or > > > > > > frequency of the filtered data? > > > > > > > > > > Both. > > > > > The data from the A/D is also both. > > > > > > > > > > > > > I don't see how..... The output of the FIR filter is a series of > samples > > > in > > > > time that represent amplitudes. > > > > > > My bad - I guess I was thinking that the samples have spectral > information > > > (because you can extract it by performing a transform) and hence > concluded > > > it has frequency information. I interpreted amplitude information to be > > > 'envelope' of the signal. > > > Fred'd interpretation (and answer) is what the OP was looking for. > > > > > > > There is no frequency information explicit > > > > there. In order to assess frequencies, you have to do some sort of > > > > transform on the data. > > > > > > > > The output of the FIR filter are real values of amplitude - that is > all. > > > > > > > > Fred > > > > > > > > > > > > But you are both talking over Nitesh's head now. Bhaskar's first answer > > was to the point, but I'll expand on it: > > > > The output of the A/D is a series of numbers that represent the > > amplitude of the signal at successive instants. Their changes from one > > to the next contain the frequency content of the signal. The filter > > modifies that frequency content, usually attenuating parts while leaving > > other parts unaffected. The filter's output is a sequence of numbers > > that has the same relation to the filter's output that the A/D's output > > has to the original signal. > > Jerry, > > First I've heard that taking the first difference was a way to get frequency > information.
I didn't mean to take differences. The frequency information is implicit in the changes of value from one sample to the next. DC happens when all samples are the same, etc.
> I did say "explicit" and will stick with that. > I'm not well enough equipped to make it simpler. > I don't get your last sentence about "relation to"....
The samples out of the A/D represent the original in the same way that the samples out of the filter represent the modified signal.
> > Of course, if there were frequency information explicit in the sequence then > your comment about the effect of the filter would be appropriate. It's > still appropriate if you keep the discussion in the time domain - otherwise > there is implied analysis which, I suggest, makes the discussion more > complicated.
We can't stay entirely in the time domain when discussing the effects of a band-pass filter.
> > The OP's question was "what do these numbers represent?" There's only one > answer to this question. Anything beyond assumes analysis of those numbers. > He didn't say that this was a lowpass filter with the lowest possible cutoff > frequency so that the output effectively represents the dc component of the > input - which would be a special case and frequency would be part of the > answer.
He asked if they represented frequencies somehow. That indicates a confusion that we ought to try to clear away.
> > So, one might say: the filter's output could have more rapid changes or less > rapid changes depending on the type of filter: high-pass or low-pass > respectively. At that, there's some frequency jargon involved but even that > could be put in the time domain if necessary. But, that would be overkill > to make a point. >
A little overkill when slaying misconceptions can be salutary.
> Fred
Jerry -- Engineering is the art of making what you want from things you can get. &#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;&#2013266095;
"Jerry Avins" <jya@ieee.org> wrote in message
news:3F60FC4B.8C2314D5@ieee.org...
> > > > First I've heard that taking the first difference was a way to get
frequency
> > information. > > I didn't mean to take differences. The frequency information is implicit > in the changes of value from one sample to the next. DC happens when all > samples are the same, etc.
***er.... "the changes of value from one sample to the next" *are* the first differences. .......
> > Of course, if there were frequency information explicit in the sequence
then
> > your comment about the effect of the filter would be appropriate. It's > > still appropriate if you keep the discussion in the time domain -
otherwise
> > there is implied analysis which, I suggest, makes the discussion more > > complicated. > > We can't stay entirely in the time domain when discussing the effects of > a band-pass filter.
***Well, you *could* but it would be difficult and not helpful. That's what I said below.
> > > > The OP's question was "what do these numbers represent?" There's only
one
> > answer to this question. Anything beyond assumes analysis of those
numbers.
> > He didn't say that this was a lowpass filter with the lowest possible
cutoff
> > frequency so that the output effectively represents the dc component of
the
> > input - which would be a special case and frequency would be part of the > > answer. > > He asked if they represented frequencies somehow. That indicates a > confusion that we ought to try to clear away.
***Agreed.
> > > > So, one might say: the filter's output could have more rapid changes or
less
> > rapid changes depending on the type of filter: high-pass or low-pass > > respectively. At that, there's some frequency jargon involved but even
that
> > could be put in the time domain if necessary. But, that would be
overkill
> > to make a point. > > > A little overkill when slaying misconceptions can be salutary.
***Yeah, except I meant that keeping the discussion purely in the time domain would be overkill. That's not what your'e advocating and I've agreed. ***I think we agree. My real point was that frequency information is implicit in the time samples and not explicit in the time samples, that's all. Some analysis is necessary to get more explicit re: frequency and this can include using filters. Fred
Thanx all for your co-operation,

The reason behind asking this question was:

The following block diagram, that I'm not able to understand. Can U
please help me in understanding this diagram? Why this "Freq to Value"
block is placed in between, if the output of 16 TAP BPF represents
amplitude component?


             ------------     ------------        -----     ----
            |            |   |            |      |      |  |    |
ADC_OUT --->| 16 TAP BPF |-->|Freq to val |----> | LPF  |->| -- |<--
            |            |   |            |      |      |  |    |   |
             ------------     ------------        ------    ----    |
                  -------------------------------------------|      | 
                  |                                                 |
             -----V-------     ------------        -------          |
            |            |   |            |      |        |         |
   OUT  <---| SINE       |-->|Freq to val |----> |   LPF  |---------
            | GENERATOR  |   |            |      |        |  
             ------------     ------------        --------   

--Nitesh
Nitesh Gupta wrote:
> > Thanx all for your co-operation, > > The reason behind asking this question was: > > The following block diagram, that I'm not able to understand. Can U > please help me in understanding this diagram? Why this "Freq to Value" > block is placed in between, if the output of 16 TAP BPF represents > amplitude component? > > ------------ ------------ ----- ---- > | | | | | | | | > ADC_OUT --->| 16 TAP BPF |-->|Freq to val |----> | LPF |->| -- |<-- > | | | | | | | | | > ------------ ------------ ------ ---- | > -------------------------------------------| | > | | > -----V------- ------------ ------- | > | | | | | | | > OUT <---| SINE |-->|Freq to val |----> | LPF |--------- > | GENERATOR | | | | | > ------------ ------------ -------- > > --Nitesh
Because it represents the INSTANTANEOUS amplitude. It varies with time. The BPF supresses frequencies outside the passband. If you put a pure sine wave into the BPF, and the frequency of that sine wave were within the passband, the BPF will output the same thing that was input (but delayed a little). If you put two sine waves into the BPF, one whose frequency is outside the passband, and one whose frequency is within the passband, you will only get one sine wave out. But it will still be a sine wave. -- Jim Thomas Principal Applications Engineer Bittware, Inc jthomas@bittware.com http://www.bittware.com (703) 779-7770 Air conditioning may have destroyed the ozone layer - but it's been worth it!