Analytics ‐ Fall 2023 Work - GeorgiaTech-DDI/makerspace_iot GitHub Wiki
Fall 2023 Work
Goals
There were 3 goals that were outlined for this project and over the course of the semester:
- Predictive Maintenance: Forecast blade wear and anticipate blade replacement needs proactively.
- Anomaly Detection: Identify irregularities in saw behavior during operation or over time.
- Usage Monitoring: Monitor machine usage, track operational hours per day, determine blade lifespan, and facilitate manual blade replacement by PIs.
Approach
This is an approach that was developed in the Fall 2023 Semester to implement RUL (Remaining Useful Life) in Predictive Maintenance. The only issue was that an algorithm to detect when interval states wasn't developed until the end of the semester.
- Data Normalization – Normalize data to a 0-1 range using the min-max algorithm for equalizing values.
- Moving Average – Apply a moving average to smooth data points.
- Variance Calculation – Calculate variance of the moving average to filter out outliers affecting Remaining Useful Life (RUL) calculation.
- Derivative Calculation / Interval Generation – Derive the moving average, identify critical points, and determine trends (increasing, decreasing, constant) based on a set threshold.
- Stratification – Group data into intervals (rest, acceleration, operation, deceleration) based on known states from the previous step.
- Regression Calculation – Running regression on interval states, compare standard deviations, and calculate RUL by measuring distance from a predefined error threshold.
Implementation
Only Usage Monitoring was successfully implemented during Fall 2023 Semester.
1. Import all required modules & load dataset
import matplotlib.pyplot as plt
import pandas as pd
data = '/content/10-31-23-Disc-Sander.csv' # data_file
df = pd.read_csv(data)
time = "timestamp" # timestamp column
data = "ACC X" # data column
2. Shift All Values by Average
shift_value = df[data].mean()
df[data] = df[data] - shift_value
3. Convert to Absolute Value
df[data] = df[data].abs()
4. Normalize
def min_max(x):
normal_x = (x-df[data].min())/(df[data].max()-df[data].min())
return normal_x
df[data] = df[data].apply(min_max)
5. Moving Average
df['SMA'] = df[data].rolling(20).mean() # Some value between 10 - 30 is acceptable
6. Threshold
def threshold(x):
if x >= 0.015:
return True
else:
return False
df["Usage"] = df["SMA"].apply(threshold)
7. For Loop to get number of seconds – uptime of machine
print("Seconds in operation: " + str(df['Usage'].value_counts()[True] * 0.1))
Future Work (To Be Completed)
The Usage Monitoring based on the very limited dataset and setting has a 91% accuracy meaning it's meaning 9% of the data. Ideally, in the Spring 2024 semester, this method will be refined to have near 100% accuracy and then the algorithm for predicative maintenance can be further developed. Furthermore, the script above should be converted into a function that can get called.