Forums

Problem with fourier transform

Started by acepsut May 27, 2009
Hello all,

I have a problem about period amplitude and phase distortion when performing
a fourier trasform. The problem arise when I have two periods with different
amplitude but very close.

An example; I create one cosine function with period amp` and phase 2.2
rad, another one with period= 75 amp0 phase=1.1 and then sum togheter.

If I perform an FT on this sum of cosines I get correctly periods,
amplitudes and phases for each function. But if I change the period of
second cosine from 75 to 84, I do not have correct values of this one.

Higher amplitude of cosine with period= 90 create a distortion on second
one, and I get uncorrect period amplitude and phase only in the cosine with
period, I get period.x, higher amplitude and of course an incorrect
phase on angle plot.

Why does this strange occurs? And what to do to have correct values of lower
magnitude cosine?

Thanks in advance

Alberto
Your problem is related to the resolution that you can have in the
frequency domain.
The frequency resolution that you have is related to the length of the
simulation:

df = 1/T;

Just to clarify
Suppose that your simulation is long 1ms (please use the appropriate
measurements units, period 75 and amplitude 30 can produce confusion).
Your resolution is df = 1/0.001 = 1000 Hz so, e.g. you can not see two
peaks at 12kHz and 12.5kHz

I think this is your problem because when the sinusoid are far you get
correct spectrum, when the sinusoid are really near
you have strange results.

Bye
Daniele
On Tue, May 26, 2009 at 5:32 PM, acepsut wrote:
> Hello all,
>
> I have a problem about period amplitude and phase distortion when performing
> a fourier trasform. The problem arise when I have two periods with different
> amplitude but very close.
>
> An example; I createone cosine function with period amp` and phase 2.2
> rad, another one with period= 75 amp0 phase=1.1 and then sum togheter.
>
> If I perform an FT on this sum of cosines I get correctly periods,
> amplitudes and phases for each function. But if I change the period of
> second cosine from 75 to 84, I do not have correct values of this one.
>
> Higher amplitude of cosine with period= 90 create a distortion on second
> one, and I get uncorrect period amplitude and phase only in the cosine with
> period, I get period.x, higher amplitude and of course an incorrect
> phase on angle plot.
>
> Why does this strange occurs? And what to do to have correct values of lower
> magnitude cosine?
>
> Thanks in advance
>
> Alberto
>
Since the description of your problem confines to the discreet domain, the
resolution of an N point DFT is given by 1/N on discreet frequency scale.
Therefore to "resolve" a monochromatic wave of frequency 1/90 (i.e period 90 samples) from another of discreet frequency 1/75 (i.e. period = 75
samples) you need to take a DFT whose resolution is better than (1/75-1/90).
To make use of a power of two points FFT, this would mean to use atleast 512
sample points for the signal records [512 is the nearest power of two
greater than 90*75/(90-75)E0]. Probably you would have used a 512 point or
1024 point FFT to find the spectral components over a simulated signal with
a record length more than 450 samples. This is enough to resolve period 75
and period 90 waves. But to resolve period 84 and period 90 waves you must
use atleast 2048 point FFT [2048 is the nearest power of two geater than
90*84/(90-84)60] over a signal simulated for more than 1260 points.

The second part of your problem is not very clear to me. May be you are
referring to the problem of resolving a strong sinusoid and a weak sinusoid
(strong and weak refer to the amplitudes) which lies close by. If two waves
one with period P1 samples and another with period P2 samples are such that
N is some integer multiple of both P1 and P2 (eg. P1d samples, P22
samples and N24 samples of signal record) then it is always possible to
resolve the two waves using an N point FFT regardless of their relative
amplitude. But this is seldom the case in practice and one has to resolve
waves of arbitrary periods. One way to solve the problem of "spectral
leakage" (i.e. a strong frequency affecting a weak frequency) is to use
an "appropriate" window that results in a lower side-lobe level than a
rectangular window whose side-lobe level is -13dB. The choice of window
depends on the kind of resolution (ie main lobe width of the FFT filter) and
the level of intereference suppression (typically through side-lobes) your
application demands. Interestingly there are other spectrum estimators than
FFT which yield superior resolution and intereference rejections.

