I have a univariate time series signal. It's the magnitude of an accelerometer attached to an engine.
I need to create an algorithm to detect off state, please see the black lines in the image below. The rest of signal is comprised of idle and active states. Idle state looks slightly higher and active state tend to have huge spikes and generally higher mean than both idle and off.
While this is simple, several machines have different mean values based on the size of the engine and the proximity of the sensor to the vibration. So the idea of using thresholds will not help.
I have considered K-Means algorithm. It worked pretty well when three states are available. When one or two are absent, the results are degraded significantly since it attempts to find two classes that don't exist in the data.
I have tried Hidden Markov Models. They looked promising, unfortunately they train themselves to identify the distribution of the states which will again change from one machine to another.
I thought of using standardisation. But I'm hesitant since the mean value of off state will change accordingly.
What unsupervised or semi-unsupervised approaches do you recommend on detecting off/idle/on states?