I have several signals, that I am trying to find a metric to compare the signal smoothness. By signal smoothness I mean, the signal that the distance between the peak to trough become smaller (getting close to becoming flat) is smoother, and if this peak-tough distance increases it becomes wavier.

I can fit a Fourier series with eight terms to all of them. it means that I do have a Fourier series equation with eight terms for all of them.

My question is that how I can compare the Fourier series coefficient to each other, in order to evaluate the signal smoothness?

since for a single term fourerie series (i.e f(x)=a0+a1cos(xw)+b1sin (xw)) I can use the "sqrt ((a1^2)+(b1^2))" as an indicator of surface smoothness. but I do not know what I should do when it has eight terms? Thank you

  • 2
    $\begingroup$ Why do you want to do it using the Fourier Series coefficients? There are much better ways to do it in time domain. What you ask about is a local property while each of the Fourier coefficients has a global effect. $\endgroup$
    – Royi
    Commented Jul 26, 2021 at 4:24
  • $\begingroup$ Thanks for your response. I have several graphs that are similar to sin waves. I am trying to find a method (metric) to quantify the difference between the peak and the trough. The techniques should be consistent across all of the graphs to compare the metrics for each graph. Currently, I realised that Fourier order 4 has the best fit for all of my graphs. I appreciate it if you would advise me on other techniques to do this? Thanks $\endgroup$
    – Saeed
    Commented Jul 26, 2021 at 8:24
  • $\begingroup$ Smoothness: How about measuring the fraction of the signal energy that's contained in the e.g. lowest AC band? So your measure would be (a_1^2 + b_1^2)/(sum_{i=1}^8 a_i^2 + b_i^2). $\endgroup$
    – Sina
    Commented Jul 26, 2021 at 14:42
  • $\begingroup$ Does variance meet your definition on smoothness? $\endgroup$
    – ZR Han
    Commented Jul 27, 2021 at 2:23
  • $\begingroup$ @Sina Thanks for your response, it does not seem to work for me? Do you mean this? sum=((a1^2)+(b1^2)+(a2^2)+(b2^2)+(a3^2)+(b3^2)+(a4^2)+(b4^2)+(a5^2)+(b5^2)... +(a6^2)+(b6^2)+(a7^2)+(b7^2)+(a8^2)+(b8^2)); Single=(a1^2)+(b1^2) Metric=(sqrt (Single/sum)); Please let me know if you meant something else. $\endgroup$
    – Saeed
    Commented Jul 27, 2021 at 5:38

1 Answer 1


Calculating the variance of the Fourier coefficients directly won't do the job.
Think of the case of a single Fourier coefficient being not zero (The DC) and the rest are zero. While you can multiply this coefficient by any number to set any variance you'd like the signal in the time domain is as smooth as it gets (Constant signal).

You may do one of the following:

  1. Convert the signal into time domain and calculate the Total Variation norm as a measure of non smoothness.
  2. Scale all signals to have the same energy. apply High Pass filter in Frequency Domain. Calculate the variance of the coefficients.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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