Dr. Türck Ingenieurbüro
Data Science
Predictive Maintenance using MATLAB:
Pattern Matching for Time Series DataDr. Irina Ostapenko (Dr. Türck Ingenieurbüro GmbH),
Jessica Fisch (Daimler AG)
18.04.2018
Dr. Türck IngenieurbüroZwischen den Zahlen lesen
www.mercedes-benz.com
www.tuerck-optik.de
Dr. Türck Ingenieurbüro
Data Science Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 2
Irina Ostapenko
Senior Data Scientist
Solutions and Algorithms
Kreuzbergstr. 37 Berlin 10965
Jessica Fisch
Mercedes-Benz Werk Mettingen
Digitale Fabrik Powertrain und Projekt Industrie 4.0
PT/TSD
010 – HPC M427
70546 Stuttgart
Mercedes-Benz
Collaboration partners
Dr. Türck Ingenieurbüro
Data Science Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 3
Irina Ostapenko
Jessica Fisch
Collaboration partners
We provide
• Algorithms
• Signal Processing
• Measurement Systems Developing
Optical System Design
Mercedes-Benz
Focus:
• Digital Transformation
• Big Data
• IIoT
Dr. Türck Ingenieurbüro
Data Science
Outline
1. Project introduction
2. Task description
3. Solution/Algorithm
4. Summary
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 4
Dr. Türck Ingenieurbüro
Data Science
POWERTRAINFive modules form
the core of our cars
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 5
Dr. Türck Ingenieurbüro
Data Science
The Powertrain production network is set up globally
with lead plant in Germany
Locations at a glance
Europe USA
China
Beijing
(Joint Venture with
BAIC Motor)
Decherd
(Cooperation with
Renault/Nissan)
Legend
100% Daimler Joint Venture
Majority Holding Cooperation
Berlin
Hamburg
Koelleda (MDC Power)
Arnstadt (MDC Technology)
Stuttgart
Rastatt
Jawor/Poland
Most/ Czech Republic
Maribor/Slovenia
Sebes and Cugir/Romania
(Star Transmission)
Kamenz (ACCUmotive)
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 6
Dr. Türck Ingenieurbüro
Data Science
Motivation for Anomaly Detection in the Projekt „iLL“
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 7
Source: www.autem.de
Automatic Notification of the Deviation:PLC-Data today:
Data properties in the context of Big Data
The 3 basic V's of Big Data:
• Velocity: Speed with which data is
generated and analyzed
• Volume: Amount of data that traditionally
can not be analyzed
• Variety: Data diversity refers to
unstructured data without a recognizable
context
The 2 additional V‘s:
• Validity: Ensuring data quality
• Value: measurable benefits from the data
Workshop zur Fabrik des Jahres | MB Werk Berlin | 05.03.18 8
Volume VarietyVelocity
sampling rate ≈100 ms
700 Variables6 TB/p.M.
Maschine
Machine State
PLC
Numerical Control
Big Data
2 GB/day
100 Machine =
Dr. Türck Ingenieurbüro
Data Science
Machine
Benefits of „Intelligent Level-Learning“
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 9
Bearing
damaged !
Different cycle× Cycletime
× power
✓ Position
… …
--- Active power engine axis 1
--- Position axis 1
Normal cycle✓ Cycletime
✓ power
✓ Position
Error cycle× Cycletime
× power
× Position
Repair
Procurement
of spare
parts;
Downtime in
production
times
Create
maintenance
order for
unplanned
breakdown
Ensuring lean production by
controlling quality, cost and time
Dr. Türck Ingenieurbüro
Data Science
Challenges
• About 700 parameters are continuously monitored in every production cycle
yielding 700 individual time-series of about 2500 samples each
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 10
Time, s
Pro
du
ctio
np
ara
me
terA
Dr. Türck Ingenieurbüro
Data Science
Challenges
• About 700 parameters are continuously monitored in every production cycle
yielding 700 individual time-series of about 2500 samples each
• Different parameters show very different and elaborate features
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 11
Time, s
Pro
du
ctio
np
ara
me
terA
Time, s
Pro
du
ctio
np
ara
me
ter
B
Time, s
Pro
du
ctio
np
ara
me
ter
C
Dr. Türck Ingenieurbüro
Data Science
Challenges
• About 700 parameters are continuously monitored in every production cycle
yielding 700 individual time-series of about 2500 samples each
• Different parameters show very different and elaborate features
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 12
Time, s
Pro
du
ctio
np
ara
me
terA
Time, s
Pro
du
ctio
np
ara
me
ter
B
Time, s
Pro
du
ctio
np
ara
me
ter
C
Task: Analyse these 700 time-series and find specific kinds of deviations
Dr. Türck Ingenieurbüro
Data Science
Requirements for algorithm
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 13
Time, s
Pro
du
ctio
np
ara
me
ter
D
Time deviation
Dr. Türck Ingenieurbüro
Data Science
Requirements for algorithm
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 14
Time, s
Pro
du
ctio
np
ara
me
ter
D
Time deviation
Time, s
Pro
du
ctio
np
ara
me
ter
E
Pattern deviation
Dr. Türck Ingenieurbüro
Data Science
Requirements for algorithm
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 15
Time, s
Pro
du
ctio
np
ara
me
ter
D
Time deviation
Time, s
Pro
du
ctio
np
ara
me
ter
E
Pattern deviationmight not be critical is critical
Dr. Türck Ingenieurbüro
Data Science
Requirements for algorithm
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 16
What the algorithm should do
• Time series analysis
• Find deviations from normal cycle and
• Distinguishing between time and pattern deviation What is normal?
Time, s
Pro
du
ctio
np
ara
me
ter
D
Time deviation
Time, s
Pro
du
ctio
np
ara
me
ter
E
Pattern deviationmight not be critical is critical
Dr. Türck Ingenieurbüro
Data Science
Delays in production cycles
• Length of time-series varies from cycle to cycle
even for normal production
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 17
Cycle lengths over one day, s
Re
lative
Fre
qu
en
cy
Dr. Türck Ingenieurbüro
Data Science
Delays in production cycles
• Length of time-series varies from cycle to cycle
even for normal production
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 18
Time, s
Pro
du
ctio
np
ara
me
ter
F
Time, s
Pro
du
ctio
np
ara
me
ter
F
Cycle lengths over one day, s
Re
lative
Fre
qu
en
cy
1 cycle
Dr. Türck Ingenieurbüro
Data Science
Delays in production cycles
• Length of time-series varies from cycle to cycle
even for normal production
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 19
Time, s
Pro
du
ctio
np
ara
me
ter
F
Time, s
Pro
du
ctio
np
ara
me
ter
F
Cycle lengths over one day, s
Re
lative
Fre
qu
en
cy
2 cycle
Dr. Türck Ingenieurbüro
Data Science
Delays in production cycles
• Length of time-series varies from cycle to cycle
even for normal production
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 20
Time, s
Pro
du
ctio
np
ara
me
ter
F
Time, s
Pro
du
ctio
np
ara
me
ter
F
Cycle lengths over one day, s
Re
lative
Fre
qu
en
cy
4 cycle
Dr. Türck Ingenieurbüro
Data Science
Delays in production cycles
• Length of time-series varies from cycle to cycle
even for normal production
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 21
Time, s
Pro
du
ctio
np
ara
me
ter
F
Time, s
Pro
du
ctio
np
ara
me
ter
F
different delays
Cycle lengths over one day, s
Re
lative
Fre
qu
en
cy
Cycles from one day
Dr. Türck Ingenieurbüro
Data Science
Delays in production cycles
• Length of time-series varies from cycle to cycle
even for normal production
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 22
Time, s
Pro
du
ctio
np
ara
me
ter
F
perfect match
after shift in time axis
Time, s
Pro
du
ctio
np
ara
me
ter
F
Time, s
Pro
du
ctio
np
ara
me
ter
F
different delays
Cycle lengths over one day, s
Re
lative
Fre
qu
en
cy
Normal cycles can be matched to one another
through shifting in time axis!
Cycles from one day
Dr. Türck Ingenieurbüro
Data Science
Algorithm principle
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 23
no
rmal cyc
lete
stcyc
le
Dr. Türck Ingenieurbüro
Data Science
Algorithm principle
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 24
t1 t2
no
rmal cyc
lete
stcyc
le
f1 f2
f3
• Cycle can be described as sequence of
features f1, f2, f3
• Each cycle can show some delays in
time t1, t2
Dr. Türck Ingenieurbüro
Data Science
Algorithm principle
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 25
t1 t2
no
rmal cyc
lete
stcyc
le
f1 f2
f3
• Cycle can be described as sequence of
features f1, f2, f3
• Each cycle can show some delays in
time t1, t2
f1 f2
f3
• Automatic feature detection f1, f2, f3
Dr. Türck Ingenieurbüro
Data Science
Algorithm principle
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 26
t1 t2
no
rmal cyc
lete
stcyc
le
f1 f2
f3
Δt3Δ t1 Δ t2
• Cycle can be described as sequence of
features f1, f2, f3
• Each cycle can show some delays in
time t1, t2
f1 f2
f3
• Pattern matching through shift of feature
along time axis (Δt2, Δt2, Δt3):
least square fit (tshift to minimize the Sum
of Residual Squares of two signals)
• Automatic feature detection f1, f2, f3
Dr. Türck Ingenieurbüro
Data Science
Algorithm principle
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 27
Δt3Δ t1 Δ t2pattern deviation
time deviation
• Pattern matching through shift of feature
along time axis (Δt2, Δt2, Δt3):
minimization of SRS
Dr. Türck Ingenieurbüro
Data Science
Algorithm principle
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 28
Δt3Δ t1 Δ t2pattern deviation
time deviation
• Pattern matching through shift of
feature along time axis (Δt1,
Δt2, Δt3): minimization of SRS
• Time and pattern deviation
for each feature are used
as characteristic numbers for test cycle
f1 f2 f3
Δt1 Δt2 Δt3 Time deviation
No No Yes Pattern deviation
Data reduction!
• Decription of a cycle as feature
sequence
• For each feature time and pattern
deviation can be calculated
Dr. Türck Ingenieurbüro
Data Science
Automatic feature detection
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 29
Time series is split
• After a local extremum (maximum or minimum) or on a plateau
• After a given relative change
Time, s
Pro
du
ctio
np
ara
me
ter
C
Time, s
Pro
du
ctio
np
ara
me
ter
D
Time, s
Pro
du
ctio
np
ara
me
ter
E
4 features 7 features 14 features
Data reduction of time series from 2500 datapoints to sequence of max. 60 features (typically 10)!
Dr. Türck Ingenieurbüro
Data Science
Algorithm implementation: machine learning approach in MATLAB
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 30
Training
Reference cycles ->
• Build „reference signal“ for each feature
• Limits for time and pattern deviation
Testing
Test cycles ->
• Comparison of each feature in reference signal
• Is time and pattern deviation within the limits?
Dr. Türck Ingenieurbüro
Data Science
Create „reference signal“ for each produciton parameter
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 31
1. For all training cycles - matching to shortest cycle
2. Create „reference signal“ – mean over all matched reference cycles
Time, s
Pro
du
ctio
np
ara
me
ter
F
Almost perfect match after shifting
Cycles from one day
Time, s
Pro
du
ctio
np
ara
me
ter
F
Reference signal
Training
Dr. Türck Ingenieurbüro
Data Science
Create „reference signal“ for each produciton parameter
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 32
1. For all training cycles - matching to shortest cycle
2. Create „reference signal“ – mean over all matched reference cycles
3. Possible pattern deviation - standard deviation over all matched reference cycles
Time, s
Pro
du
ctio
np
ara
me
ter
F
Almost perfect match after shifting
Cycles from one day
Time, s
Pro
du
ctio
np
ara
me
ter
F σ
Tolerance for pattern deviation
Time, s
Pro
du
ctio
np
ara
me
ter
F
Reference signal
Training
Dr. Türck Ingenieurbüro
Data Science
Create „reference signal“ for each produciton parameter
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 33
1. Create „reference signal“ – mean over all matched reference cycles
2. Possible pattern deviation - standard deviation over all matched reference cycles, limits for SRS
3. Possible time deviation – maximal absolute shift from matched reference cycles
Nr. of feature
ma
xsh
ift,
s
Time, s
Pro
du
ctio
np
ara
me
ter
F σ
Tolerance for pattern deviation
Nr. of feature
ma
xS
RS
,
arb
.un
.
Possible time deviation
Possible pattern deviation
Training
Dr. Türck Ingenieurbüro
Data Science
Testing: time and pattern deviation evaluation
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 34
error cycle
normal cycle
reference signal
Time, s
Pro
du
ctio
np
ara
me
ter
F
delay
a
a
a
Testing
Dr. Türck Ingenieurbüro
Data Science
Testing: time and pattern deviation evaluation
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 35
error cycle
normal cycle
reference signal
Time, s
Pro
du
ctio
np
ara
me
ter
F
delay
a
a
a
Is time and pattern deviation
for this feature within the limits?
• Tolerance window (Δ t, SRS)
• Easy to spot a critical deviation
Testing
Time: max Shift (norm.)F
orm
:
max
SR
S (
norm
.)
feature a
0
☺
Dr. Türck Ingenieurbüro
Data Science
Testing: time and pattern deviation evaluation
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 36
error cycle
normal cycle
reference signal
Time, s
Pro
du
ctio
np
ara
me
ter
F
delay
a
a
a
b
b
b
c
c
c d
d
dTesting
max Shift (norm.)
ma
xS
RS
(no
rm.)
feature d
0
max Shift (norm.)m
ax
SR
S (
no
rm.)
feature c
0
max Shift (norm.)
ma
xS
RS
(no
rm.)
feature b
0
max Shift (norm.)
ma
xS
RS
(no
rm.)
feature a
0
Dr. Türck Ingenieurbüro
Data Science
Algorithm: Summary
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 37
1. Quantitative and qualitative description of produciton failure
2. Independent of signal form -> universally applicable to other applications or machines
3. Signal description with characteristic numbers, which are easy to interpret
4. Data reduction with a factor 250 without significant loss of information!
5. Easy control of production: recognition of critical errors and non-critical delays online
Dr. Türck Ingenieurbüro
Data Science
Example of the added value
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 38
Results:
• Transparency of the process
• Deviation for each Signal
• Reason of Cycletime increase found
Time and Pattern deviation are recognized
Example: Change in code
normal
cycle
actual
cycle
deviation
0 50 100 150 200 250
Position Setpoint Spindle Axis W1
Valu
e
Time [s]
Englisch
Dr. Türck Ingenieurbüro
Data Science
Summary
Algorithm using pattern matching for time series developed and implemented for production data
Why MATLAB?
• easy algorithm implementation
• existing solution for data import
• very good support and broad use in universities
MATLAB Products used:
• Signal Processing Toolbox
• Statistics and Machine Learning Toolbox
Outlook:• Parallel Computing Toolbox for performance improvement
Prototyp intelligent Level-Learning (iLL) has a new function for anomaly detection• Troubleshooting in case of failure (maintenance), Parts Planning, Influences on the quality
Optimization of repair time, spreaders amount, …
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 39
Dr. Türck Ingenieurbüro
Data Science
Thank you for your attention!
Predictive Maintenance using MATLAB: Pattern Matching for Time Series Data 40
Irina Ostapenko
Jessica Fisch
Mercedes-Benz
Picture Credits: © Can Stock Photo / AnatolyM, abluecup, maxxyustas