Constant State Detection In Time Series: Introduction.

There is the author's article The effective algorithm for constant state detection in time series with the basic description of the algorithm for Constant State Detection. You can read and/or download the article using the provided link.

The article introduces a simple and effective algorithm for constant state detection in the time series. The algorithm, based on the sliding window of variable length, finds all the sections of the time series which have length greater or equal than some given minimal length and have difference between maximal and minimal value in the section less or equal than some given value. It is shown that the computational complexity of the aforementioned algorithm is $O(N \log(N))$, where $N$ is the length of time series.

Actually this algorithm works as two-way one, because the sliding window start and finish indexes are moving quite independently one from another taking into account the maximal window height and the minimal window width restriction.

Algorithm implementation presented on the website can be divided in two main categories:

Algorithm with absolute window height. In this case the maximal window height restriction used as it is described in the referenced article.

Algorithm with relative window height. In this case software will calculate maximal ($max$) and minimal ($min$) values of the timeseries, then it will search windows with the allowed maximal window height value equal to
$(max - min) h_r$ where $h_r$ is the relative window height that you will provide in the input form.

The model data for a time series.

The timeseries for a model data are calculating as a sum of two sines.
$f(x_i) = sin(x_i) + \beta sin(2 x_i + \pi \phi)$
where $ x_i = 2 \pi i / 256 $
where $i \in \{0, 1, \ldots 255 \}$

You also can use your own data with this website.

You can upload and use your own data to check how the constant state section are found in the case of your specific data. The csv file format is floating-point, one-column one, without headers. You can download the csv file example using this link. The maximal file size to upload is 6 kB kB, the maximal data point count is 256.

You can explore the plot of the function with the constant section(s) and the tables with the found constant section location, regions of uninterrupted constant section and their length.

Use the menu item Constant state detection located on the (more or less) top right of the webpage to access the algorithm demo forms.

Also, you can use the next references for the website navigation:

The algorithm implementation for the model data with absolute window height is here.

The algorithm implementation for the model data with relative window height is here.

The algorithm implementation where you can upload your data for the absolute window height is here.

The algorithm implementation where you can upload your data for the relative window height is here.

If you think you see a bug, a typo, or you'd like to use the algorithm software presented on this website to process a big chunk of your data, please let me know.