Best Regards,
Arunkumar KP

On 5/26/09, acepsut wrote:

> Hello all,
>
> I have a problem about period amplitude and phase distortion when
> performing a fourier trasform. The problem arise when I have two periods
> with different amplitude but very close.
>
> An example; I create one cosine function with period amp` and phase
> 2.2 rad, another one with period= 75 amp0 phase=1.1 and then sum togheter.
>
> If I perform an FT on this sum of cosines I get correctly periods,
> amplitudes and phases for each function. But if I change the period of
> second cosine from 75 to 84, I do not have correct values of this one.
>
> Higher amplitude of cosine with period= 90 create a distortion on second
> one, and I get uncorrect period amplitude and phase only in the cosine with
> period, I get period.x, higher amplitude and of course an incorrect
> phase on angle plot.
>
> Why does this strange occurs? And what to do to have correct values of
> lower magnitude cosine?
>
> Thanks in advance
>
> Alberto
>
>
>
Please correct 'discreet' to 'discrete' (where ever it appears in the above
response). Thanks for your patience.

On 5/30/09, Arunkumar K.P. wrote:
>
> Since the description of your problem confines to the discreet domain, the
> resolution of an N point DFT is given by 1/N on discreet frequency scale.
> Therefore to "resolve" a monochromatic wave of frequency 1/90 (i.e period > 90 samples) from another of discreet frequency 1/75 (i.e. period = 75
> samples) you need to take a DFT whose resolution is better than (1/75-1/90).
> To make use of a power of two points FFT, this would mean to use atleast 512
> sample points for the signal records [512 is the nearest power of two
> greater than 90*75/(90-75)E0]. Probably you would have used a 512 point or
> 1024 point FFT to find the spectral components over a simulated signal with
> a record length more than 450 samples. This is enough to resolve period 75
> and period 90 waves. But to resolve period 84 and period 90 waves you must
> use atleast 2048 point FFT [2048 is the nearest power of two geater than
> 90*84/(90-84)60] over a signal simulated for more than 1260 points.
>
> The second part of your problem is not very clear to me. May be you are
> referring to the problem of resolving a strong sinusoid and a weak sinusoid
> (strong and weak refer to the amplitudes) which lies close by. If two waves
> one with period P1 samples and another with period P2 samples are such that
> N is some integer multiple of both P1 and P2 (eg. P1d samples, P22
> samples and N24 samples of signal record) then it is always possible to
> resolve the two waves using an N point FFT regardless of their relative
> amplitude. But this is seldom the case in practice and one has to resolve
> waves of arbitrary periods. One way to solve the problem of "spectral
> leakage" (i.e. a strong frequency affecting a weak frequency) is to use
> an "appropriate" window that results in a lower side-lobe level than a
> rectangular window whose side-lobe level is -13dB. The choice of window
> depends on the kind of resolution (ie main lobe width of the FFT filter) and
> the level of intereference suppression (typically through side-lobes) your
> application demands. Interestingly there are other spectrum estimators than
> FFT which yield superior resolution and intereference rejections.
>
> Best Regards,
> Arunkumar KP
>
> On 5/26/09, acepsut wrote:
>
>> Hello all,
>>
>> I have a problem about period amplitude and phase distortion when
>> performing a fourier trasform. The problem arise when I have two periods
>> with different amplitude but very close.
>>
>> An example; I create one cosine function with period amp` and phase
>> 2.2 rad, another one with period= 75 amp0 phase=1.1 and then sum togheter.
>>
>> If I perform an FT on this sum of cosines I get correctly periods,
>> amplitudes and phases for each function. But if I change the period of
>> second cosine from 75 to 84, I do not have correct values of this one.
>>
>> Higher amplitude of cosine with period= 90 create a distortion on second
>> one, and I get uncorrect period amplitude and phase only in the cosine with
>> period, I get period.x, higher amplitude and of course an incorrect
>> phase on angle plot.
>>
>> Why does this strange occurs? And what to do to have correct values of
>> lower magnitude cosine?
>>
>> Thanks in advance
>>
>> Alberto
>>
>>
>>