Provides methods for detecting steady-state conditions based on t-test.
The following example demonstrates some of the methods found in the benchmark_steady_state_detection module.
The steady-state detection algorithm is based on the work by J. D. Kelly and J. D. Hedengren, “A steady-state detection (SSD) algorithm to detect non-stationary drifts in processes,” J. Process Control, vol. 23, no. 3, pp. 326–331, 2013. The original algorithm has been altered to be used with dynamic real-time data.
real(r8) function, public ssd | ( | real(r8), dimension(:), intent(in) | x, |
integer, intent(in) | offset, | ||
real(r8), intent(in) | alpha ) |
Compute the probability that a sample x
reached steady-state. The SSD algorithm presented in this work is also window-based and utilizes the Student-t test to determine if the difference between the process signal value minus its mean is above or below the standard-deviation times its statistical critical value. If less than, then that time instant or point is steady and if greater than, then it is unsteady where the aggregation is computed over the window approximating a probability or frequency of being at steady-state.
[in] | x | Sample of real(r8) values |
[in] | offset | Index of the first values inside the periodic array x |
[in] | alpha | Significance level for the student test. |
The mean is defined as:
\[ \mu = \frac{1}{n}\left(\sum x-m\sum i\right) \]
where \(m\) is the slope of a linear drift. In the present case, \(m=0\) It comes that the standard deviation is given by
\[ \sigma = \sqrt{\frac{1}{n-2}\sum (x-\mu)^2} \]
At this point along with a specified Student-t critical or threshold value at a particu100 lar significance level α and degrees-of-freedom n, all of the necessary information is available to test the null-hypothesis that the process signal is steady or is stationary about \(\mu\)
\[ if\ x - \mu < t_{crit}-\sigma\ , then\ 1,\ else\ 0 \]
\(t_{crit}\) is evaluated for a given significance level and a given degree of freedom using the t-distribution.
Remarks
Definition at line 59 of file SteadyStateDetection.f90.