I want to get a measure for the 'restlessness' of a signal.
I thought that the standard deviation could be right.
(In the end, I want to have a moving window over my signal, where an indicator tells me how restless my signal is. But for the beginning I just analysed some toy data over a fixed and static amount of data.)
Unfortunately, if I take some generated signals like in the example below, I can see that quite different signals result in the same value for the standard deviation.
I could imagine that a fourier transformation or a power spectrum might deliver a better indication how unsteady my signal is, but my question is: are there any other (easier to use) indicators for my use case?
The example:
import numpy as np
import matplotlib
matplotlib.use('QT5Agg')
import matplotlib.pyplot as plt
x = np.linspace(0, 2 * np.pi, 1000)
y1 = np.sin(x)
print("y1.std()=", y1.std())
y2 = np.sin(10 * x)
print("y2.std()=", y2.std())
plt.plot(x,y1, '-o', markersize=2, c='r')
plt.plot(x,y2, '-o', markersize=2, c='g')
plt.grid()
plt.show()
The output:
y1.std()= 0.7067531393633848
y2.std()= 0.7067531393633849