CONDITION MONITORING & PREDICTIVE MAINTENANCE

Introduction

Generally, conditioning monitoring of a machine is done by looking at a sensor mesurement (Eg. Temperature, Vibration ) and imposing bounds to it, i.e. under normal operating conditions, the measurement values are bounded by a maximum and minimum value (similar to control charts). Any deviation is the defined bounds sends an alarm. This is often generally defined as anamoly detection.</b>

However, this method often sends false alarms (false positives) or misses an alarm (false negative). Furthermore, a single signal is observed/analysed in isolation. For example, an alarm may sound if the temperature exceeeds a certain level. A system defined above often cannot look at mutiple parameters and come to a conclusion about the state of a machine. Or technical parlance, one cannot take advantage of the multi-dimensionality of the data.

This is where machine learning and other AI based techniques step in.

This notes walks one through anamoly detection of a single dimension data (vibration). This is easier to visualise. The same principles hold true for mutildimensional data as well.

Machine Learning Anamoly Detection Engine

A Machine Learning Anomaly Detection (MLAD) Engine uses sensor data like tempearture, flow, vibration and other variables (multi-dimensional) to create a multi-dimensional pattern ., i.e. the state of a machine is "learned" under healthy operating conditions. By learning the healthy state, the engine guages if an alert should be triggered or not under any deviation.

The second step is to forecast the probability of future breakdown or in other words, asses the RUL (Residual Useful Life) of a machine. This provides valuable information regarding urgent repairs or regarding planned maintenance activity.

Finally, can integrate them into dashboards or into alarm systems that will be monitored by maintenance teams.

Softwares / Packages Used

All sofware packages used are open-sourced packages. The language used is Python and asscoiated packages like pandas, matplotlib.

For anamoly detection, a open source package developed by Facebook team called Prophet is used.

The Dataset

The dataset is sourced from the NASA repo https://ti.arc.nasa.gov/tech/dash/groups/pcoe/prognostic-data-repository/.


