# How to Mesure the smoothness of a signal

so how can i determine if a signal is smooth or not ? And if its possible to get something indicating the level of the smoothness of my signal.

I looked at the r-squared and hurst exponent but i wanted to know if they where others methods.

• Can I please ask what is the specific application you are looking at? – A_A Jan 10 '18 at 10:24
• Hi, i just want to see if a time series is smooth or not – Wolt Jan 22 '18 at 18:21

A number of features will return some estimate of the smoothness of a signal. In general, these are all measures of dispersion with slightly different takes on "dispersion".

The choice of the "right" metric, depends very much on the application and the characteristics of the system and its signals.

The simplest metric would be the variance or the standard deviation. This measures dispersion around a signal's average value.

Closely related to variance is Entropy, as defined in Information Theory. Entropy returns a value that is proportional to how unpredictable a signal appears to be. This diagram from Wikipedia, depicts the entropy of a time series that takes values 0,1. When the time series is "boring", that is, when it is all 0 (far left part of the diagram) or when it is all 1 (far right part of the diagram), then the entropy is at its lowest value. But, when statistically there is not "preference" for either state (that is, exactly in the middle of the diagram) then the entropy is at its highest value.

Entropy is a very useful metric but it can be derived in a number of different ways, each one with its own little special considerations.

Shannon's entropy is the easiest option and most scientific computation packages will include some function that calculates the entropy through the signal's marginal distribution with various refinements. All of these however assume that each signal value is independent of its neighbours. Something that rarely is true. Therefore, this "simple" entropy can return a metric of how much a signal tends to white noise.

Alternative derivations of entropy take into account the relationship between neighbouring values. One such metric is LZ-Complexity.

And this brings us to something a bit more meaningful for practical signals. Measures of complexity. Many signals you find "in the wild" are not generated from linear systems or processes. This can "confuse" the linear metrics.

For instance, imagine that the output of a system is deterministic but looks very much like noise. This condition could return two similar values of variance for two different time series despite the fact that they may have been generated when the system was at different states.

To account for this non-linear behaviour, non-linear methods are using different representations for the signal and from those can derive metrics of complexity (or conversely, regularity). In this case there is a family of metrics that all try to estimate the dimension of this representation. In other words, what you are trying to understand here is whether or not the signal becomes more smooth (or more iregular) as you are decreasing a window of observation on its time course. One such metric is Fractal Dimension and it is very closely related to the Hurst Exponent.

These metrics are very useful when dealing with physiological signals (and here) and have been shown to respond well to altered states of the processes that generated the signals these metrics evaluate (example, another example, yet another example, plenty more in literature if you are looking for "complexity") .

Hope this helps.

• Really interesting :) thank you so much for your response and your time, i will try to use all the features you mentioned – Wolt Jan 22 '18 at 16:24
• Thank you for your message, best wishes for quick and uneventful progress – A_A Jan 23 '18 at 13:33

Hurst exponent is a good option.

For a better answer you must better explain your objective. For example if you are comparing signals and if they have the save length, amplitude, sampling frequency and/or others.

If you are looking for very simple approaches then, for example, you can:

1. calculate the discrete derivative
2. calculate absolute value
3. sum all values

Another option could be:

1. apply a low pass filter
2. calculate difference between original signal and filtered signal
3. a smaller difference means a smoother signal.
• so the "difference between original signal and [low-pass] filtered signal" is a high-pass filter output. i presume you mean-square it so a "smoother" signal i one with a relatively low high-pass output. – robert bristow-johnson Jan 10 '18 at 7:55