I am working on building a machine learning model to detect the drift in trend, whether upward or downward trends (see the figure attached). The idea to send alarms when the uptick or down-tick happens and the data reaches a control limit, where the equipment results fatal abort.
I have been looking different methods, but not been successful, for example I tried LSTM anomaly detection, it works if I have already know when the measurements starts drifting, then I can take the earlier data for training and later data for testing. In my current situation, I wouldnt know when the drift happens to split data for training and testing. Moreover, the model should look back for last 2 or 3 days data and see if the trend drifting upward or downward.
Below is the picture with hypothetical data to convey the idea. I greatly appreciate if you point me in the right direction or please share your wisdom on how to go about it.