Dataset Citation : J. Lee, H. Qiu, G. Yu, J. Lin, and Rexnord Technical Services (2007). IMS, University of Cincinnati. "Bearing Data Set", NASA Ames Prognostics Data Repository (http://ti.arc.nasa.gov/project/prognostic-data-repository), NASA Ames Research Center, Moffett Field, CA


Breif Description of Test Rig for Data Collection

This is a "Run to Failure "</b> dataset.

Four bearings were installed on a shaft. The rotation speed was kept constant at 2000 RPM by an AC motor coupled to the shaft via rub belts. A radial load of 6000 lbs is applied onto the shaft and bearing by a spring mechanism. All bearings are force lubricated.

Rexnord ZA-2115 double row bearings were installed on the shaft as shown in Figure 1. PCB 353B33 High Sensitivity Quartz ICP accelerometers were installed on the bearing housing (two accelerometers for each bearing [x- and y-axes] for data set 1, one accelerometer for each bearing for data sets 2 and 3). Sensor placement is also shown in figure. All failures occurred after exceeding designed life time of the bearing which is more than 100 million revolutions.

Image not Available

  • Recording Duration: February 12, 2004 10:32:39 to February 19, 2004 06:22:39
  • No. of Files: 984
  • No. of Channels: 4
  • Channel Arrangement: Bearing 1 – Ch 1; Bearing2 – Ch 2; Bearing3 – Ch3; Bearing 4 – Ch 4.
  • File Recording Interval: Every 10 minutes
  • File Format: ASCII Description

At the end of the test-to-failure experiment, Outer race failure occurred in bearing 1.

Loading of Data from G.Cloud

Confirming the Working Directory

In [1]:
import os
os.chdir('/content')
print(" Current Working Directory")
% pwd
 Current Working Directory
Out[1]:
'/content'

Importing Python Packages

In [2]:
# Common imports
import pandas as pd
import numpy as np
from sklearn import preprocessing
import seaborn as sns
sns.set(color_codes=True)
import matplotlib.pyplot as plt
%matplotlib inline
/usr/local/lib/python3.6/dist-packages/statsmodels/tools/_testing.py:19: FutureWarning: pandas.util.testing is deprecated. Use the functions in the public API at pandas.testing instead.
  import pandas.util.testing as tm

Connecting to G.Cloud Account where data has been stored. Needs Google ID and Password for Verfication.

In [0]:
# Install the PyDrive wrapper & import libraries.
# This only needs to be done once per notebook.
!pip install -U -q PyDrive
from pydrive.auth import GoogleAuth
from pydrive.drive import GoogleDrive
from google.colab import auth
from oauth2client.client import GoogleCredentials

# Authenticate and create the PyDrive client.
# This only needs to be done once per notebook.
auth.authenticate_user()
gauth = GoogleAuth()
gauth.credentials = GoogleCredentials.get_application_default()
drive = GoogleDrive(gauth)
In [4]:
# Download a file based on its file ID
file_id = '1bljNTBDZr701KXs8wfPB6KAyi8dtM8QG'
download = drive.CreateFile({'id': file_id})
download.GetContentFile('data.zip')
print('Downloaded Data File')
Downloaded Data File
In [5]:
# Unzipping the data file
!unzip data.zip
Archive:  data.zip
   creating: 2nd_test/
  inflating: 2nd_test/2004.02.12.10.32.39  
  inflating: 2nd_test/2004.02.12.10.42.39  
  inflating: 2nd_test/2004.02.12.10.52.39  
  inflating: 2nd_test/2004.02.12.11.02.39  
  inflating: 2nd_test/2004.02.12.11.12.39  
  inflating: 2nd_test/2004.02.12.11.22.39  
  inflating: 2nd_test/2004.02.12.11.32.39  
  inflating: 2nd_test/2004.02.12.11.42.39  
  inflating: 2nd_test/2004.02.12.11.52.39  
  inflating: 2nd_test/2004.02.12.12.02.39  
  inflating: 2nd_test/2004.02.12.12.12.39  
  inflating: 2nd_test/2004.02.12.12.22.39  
  inflating: 2nd_test/2004.02.12.12.32.39  
  inflating: 2nd_test/2004.02.12.12.42.39  
  inflating: 2nd_test/2004.02.12.12.52.39  
  inflating: 2nd_test/2004.02.12.13.02.39  
  inflating: 2nd_test/2004.02.12.13.12.39  
  inflating: 2nd_test/2004.02.12.13.22.39  
  inflating: 2nd_test/2004.02.12.13.32.39  
  inflating: 2nd_test/2004.02.12.13.42.39  
  inflating: 2nd_test/2004.02.12.13.52.39  
  inflating: 2nd_test/2004.02.12.14.02.39  
  inflating: 2nd_test/2004.02.12.14.12.39  
  inflating: 2nd_test/2004.02.12.14.22.39  
  inflating: 2nd_test/2004.02.12.14.32.39  
  inflating: 2nd_test/2004.02.12.14.42.39  
  inflating: 2nd_test/2004.02.12.14.52.39  
  inflating: 2nd_test/2004.02.12.15.02.39  
  inflating: 2nd_test/2004.02.12.15.12.39  
  inflating: 2nd_test/2004.02.12.15.22.39  
  inflating: 2nd_test/2004.02.12.15.32.39  
  inflating: 2nd_test/2004.02.12.15.42.39  
  inflating: 2nd_test/2004.02.12.15.52.39  
  inflating: 2nd_test/2004.02.12.16.02.39  
  inflating: 2nd_test/2004.02.12.16.12.39  
  inflating: 2nd_test/2004.02.12.16.22.39  
  inflating: 2nd_test/2004.02.12.16.32.39  
  inflating: 2nd_test/2004.02.12.16.42.39  
  inflating: 2nd_test/2004.02.12.16.52.39  
  inflating: 2nd_test/2004.02.12.17.02.39  
  inflating: 2nd_test/2004.02.12.17.12.39  
  inflating: 2nd_test/2004.02.12.17.22.39  
  inflating: 2nd_test/2004.02.12.17.32.39  
  inflating: 2nd_test/2004.02.12.17.42.39  
  inflating: 2nd_test/2004.02.12.17.52.39  
  inflating: 2nd_test/2004.02.12.18.02.39  
  inflating: 2nd_test/2004.02.12.18.12.39  
  inflating: 2nd_test/2004.02.12.18.22.39  
  inflating: 2nd_test/2004.02.12.18.32.39  
  inflating: 2nd_test/2004.02.12.18.42.39  
  inflating: 2nd_test/2004.02.12.18.52.39  
  inflating: 2nd_test/2004.02.12.19.02.39  
  inflating: 2nd_test/2004.02.12.19.12.39  
  inflating: 2nd_test/2004.02.12.19.22.39  
  inflating: 2nd_test/2004.02.12.19.32.39  
  inflating: 2nd_test/2004.02.12.19.42.39  
  inflating: 2nd_test/2004.02.12.19.52.39  
  inflating: 2nd_test/2004.02.12.20.02.39  
  inflating: 2nd_test/2004.02.12.20.12.39  
  inflating: 2nd_test/2004.02.12.20.22.39  
  inflating: 2nd_test/2004.02.12.20.32.39  
  inflating: 2nd_test/2004.02.12.20.42.39  
  inflating: 2nd_test/2004.02.12.20.52.39  
  inflating: 2nd_test/2004.02.12.21.02.39  
  inflating: 2nd_test/2004.02.12.21.12.39  
  inflating: 2nd_test/2004.02.12.21.22.39  
  inflating: 2nd_test/2004.02.12.21.32.39  
  inflating: 2nd_test/2004.02.12.21.52.39  
  inflating: 2nd_test/2004.02.12.22.02.39  
  inflating: 2nd_test/2004.02.12.22.12.39  
  inflating: 2nd_test/2004.02.12.22.22.39  
  inflating: 2nd_test/2004.02.12.22.32.39  
  inflating: 2nd_test/2004.02.12.22.42.39  
  inflating: 2nd_test/2004.02.12.22.52.39  
  inflating: 2nd_test/2004.02.12.23.02.39  
  inflating: 2nd_test/2004.02.12.23.12.39  
  inflating: 2nd_test/2004.02.12.23.22.39  
  inflating: 2nd_test/2004.02.12.23.32.39  
  inflating: 2nd_test/2004.02.12.23.42.39  
  inflating: 2nd_test/2004.02.12.23.52.39  
  inflating: 2nd_test/2004.02.13.00.02.39  
  inflating: 2nd_test/2004.02.13.00.12.39  
  inflating: 2nd_test/2004.02.13.00.22.39  
  inflating: 2nd_test/2004.02.13.00.32.39  
  inflating: 2nd_test/2004.02.13.00.42.39  
  inflating: 2nd_test/2004.02.13.00.52.39  
  inflating: 2nd_test/2004.02.13.01.02.39  
  inflating: 2nd_test/2004.02.13.01.12.39  
  inflating: 2nd_test/2004.02.13.01.22.39  
  inflating: 2nd_test/2004.02.13.01.32.39  
  inflating: 2nd_test/2004.02.13.01.42.39  
  inflating: 2nd_test/2004.02.13.01.52.39  
  inflating: 2nd_test/2004.02.13.02.02.39  
  inflating: 2nd_test/2004.02.13.02.12.39  
  inflating: 2nd_test/2004.02.13.02.22.39  
  inflating: 2nd_test/2004.02.13.02.32.39  
  inflating: 2nd_test/2004.02.13.02.42.39  
  inflating: 2nd_test/2004.02.13.02.52.39  
  inflating: 2nd_test/2004.02.13.03.02.39  
  inflating: 2nd_test/2004.02.13.03.12.39  
  inflating: 2nd_test/2004.02.13.03.22.39  
  inflating: 2nd_test/2004.02.13.03.32.39  
  inflating: 2nd_test/2004.02.13.03.42.39  
  inflating: 2nd_test/2004.02.13.03.52.39  
  inflating: 2nd_test/2004.02.13.04.02.39  
  inflating: 2nd_test/2004.02.13.04.12.39  
  inflating: 2nd_test/2004.02.13.04.22.39  
  inflating: 2nd_test/2004.02.13.04.32.39  
  inflating: 2nd_test/2004.02.13.04.42.39  
  inflating: 2nd_test/2004.02.13.04.52.39  
  inflating: 2nd_test/2004.02.13.05.02.39  
  inflating: 2nd_test/2004.02.13.05.12.39  
  inflating: 2nd_test/2004.02.13.05.22.39  
  inflating: 2nd_test/2004.02.13.05.32.39  
  inflating: 2nd_test/2004.02.13.05.42.39  
  inflating: 2nd_test/2004.02.13.05.52.39  
  inflating: 2nd_test/2004.02.13.06.02.39  
  inflating: 2nd_test/2004.02.13.06.12.39  
  inflating: 2nd_test/2004.02.13.06.22.39  
  inflating: 2nd_test/2004.02.13.06.32.39  
  inflating: 2nd_test/2004.02.13.06.42.39  
  inflating: 2nd_test/2004.02.13.06.52.39  
  inflating: 2nd_test/2004.02.13.07.02.39  
  inflating: 2nd_test/2004.02.13.07.12.39  
  inflating: 2nd_test/2004.02.13.07.22.39  
  inflating: 2nd_test/2004.02.13.07.32.39  
  inflating: 2nd_test/2004.02.13.07.42.39  
  inflating: 2nd_test/2004.02.13.07.52.39  
  inflating: 2nd_test/2004.02.13.08.02.39  
  inflating: 2nd_test/2004.02.13.08.12.39  
  inflating: 2nd_test/2004.02.13.08.22.39  
  inflating: 2nd_test/2004.02.13.08.32.39  
  inflating: 2nd_test/2004.02.13.08.42.39  
  inflating: 2nd_test/2004.02.13.08.52.39  
  inflating: 2nd_test/2004.02.13.09.02.39  
  inflating: 2nd_test/2004.02.13.09.12.39  
  inflating: 2nd_test/2004.02.13.09.22.39  
  inflating: 2nd_test/2004.02.13.09.32.39  
  inflating: 2nd_test/2004.02.13.09.42.39  
  inflating: 2nd_test/2004.02.13.09.52.39  
  inflating: 2nd_test/2004.02.13.10.02.39  
  inflating: 2nd_test/2004.02.13.10.12.39  
  inflating: 2nd_test/2004.02.13.10.22.39  
  inflating: 2nd_test/2004.02.13.10.32.39  
  inflating: 2nd_test/2004.02.13.10.42.39  
  inflating: 2nd_test/2004.02.13.10.52.39  
  inflating: 2nd_test/2004.02.13.11.02.39  
  inflating: 2nd_test/2004.02.13.11.12.39  
  inflating: 2nd_test/2004.02.13.11.22.39  
  inflating: 2nd_test/2004.02.13.11.32.39  
  inflating: 2nd_test/2004.02.13.11.42.39  
  inflating: 2nd_test/2004.02.13.11.52.39  
  inflating: 2nd_test/2004.02.13.12.02.39  
  inflating: 2nd_test/2004.02.13.12.12.39  
  inflating: 2nd_test/2004.02.13.12.22.39  
  inflating: 2nd_test/2004.02.13.12.32.39  
  inflating: 2nd_test/2004.02.13.12.42.39  
  inflating: 2nd_test/2004.02.13.12.52.39  
  inflating: 2nd_test/2004.02.13.13.02.39  
  inflating: 2nd_test/2004.02.13.13.12.39  
  inflating: 2nd_test/2004.02.13.13.22.39  
  inflating: 2nd_test/2004.02.13.13.32.39  
  inflating: 2nd_test/2004.02.13.13.42.39  
  inflating: 2nd_test/2004.02.13.13.52.39  
  inflating: 2nd_test/2004.02.13.14.02.39  
  inflating: 2nd_test/2004.02.13.14.12.39  
  inflating: 2nd_test/2004.02.13.14.22.39  
  inflating: 2nd_test/2004.02.13.14.32.39  
  inflating: 2nd_test/2004.02.13.14.42.39  
  inflating: 2nd_test/2004.02.13.14.52.39  
  inflating: 2nd_test/2004.02.13.15.02.39  
  inflating: 2nd_test/2004.02.13.15.12.39  
  inflating: 2nd_test/2004.02.13.15.22.39  
  inflating: 2nd_test/2004.02.13.15.32.39  
  inflating: 2nd_test/2004.02.13.15.42.39  
  inflating: 2nd_test/2004.02.13.15.52.39  
  inflating: 2nd_test/2004.02.13.16.02.39  
  inflating: 2nd_test/2004.02.13.16.12.39  
  inflating: 2nd_test/2004.02.13.16.22.39  
  inflating: 2nd_test/2004.02.13.16.32.39  
  inflating: 2nd_test/2004.02.13.16.42.39  
  inflating: 2nd_test/2004.02.13.16.52.39  
  inflating: 2nd_test/2004.02.13.17.02.39  
  inflating: 2nd_test/2004.02.13.17.12.39  
  inflating: 2nd_test/2004.02.13.17.22.39  
  inflating: 2nd_test/2004.02.13.17.32.39  
  inflating: 2nd_test/2004.02.13.17.42.39  
  inflating: 2nd_test/2004.02.13.17.52.39  
  inflating: 2nd_test/2004.02.13.18.02.39  
  inflating: 2nd_test/2004.02.13.18.12.39  
  inflating: 2nd_test/2004.02.13.18.22.39  
  inflating: 2nd_test/2004.02.13.18.32.39  
  inflating: 2nd_test/2004.02.13.18.42.39  
  inflating: 2nd_test/2004.02.13.18.52.39  
  inflating: 2nd_test/2004.02.13.19.02.39  
  inflating: 2nd_test/2004.02.13.19.12.39  
  inflating: 2nd_test/2004.02.13.19.22.39  
  inflating: 2nd_test/2004.02.13.19.32.39  
  inflating: 2nd_test/2004.02.13.19.42.39  
  inflating: 2nd_test/2004.02.13.19.52.39  
  inflating: 2nd_test/2004.02.13.20.02.39  
  inflating: 2nd_test/2004.02.13.20.12.39  
  inflating: 2nd_test/2004.02.13.20.22.39  
  inflating: 2nd_test/2004.02.13.20.32.39  
  inflating: 2nd_test/2004.02.13.20.42.39  
  inflating: 2nd_test/2004.02.13.20.52.39  
  inflating: 2nd_test/2004.02.13.21.02.39  
  inflating: 2nd_test/2004.02.13.21.12.39  
  inflating: 2nd_test/2004.02.13.21.22.39  
  inflating: 2nd_test/2004.02.13.21.32.39  
  inflating: 2nd_test/2004.02.13.21.42.39  
  inflating: 2nd_test/2004.02.13.21.52.39  
  inflating: 2nd_test/2004.02.13.22.02.39  
  inflating: 2nd_test/2004.02.13.22.12.39  
  inflating: 2nd_test/2004.02.13.22.22.39  
  inflating: 2nd_test/2004.02.13.22.32.39  
  inflating: 2nd_test/2004.02.13.22.42.39  
  inflating: 2nd_test/2004.02.13.22.52.39  
  inflating: 2nd_test/2004.02.13.23.02.39  
  inflating: 2nd_test/2004.02.13.23.12.39  
  inflating: 2nd_test/2004.02.13.23.22.39  
  inflating: 2nd_test/2004.02.13.23.32.39  
  inflating: 2nd_test/2004.02.13.23.42.39  
  inflating: 2nd_test/2004.02.13.23.52.39  
  inflating: 2nd_test/2004.02.14.00.02.39  
  inflating: 2nd_test/2004.02.14.00.12.39  
  inflating: 2nd_test/2004.02.14.00.22.39  
  inflating: 2nd_test/2004.02.14.00.32.39  
  inflating: 2nd_test/2004.02.14.00.42.39  
  inflating: 2nd_test/2004.02.14.00.52.39  
  inflating: 2nd_test/2004.02.14.01.02.39  
  inflating: 2nd_test/2004.02.14.01.12.39  
  inflating: 2nd_test/2004.02.14.01.22.39  
  inflating: 2nd_test/2004.02.14.01.32.39  
  inflating: 2nd_test/2004.02.14.01.42.39  
  inflating: 2nd_test/2004.02.14.01.52.39  
  inflating: 2nd_test/2004.02.14.02.02.39  
  inflating: 2nd_test/2004.02.14.02.12.39  
  inflating: 2nd_test/2004.02.14.02.22.39  
  inflating: 2nd_test/2004.02.14.02.32.39  
  inflating: 2nd_test/2004.02.14.02.42.39  
  inflating: 2nd_test/2004.02.14.02.52.39  
  inflating: 2nd_test/2004.02.14.03.02.39  
  inflating: 2nd_test/2004.02.14.03.12.39  
  inflating: 2nd_test/2004.02.14.03.22.39  
  inflating: 2nd_test/2004.02.14.03.32.39  
  inflating: 2nd_test/2004.02.14.03.42.39  
  inflating: 2nd_test/2004.02.14.03.52.39  
  inflating: 2nd_test/2004.02.14.04.02.39  
  inflating: 2nd_test/2004.02.14.04.12.39  
  inflating: 2nd_test/2004.02.14.04.22.39  
  inflating: 2nd_test/2004.02.14.04.32.39  
  inflating: 2nd_test/2004.02.14.04.42.39  
  inflating: 2nd_test/2004.02.14.04.52.39  
  inflating: 2nd_test/2004.02.14.05.02.39  
  inflating: 2nd_test/2004.02.14.05.12.39  
  inflating: 2nd_test/2004.02.14.05.22.39  
  inflating: 2nd_test/2004.02.14.05.32.39  
  inflating: 2nd_test/2004.02.14.05.42.39  
  inflating: 2nd_test/2004.02.14.05.52.39  
  inflating: 2nd_test/2004.02.14.06.02.39  
  inflating: 2nd_test/2004.02.14.06.12.39  
  inflating: 2nd_test/2004.02.14.06.22.39  
  inflating: 2nd_test/2004.02.14.06.32.39  
  inflating: 2nd_test/2004.02.14.06.42.39  
  inflating: 2nd_test/2004.02.14.06.52.39  
  inflating: 2nd_test/2004.02.14.07.02.39  
  inflating: 2nd_test/2004.02.14.07.12.39  
  inflating: 2nd_test/2004.02.14.07.22.39  
  inflating: 2nd_test/2004.02.14.07.32.39  
  inflating: 2nd_test/2004.02.14.07.42.39  
  inflating: 2nd_test/2004.02.14.07.52.39  
  inflating: 2nd_test/2004.02.14.08.02.39  
  inflating: 2nd_test/2004.02.14.08.12.39  
  inflating: 2nd_test/2004.02.14.08.22.39  
  inflating: 2nd_test/2004.02.14.08.32.39  
  inflating: 2nd_test/2004.02.14.08.42.39  
  inflating: 2nd_test/2004.02.14.08.52.39  
  inflating: 2nd_test/2004.02.14.09.02.39  
  inflating: 2nd_test/2004.02.14.09.12.39  
  inflating: 2nd_test/2004.02.14.09.22.39  
  inflating: 2nd_test/2004.02.14.09.32.39  
  inflating: 2nd_test/2004.02.14.09.42.39  
  inflating: 2nd_test/2004.02.14.09.52.39  
  inflating: 2nd_test/2004.02.14.10.02.39  
  inflating: 2nd_test/2004.02.14.10.12.39  
  inflating: 2nd_test/2004.02.14.10.22.39  
  inflating: 2nd_test/2004.02.14.10.32.39  
  inflating: 2nd_test/2004.02.14.10.42.39  
  inflating: 2nd_test/2004.02.14.10.52.39  
  inflating: 2nd_test/2004.02.14.11.02.39  
  inflating: 2nd_test/2004.02.14.11.12.39  
  inflating: 2nd_test/2004.02.14.11.22.39  
  inflating: 2nd_test/2004.02.14.11.32.39  
  inflating: 2nd_test/2004.02.14.11.42.39  
  inflating: 2nd_test/2004.02.14.11.52.39  
  inflating: 2nd_test/2004.02.14.12.02.39  
  inflating: 2nd_test/2004.02.14.12.12.39  
  inflating: 2nd_test/2004.02.14.12.22.39  
  inflating: 2nd_test/2004.02.14.12.32.39  
  inflating: 2nd_test/2004.02.14.12.42.39  
  inflating: 2nd_test/2004.02.14.12.52.39  
  inflating: 2nd_test/2004.02.14.13.02.39  
  inflating: 2nd_test/2004.02.14.13.12.39  
  inflating: 2nd_test/2004.02.14.13.22.39  
  inflating: 2nd_test/2004.02.14.13.32.39  
  inflating: 2nd_test/2004.02.14.13.42.39  
  inflating: 2nd_test/2004.02.14.13.52.39  
  inflating: 2nd_test/2004.02.14.14.02.39  
  inflating: 2nd_test/2004.02.14.14.12.39  
  inflating: 2nd_test/2004.02.14.14.22.39  
  inflating: 2nd_test/2004.02.14.14.32.39  
  inflating: 2nd_test/2004.02.14.14.42.39  
  inflating: 2nd_test/2004.02.14.14.52.39  
  inflating: 2nd_test/2004.02.14.15.02.39  
  inflating: 2nd_test/2004.02.14.15.12.39  
  inflating: 2nd_test/2004.02.14.15.22.39  
  inflating: 2nd_test/2004.02.14.15.32.39  
  inflating: 2nd_test/2004.02.14.15.42.39  
  inflating: 2nd_test/2004.02.14.15.52.39  
  inflating: 2nd_test/2004.02.14.16.02.39  
  inflating: 2nd_test/2004.02.14.16.12.39  
  inflating: 2nd_test/2004.02.14.16.22.39  
  inflating: 2nd_test/2004.02.14.16.32.39  
  inflating: 2nd_test/2004.02.14.16.42.39  
  inflating: 2nd_test/2004.02.14.16.52.39  
  inflating: 2nd_test/2004.02.14.17.02.39  
  inflating: 2nd_test/2004.02.14.17.12.39  
  inflating: 2nd_test/2004.02.14.17.22.39  
  inflating: 2nd_test/2004.02.14.17.32.39  
  inflating: 2nd_test/2004.02.14.17.42.39  
  inflating: 2nd_test/2004.02.14.17.52.39  
  inflating: 2nd_test/2004.02.14.18.02.39  
  inflating: 2nd_test/2004.02.14.18.12.39  
  inflating: 2nd_test/2004.02.14.18.22.39  
  inflating: 2nd_test/2004.02.14.18.32.39  
  inflating: 2nd_test/2004.02.14.18.42.39  
  inflating: 2nd_test/2004.02.14.18.52.39  
  inflating: 2nd_test/2004.02.14.19.02.39  
  inflating: 2nd_test/2004.02.14.19.12.39  
  inflating: 2nd_test/2004.02.14.19.22.39  
  inflating: 2nd_test/2004.02.14.19.32.39  
  inflating: 2nd_test/2004.02.14.19.42.39  
  inflating: 2nd_test/2004.02.14.19.52.39  
  inflating: 2nd_test/2004.02.14.20.02.39  
  inflating: 2nd_test/2004.02.14.20.12.39  
  inflating: 2nd_test/2004.02.14.20.22.39  
  inflating: 2nd_test/2004.02.14.20.32.39  
  inflating: 2nd_test/2004.02.14.20.42.39  
  inflating: 2nd_test/2004.02.14.20.52.39  
  inflating: 2nd_test/2004.02.14.21.02.39  
  inflating: 2nd_test/2004.02.14.21.12.39  
  inflating: 2nd_test/2004.02.14.21.22.39  
  inflating: 2nd_test/2004.02.14.21.32.39  
  inflating: 2nd_test/2004.02.14.21.42.39  
  inflating: 2nd_test/2004.02.14.21.52.39  
  inflating: 2nd_test/2004.02.14.22.02.39  
  inflating: 2nd_test/2004.02.14.22.12.39  
  inflating: 2nd_test/2004.02.14.22.22.39  
  inflating: 2nd_test/2004.02.14.22.32.39  
  inflating: 2nd_test/2004.02.14.22.42.39  
  inflating: 2nd_test/2004.02.14.22.52.39  
  inflating: 2nd_test/2004.02.14.23.02.39  
  inflating: 2nd_test/2004.02.14.23.12.39  
  inflating: 2nd_test/2004.02.14.23.22.39  
  inflating: 2nd_test/2004.02.14.23.32.39  
  inflating: 2nd_test/2004.02.14.23.42.39  
  inflating: 2nd_test/2004.02.14.23.52.39  
  inflating: 2nd_test/2004.02.15.00.02.39  
  inflating: 2nd_test/2004.02.15.00.12.39  
  inflating: 2nd_test/2004.02.15.00.22.39  
  inflating: 2nd_test/2004.02.15.00.32.39  
  inflating: 2nd_test/2004.02.15.00.42.39  
  inflating: 2nd_test/2004.02.15.00.52.39  
  inflating: 2nd_test/2004.02.15.01.02.39  
  inflating: 2nd_test/2004.02.15.01.12.39  
  inflating: 2nd_test/2004.02.15.01.22.39  
  inflating: 2nd_test/2004.02.15.01.32.39  
  inflating: 2nd_test/2004.02.15.01.42.39  
  inflating: 2nd_test/2004.02.15.01.52.39  
  inflating: 2nd_test/2004.02.15.02.02.39  
  inflating: 2nd_test/2004.02.15.02.12.39  
  inflating: 2nd_test/2004.02.15.02.22.39  
  inflating: 2nd_test/2004.02.15.02.32.39  
  inflating: 2nd_test/2004.02.15.02.42.39  
  inflating: 2nd_test/2004.02.15.02.52.39  
  inflating: 2nd_test/2004.02.15.03.02.39  
  inflating: 2nd_test/2004.02.15.03.12.39  
  inflating: 2nd_test/2004.02.15.03.22.39  
  inflating: 2nd_test/2004.02.15.03.32.39  
  inflating: 2nd_test/2004.02.15.03.42.39  
  inflating: 2nd_test/2004.02.15.03.52.39  
  inflating: 2nd_test/2004.02.15.04.02.39  
  inflating: 2nd_test/2004.02.15.04.12.39  
  inflating: 2nd_test/2004.02.15.04.22.39  
  inflating: 2nd_test/2004.02.15.04.32.39  
  inflating: 2nd_test/2004.02.15.04.42.39  
  inflating: 2nd_test/2004.02.15.04.52.39  
  inflating: 2nd_test/2004.02.15.05.02.39  
  inflating: 2nd_test/2004.02.15.05.12.39  
  inflating: 2nd_test/2004.02.15.05.22.39  
  inflating: 2nd_test/2004.02.15.05.32.39  
  inflating: 2nd_test/2004.02.15.05.42.39  
  inflating: 2nd_test/2004.02.15.05.52.39  
  inflating: 2nd_test/2004.02.15.06.02.39  
  inflating: 2nd_test/2004.02.15.06.12.39  
  inflating: 2nd_test/2004.02.15.06.22.39  
  inflating: 2nd_test/2004.02.15.06.32.39  
  inflating: 2nd_test/2004.02.15.06.42.39  
  inflating: 2nd_test/2004.02.15.06.52.39  
  inflating: 2nd_test/2004.02.15.07.02.39  
  inflating: 2nd_test/2004.02.15.07.12.39  
  inflating: 2nd_test/2004.02.15.07.22.39  
  inflating: 2nd_test/2004.02.15.07.32.39  
  inflating: 2nd_test/2004.02.15.07.42.39  
  inflating: 2nd_test/2004.02.15.07.52.39  
  inflating: 2nd_test/2004.02.15.08.02.39  
  inflating: 2nd_test/2004.02.15.08.12.39  
  inflating: 2nd_test/2004.02.15.08.22.39  
  inflating: 2nd_test/2004.02.15.08.32.39  
  inflating: 2nd_test/2004.02.15.08.42.39  
  inflating: 2nd_test/2004.02.15.08.52.39  
  inflating: 2nd_test/2004.02.15.09.02.39  
  inflating: 2nd_test/2004.02.15.09.12.39  
  inflating: 2nd_test/2004.02.15.09.22.39  
  inflating: 2nd_test/2004.02.15.09.32.39  
  inflating: 2nd_test/2004.02.15.09.42.39  
  inflating: 2nd_test/2004.02.15.09.52.39  
  inflating: 2nd_test/2004.02.15.10.02.39  
  inflating: 2nd_test/2004.02.15.10.12.39  
  inflating: 2nd_test/2004.02.15.10.22.39  
  inflating: 2nd_test/2004.02.15.10.32.39  
  inflating: 2nd_test/2004.02.15.10.42.39  
  inflating: 2nd_test/2004.02.15.10.52.39  
  inflating: 2nd_test/2004.02.15.11.02.39  
  inflating: 2nd_test/2004.02.15.11.12.39  
  inflating: 2nd_test/2004.02.15.11.22.39  
  inflating: 2nd_test/2004.02.15.11.32.39  
  inflating: 2nd_test/2004.02.15.11.42.39  
  inflating: 2nd_test/2004.02.15.11.52.39  
  inflating: 2nd_test/2004.02.15.12.02.39  
  inflating: 2nd_test/2004.02.15.12.12.39  
  inflating: 2nd_test/2004.02.15.12.22.39  
  inflating: 2nd_test/2004.02.15.12.32.39  
  inflating: 2nd_test/2004.02.15.12.42.39  
  inflating: 2nd_test/2004.02.15.12.52.39  
  inflating: 2nd_test/2004.02.15.13.02.39  
  inflating: 2nd_test/2004.02.15.13.12.39  
  inflating: 2nd_test/2004.02.15.13.22.39  
  inflating: 2nd_test/2004.02.15.13.32.39  
  inflating: 2nd_test/2004.02.15.13.42.39  
  inflating: 2nd_test/2004.02.15.13.52.39  
  inflating: 2nd_test/2004.02.15.14.02.39  
  inflating: 2nd_test/2004.02.15.14.12.39  
  inflating: 2nd_test/2004.02.15.14.22.39  
  inflating: 2nd_test/2004.02.15.14.32.39  
  inflating: 2nd_test/2004.02.15.14.42.39  
  inflating: 2nd_test/2004.02.15.14.52.39  
  inflating: 2nd_test/2004.02.15.15.02.39  
  inflating: 2nd_test/2004.02.15.15.12.39  
  inflating: 2nd_test/2004.02.15.15.22.39  
  inflating: 2nd_test/2004.02.15.15.32.39  
  inflating: 2nd_test/2004.02.15.15.42.39  
  inflating: 2nd_test/2004.02.15.15.52.39  
  inflating: 2nd_test/2004.02.15.16.02.39  
  inflating: 2nd_test/2004.02.15.16.12.39  
  inflating: 2nd_test/2004.02.15.16.22.39  
  inflating: 2nd_test/2004.02.15.16.32.39  
  inflating: 2nd_test/2004.02.15.16.42.39  
  inflating: 2nd_test/2004.02.15.16.52.39  
  inflating: 2nd_test/2004.02.15.17.02.39  
  inflating: 2nd_test/2004.02.15.17.12.39  
  inflating: 2nd_test/2004.02.15.17.22.39  
  inflating: 2nd_test/2004.02.15.17.32.39  
  inflating: 2nd_test/2004.02.15.17.42.39  
  inflating: 2nd_test/2004.02.15.17.52.39  
  inflating: 2nd_test/2004.02.15.18.02.39  
  inflating: 2nd_test/2004.02.15.18.12.39  
  inflating: 2nd_test/2004.02.15.18.22.39  
  inflating: 2nd_test/2004.02.15.18.32.39  
  inflating: 2nd_test/2004.02.15.18.42.39  
  inflating: 2nd_test/2004.02.15.18.52.39  
  inflating: 2nd_test/2004.02.15.19.02.39  
  inflating: 2nd_test/2004.02.15.19.12.39  
  inflating: 2nd_test/2004.02.15.19.22.39  
  inflating: 2nd_test/2004.02.15.19.32.39  
  inflating: 2nd_test/2004.02.15.19.42.39  
  inflating: 2nd_test/2004.02.15.19.52.39  
  inflating: 2nd_test/2004.02.15.20.02.39  
  inflating: 2nd_test/2004.02.15.20.12.39  
  inflating: 2nd_test/2004.02.15.20.22.39  
  inflating: 2nd_test/2004.02.15.20.32.39  
  inflating: 2nd_test/2004.02.15.20.42.39  
  inflating: 2nd_test/2004.02.15.20.52.39  
  inflating: 2nd_test/2004.02.15.21.02.39  
  inflating: 2nd_test/2004.02.15.21.12.39  
  inflating: 2nd_test/2004.02.15.21.22.39  
  inflating: 2nd_test/2004.02.15.21.32.39  
  inflating: 2nd_test/2004.02.15.21.42.39  
  inflating: 2nd_test/2004.02.15.21.52.39  
  inflating: 2nd_test/2004.02.15.22.02.39  
  inflating: 2nd_test/2004.02.15.22.12.39  
  inflating: 2nd_test/2004.02.15.22.22.39  
  inflating: 2nd_test/2004.02.15.22.32.39  
  inflating: 2nd_test/2004.02.15.22.42.39  
  inflating: 2nd_test/2004.02.15.22.52.39  
  inflating: 2nd_test/2004.02.15.23.02.39  
  inflating: 2nd_test/2004.02.15.23.12.39  
  inflating: 2nd_test/2004.02.15.23.22.39  
  inflating: 2nd_test/2004.02.15.23.32.39  
  inflating: 2nd_test/2004.02.15.23.42.39  
  inflating: 2nd_test/2004.02.15.23.52.39  
  inflating: 2nd_test/2004.02.16.00.02.39  
  inflating: 2nd_test/2004.02.16.00.12.39  
  inflating: 2nd_test/2004.02.16.00.22.39  
  inflating: 2nd_test/2004.02.16.00.32.39  
  inflating: 2nd_test/2004.02.16.00.42.39  
  inflating: 2nd_test/2004.02.16.00.52.39  
  inflating: 2nd_test/2004.02.16.01.02.39  
  inflating: 2nd_test/2004.02.16.01.12.39  
  inflating: 2nd_test/2004.02.16.01.22.39  
  inflating: 2nd_test/2004.02.16.01.32.39  
  inflating: 2nd_test/2004.02.16.01.42.39  
  inflating: 2nd_test/2004.02.16.01.52.39  
  inflating: 2nd_test/2004.02.16.02.02.39  
  inflating: 2nd_test/2004.02.16.02.12.39  
  inflating: 2nd_test/2004.02.16.02.22.39  
  inflating: 2nd_test/2004.02.16.02.32.39  
  inflating: 2nd_test/2004.02.16.02.42.39  
  inflating: 2nd_test/2004.02.16.02.52.39  
  inflating: 2nd_test/2004.02.16.03.02.39  
  inflating: 2nd_test/2004.02.16.03.12.39  
  inflating: 2nd_test/2004.02.16.03.22.39  
  inflating: 2nd_test/2004.02.16.03.32.39  
  inflating: 2nd_test/2004.02.16.03.42.39  
  inflating: 2nd_test/2004.02.16.03.52.39  
  inflating: 2nd_test/2004.02.16.04.02.39  
  inflating: 2nd_test/2004.02.16.04.12.39  
  inflating: 2nd_test/2004.02.16.04.22.39  
  inflating: 2nd_test/2004.02.16.04.32.39  
  inflating: 2nd_test/2004.02.16.04.42.39  
  inflating: 2nd_test/2004.02.16.04.52.39  
  inflating: 2nd_test/2004.02.16.05.02.39  
  inflating: 2nd_test/2004.02.16.05.12.39  
  inflating: 2nd_test/2004.02.16.05.22.39  
  inflating: 2nd_test/2004.02.16.05.32.39  
  inflating: 2nd_test/2004.02.16.05.42.39  
  inflating: 2nd_test/2004.02.16.05.52.39  
  inflating: 2nd_test/2004.02.16.06.02.39  
  inflating: 2nd_test/2004.02.16.06.12.39  
  inflating: 2nd_test/2004.02.16.06.22.39  
  inflating: 2nd_test/2004.02.16.06.32.39  
  inflating: 2nd_test/2004.02.16.06.42.39  
  inflating: 2nd_test/2004.02.16.06.52.39  
  inflating: 2nd_test/2004.02.16.07.02.39  
  inflating: 2nd_test/2004.02.16.07.12.39  
  inflating: 2nd_test/2004.02.16.07.22.39  
  inflating: 2nd_test/2004.02.16.07.32.39  
  inflating: 2nd_test/2004.02.16.07.42.39  
  inflating: 2nd_test/2004.02.16.07.52.39  
  inflating: 2nd_test/2004.02.16.08.02.39  
  inflating: 2nd_test/2004.02.16.08.12.39  
  inflating: 2nd_test/2004.02.16.08.22.39  
  inflating: 2nd_test/2004.02.16.08.32.39  
  inflating: 2nd_test/2004.02.16.08.42.39  
  inflating: 2nd_test/2004.02.16.08.52.39  
  inflating: 2nd_test/2004.02.16.09.02.39  
  inflating: 2nd_test/2004.02.16.09.12.39  
  inflating: 2nd_test/2004.02.16.09.22.39  
  inflating: 2nd_test/2004.02.16.09.32.39  
  inflating: 2nd_test/2004.02.16.09.42.39  
  inflating: 2nd_test/2004.02.16.09.52.39  
  inflating: 2nd_test/2004.02.16.10.02.39  
  inflating: 2nd_test/2004.02.16.10.12.39  
  inflating: 2nd_test/2004.02.16.10.22.39  
  inflating: 2nd_test/2004.02.16.10.32.39  
  inflating: 2nd_test/2004.02.16.10.42.39  
  inflating: 2nd_test/2004.02.16.10.52.39  
  inflating: 2nd_test/2004.02.16.11.02.39  
  inflating: 2nd_test/2004.02.16.11.12.39  
  inflating: 2nd_test/2004.02.16.11.22.39  
  inflating: 2nd_test/2004.02.16.11.32.39  
  inflating: 2nd_test/2004.02.16.11.42.39  
  inflating: 2nd_test/2004.02.16.11.52.39  
  inflating: 2nd_test/2004.02.16.12.02.39  
  inflating: 2nd_test/2004.02.16.12.12.39  
  inflating: 2nd_test/2004.02.16.12.22.39  
  inflating: 2nd_test/2004.02.16.12.32.39  
  inflating: 2nd_test/2004.02.16.12.42.39  
  inflating: 2nd_test/2004.02.16.12.52.39  
  inflating: 2nd_test/2004.02.16.13.02.39  
  inflating: 2nd_test/2004.02.16.13.12.39  
  inflating: 2nd_test/2004.02.16.13.22.39  
  inflating: 2nd_test/2004.02.16.13.32.39  
  inflating: 2nd_test/2004.02.16.13.42.39  
  inflating: 2nd_test/2004.02.16.13.52.39  
  inflating: 2nd_test/2004.02.16.14.02.39  
  inflating: 2nd_test/2004.02.16.14.12.39  
  inflating: 2nd_test/2004.02.16.14.22.39  
  inflating: 2nd_test/2004.02.16.14.32.39  
  inflating: 2nd_test/2004.02.16.14.42.39  
  inflating: 2nd_test/2004.02.16.14.52.39  
  inflating: 2nd_test/2004.02.16.15.02.39  
  inflating: 2nd_test/2004.02.16.15.12.39  
  inflating: 2nd_test/2004.02.16.15.22.39  
  inflating: 2nd_test/2004.02.16.15.32.39  
  inflating: 2nd_test/2004.02.16.15.42.39  
  inflating: 2nd_test/2004.02.16.15.52.39  
  inflating: 2nd_test/2004.02.16.16.02.39  
  inflating: 2nd_test/2004.02.16.16.12.39  
  inflating: 2nd_test/2004.02.16.16.22.39  
  inflating: 2nd_test/2004.02.16.16.32.39  
  inflating: 2nd_test/2004.02.16.16.42.39  
  inflating: 2nd_test/2004.02.16.16.52.39  
  inflating: 2nd_test/2004.02.16.17.02.39  
  inflating: 2nd_test/2004.02.16.17.12.39  
  inflating: 2nd_test/2004.02.16.17.22.39  
  inflating: 2nd_test/2004.02.16.17.32.39  
  inflating: 2nd_test/2004.02.16.17.42.39  
  inflating: 2nd_test/2004.02.16.17.52.39  
  inflating: 2nd_test/2004.02.16.18.02.39  
  inflating: 2nd_test/2004.02.16.18.12.39  
  inflating: 2nd_test/2004.02.16.18.22.39  
  inflating: 2nd_test/2004.02.16.18.32.39  
  inflating: 2nd_test/2004.02.16.18.42.39  
  inflating: 2nd_test/2004.02.16.18.52.39  
  inflating: 2nd_test/2004.02.16.19.02.39  
  inflating: 2nd_test/2004.02.16.19.12.39  
  inflating: 2nd_test/2004.02.16.19.22.39  
  inflating: 2nd_test/2004.02.16.19.32.39  
  inflating: 2nd_test/2004.02.16.19.42.39  
  inflating: 2nd_test/2004.02.16.19.52.39  
  inflating: 2nd_test/2004.02.16.20.02.39  
  inflating: 2nd_test/2004.02.16.20.12.39  
  inflating: 2nd_test/2004.02.16.20.22.39  
  inflating: 2nd_test/2004.02.16.20.32.39  
  inflating: 2nd_test/2004.02.16.20.42.39  
  inflating: 2nd_test/2004.02.16.20.52.39  
  inflating: 2nd_test/2004.02.16.21.02.39  
  inflating: 2nd_test/2004.02.16.21.12.39  
  inflating: 2nd_test/2004.02.16.21.22.39  
  inflating: 2nd_test/2004.02.16.21.32.39  
  inflating: 2nd_test/2004.02.16.21.42.39  
  inflating: 2nd_test/2004.02.16.21.52.39  
  inflating: 2nd_test/2004.02.16.22.02.39  
  inflating: 2nd_test/2004.02.16.22.12.39  
  inflating: 2nd_test/2004.02.16.22.22.39  
  inflating: 2nd_test/2004.02.16.22.32.39  
  inflating: 2nd_test/2004.02.16.22.42.39  
  inflating: 2nd_test/2004.02.16.22.52.39  
  inflating: 2nd_test/2004.02.16.23.02.39  
  inflating: 2nd_test/2004.02.16.23.12.39  
  inflating: 2nd_test/2004.02.16.23.22.39  
  inflating: 2nd_test/2004.02.16.23.32.39  
  inflating: 2nd_test/2004.02.16.23.42.39  
  inflating: 2nd_test/2004.02.16.23.52.39  
  inflating: 2nd_test/2004.02.17.00.02.39  
  inflating: 2nd_test/2004.02.17.00.12.39  
  inflating: 2nd_test/2004.02.17.00.22.39  
  inflating: 2nd_test/2004.02.17.00.32.39  
  inflating: 2nd_test/2004.02.17.00.42.39  
  inflating: 2nd_test/2004.02.17.00.52.39  
  inflating: 2nd_test/2004.02.17.01.02.39  
  inflating: 2nd_test/2004.02.17.01.12.39  
  inflating: 2nd_test/2004.02.17.01.22.39  
  inflating: 2nd_test/2004.02.17.01.32.39  
  inflating: 2nd_test/2004.02.17.01.42.39  
  inflating: 2nd_test/2004.02.17.01.52.39  
  inflating: 2nd_test/2004.02.17.02.02.39  
  inflating: 2nd_test/2004.02.17.02.12.39  
  inflating: 2nd_test/2004.02.17.02.22.39  
  inflating: 2nd_test/2004.02.17.02.32.39  
  inflating: 2nd_test/2004.02.17.02.42.39  
  inflating: 2nd_test/2004.02.17.02.52.39  
  inflating: 2nd_test/2004.02.17.03.02.39  
  inflating: 2nd_test/2004.02.17.03.12.39  
  inflating: 2nd_test/2004.02.17.03.22.39  
  inflating: 2nd_test/2004.02.17.03.32.39  
  inflating: 2nd_test/2004.02.17.03.42.39  
  inflating: 2nd_test/2004.02.17.03.52.39  
  inflating: 2nd_test/2004.02.17.04.02.39  
  inflating: 2nd_test/2004.02.17.04.12.39  
  inflating: 2nd_test/2004.02.17.04.22.39  
  inflating: 2nd_test/2004.02.17.04.32.39  
  inflating: 2nd_test/2004.02.17.04.42.39  
  inflating: 2nd_test/2004.02.17.04.52.39  
  inflating: 2nd_test/2004.02.17.05.02.39  
  inflating: 2nd_test/2004.02.17.05.12.39  
  inflating: 2nd_test/2004.02.17.05.22.39  
  inflating: 2nd_test/2004.02.17.05.32.39  
  inflating: 2nd_test/2004.02.17.05.42.39  
  inflating: 2nd_test/2004.02.17.05.52.39  
  inflating: 2nd_test/2004.02.17.06.02.39  
  inflating: 2nd_test/2004.02.17.06.12.39  
  inflating: 2nd_test/2004.02.17.06.22.39  
  inflating: 2nd_test/2004.02.17.06.32.39  
  inflating: 2nd_test/2004.02.17.06.42.39  
  inflating: 2nd_test/2004.02.17.06.52.39  
  inflating: 2nd_test/2004.02.17.07.02.39  
  inflating: 2nd_test/2004.02.17.07.12.39  
  inflating: 2nd_test/2004.02.17.07.22.39  
  inflating: 2nd_test/2004.02.17.07.32.39  
  inflating: 2nd_test/2004.02.17.07.42.39  
  inflating: 2nd_test/2004.02.17.07.52.39  
  inflating: 2nd_test/2004.02.17.08.02.39  
  inflating: 2nd_test/2004.02.17.08.12.39  
  inflating: 2nd_test/2004.02.17.08.22.39  
  inflating: 2nd_test/2004.02.17.08.32.39  
  inflating: 2nd_test/2004.02.17.08.42.39  
  inflating: 2nd_test/2004.02.17.08.52.39  
  inflating: 2nd_test/2004.02.17.09.02.39  
  inflating: 2nd_test/2004.02.17.09.12.39  
  inflating: 2nd_test/2004.02.17.09.22.39  
  inflating: 2nd_test/2004.02.17.09.32.39  
  inflating: 2nd_test/2004.02.17.09.42.39  
  inflating: 2nd_test/2004.02.17.09.52.39  
  inflating: 2nd_test/2004.02.17.10.02.39  
  inflating: 2nd_test/2004.02.17.10.12.39  
  inflating: 2nd_test/2004.02.17.10.22.39  
  inflating: 2nd_test/2004.02.17.10.32.39  
  inflating: 2nd_test/2004.02.17.10.42.39  
  inflating: 2nd_test/2004.02.17.10.52.39  
  inflating: 2nd_test/2004.02.17.11.02.39  
  inflating: 2nd_test/2004.02.17.11.12.39  
  inflating: 2nd_test/2004.02.17.11.22.39  
  inflating: 2nd_test/2004.02.17.11.32.39  
  inflating: 2nd_test/2004.02.17.11.42.39  
  inflating: 2nd_test/2004.02.17.11.52.39  
  inflating: 2nd_test/2004.02.17.12.02.39  
  inflating: 2nd_test/2004.02.17.12.12.39  
  inflating: 2nd_test/2004.02.17.12.22.39  
  inflating: 2nd_test/2004.02.17.12.32.39  
  inflating: 2nd_test/2004.02.17.12.42.39  
  inflating: 2nd_test/2004.02.17.12.52.39  
  inflating: 2nd_test/2004.02.17.13.02.39  
  inflating: 2nd_test/2004.02.17.13.12.39  
  inflating: 2nd_test/2004.02.17.13.22.39  
  inflating: 2nd_test/2004.02.17.13.32.39  
  inflating: 2nd_test/2004.02.17.13.42.39  
  inflating: 2nd_test/2004.02.17.13.52.39  
  inflating: 2nd_test/2004.02.17.14.02.39  
  inflating: 2nd_test/2004.02.17.14.12.39  
  inflating: 2nd_test/2004.02.17.14.22.39  
  inflating: 2nd_test/2004.02.17.14.32.39  
  inflating: 2nd_test/2004.02.17.14.42.39  
  inflating: 2nd_test/2004.02.17.14.52.39  
  inflating: 2nd_test/2004.02.17.15.02.39  
  inflating: 2nd_test/2004.02.17.15.12.39  
  inflating: 2nd_test/2004.02.17.15.22.39  
  inflating: 2nd_test/2004.02.17.15.32.39  
  inflating: 2nd_test/2004.02.17.15.42.39  
  inflating: 2nd_test/2004.02.17.15.52.39  
  inflating: 2nd_test/2004.02.17.16.02.39  
  inflating: 2nd_test/2004.02.17.16.12.39  
  inflating: 2nd_test/2004.02.17.16.22.39  
  inflating: 2nd_test/2004.02.17.16.32.39  
  inflating: 2nd_test/2004.02.17.16.42.39  
  inflating: 2nd_test/2004.02.17.16.52.39  
  inflating: 2nd_test/2004.02.17.17.02.39  
  inflating: 2nd_test/2004.02.17.17.12.39  
  inflating: 2nd_test/2004.02.17.17.22.39  
  inflating: 2nd_test/2004.02.17.17.32.39  
  inflating: 2nd_test/2004.02.17.17.42.39  
  inflating: 2nd_test/2004.02.17.17.52.39  
  inflating: 2nd_test/2004.02.17.18.02.39  
  inflating: 2nd_test/2004.02.17.18.12.39  
  inflating: 2nd_test/2004.02.17.18.22.39  
  inflating: 2nd_test/2004.02.17.18.32.39  
  inflating: 2nd_test/2004.02.17.18.42.39  
  inflating: 2nd_test/2004.02.17.18.52.39  
  inflating: 2nd_test/2004.02.17.19.02.39  
  inflating: 2nd_test/2004.02.17.19.12.39  
  inflating: 2nd_test/2004.02.17.19.22.39  
  inflating: 2nd_test/2004.02.17.19.32.39  
  inflating: 2nd_test/2004.02.17.19.42.39  
  inflating: 2nd_test/2004.02.17.19.52.39  
  inflating: 2nd_test/2004.02.17.20.02.39  
  inflating: 2nd_test/2004.02.17.20.12.39  
  inflating: 2nd_test/2004.02.17.20.22.39  
  inflating: 2nd_test/2004.02.17.20.32.39  
  inflating: 2nd_test/2004.02.17.20.42.39  
  inflating: 2nd_test/2004.02.17.20.52.39  
  inflating: 2nd_test/2004.02.17.21.02.39  
  inflating: 2nd_test/2004.02.17.21.12.39  
  inflating: 2nd_test/2004.02.17.21.22.39  
  inflating: 2nd_test/2004.02.17.21.32.39  
  inflating: 2nd_test/2004.02.17.21.42.39  
  inflating: 2nd_test/2004.02.17.21.52.39  
  inflating: 2nd_test/2004.02.17.22.02.39  
  inflating: 2nd_test/2004.02.17.22.12.39  
  inflating: 2nd_test/2004.02.17.22.22.39  
  inflating: 2nd_test/2004.02.17.22.32.39  
  inflating: 2nd_test/2004.02.17.22.42.39  
  inflating: 2nd_test/2004.02.17.22.52.39  
  inflating: 2nd_test/2004.02.17.23.02.39  
  inflating: 2nd_test/2004.02.17.23.12.39  
  inflating: 2nd_test/2004.02.17.23.22.39  
  inflating: 2nd_test/2004.02.17.23.32.39  
  inflating: 2nd_test/2004.02.17.23.42.39  
  inflating: 2nd_test/2004.02.17.23.52.39  
  inflating: 2nd_test/2004.02.18.00.02.39  
  inflating: 2nd_test/2004.02.18.00.12.39  
  inflating: 2nd_test/2004.02.18.00.22.39  
  inflating: 2nd_test/2004.02.18.00.32.39  
  inflating: 2nd_test/2004.02.18.00.42.39  
  inflating: 2nd_test/2004.02.18.00.52.39  
  inflating: 2nd_test/2004.02.18.01.02.39  
  inflating: 2nd_test/2004.02.18.01.12.39  
  inflating: 2nd_test/2004.02.18.01.22.39  
  inflating: 2nd_test/2004.02.18.01.32.39  
  inflating: 2nd_test/2004.02.18.01.42.39  
  inflating: 2nd_test/2004.02.18.01.52.39  
  inflating: 2nd_test/2004.02.18.02.02.39  
  inflating: 2nd_test/2004.02.18.02.12.39  
  inflating: 2nd_test/2004.02.18.02.22.39  
  inflating: 2nd_test/2004.02.18.02.32.39  
  inflating: 2nd_test/2004.02.18.02.42.39  
  inflating: 2nd_test/2004.02.18.02.52.39  
  inflating: 2nd_test/2004.02.18.03.02.39  
  inflating: 2nd_test/2004.02.18.03.12.39  
  inflating: 2nd_test/2004.02.18.03.22.39  
  inflating: 2nd_test/2004.02.18.03.32.39  
  inflating: 2nd_test/2004.02.18.03.42.39  
  inflating: 2nd_test/2004.02.18.03.52.39  
  inflating: 2nd_test/2004.02.18.04.02.39  
  inflating: 2nd_test/2004.02.18.04.12.39  
  inflating: 2nd_test/2004.02.18.04.22.39  
  inflating: 2nd_test/2004.02.18.04.32.39  
  inflating: 2nd_test/2004.02.18.04.42.39  
  inflating: 2nd_test/2004.02.18.04.52.39  
  inflating: 2nd_test/2004.02.18.05.02.39  
  inflating: 2nd_test/2004.02.18.05.12.39  
  inflating: 2nd_test/2004.02.18.05.22.39  
  inflating: 2nd_test/2004.02.18.05.32.39  
  inflating: 2nd_test/2004.02.18.05.42.39  
  inflating: 2nd_test/2004.02.18.05.52.39  
  inflating: 2nd_test/2004.02.18.06.02.39  
  inflating: 2nd_test/2004.02.18.06.12.39  
  inflating: 2nd_test/2004.02.18.06.22.39  
  inflating: 2nd_test/2004.02.18.06.32.39  
  inflating: 2nd_test/2004.02.18.06.42.39  
  inflating: 2nd_test/2004.02.18.06.52.39  
  inflating: 2nd_test/2004.02.18.07.02.39  
  inflating: 2nd_test/2004.02.18.07.12.39  
  inflating: 2nd_test/2004.02.18.07.22.39  
  inflating: 2nd_test/2004.02.18.07.32.39  
  inflating: 2nd_test/2004.02.18.07.42.39  
  inflating: 2nd_test/2004.02.18.07.52.39  
  inflating: 2nd_test/2004.02.18.08.02.39  
  inflating: 2nd_test/2004.02.18.08.12.39  
  inflating: 2nd_test/2004.02.18.08.22.39  
  inflating: 2nd_test/2004.02.18.08.32.39  
  inflating: 2nd_test/2004.02.18.08.42.39  
  inflating: 2nd_test/2004.02.18.08.52.39  
  inflating: 2nd_test/2004.02.18.09.02.39  
  inflating: 2nd_test/2004.02.18.09.12.39  
  inflating: 2nd_test/2004.02.18.09.22.39  
  inflating: 2nd_test/2004.02.18.09.32.39  
  inflating: 2nd_test/2004.02.18.09.42.39  
  inflating: 2nd_test/2004.02.18.09.52.39  
  inflating: 2nd_test/2004.02.18.10.02.39  
  inflating: 2nd_test/2004.02.18.10.12.39  
  inflating: 2nd_test/2004.02.18.10.22.39  
  inflating: 2nd_test/2004.02.18.10.32.39  
  inflating: 2nd_test/2004.02.18.10.42.39  
  inflating: 2nd_test/2004.02.18.10.52.39  
  inflating: 2nd_test/2004.02.18.11.02.39  
  inflating: 2nd_test/2004.02.18.11.12.39  
  inflating: 2nd_test/2004.02.18.11.22.39  
  inflating: 2nd_test/2004.02.18.11.32.39  
  inflating: 2nd_test/2004.02.18.11.42.39  
  inflating: 2nd_test/2004.02.18.11.52.39  
  inflating: 2nd_test/2004.02.18.12.02.39  
  inflating: 2nd_test/2004.02.18.12.12.39  
  inflating: 2nd_test/2004.02.18.12.22.39  
  inflating: 2nd_test/2004.02.18.12.32.39  
  inflating: 2nd_test/2004.02.18.12.42.39  
  inflating: 2nd_test/2004.02.18.12.52.39  
  inflating: 2nd_test/2004.02.18.13.02.39  
  inflating: 2nd_test/2004.02.18.13.12.39  
  inflating: 2nd_test/2004.02.18.13.22.39  
  inflating: 2nd_test/2004.02.18.13.32.39  
  inflating: 2nd_test/2004.02.18.13.42.39  
  inflating: 2nd_test/2004.02.18.13.52.39  
  inflating: 2nd_test/2004.02.18.14.02.39  
  inflating: 2nd_test/2004.02.18.14.12.39  
  inflating: 2nd_test/2004.02.18.14.22.39  
  inflating: 2nd_test/2004.02.18.14.32.39  
  inflating: 2nd_test/2004.02.18.14.42.39  
  inflating: 2nd_test/2004.02.18.14.52.39  
  inflating: 2nd_test/2004.02.18.15.02.39  
  inflating: 2nd_test/2004.02.18.15.12.39  
  inflating: 2nd_test/2004.02.18.15.22.39  
  inflating: 2nd_test/2004.02.18.15.32.39  
  inflating: 2nd_test/2004.02.18.15.42.39  
  inflating: 2nd_test/2004.02.18.15.52.39  
  inflating: 2nd_test/2004.02.18.16.02.39  
  inflating: 2nd_test/2004.02.18.16.12.39  
  inflating: 2nd_test/2004.02.18.16.22.39  
  inflating: 2nd_test/2004.02.18.16.32.39  
  inflating: 2nd_test/2004.02.18.16.42.39  
  inflating: 2nd_test/2004.02.18.16.52.39  
  inflating: 2nd_test/2004.02.18.17.02.39  
  inflating: 2nd_test/2004.02.18.17.12.39  
  inflating: 2nd_test/2004.02.18.17.22.39  
  inflating: 2nd_test/2004.02.18.17.32.39  
  inflating: 2nd_test/2004.02.18.17.42.39  
  inflating: 2nd_test/2004.02.18.17.52.39  
  inflating: 2nd_test/2004.02.18.18.02.39  
  inflating: 2nd_test/2004.02.18.18.12.39  
  inflating: 2nd_test/2004.02.18.18.22.39  
  inflating: 2nd_test/2004.02.18.18.32.39  
  inflating: 2nd_test/2004.02.18.18.42.39  
  inflating: 2nd_test/2004.02.18.18.52.39  
  inflating: 2nd_test/2004.02.18.19.02.39  
  inflating: 2nd_test/2004.02.18.19.12.39  
  inflating: 2nd_test/2004.02.18.19.22.39  
  inflating: 2nd_test/2004.02.18.19.32.39  
  inflating: 2nd_test/2004.02.18.19.42.39  
  inflating: 2nd_test/2004.02.18.19.52.39  
  inflating: 2nd_test/2004.02.18.20.02.39  
  inflating: 2nd_test/2004.02.18.20.12.39  
  inflating: 2nd_test/2004.02.18.20.22.39  
  inflating: 2nd_test/2004.02.18.20.32.39  
  inflating: 2nd_test/2004.02.18.20.42.39  
  inflating: 2nd_test/2004.02.18.20.52.39  
  inflating: 2nd_test/2004.02.18.21.02.39  
  inflating: 2nd_test/2004.02.18.21.12.39  
  inflating: 2nd_test/2004.02.18.21.22.39  
  inflating: 2nd_test/2004.02.18.21.32.39  
  inflating: 2nd_test/2004.02.18.21.42.39  
  inflating: 2nd_test/2004.02.18.21.52.39  
  inflating: 2nd_test/2004.02.18.22.02.39  
  inflating: 2nd_test/2004.02.18.22.12.39  
  inflating: 2nd_test/2004.02.18.22.22.39  
  inflating: 2nd_test/2004.02.18.22.32.39  
  inflating: 2nd_test/2004.02.18.22.42.39  
  inflating: 2nd_test/2004.02.18.22.52.39  
  inflating: 2nd_test/2004.02.18.23.02.39  
  inflating: 2nd_test/2004.02.18.23.12.39  
  inflating: 2nd_test/2004.02.18.23.22.39  
  inflating: 2nd_test/2004.02.18.23.32.39  
  inflating: 2nd_test/2004.02.18.23.42.39  
  inflating: 2nd_test/2004.02.18.23.52.39  
  inflating: 2nd_test/2004.02.19.00.02.39  
  inflating: 2nd_test/2004.02.19.00.12.39  
  inflating: 2nd_test/2004.02.19.00.22.39  
  inflating: 2nd_test/2004.02.19.00.32.39  
  inflating: 2nd_test/2004.02.19.00.42.39  
  inflating: 2nd_test/2004.02.19.00.52.39  
  inflating: 2nd_test/2004.02.19.01.02.39  
  inflating: 2nd_test/2004.02.19.01.12.39  
  inflating: 2nd_test/2004.02.19.01.22.39  
  inflating: 2nd_test/2004.02.19.01.32.39  
  inflating: 2nd_test/2004.02.19.01.42.39  
  inflating: 2nd_test/2004.02.19.01.52.39  
  inflating: 2nd_test/2004.02.19.02.02.39  
  inflating: 2nd_test/2004.02.19.02.12.39  
  inflating: 2nd_test/2004.02.19.02.22.39  
  inflating: 2nd_test/2004.02.19.02.32.39  
  inflating: 2nd_test/2004.02.19.02.42.39  
  inflating: 2nd_test/2004.02.19.02.52.39  
  inflating: 2nd_test/2004.02.19.03.02.39  
  inflating: 2nd_test/2004.02.19.03.12.39  
  inflating: 2nd_test/2004.02.19.03.22.39  
  inflating: 2nd_test/2004.02.19.03.32.39  
  inflating: 2nd_test/2004.02.19.03.42.39  
  inflating: 2nd_test/2004.02.19.03.52.39  
  inflating: 2nd_test/2004.02.19.04.02.39  
  inflating: 2nd_test/2004.02.19.04.12.39  
  inflating: 2nd_test/2004.02.19.04.22.39  
  inflating: 2nd_test/2004.02.19.04.32.39  
  inflating: 2nd_test/2004.02.19.04.42.39  
  inflating: 2nd_test/2004.02.19.04.52.39  
  inflating: 2nd_test/2004.02.19.05.02.39  
  inflating: 2nd_test/2004.02.19.05.12.39  
  inflating: 2nd_test/2004.02.19.05.22.39  
  inflating: 2nd_test/2004.02.19.05.32.39  
  inflating: 2nd_test/2004.02.19.05.42.39  
  inflating: 2nd_test/2004.02.19.05.52.39  
  inflating: 2nd_test/2004.02.19.06.02.39  
  inflating: 2nd_test/2004.02.19.06.12.39  
  inflating: 2nd_test/2004.02.19.06.22.39  

The data is downloaded into the remote instance as data in the /content folder and is used for analytics.

In [0]:
# renaming file from 2nd_test to data
os.rename('2nd_test','data')

Understanding the Data

Measurement files are available as seperate files (Total 984)

Start of Directory Data
data/2004.02.12.10.32.39 (12th Feb, 2004)
data/2004.02.12.10.42.39

End Directory Data
data/2004.02.19.06.12.39 (19th Feb, 2004)
data/2004.02.19.06.22.39

Each file contains 10mins of accelerometer data.

Data Wrangling

Each of the 10min file is averaged and stored to a pandas dataframe

In [0]:
data_dir = 'data'
merged_data = pd.DataFrame()

# Looping over all files from 12th Feb to 19th Feb
for filename in os.listdir(data_dir):
    dataset=pd.read_csv(os.path.join(data_dir, filename), sep='\t')
    dataset_mean_abs = np.array(dataset.abs().mean())
    dataset_mean_abs = pd.DataFrame(dataset_mean_abs.reshape(1,4))
    dataset_mean_abs.index = [filename]
    merged_data = merged_data.append(dataset_mean_abs)
    
# Renaming columns
merged_data.columns = ['Bearing 1','Bearing 2','Bearing 3','Bearing 4']
# Identifying index as datetime format
merged_data.index = pd.to_datetime(merged_data.index, format='%Y.%m.%d.%H.%M.%S')
merged_data = merged_data.sort_index()
merged_data.to_csv('merged_dataset_BearingTest_2.csv')
In [31]:
# Check - Begining of Data
merged_data
Out[31]:
Bearing 1 Bearing 2 Bearing 3 Bearing 4
2004-02-12 10:32:39 0.058333 0.071832 0.083242 0.043067
2004-02-12 10:42:39 0.058995 0.074006 0.084435 0.044541
2004-02-12 10:52:39 0.060236 0.074227 0.083926 0.044443
2004-02-12 11:02:39 0.061455 0.073844 0.084457 0.045081
2004-02-12 11:12:39 0.061361 0.075609 0.082837 0.045118
... ... ... ... ...
2004-02-19 05:42:39 0.453335 0.161016 0.137440 0.119047
2004-02-19 05:52:39 0.337583 0.132400 0.144992 0.092125
2004-02-19 06:02:39 0.351111 0.152266 0.151299 0.100817
2004-02-19 06:12:39 0.001857 0.003732 0.003656 0.001786
2004-02-19 06:22:39 0.001168 0.000767 0.000716 0.001699

983 rows × 4 columns

In [9]:
# Check - End of Data
merged_data.tail()
Out[9]:
Bearing 1 Bearing 2 Bearing 3 Bearing 4
2004-02-19 05:42:39 0.453335 0.161016 0.137440 0.119047
2004-02-19 05:52:39 0.337583 0.132400 0.144992 0.092125
2004-02-19 06:02:39 0.351111 0.152266 0.151299 0.100817
2004-02-19 06:12:39 0.001857 0.003732 0.003656 0.001786
2004-02-19 06:22:39 0.001168 0.000767 0.000716 0.001699
In [10]:
#Check Total Points
print(f'Total Data Points {merged_data.shape[0] + 1}')
Total Data Points 984

Visualising Vibration Data

In [11]:
# Visualising Data
ax = merged_data.plot(figsize = (12,6), title="Vibration Data" , legend = True)
ax.set(xlabel="Year-Month-Date", ylabel="Vibration/Acceleration(g)")
plt.axvline(x='2004-02-19 06:12:39', linewidth=4, color='b', label ="Breakdown of Bearing 1")
plt.text('2004-02-19 06:12:39',0.3,'Breakdown of Bearing 1',rotation=90, fontsize=14, color='b')
Out[11]:
Text(2004-02-19 06:12:39, 0.3, 'Breakdown of Bearing 1')

The above figure shows the accelereometer data for all four bearings. Bearing 1 fails at end of measurement, @ 2004-02-19 06:22:39.

Observing the time plot, it is pretty obvious that the vibration increases after 2004-02-16. However, how does a machine access that there has been an increase in bearing vibration?

Zooming in Data for Bearing 1

In [12]:
fig = plt.figure()

# Divide the figure into a 1x2 grid, and give me the first section
ax1 = fig.add_subplot(121)
# Divide the figure into a 1x2 grid, and give me the second section
ax2 = fig.add_subplot(122)

healthy = merged_data['2004-02-12 11:02:39':'2004-02-12 23:52:39']
healthy['Bearing 1'].plot(figsize = (12,6), title="Healthy State" , legend = True, ax=ax1)
ax1.set(xlabel="Month-Date Time", ylabel="Vibration/Acceleration(g)")

faulty = merged_data['2004-02-18 11:02:39':'2004-02-18 23:52:39']
ax2 = faulty['Bearing 1'].plot(figsize = (12,6), title="Faulty State" , legend = True, ax= ax2)
ax2.set(xlabel="Month-Date Time", ylabel="Vibration/Acceleration(g)")
Out[12]:
[Text(0, 0.5, 'Vibration/Acceleration(g)'), Text(0.5, 0, 'Month-Date Time')]

The above graphs shows the vibration data fro bearing 1 at the for the same time peiod , '11:02:39' to "23:52:39' on 12th (Healthy) and on the 18th(Faulty/Poor Heath Score).

The vibration is definetly higher. Furthermore, the frequency component are also different. It is easy to identify for one variable (one dimension). However, when the number of variables (dimensions) increase, i.e. when we consider more variable likes temperature, humidity etc., the complexity increases.

The beauty of ML lies in the fact that the same methods hold true for mutli dimensional data as well. Multiple sensor variables (dimensions) can be considered to get a more accurate measure of the "Health Score" of a machine.

Anamoly Detection using Prophet Package (Black Box Modelling)

Anomaly detection problem for time series can be formulated as finding outlier data points relative to some standard or usual signal. Our focus shall be from a machine persopective, such as unexpected spikes, level shift pointing to deteriorating health of a machine.

Prophet is open source software released by Facebook’s Core Data Science team.

In [0]:
from fbprophet import Prophet

Creating Training Data Set

The training of the anamoly detection model is using data from the healthy phase of the bearing. The input to Prophet is always a dataframe with two columns: ds and y. The ds (datestamp) column should be of a format expected by Pandas, ideally YYYY-MM-DD for a date or YYYY-MM-DD HH:MM:SS for a timestamp. The y column must be numeric, and represents the measurement we wish to forecast.

In [36]:
healthy_bearing1 = merged_data['2004-02-12 10:32:39':'2004-02-15 23:42:39']['Bearing 1']

# Creating training dataframe
prophet_healthy_train = pd.DataFrame()
prophet_healthy_train['ds'] = healthy_bearing1.index
prophet_healthy_train['y'] = healthy_bearing1.values

prophet_healthy_train.head()
Out[36]:
ds y
0 2004-02-12 10:32:39 0.058333
1 2004-02-12 10:42:39 0.058995
2 2004-02-12 10:52:39 0.060236
3 2004-02-12 11:02:39 0.061455
4 2004-02-12 11:12:39 0.061361

Creating the Model

Calling the In-Bulit Prophet Module for training a model

In [37]:
m = Prophet(interval_width = 1)
# Using the training data from "healthy part"
m.fit(prophet_healthy_train)
INFO:fbprophet:Disabling yearly seasonality. Run prophet with yearly_seasonality=True to override this.
INFO:fbprophet:Disabling weekly seasonality. Run prophet with weekly_seasonality=True to override this.
Out[37]:
<fbprophet.forecaster.Prophet at 0x7fa88fe10c18>

Evaluation on Training Data

In [16]:
forecast = m.predict(prophet_healthy_train)
forecast['fact'] = prophet_healthy_train['y'].reset_index(drop = True)
print('Displaying Prophet plot')
fig1 = m.plot(forecast)
fig1 = healthy_bearing1.plot(figsize = (12,6), title="Fit of Training Data")
fig1.set(xlabel="Month (MM)-Date(DD) Time", ylabel="Vibration/Acceleration(g)")
Displaying Prophet plot
Out[16]:
[Text(45.125, 0.5, 'Vibration/Acceleration(g)'),
 Text(0.5, 30.5, 'Month (MM)-Date(DD) Time')]

The black points are the true data points of the vibration sensor. The blue line represents the fitted line (trend line) with the light blue portion showing the acceptable variance.

Evaluation on Test Data (Unseen, Fault Data)

Finally, the moment of truth!

Can the model developed above detect faulty machine condition. To evaluate this, the fault portion of the data is fed into the model.

Note that this data has not been trained by the training model.

In [17]:
prophet_faultydata = merged_data['2004-02-15 23:22:39':'2004-02-16 23:52:39']['Bearing 1']
prophet_faultydata.head()

prophet_faulty_test = pd.DataFrame()

prophet_faulty_test['ds'] = prophet_faultydata.index
#pd.to_datetime(prophet_healthy.index, format='%Y.%m.%d.%H.%M.%S')
prophet_faulty_test['y'] = prophet_faultydata.values

forecast = m.predict(prophet_faulty_test)
forecast['fact'] = prophet_faulty_test['y'].reset_index(drop = True)
print('Displaying Prophet plot')
fig1 = m.plot(forecast)
fig1 = prophet_faultydata.plot(figsize = (12,6),title="Fit of Test/Unseen/Fault Data")
fig1.set(xlabel="Month (MM)-Date(DD) Time", ylabel="Vibration/Acceleration(g)")
fig1.text(731626.875,0.057,'Expected/Predicted', fontsize=14, color='r')
fig1.text(731626.875,0.075,'Actual/Faulty Data', fontsize=14, color='r')
fig1.text(731624.875,0.057,'Actual/Healthy', fontsize=14, color='r')
Displaying Prophet plot
Out[17]:
Text(731624.875, 0.057, 'Actual/Healthy')

The black points are the true data points of the vibration sensor. The blue line represents the expected values from 2004-02-15, 23:42:39 with the light blue portion showing the acceptable variance.

Clearly, the values are higher than the predicted values and an alarm can be sounded.

In [18]:
# Healper functions to annotate the graph.
print(fig1.get_xticks())
print(fig1.get_yticks())
[731624. 731625. 731626. 731627. 731628.]
[0.055 0.06  0.065 0.07  0.075 0.08  0.085]
In [0]:
def calculate_mape(y_true, y_pred):
    return np.mean(np.abs((y_true - y_pred) / y_true)) * 100

def calculate_mpe(y_true, y_pred):
    return np.mean((y_true - y_pred) / y_true) * 100

def calculate_mae(y_true, y_pred):
    return np.mean(np.abs(y_true - y_pred)) * 100

def calculate_rmse(y_true, y_pred):
    return np.sqrt(np.mean((y_true - y_pred)**2))

def print_error_metrics(y_true, y_pred):
    print('MAPE: %f'%calculate_mape(y_true, y_pred))
    print('MPE: %f'%calculate_mpe(y_true, y_pred))
    print('MAE: %f'%calculate_mae(y_true, y_pred))
    print('RMSE: %f'%calculate_rmse(y_true, y_pred))
    return
In [23]:
print_error_metrics(y_true = prophet_faulty_test['y'], y_pred = forecast['yhat'])
MAPE: 12.414082
MPE: 12.339924
MAE: 0.905349
RMSE: 0.010342

Conclusion

By analysing past trends of healthy, the model learns the expected trend with acceptable variance (hyperparameter).The trained model predicts the trends for the future and if any deviation is observed, an alarm can be raised.

The same principle hold true for analysing multiple signal (multi-dimensional) at a time and creating a single metric like, the "health score" of a machine.

Using such predictive maintenace strategies, one can find the earliest stages of damage and reduce operating costs. Rather than shutting down equipment for scheduled preventive maintenance routines, maintenance can be planned to match convenient schedules and improve reliability. Predictive maintenance uses sensors, machine learning, and advanced algorithms to detect faults and predict failure. Connecting to the Industrial Internet of Things (IIoT) enables access to historical baseline data while building the statistical and trend analyses that point to why and where problems occur and what actions are needed.

In [0]:
import numpy as np
import matplotlib.pyplot as plt
import sys
from sklearn import svm
from mpl_toolkits.mplot3d import axes3d, Axes3D
In [49]:
import pandas as pd


data=merged_data['Bearing 1']
data
Out[49]:
2004-02-12 10:32:39    0.058333
2004-02-12 10:42:39    0.058995
2004-02-12 10:52:39    0.060236
2004-02-12 11:02:39    0.061455
2004-02-12 11:12:39    0.061361
                         ...   
2004-02-19 05:42:39    0.453335
2004-02-19 05:52:39    0.337583
2004-02-19 06:02:39    0.351111
2004-02-19 06:12:39    0.001857
2004-02-19 06:22:39    0.001168
Name: Bearing 1, Length: 983, dtype: float64
In [51]:
data_n = data.copy()
data_n = (data - data.min())/(data.max() - data.min())
print(data_n)
data.plot()
2004-02-12 10:32:39    0.126423
2004-02-12 10:42:39    0.127888
2004-02-12 10:52:39    0.130633
2004-02-12 11:02:39    0.133329
2004-02-12 11:12:39    0.133120
                         ...   
2004-02-19 05:42:39    1.000000
2004-02-19 05:52:39    0.744004
2004-02-19 06:02:39    0.773924
2004-02-19 06:12:39    0.001523
2004-02-19 06:22:39    0.000000
Name: Bearing 1, Length: 983, dtype: float64
Out[51]:
<matplotlib.axes._subplots.AxesSubplot at 0x7fa88daf09e8>
In [52]:
data_n = data.copy()
data_n = (data - data.min())/(data.max() - data.min())
print(data_n)
2004-02-12 10:32:39    0.126423
2004-02-12 10:42:39    0.127888
2004-02-12 10:52:39    0.130633
2004-02-12 11:02:39    0.133329
2004-02-12 11:12:39    0.133120
                         ...   
2004-02-19 05:42:39    1.000000
2004-02-19 05:52:39    0.744004
2004-02-19 06:02:39    0.773924
2004-02-19 06:12:39    0.001523
2004-02-19 06:22:39    0.000000
Name: Bearing 1, Length: 983, dtype: float64
In [53]:
dimensions = 1
data_cn = pd.concat([data_n.shift(i) for i in range(0 + dimensions + 1)], axis = 1)

print(data_cn)
                     Bearing 1  Bearing 1
2004-02-12 10:32:39   0.126423        NaN
2004-02-12 10:42:39   0.127888   0.126423
2004-02-12 10:52:39   0.130633   0.127888
2004-02-12 11:02:39   0.133329   0.130633
2004-02-12 11:12:39   0.133120   0.133329
...                        ...        ...
2004-02-19 05:42:39   1.000000   0.663860
2004-02-19 05:52:39   0.744004   1.000000
2004-02-19 06:02:39   0.773924   0.744004
2004-02-19 06:12:39   0.001523   0.773924
2004-02-19 06:22:39   0.000000   0.001523

[983 rows x 2 columns]
In [55]:
from sklearn.model_selection import train_test_split

X = data_cn.iloc[1:,1:]

y = data_cn.iloc[1:,0]

X_train, X_val, y_train, y_val = train_test_split(X, y, test_size = 0.3, shuffle = False)

X_val, X_test, y_val, y_test = train_test_split(X_val, y_val, test_size = 0.5, shuffle = False)


print(len(y_val))
print(len(y_test))
print(len(y_train))
147
148
687
In [0]:
def pso(n_particles, iterations, dimensions, inertia):
    max_c = 1e4
    min_c = 1e-3
    max_e = 1e-1
    min_e = 1e-8
    max_g = 1e3
    min_g = 1e-3
    
    x = np.random.rand(n_particles, 1)*(max_c - min_c) + min_c
    y = np.random.rand(n_particles, 1)*(max_e - min_e) + min_e
    z = np.random.rand(n_particles, 1)*(max_g - min_g) + min_g

    c = np.concatenate((x,y,z), axis=1)

    # Initializing particles' parameters
    v = np.zeros((n_particles, dimensions))
    c1 = 2
    c2 = 2
    p_best = np.zeros((n_particles, dimensions))
    p_best_val = np.zeros(n_particles) + sys.maxsize  
    g_best = np.zeros(dimensions)
    g_best_val = sys.maxsize

    best_iter = np.zeros(iterations)

    # Initializing regression variables
    p_best_RGS = np.empty((n_particles), dtype = object);
    g_best_RGS = sys.maxsize

    

    # Displaying tridimensional search space
    plot(c)

    from sklearn.metrics import mean_squared_error
    
    for i in range(iterations):

        for j in range(n_particles):
          # Starting Regression
          rgs = svm.SVR(C = c[j][0], epsilon = c[j][1], gamma = c[j][2])

          # Fitting the curve
          rgs.fit(X_train, y_train)
          y_predict = rgs.predict(X_val)

          # Using Mean Squared Error to verify prediction accuracy
          mse = mean_squared_error(y_val, y_predict) 

          # If mse value for that search point, for that particle,
          # is less than its personal best point,
          # replace personal best
          if(mse < p_best_val[j]):   # mse < p_best_val[j]
              # The value below represents the current least Mean Squared Error
              p_best_val[j] = mse
              
              p_best_RGS[j] = rgs
                           

              # The value below represents the current search coordinates for
              # the particle's current least Mean Squared Error found
              p_best[j] = c[j].copy()
              
          # Using auxiliar variable to get the index of the
          # particle that found the configuration with the 
          # minimum MSE value
          aux = np.argmin(p_best_val)        
        
          if(p_best_val[aux] < g_best_val):
              # Assigning Particle's current best MSE to the Group's best    
              g_best_val = p_best_val[aux]

              # Assigning Particle's current best configuration to the Group's best
              g_best = p_best[aux].copy()

              # Group best regressor:
              # the combination of C, Epsilon and Gamma
              # that computes the best fitting curve
              g_best_RGS = p_best_RGS[aux]

        
          rand1 = np.random.random()
          rand2 = np.random.random()

          # The variable below influences directly the particle's velocity.
          # It can either make it smaller or bigger. 
          w = inertia

          # The equation below represents Particle's velocity, which is
          # the rate of change in its position
          v[j] = w*v[j] + c1*(p_best[j] - c[j])*rand1 + c2*(g_best - c[j])*rand2

          # Change in the Particle's position 
          c[j] = c[j] + v[j]

          # Below is a series of conditions that stop the particles from
          # leaving the search space
          if(c[j][2] < min_g):
            c[j][2] = min_g
          if(c[j][2] > max_g):
            c[j][2] = max_g
          if(c[j][1] < min_e):
            c[j][1] = min_e
          if(c[j][1] > max_e):
            c[j][1] = max_e
          if(c[j][0] < min_c):
            c[j][0] = min_c
          if(c[j][0] > max_c):
            c[j][0] = max_c
            
     
        # The variable below represents the least Mean Squared Error
        # of the current iteration
        best_iter[i] = g_best_val
                
        print('Best value iteration # %d = %f\n'%(i, g_best_val))

    # Coordinates found after all the iterations
    print('Group Best configuration found: ')
    print(g_best)
    print('\n')
    print('Best Regressor:\n')
    print(g_best_RGS)
    print('\n')
    # Displaying the MSE value variation throughout the iterations
    t = range(iterations)
    plt.plot(t, best_iter, label='Fitness Value')
    plt.legend()
    plt.show()

    # Displaying Particles' final configuration
    plot(c)

    # Making the prediction with the best configuration of C, Epsilon and
    # Gamma found by the particles
    predict_test = g_best_RGS.predict(X_test)
    

    
    # Displaying actual values and predicted values for
    # Group's best configuration found overall
    print(color.BOLD + 'Predictions with the Population Best Value found:\n' + color.END)
    evaluate(predict_test)  
In [0]:
class color:
   PURPLE = '\033[95m'
   CYAN = '\033[96m'
   DARKCYAN = '\033[36m'
   BLUE = '\033[94m'
   GREEN = '\033[92m'
   YELLOW = '\033[93m'
   RED = '\033[94m'
   BOLD = '\033[1m'
   UNDERLINE = '\033[4m'
   END = '\033[94m'
In [0]:
def plot(some_list):
 
  ax = Axes3D(plt.figure())
  ax.scatter3D(some_list[:,0], some_list[:,1], some_list[:,2], cmap = 'virdis')
  ax.set_xlabel('$C$', fontsize = 15)
  ax.set_ylabel('$\epsilon$', fontsize = 15)
  ax.zaxis.set_rotate_label(False) 
  ax.set_zlabel('$\gamma$', fontsize=15, rotation = 0)
  ax.zaxis._axinfo['label']['space_factor'] = 1.0
  plt.show()

  print('\n')
  print('\n')
In [0]:
def evaluate(predictions):

    from sklearn.metrics import mean_squared_error
    import statistics as st

    predict_test = predictions

    # To un-normalize the data:
    # Multiply the values by
    # data.to_numpy().max()

    plt.plot(range(len(y_test)), y_test, label='Real')
    plt.plot(range(len(predict_test)), predict_test, label='Predicted')
    plt.legend()
    plt.show()
    
    mse = mean_squared_error(y_test, predict_test)
    print('\n')
    print('\n')
    print('Mean Squared Error for the Test Set:\t %f' %mse)
    print('\n')
    print('\n')
    print('Predictions Average:\t %f' %((predict_test.sum()/len(predict_test))))
    print('\n')
    print('\n')
    print('Predictions Median:\t %f' %(st.median(predict_test)))
    print('\n')
    print('\n')
    print('Predictions', predict_test)
In [61]:
pso(12, 10, 3, 1)



Best value iteration # 0 = 0.001956

Best value iteration # 1 = 0.000114

Best value iteration # 2 = 0.000074

Best value iteration # 3 = 0.000066

Best value iteration # 4 = 0.000066

Best value iteration # 5 = 0.000065

Best value iteration # 6 = 0.000065

Best value iteration # 7 = 0.000064

Best value iteration # 8 = 0.000064

Best value iteration # 9 = 0.000064

Group Best configuration found: 
[7.1697225e+02 1.0000000e-08 1.0000000e-03]


Best Regressor:

SVR(C=716.9722501157323, cache_size=200, coef0=0.0, degree=3, epsilon=1e-08,
    gamma=0.001, kernel='rbf', max_iter=-1, shrinking=True, tol=0.001,
    verbose=False)





Predictions with the Population Best Value found:




Mean Squared Error for the Test Set:	 0.006448




Predictions Average:	 0.315575




Predictions Median:	 0.265653




Predictions [0.24596606 0.24012802 0.24688443 0.25132741 0.25094931 0.24998393
 0.25101696 0.25412693 0.25337904 0.25478196 0.25571911 0.25429979
 0.25104923 0.26202526 0.26634648 0.265342   0.2658913  0.25913942
 0.25229434 0.24858328 0.25221247 0.25384564 0.26245793 0.25209709
 0.24851615 0.25315512 0.2479903  0.25809187 0.25542485 0.25089452
 0.24996484 0.23961617 0.23680552 0.23489416 0.23441728 0.23573482
 0.23381225 0.25517749 0.26194868 0.24951847 0.24680568 0.24925398
 0.24174698 0.23629658 0.2398075  0.24335609 0.23732837 0.23374616
 0.23783524 0.24264762 0.24357388 0.24169292 0.23974338 0.24189889
 0.25131848 0.24156551 0.2271469  0.21798463 0.21318081 0.20589699
 0.20432874 0.20253938 0.19851821 0.20178047 0.20075718 0.20129103
 0.2098368  0.21395829 0.23455466 0.24743695 0.26315384 0.27856728
 0.28676533 0.28822114 0.28882833 0.27849953 0.26655846 0.27784264
 0.28129299 0.27972916 0.30172353 0.28416633 0.27278934 0.27914065
 0.26883014 0.27885594 0.27103936 0.29064002 0.28660586 0.27895077
 0.27748489 0.26259396 0.24958373 0.26395568 0.28442541 0.27943272
 0.29711751 0.31258584 0.32557745 0.35358077 0.40462095 0.32144414
 0.31793218 0.31814093 0.27702794 0.27033162 0.28316819 0.27838332
 0.32556947 0.31277737 0.34472424 0.30645238 0.27790874 0.26541556
 0.26747672 0.29995315 0.34473555 0.3798208  0.3286391  0.3841471
 0.33352542 0.36789364 0.3490912  0.42195894 0.33229222 0.36923053
 0.43654731 0.39170636 0.39023713 0.41668647 0.49184179 0.48734983
 0.59858074 0.54242004 0.54489235 0.57509154 0.62795259 0.63986771
 0.53092718 0.70216172 0.8879071  0.75049553 0.72144268 0.64305685
 0.96558962 0.71999459 0.74871209 0.00678904]
In [0]: