DSPRelated.com
Forums

DFT of a Fourier summation

Started by mees April 24, 2007
If I have an expression for the Fourier expansion of a signal, is it valid
to take the FFT or the DFT of the signal (e.g. in Matlab) in order to
examine its spectral contents?

In particular, I have a Fourier sum that describes an RF pulse-modulation
process. The sum is equivalent to the fourier series expansion of a PWM
waveform multiplied by the fourier series expansion of an RF rectangular
waveform. The modulating signal that generates the PWM waveform is a
two-tone signal with tone separation of 1MHz.

% Fourier summation expression
f(t) =  2/(pi^2) * sum   a(t) * { b(t) + [16/(pi^2) * (c(t)*b(t))] }
                  n=1,3,5...

where:

a(t) = 1/n * sin(n*wm*t)
 
                          V
b(t) = {pi * E(t)} + 2 * sum {sin[pi*v*E(t)] * cos[(v*ws*t) + (v*pi)]/v}  

                        v=1,2,3...          

        N         K
c(t) = sum       sum   1/(n*k) * sin(n*wm*t) * sin(k*wc*t)      
     n=1,3,5... k=1,3,5...

E(t) = abs(cos(wm*t)) % Envelope of two-tone signal


If I evaluate the summation above as a 'for' loop in Matlab, and plug in
the relevant values e.g. 

wc = 2*pi*900e6; % carrier frequency
ws = 2*pi*20e6;  % pwm frequency
wm = 2*pi*0.5e6; % modulating frequency = two-tone signal separation 

N = 200;         % Limits of the Fourier sums
K = 11;
V = 7;

Would I then be correct in simply applying the matlab fft() function to
the sum in order to get the frequency spectrum as I've done below?

% FFT resolution of 1MHz:
  fres = 1e6;

% Number of FFT points:
 Nfft = 2^17;

% Sampling frequency:
 Fs = fres * Nfft;

% Sample period:
 Ts = 1/Fs;

% Plot spectrum where fourier_sum is the result from the sum above
figure
s = fft(fourier_sum,Nfft);
Y = abs(s(1:length(s)/2));
f = Fs*(0:(Nfft/2)-1)/Nfft;  
stem(f,Y)


I am asking because my plots don't give the expected frequency spectrum.
In general is it correct to apply the fft to a fourier sum to get the
frequency response?

thanks
m


_____________________________________
Do you know a company who employs DSP engineers?  
Is it already listed at http://dsprelated.com/employers.php ?
I am going to admit that I didn't read your formulas carefully, but
here is my understanding of it:

You have a signal f(t) that is a sum of discrete tones, as given
by your formula.

You then want to take the Fourier transform of f(t) and do some
comparison?

First of all, f(t) is a finite-length signal, at least the way that
you
have defined it.  So there will be smearing of the spectrum,
and the discrete tones will be a bit spread out.

So when you compute the Discrete Fourier Transform or FFT of
the signal, you have to be careful which points in the frequency
domain are evaluated.  It could be that the FFT gives evaluations
of points in the frequency domain that don't look like what you
expect, simply because the expressions are not aligned with
each other.

That's the funny thing about using discrete-time, finite-length
approximation to things that are continuous-time.  This is why I
prefer to just do things analytically :-).

One thing to try is the freqz(.) function in Matlab, since it has
automatic windowing and smoothing.  So you are less likely
to run into the problem above.

Else, try windowing your signal before computing the DFT/FFT.

Hope that helps,
Julius

julius wrote:

(snip)

> First of all, f(t) is a finite-length signal, at least the > way that you have defined it. So there will be smearing
> of the spectrum, and the discrete tones will be a bit spread out. The other way is to consider that f(t) is periodic with the appropriate period, and that only certain tones are allowed. If you use those tones there is no smearing. -- glen
On 25 Apr, 00:29, "mees" <kyomubi...@yahoo.co.uk> wrote:
> If I have an expression for the Fourier expansion of a signal, is it valid > to take the FFT or the DFT of the signal (e.g. in Matlab) in order to > examine its spectral contents? > > In particular, I have a Fourier sum that describes an RF pulse-modulation > process.
...
> I am asking because my plots don't give the expected frequency spectrum. > In general is it correct to apply the fft to a fourier sum to get the > frequency response?
You have to be very careful with your Fourier transforms before attempting to interpret the various results. You don't say it explicity (or it is hidden in the part of your post which I skipped without reading...) but I assume your RF signal is continuous time, CT for short. Now, there are two possible FTs for CT signals: The finite extent FT, which results in a discrete spectrum, or the infinite extent FT, which results in a continuous spectrum. Both spectra of CT signals are of infinite bandwidth. The DFT, on the other hand, works on finite-length Discrete-Time (DT) signals, which results in a finite-bandwidth discrete spectrum. Without going into details: The FFT is a very useful tool to work with Fourier transforms, as long as one knows exactly what it does, and that it is merely one of many variants of the FT. If you want to compare the results from the DFT with any other variation of the FT, there will be discrepancies. Rune