Skip to main content
14-Alexandrite
August 25, 2023
Solved

CFFT and a sanity check

  • August 25, 2023
  • 1 reply
  • 2605 views

to all

 

Doing a sanity check on the CFFT for another spectrum analyser in a 1/3 party tool

If one has a sine wave Asin(w*t) then a spectrum analysis will return an amplitude a=A/2 at w (or f= 2piw) . Am I correct?

Therefore if one only has the spectrum as an output (and not the original time signal) then one can read the frequency (w or f ) and conclude that the sine wave at the freq (in the time signal )has a peak value 2a!

 

Thanks in advance

John

Best answer by LucMeekes

The output of all discrete Fourier transform functions is scaled.

Apparently dft (and dftr) is scaled by n/2, where n is the number of samples of the input vector:

LucMeekes_1-1693135975407.png

You can investigate that by changing Tobs, Fs and A1.

 

Success!
Luc

 

1 reply

23-Emerald IV
August 25, 2023

Mathcad (the real thing) used to have several implementations of the discrete Fourier transform:

fft, cfft, FFT and CFFT. they differ in scaling factor and whether or not they work with arbitrary sized vectors or 2^n size.

In Prime these functions are deprecated (but may still work), and the preference now is to use the dft and dftr functions.

In the online help (search term CFFT) you can find an overview and comparison of all these functions.

 

Success!
Luc

JXBWk14-AlexandriteAuthor
14-Alexandrite
August 27, 2023

Thanks

Looking at the example: Example: Filtering in the Frequency Domain  especially the one 'Signal without Noise'. Playing with the input signal as per the example one can see the frequencies (of the signal changing (if one changes the w values) but the peaks value are odd. the the amptidues of both wave is 1 then 300 is returned as apeak, ampltidue 0.1 peaks ais 250

Jsut not sure what the tool/function is doing here. 

Ultimatly one is lookgin to get the spectrum of the signal 

 

LucMeekes23-Emerald IVAnswer
23-Emerald IV
August 27, 2023

The output of all discrete Fourier transform functions is scaled.

Apparently dft (and dftr) is scaled by n/2, where n is the number of samples of the input vector:

LucMeekes_1-1693135975407.png

You can investigate that by changing Tobs, Fs and A1.

 

Success!
Luc