Ways to characterize changes in sampled data beyond variance

I'm looking for ways to characterize sampled data that captures how monotonic changes in the data are. For example, in the function plots below, I want a measure that differs significantly for the two plots even though their variance might be roughly the same.

As a further complication the computation must be performed on a very resource-constrained device, namely using less than a KB of RAM if possible. The interesting window of the data is around 300 samples wide and each sample fits into 2 Bytes.

Currently I'm using a running (sliding window) variance over two different window widths, but it's not very useful. I know with more memory FFT and frequency analysis might be a way to approach this, but I'm not sure if it'll work on my setup. I was also thinking about counting moving average crossovers (as might be used in fincancial algorithms) within the window. I might also count how often the numerical derivative of the data crosses 0 (i.e. how often the data itself changes from decreasing to increasing or vice versa). But there I would have to handle the case where the data is mostly horizontal and the derivative fluctuates very closely around 0, crossing it often despite no significant slope in the data.

Any input is greatly appreciated.

Function Plot 1:

Function Plot 2:

Topic preprocessing

Category Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.