> Jerry Avins schrieb:
>>
>>A beautiful accounting. One of those insights I wish had occurred to me!
>
>
> Indeed - one is tempted to say that Bob describes things as simple as
> possible, but no simpler.
<blush> :-)
Bob
--
"Things should be described as simply as possible, but no
simpler."
A. Einstein
Reply by Andor●July 5, 20052005-07-05
Jerry Avins schrieb:
> Bob Cain wrote:
>
> ...
>
> > Consider a signal where your frequency is changing. The magnitude and
> > phase of two successive blocks at that frequency will not be the same.
> > Zeroing that frequency sample in the FFT for each block effectively
> > subtracts a sinusoid from each time domain block with the magnitude and
> > phase those frequency samples actually had. If that is different for
> > the two blocks, a discontinuity will be created between them. This
> > comes from modifying something on a block basis that is actully changing
> > continuously.
>
> ...
>
> A beautiful accounting. One of those insights I wish had occurred to me!
Indeed - one is tempted to say that Bob describes things as simple as
possible, but no simpler.
:-)
Regards,
Andor
Reply by Jerry Avins●July 4, 20052005-07-04
Bob Cain wrote:
...
> Consider a signal where your frequency is changing. The magnitude and
> phase of two successive blocks at that frequency will not be the same.
> Zeroing that frequency sample in the FFT for each block effectively
> subtracts a sinusoid from each time domain block with the magnitude and
> phase those frequency samples actually had. If that is different for
> the two blocks, a discontinuity will be created between them. This
> comes from modifying something on a block basis that is actully changing
> continuously.
...
A beautiful accounting. One of those insights I wish had occurred to me!
Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
Reply by Jerry Avins●July 4, 20052005-07-04
Andor wrote:
> Jerry wrote:
>
>>>In my case, I don't want to
>>>run a filter over my signal. Instead, in the frequency domain, I
>>>seriously just need to zero out certain frequency bins
>>
>>That never works. Infinitely sharp filters in the frequency domain
>>introduce unacceptable artifacts into the frequency domain.
>
>
> I disagree. The zero-phase frequency response of a linear-phase FIR is
> just a trigonometric polynomial. Setting bins to zero specifies the
> zeros of the polynomial and does not in any way imply infinitely sharp
> transition bandwidths. The only drawback of the naive approach is as
> O&S put it: "If we evaluate the frequency response corresponding to
> such a filter [designed by zeroing bins in frequency domain], we obtain
> the rather disappointing curve shown in ...". The stop band attenuation
> of such filters is usually lousy because of the wiggly frequency
> response in between the specified zeros. But that is another topic.
>
> I pointed out to Salil a thread where we discussed how to implement a
> frequency domain FIR with arbitrary modulation of the frequency domain
> vector (including setting arbitrary bins to zero) using overlap-save
> (which is simpler to implement and more effiicient than overlap-add).
> The only way to do that is by shifting the FFT frame by one sample and
> using one sample of each output frame to splice the output signal
> together.
>
> My advice to Salil is: read about FIR design and time-domain
> convolution first before you try frequency-domain convolution. That way
> you understand why what you are doing now is not going to work. You'll
> find most of what you need in that online book again.
If you repeat what you wrote at Salil's level of understanding, I think
you will come close to "That never works." Maybe instead of "infinitely
sharp" I should have written "apparently (to the naive) infinitely
sharp". That is more detail than I think the level of the discussion
warranted. I think we agree on the facts. We differ on the best way to
help Salil. Your judgment may be better than mine there.
Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
Reply by Andor●July 4, 20052005-07-04
Jerry wrote:
>> In my case, I don't want to
>> run a filter over my signal. Instead, in the frequency domain, I
>> seriously just need to zero out certain frequency bins
>
> That never works. Infinitely sharp filters in the frequency domain
> introduce unacceptable artifacts into the frequency domain.
I disagree. The zero-phase frequency response of a linear-phase FIR is
just a trigonometric polynomial. Setting bins to zero specifies the
zeros of the polynomial and does not in any way imply infinitely sharp
transition bandwidths. The only drawback of the naive approach is as
O&S put it: "If we evaluate the frequency response corresponding to
such a filter [designed by zeroing bins in frequency domain], we obtain
the rather disappointing curve shown in ...". The stop band attenuation
of such filters is usually lousy because of the wiggly frequency
response in between the specified zeros. But that is another topic.
I pointed out to Salil a thread where we discussed how to implement a
frequency domain FIR with arbitrary modulation of the frequency domain
vector (including setting arbitrary bins to zero) using overlap-save
(which is simpler to implement and more effiicient than overlap-add).
The only way to do that is by shifting the FFT frame by one sample and
using one sample of each output frame to splice the output signal
together.
My advice to Salil is: read about FIR design and time-domain
convolution first before you try frequency-domain convolution. That way
you understand why what you are doing now is not going to work. You'll
find most of what you need in that online book again.
Regards,
Andor
Reply by Bob Cain●July 4, 20052005-07-04
staufman@gmail.com wrote:
> Ok, I understand what you mean about this not being overlap-add but
> shouldn't my algorithm work nonetheless? In my case, I don't want to
> run a filter over my signal. Instead, in the frequency domain, I
> seriously just need to zero out certain frequency bins and change the
> magnitude of others. Does zero'ing certain bins cause the problem I am
> seeing? Is there anyway around this?
Consider a signal where your frequency is changing. The
magnitude and phase of two successive blocks at that
frequency will not be the same. Zeroing that frequency
sample in the FFT for each block effectively subtracts a
sinusoid from each time domain block with the magnitude and
phase those frequency samples actually had. If that is
different for the two blocks, a discontinuity will be
created between them. This comes from modifying something
on a block basis that is actully changing continuously.
That a block operation has an inverse does not imply an
intuitive reconstruction if the coeficients are modified
willy-nilly before taking the inverse. That's why we do our
modifications with convolutions, i.e. filters which actually
do perform overlap-add.
Bob
--
"Things should be described as simply as possible, but no
simpler."
A. Einstein
Reply by Jerry Avins●July 3, 20052005-07-03
staufman@gmail.com wrote:
> I've got the FFT/IFFT process working fine so I'm sure its the
> frequency tweaking that is causing this. Oh yea, the reason I keep on
> saying frequency zero'ing is so people don't refer me to overlap-add
> because I don't think it applies to my case. I'm not filtering using a
> kernel.
You are using a kernel; a weird one, that's all.
Jerry
--
Engineering is the art of making what you want from things you can get.
�����������������������������������������������������������������������
Reply by stau...@gmail.com●July 3, 20052005-07-03
I've got the FFT/IFFT process working fine so I'm sure its the
frequency tweaking that is causing this. Oh yea, the reason I keep on
saying frequency zero'ing is so people don't refer me to overlap-add
because I don't think it applies to my case. I'm not filtering using a
kernel.
Thanks!
-Salil
Reply by Jon Harris●July 3, 20052005-07-03
<staufman@gmail.com> wrote in message
news:1120432234.744816.82470@f14g2000cwb.googlegroups.com...
> Thanks for the help thus far. I'm a bit of a newbie if you didn't
> notice already. :)
>
> The other question I have is that the clipping I see is very regular
> and while the amplitude of the clipping samples change, the clipping is
> clearly periodic. In fact, its periodic with the window borders. So at
> every window border, there is a group of samples which are just
> completely out of the range from the rest of the neighboring samples.
> There must be a way to get rid of this noise cleanly. I'm going to try
> running a mean filter on it but assuming this can be fixed, really
> there is no other problem with the signal so while theoretically, sharp
> filters don't work in the FD, in practice they seem to be fine.
To begin, I would suggest you eliminate the filter operation (or as you say
zeroing some components, changing the magnitude of others--which is exactly what
filtering is). Just process your signal through the FFT and IFFT without making
any changes to the frequency data. That way you can separate problems that may
be caused by your FFT/IFFT process from those that are caused by the
frequency-domain processing. Once you get it so the result of the FFT/IFFT
sounds just like the original, then add the frequency-domain processing back in.
Reply by stau...@gmail.com●July 3, 20052005-07-03
Thanks for the help thus far. I'm a bit of a newbie if you didn't
notice already. :)
The other question I have is that the clipping I see is very regular
and while the amplitude of the clipping samples change, the clipping is
clearly periodic. In fact, its periodic with the window borders. So at
every window border, there is a group of samples which are just
completely out of the range from the rest of the neighboring samples.
There must be a way to get rid of this noise cleanly. I'm going to try
running a mean filter on it but assuming this can be fixed, really
there is no other problem with the signal so while theoretically, sharp
filters don't work in the FD, in practice they seem to be fine.
Thanks!
-Salil