Hi, I am using fft in DSP. However, I found that the alising is very serious in my case. I am going to use a hamming window for smoothing. However, my signal has a constanst background(the base is not zero). The effect of hamming window will cut part of the background. Does anyone know how to design a window for smoothing and can also keep the background of signal constant? Thanks in advance.
about filtering signal
Started by ●October 8, 2003
Reply by ●October 8, 20032003-10-08
Rex_chaos wrote: > Hi, > I am using fft in DSP. However, I found that the alising is very > serious in my case. I am going to use a hamming window for smoothing. > However, my signal has a constanst background(the base is not zero). > The effect of hamming window will cut part of the background. Does > anyone know how to design a window for smoothing and can also keep the > background of signal constant? > > Thanks in advance. Are you looking at the right problem? The FFT won't cause aliasing, but it will reveal it if the data were originally undersampled. In general, windows (Hamm or any other) achieve reduced sidelobe width by allowing a broadened main lobe. They also reduce component frequencies' calculated amplitudes by a constant for all frequencies. This amounts to a gain change. Jerry -- "I view the progress of science as ... the slow erosion of the tendency to dichotomize." Barbara Smuts, U. Mich. ���������������������������������������������������������������������
Reply by ●October 8, 20032003-10-08
Jerry Avins <jya@ieee.org> wrote in message news:<bm1d89$k05$1@bob.news.rcn.net>...> Rex_chaos wrote: > > > Hi, > > I am using fft in DSP. However, I found that the alising is very > > serious in my case. I am going to use a hamming window for smoothing. > > However, my signal has a constanst background(the base is not zero). > > The effect of hamming window will cut part of the background. Does > > anyone know how to design a window for smoothing and can also keep the > > background of signal constant? > > > > Thanks in advance. > > Are you looking at the right problem? The FFT won't cause aliasing, but > it will reveal it if the data were originally undersampled. In general, > windows (Hamm or any other) achieve reduced sidelobe width by allowing a > broadened main lobe. They also reduce component frequencies' calculated > amplitudes by a constant for all frequencies. This amounts to a gain > change. > > JerryThanks. I think I misuderstand the concept of alising. I am talking about the side effect caused by the periodic boundary condition of fft. I am handling a signal with a constant energy background. However, I found that there is a oscillating wave ocuured at the tail of the signal and affect the head due to the periodic boundary condition. A hamming window is used to lower the effect, it does work, however, the constant energy background is also damaged. Besides applying a window, is there any way to reduce the side effect and keep the background at the same time? Thanks in advance.
Reply by ●October 9, 20032003-10-09
Rex_chaos wrote:> Jerry Avins <jya@ieee.org> wrote in message news:<bm1d89$k05$1@bob.news.rcn.net>... > >>Rex_chaos wrote: >> >> > Hi, >> > I am using fft in DSP. However, I found that the alising is very >> > serious in my case. I am going to use a hamming window for smoothing. >> > However, my signal has a constanst background(the base is not zero). >> > The effect of hamming window will cut part of the background. Does >> > anyone know how to design a window for smoothing and can also keep the >> > background of signal constant? >> > >> > Thanks in advance. >> >>Are you looking at the right problem? The FFT won't cause aliasing, but >>it will reveal it if the data were originally undersampled. In general, >>windows (Hamm or any other) achieve reduced sidelobe width by allowing a >>broadened main lobe. They also reduce component frequencies' calculated >>amplitudes by a constant for all frequencies. This amounts to a gain >>change. >> >>Jerry > > > > Thanks. I think I misuderstand the concept of alising. I am talking > about the side effect caused by the periodic boundary condition of > fft. I am handling a signal with a constant energy background. > However, I found that there is a oscillating wave ocuured at the tail > of the signal and affect the head due to the periodic boundary > condition. A hamming window is used to lower the effect, it does work, > however, the constant energy background is also damaged. Besides > applying a window, is there any way to reduce the side effect and keep > the background at the same time? > > Thanks in advance.As far as aliasing goes, it was matter of words, not ideas. I'm clear now. What do you mean by "damaged"? The apparent amplitudes of all frequencies are reduced in proportion to the area under the window of choice to a rectangular window (which is the same as no window at all). It's easy to calculate that ratio and apply its inverse as a correction, but for most applications, it doesn't matter. Jerry -- "I view the progress of science as ... the slow erosion of the tendency to dichotomize." Barbara Smuts, U. Mich. ���������������������������������������������������������������������
Reply by ●October 9, 20032003-10-09
Rex_chaos wrote:> I am handling a signal with a constant energy background. > However, I found that there is a oscillating wave ocuured at the tail > of the signal and affect the head due to the periodic boundary > condition. A hamming window is used to lower the effect, it does work, > however, the constant energy background is also damaged.What do you mean by "constant energy background"? Perhaps your signal has a DC component? > Besides applying a window, is there any way to reduce the side > effect and keep the background at the same time? The only other way I know of is to choose the size of the FFT such that it matches the period of your input signal. In other words, if the input signal has a period of 445 samples, use a 445 point FFT. -- 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!
Reply by ●October 9, 20032003-10-09
> As far as aliasing goes, it was matter of words, not ideas. I'm clear > now. What do you mean by "damaged"? The apparent amplitudes of all > frequencies are reduced in proportion to the area under the window of > choice to a rectangular window (which is the same as no window at all). > It's easy to calculate that ratio and apply its inverse as a correction, > but for most applications, it doesn't matter. >Thanks for reply. Actually, I am working with a so-called split-step fourier method in my project. The evolution of the signal based on the reorganization of the spectrum. In my case, the constant background, on which the signal travels, is very vital. However, it is the periodic boundary condition leads to some oscillating waves that force the signal go into ruin quickly. Somebody suggests that a strong absorber will be placed on the boundary. I tried but still no good, I wonder if the constant background is unlikely to keep in discrete space with finite-width spectrum. I also try a rectangular window to filter the spectrum. However, it leads to another issue: a sharp drop. Since I must take the numerical deriviate of the signal before reorganization of the spectrum. Numerical deriviate of a signal with a sharp drop will produce some unwanted data. It's annoying!!!
Reply by ●October 9, 20032003-10-09
Rex_chaos wrote:>>As far as aliasing goes, it was matter of words, not ideas. I'm clear >>now. What do you mean by "damaged"? The apparent amplitudes of all >>frequencies are reduced in proportion to the area under the window of >>choice to a rectangular window (which is the same as no window at all). >>It's easy to calculate that ratio and apply its inverse as a correction, >>but for most applications, it doesn't matter. >> > > Thanks for reply. Actually, I am working with a so-called split-step > fourier method in my project. The evolution of the signal based on the > reorganization of the spectrum. In my case, the constant background, > on which the signal travels, is very vital. However, it is the > periodic boundary condition leads to some oscillating waves that force > the signal go into ruin quickly. Somebody suggests that a strong > absorber will be placed on the boundary. I tried but still no good, I > wonder if the constant background is unlikely to keep in discrete > space with finite-width spectrum. I also try a rectangular window to > filter the spectrum. However, it leads to another issue: a sharp drop. > Since I must take the numerical deriviate of the signal before > reorganization of the spectrum. Numerical deriviate of a signal with a > sharp drop will produce some unwanted data. It's annoying!!!Are you looking at a single snapshot in time, or are you processing a continuous stream? I don't know enough to comment intelligently, but I can say that there's an important difference between how those cases must be handled. Jerry -- Engineering is the art of making what you want from things you can get. �����������������������������������������������������������������������
Reply by ●October 9, 20032003-10-09
Jim Thomas <jthomas@bittware.com> wrote in message news:<voao9utlla8a79@corp.supernews.com>...> Rex_chaos wrote: > > > I am handling a signal with a constant energy background. > > However, I found that there is a oscillating wave ocuured at the tail > > of the signal and affect the head due to the periodic boundary > > condition. A hamming window is used to lower the effect, it does work, > > however, the constant energy background is also damaged. > > What do you mean by "constant energy background"? Perhaps your signal > has a DC component?Yes. A non-zero DC component.> > > Besides applying a window, is there any way to reduce the side > > effect and keep the background at the same time? > > The only other way I know of is to choose the size of the FFT such that > it matches the period of your input signal. In other words, if the > input signal has a period of 445 samples, use a 445 point FFT.I alreadly take the the period of samples and point of FFT to 2^N
Reply by ●October 10, 20032003-10-10
rex_chaos@21cn.com (Rex_chaos) wrote in message news:<f7a7417.0310081818.2b975f4e@posting.google.com>...> Jerry Avins <jya@ieee.org> wrote in message news:<bm1d89$k05$1@bob.news.rcn.net>... > > Rex_chaos wrote: > > > > > Hi, > > > I am using fft in DSP. However, I found that the alising is very > > > serious in my case. I am going to use a hamming window for smoothing. > > > However, my signal has a constanst background(the base is not zero). > > > The effect of hamming window will cut part of the background. Does > > > anyone know how to design a window for smoothing and can also keep the > > > background of signal constant? > > > > > > Thanks in advance. > > > > Are you looking at the right problem? The FFT won't cause aliasing, but > > it will reveal it if the data were originally undersampled. In general, > > windows (Hamm or any other) achieve reduced sidelobe width by allowing a > > broadened main lobe. They also reduce component frequencies' calculated > > amplitudes by a constant for all frequencies. This amounts to a gain > > change. > > > > Jerry > > > Thanks. I think I misuderstand the concept of alising. I am talking > about the side effect caused by the periodic boundary condition of > fft. I am handling a signal with a constant energy background. > However, I found that there is a oscillating wave ocuured at the tail > of the signal and affect the head due to the periodic boundary > condition. A hamming window is used to lower the effect, it does work, > however, the constant energy background is also damaged. Besides > applying a window, is there any way to reduce the side effect and keep > the background at the same time? > > Thanks in advance.The best you can do is to low pass filter the data before further processing. So, you could use a FIR lowpass filter in the time domain or, you could apply a FIR lowpass filter in the frequency domain (by multiplying). In the time domain this is equivalent to convolving with a sinc-shaped impulse response which will spread the data a bit but that should be all. I think this is what you want to do rather than windowing in time - you really want to "window" in frequency (lowpass filter). Then any "background" should be reasonably retained if I understand what you mean..... Fred
Reply by ●October 10, 20032003-10-10
Rex_chaos wrote:> Jim Thomas <jthomas@bittware.com> wrote >>The only other way I know of is to choose the size of the FFT such that >>it matches the period of your input signal. In other words, if the >>input signal has a period of 445 samples, use a 445 point FFT. > > I alreadly take the the period of samples and point of FFT to 2^NPerhaps I didn't make myself clear. When I mentioned the "period" of the input signal, I meant the amount of time it takes for the signal to repeat itself. A 1KHz sine wave repeats itself once every millisecond - it has a period of 1 ms. Fourier observed that any periodic signal can be represented by summing up a series of weighted harmonically-related sinusoids. The Fourier Transform gives you those weights. The FT assumes that its input is periodic, and that you are feeding it one period. If you feed it 256 samples, it assumes that the time-domain signal repeats itself every 256 samples. If those 256 samples do NOT hold an integer number of periods, you get a discontinuity. This discontinuity shows up as smearing in the frequency domain. To see this, take a 256-point FFT of some signal. Then copy your input samples into a 512 sample array twice (that is, x[n] = x[n+256] for n=0-255). Then take a 512-point FFT. The 512-point FFT will have 2 periods, and every other output of the FFT should be zero (or close to it). The non-zero outputs should be very close to what you got with the 256-point FFT. Look at those 512 points in the time domain, and note the discontinuity between samples 255 and 256. Windowing tapers the signal down near the edges, so that when it repeats, there is no discontinuity. -- Jim Thomas Principal Applications Engineer Bittware, Inc jthomas@bittware.com http://www.bittware.com (703) 779-7770 Sometimes experience is the only teacher that works - Mike Rosing






