I have attached 2 plots for FFT spectra. One is considered good and one is bad.

The good one is classified on the basis of how closely spaced the frequencies and the bad is based on how multiple frequencies are present.

I am trying to determine a dimensionless objective function that could be maximized or minimized so as to lean towards which is a better plot (Good FFT). One function which is consistent for a particular scale is Max. Power/standard deviation. But this is not a dimensionless quantity.

I would like to determine a dimensionless quantity.

enter image description here

enter image description here

EDIT: Assuming the spectrum is similar to a probability distribution: $\frac{E}{\int_\Omega|f(\omega)|d\omega}$

where E is the max. Amplitude of the PSD.

I am investigating other definitions of spread besides: $$ \omega_{max} - \omega_{min} $$

The objective function proposed by whpowell96 does not seem working generally enough. I identified these 3 properties of a spread:

  1. Given the same shape of spectrum, only by changing number of sample of fft changes $\omega_{max}-\omega_{min}$, and so it gives different peakness for the same spectrum

  2. It is not scale invariant for a triangle spectrum with larger height and same base (you get same objective function while peakness is clearly differernt). See figure below enter image description here

  3. By scaling up the spectrum (e.g. twice larger in both dimensions), I am expecting to have the same objective function since the peakness is unchanged. enter image description here

I am investigating other definition of spread instead of $\omega_{max} - \omega_{min}$. Basically I am generalizing whpowell96 's objective function with:

$$ \frac{\|f\|_{L^\infty}\|f\|_{L^0}}{\|f\|_{L^1}} = \frac{\mathrm{max}_{\omega\in\Omega} f(\omega)\cdot|\Omega|}{\int_\Omega|f(\omega)|d\omega}. $$ Basically replacing $\Omega$ with a measure of Statistical dispersion such as (i) IQR (ii) standard deviation, (iii)Mean absolute deviation. It is easy to show that IQR satisfies point 3 but not point 2. I am investigating the other measures.

  • $\begingroup$ We can't see filenames, so it is better that you add the information describing the plots. $\endgroup$
    – nicoguaro
    May 27, 2020 at 3:24
  • $\begingroup$ Also, there are many choices for nondimensional numbers, so it would be a good idea if you describe what you need them for. $\endgroup$
    – nicoguaro
    May 27, 2020 at 3:25
  • $\begingroup$ Hi, The top one has lot more frequencies, so it is a bad FFT based on what I want to achieve and the bottom one is a good FFT. $\endgroup$ May 28, 2020 at 10:40

1 Answer 1


Let $f(\omega)$ be your power spectrum. Then maybe something like $$ \frac{\|f\|_{L^\infty}\|f\|_{L^0}}{\|f\|_{L^1}} = \frac{\mathrm{max}_{\omega\in\Omega} f(\omega)\cdot|\omega_{max}-\omega_{min}|}{\int_\Omega|f(\omega)|d\omega}. $$ I know that $L^0$ isn't really good notation but I think it is useful for presenting this. This quantity is minimized by constant functions and takes the value $1$ there. This can be interpreted as the ratio between the area of the rectangle formed by the support of your spectrum times the largest value and the true area under the power spectrum, so it will heavily penalize spikes. It is also dimensionless, as required. The only part that takes some work is discretizing the denominator but since I assume you have uniformly discretized frequencies you can just use something like $$ \int_\Omega|f(\omega)|d\omega\approx\Delta\omega\sum_{i=1}^N|f_i|. $$

Edit: $|\omega_{max}-\omega_{min}|$ is actually incorrect in my initial answer. This should instead be an estimate of the measure of $\mathrm{supp}(f)$, i.e., the places where $f$ is nonzero. This requires more work to quantify and likely requires some sort of tolerance to determine what values of $f$ are close enough to zero to be counted as zero. This should fix problems 1 and I believe 3 in your edit. I'm unsure of how to fix problem 2 but my intuition says that these triangular examples are close to worst-case scenarios for this metric since for this family of functions, $\|f\|_{L^1}$ is exactly proportional to $\|f\|_{L^{\infty}}$

  • $\begingroup$ Hi, thank you for you're answer. after that I tried the objective functions and i found some problems. Please see edited question for what my problem is. Essentially, points 1 and 2 are not satisfied with the equation you provided. Point 3 works well with it. Any suggestion would be appreciated. Thanks in advance $\endgroup$ Jul 3, 2020 at 1:11
  • $\begingroup$ Yeah Edwin is right, I tried it too, that metric is not working in general.... $\endgroup$
    – Millemila
    Jul 8, 2020 at 15:18
  • $\begingroup$ Edited to provide some new thoughts $\endgroup$
    – whpowell96
    Jul 8, 2020 at 19:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.