Detecting Production Phases Based on Sensor
Values using 1D-CNNs
Burkhard Hoppenstedt1,, Manfred Reichert1, Ghada El-Khawaga1, Klaus Kammerer1,
Karl-Michael Winter2, and R¨
udiger Pryss3
1Institute of Databases and Information Systems, Ulm University, Ulm, Germany
2Research and Development, Nitrex Metal Inc., St. Laurent, Canada
3Institute of Clinical Epidemiology and Biometry, University of W¨
urzburg, W¨
urzburg, Germany
Abstract—In the context of Industry 4.0, the knowledge ex-
traction from sensor information plays an important role. Often,
information gathered from sensor values reveals meaningful
insights for production levels, such as anomalies or machine
states. In our use case, we identify production phases through
the inspection of sensor values with the help of convolutional
neural networks. The data set stems from a tempering furnace
used for metal heat treating. Our supervised learning approach
unveils a promising accuracy for the chosen neural network that
was used for the detection of production phases. We consider
solutions like shown in this work as salient pillars in the field of
predictive maintenance.
Index Terms—Deep Learning, Industry 4.0, Sensor Processing,
Predictive Maintenance
I. INTRODUCTION
In comparison to complex deep architectures, 1D convolu-
tional neural networks (1D-CNNs) provide the possibility for
real-time fault detection [1] and sensor analysis. The feature
extraction and selection are done implicitly by the network
itself. In this context, the handling of sensor readings is
essential to build enhanced applications for monitoring and
prediction purposes [2]. In this work, we detect and restore
production phases of a carburizing furnace using the carbon
potential inside the furnace. While automated furnaces offer a
built-in functionality to record start and end of a production
phase, manually operated furnaces do not necessarily provide
such a function. The aim of this approach is to upgrade simple
machines, which only record raw sensor data, with a feature to
identify the production phases based on gathered sensor stream
data. Therefore, a model is trained that classifies a production
Fig. 1. a) Batch/IQ (Chamber with integrated quench) furnace [4]. The load
is put into the hot chamber over the quench with an elevator located at the
bottom position. This approach allows for reloading the hot chamber while
the previous load is still in the hardening bath (quench) b) Typical process
setup for carburizing
phase by recognizing its start and end point. Hereby, the
production workflow is accomplished as follows: A new load
waiting on top of the elevator is moved into the hot chamber
(see Figure 1a). Note that opening the inner furnace door and
pushing the cold load into the hot chamber causes changes
in the gathered sensor values (i.e., a pattern can be observed,
see Figure 2). When the material is heated up and kept on a
specific temperature and potential for a given time, then, at the
end of the cycle, when it is rapidly cooled down using an oil
quench, the transfer from the hot chamber to the quench will
once more cause a change in the gathered sensor values (again,
a pattern can be observed, see Figure 1b). The statistics for the
time [index relative to startpoint)
carbon potential [%]
Fig. 2. Raw sensor values visualized at the process start
three used sensor variables can be seen in Fig. 3a. Note that we
used three months of recorded sensor data, where the carbon
value is recorded at a sample rate of mostly one value per
minute (see Figure 3b). During the recorded three months, 212
production phases were conducted. These phases are denoted
as charges. Notably, the process usually takes up to four hours.
II. THE APPLICATION
Before the actual machine learning can be applied, a pre-
processing is required. First of all, data is stored in a SQL
database. For a simplified workflow using python [3], the
data is transferred into a CSV format. For each charge, we
know the timestamps of the start and end point. Therefore,
we can introduce the tree class labels (start,end,between) and
use them to apply a supervised approach to train a machine
learning model. The task is to assign the correct classification
of the current input sensor values, which can be expressed
arXiv:2004.14475v1 [cs.LG] 24 Apr 2020
frequency
20000 120000
120000
100 200 300
time deltas for carbon level [s]
Measurements
Unit
Maximum
Minimum
Mean
Median
Variance
Temperature Carbon Potential Oil Bath
64 373
°C
904.20
0.00
792.26
859.80
174.30
158 978
%
0.94
0.00
0.52
0.60
0.20
64 373
°C
134.00
0.00
95.61
100
21.57
a) b)
0
Fig. 3. a) Data set overview b) Histogram of sampling rate from carbon
potential
via sliding windows. For example, a sliding window of size
1200 values, which corresponds to a record length of about 20
minutes, is shifted over the sensor data stream. To each sliding
window, a label is assigned. The label for the whole sliding
window is denoted as the label of the corresponding label
of the centered value in the window. However, we transferred
the classification problem into a regression problem to express
the proximity of the current sliding window to the next phase.
Hereby, the label value lcan be interpreted as follows.
l=
start if l≈1
between if l≈0
end if l≈ −1
(1)
Before preprocessing was applied, the labels start and end
were assigned only at the exact position of a phase change.
After processing, the values in the area of a phase change
can be marked as different, as they differ from value 0, which
means a change was detected. In contrast, in the case of a start,
the generated label corresponds exactly to value 1at the exact
timestamp tex , for which the charge started and is reduced
linearly along the sliding window sw of duration tsw . Hereby,
the new label lnew , for a sensor measurement with value vsm
and time tsm , is assigned as follows:
distance =abs(tex
−tsm ), lnew = 1 −(distance/(tsw /2) (2)
The label workflow can be seen in Fig. 4. First, the real labels
are generated on a scale from −1to +1. Based on these labels,
a 1D-CNN is trained. The results can be seen in the curve
predicted label. To transfer the results of the predicted curve
back to a unique timestamp, local maxima and minima are
calculated. Finally, a threshold of 0.5ensures that only strong
peaks are accepted. It is evident that the predicted label fits
well to the real label. Therefore, the procedure seems suitable
for the detection of production phases. The machine learning
model is trained using the framework Keras [5]. We used the
network architecture presented in Fig. 5. Hereby, the input is
provided by the current sliding window. Next, a convolution
layer with 64 filters of kernel size 3 is applied and summarized
in another layer using max pooling. The generated matrix from
the filter results is then flattened and serves as the input for a
dense network. By using the filter-based approach, the network
automatically weights more important features. To validate the
approach, the data set is split up with a 80/20 ratio of train
and test set. With the used network, we are able to restore the
timestamps with a mean distance to the actual starting point
of 93.12 seconds without any false positive detection.
Real Label
Predicted Label
Local Max ‚Start‘
Local Min ‚End‘
time
label value
Fig. 4. Generated label values with prediction and filtering
Input
(1200,1)
Conv1D
(1200,64)
MaxPooling
(600,64)
Flatten
(38400)
Dense
(50)
Dense
(1)
Fig. 5. Architecture of the 1D-CNN
III. SUMMARY AND OUTLOOK
In this paper, we showed a workflow how to use 1D convo-
lutional neural networks (1D-CNNs) to recognize production
phases based on raw sensor value input. Based on simple
timestamps for start and end points, this classification is then
transformed into a regression problem. Finally, the results are
filtered to receive the best fitting prediction. The approach
showed a good precision and can be used for further analysis.
In future approaches, similar procedures could be applied to
detect more complex states and use these states as input for
advanced analytics, such as predictive maintenance [6].
REFERENCES
[1] L. Eren et al., ”A Generic Intelligent Bearing Fault Diagnosis System
Using Compact Adaptive 1D CNN Classifier”, Journal of Signal Pro-
cessing Systems, vol. 91, no. 2, pp. 179-189, 2018.
[2] K. Kammerer et al., ”Anomaly Detections for Manufacturing Systems
Based on Sensor Data-Insights into Two Challenging Real-World Pro-
duction Settings”, Sensors, vol. 19, no. 24, p. 5370, 2019.
[3] J. Brownlee, ”How to Develop Convolutional Neural Network Models
for Time Series Forecasting”, Machine Learning Mastery, 2018. [On-
line]. Available: https://machinelearningmastery.com/how-to-develop-
convolutional-neural-network-models-for-time-series-forecasting/. [Ac-
cessed: 04- Jan- 2020].
[4] K.-M. Winter et al., ”Principles of process technology of thermochemical
surface engineering of steels”. In Thermochemical Surface Engineering
of Steels. Woodhead Publishing Series in Metals and Surface Engineer-
ing, no. 62, pp. 141-206, 2015.
[5] F. Chollet et al., ”Keras”, Keras.io, 2015. [Online]. Available:
https://keras.io/. [Accessed: 04- Jan- 2020].
[6] B. Hoppenstedt et al., ”Techniques and Emerging Trends for State of the
Art Equipment Maintenance SystemsA Bibliometric Analysis”, Applied
Sciences, vol. 8, no. 6, p. 916, 2018.