# Compare two Fourier series to depict the signal smoothness

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

• 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.
– Royi
Jul 26, 2021 at 4:24
• 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 Jul 26, 2021 at 8:24
• 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).
– Sina
Jul 26, 2021 at 14:42
• Does variance meet your definition on smoothness? Jul 27, 2021 at 2:23
• @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. Jul 27, 2021 at 5:38