# Unevenly spaced time-series forecasting and anomaly detection for an industrial usecase

I am currently working on a PhD project for a car manufacturing company, which basically consists of creating a predictive maintenance application for the machines that are currently used to fill the air conditioning circuits of vehicles. In essence, each cycle consists of two phases designed to perform checks on the circuit followed by a last one in which the corresponding refrigerant gas is charged. Specifically, in a first phase the circuit is pressurized in order to detect leaks from inside to outside the circuit, in a second phase a vacuum is exerted on the circuit in order to detect leaks from the outside to the inside, and finally, if no leak is detected, the circuit is filled. Regarding the data collected, for each of the phases different readings are taken of the pressure reached inside the circuit, except for the gas loading phase:

• First phase (pressurization): A total of three pressure readings are taken at different times (pressurization, stabilization and control).
• Second phase (vacuum): A total of 4 readings are taken at different time instants (release of the circuit pressure to the atmospheric one, vacuum, vacuum stabilization and control).
• Third phase (charge): Grams of gas charged in the circuit.

The following figure shows the typical theoretical curve of a filling cycle with the three aforementioned phases.

As for the data, the following table presents a small sample of them:

Production Number Type of Vehicle Type of Engine Pres (bar) PresStab (bar) PresCtrl (bar) Patm (bar) Vacuum (mbar) VacuumEst (mbar) VacuumCtrl (mbar) Cycle Timestamp Cycle Result
1 1 1 12,31 12,31 12,31 0 0,7 4 0,4 01/05/2021 0:50 OK
2 1 2 12,32 12,31 12,31 0 0,7 4,1 0,4 01/05/2021 0:55 OK
3 2 3 12,32 12,32 12,31 0 2,3 12,4 1,3 01/05/2021 0:58 OK
4 1 1 12,32 12,31 12,31 0 0,7 3,9 0,5 01/05/2021 1:01 OK
5 2 4 12,32 12,32 12,31 0 2 11,7 1,1 01/05/2021 1:04 OK
6 3 4 12,32 12,31 12,31 0 0,9 5,2 0,8 30/03/2021 10:45 OK
7 3 1 12,32 12,31 12,31 0 0,9 5,2 0,8 30/03/2021 10:48 OK
8 3 5 0 0 0 0 0 0 0 26/03/2021 8:29 NOK
9 2 5 0 0 0 0 0 0 0 25/03/2021 23:31 NOK
10 3 6 12,25 12,24 12,23 0 100 0 0 14/05/2019 11:33 NOK
11 1 4 12,21 0 0 0 0 0 0 11/04/2019 13:01 NOK

The objective proposed to me is to model and monitor these variables so that, following a predictive maintenance strategy, it is possible to predict their trends and detect possible anomalies in real time, allowing to anticipate failures in the pressurization of the machines or in the pump in charge of the vacuum. With regard to the results of the cycles, it is worth mentioning that only those NOKs associated with the filling console have been taken into account, discarding the cycles that have been NOKs because the vehicle circuit itself had defects (leaks, bad connections, etc.). In any case, it is to be noted that the factory does not fully trust the assigned NOK labels... so maybe it would be better to just consider the OK samples...

As far as I understand, these data constitute time series, a completely new field for me. I have some experience in supervised and unsupervised classification problems using classical machine learning algorithms, as well as in computer vision using deep learning, but none with respect to time series. One of the problems I have encountered is that the classical techniques for dealing with these types of data, such as ARIMA and its variants are only valid for equispaced time series. However, this does not apply to my case because of the industrial context from which it comes: the machine is not filling continuously, there are line stops, breaks, vacations, maintenance stops, etc.

Can anyone guide me on the way to go? Does anyone know the techniques that can be applied to this type of time series? I would appreciate any kind of help, idea or suggestion, because although I thought it would not be so complicated and that the modeling of the time series was in a very mature state, the truth is that I am quite lost. I believe that in order to apply the classical techniques, one option would be to summarize the data in new time intervals (hourly, for example), although this is not an alternative with which I feel very comfortable.

Thank you so much in advance.

• Detecting failures or anomalies in real-time is a quite different problem than long-term monitoring and predicting future failure, likely requiring different techniques Commented Sep 23, 2021 at 8:31
• Did you find a solution? If so, can you reference your findings? Thanks! Commented Mar 14, 2023 at 11:03