Predictive maintenance represents a transformative approach to equipment maintenance, leveraging data and advanced analytics to anticipate and prevent equipment failures. Unlike traditional reactive maintenance, which addresses issues post-failure, or preventive maintenance, which operates on a fixed schedule, Predictive maintenance uses real-time data to predict issues before they disrupt operations.
This project focuses on developing a predictive maintenance model that utilizes sensor data and machine learning algorithms to forecast equipment failures.
Through this project, we aim to demonstrate the effectiveness of predictive maintenance in enhancing operational efficiency and reliability, ultimately leading to significant cost savings and improved productivity.
UDI:
- A unique identifier for each piece of equipment or device being monitored.
Product ID:
- A unique identifier for the specific product or batch being produced or maintained.
Type:
- The type or category of equipment being monitored, which could indicate the model or function of the machinery.
Air temperature:
- The temperature of the air surrounding the equipment, measured in Kelvin (K).
Process temperature:
- The temperature within the equipment during the operation process, measured in Kelvin (K).
Rotational speed:
- The speed at which a part of the equipment is rotating, measured in revolutions per minute (rpm).
Torque:
- The rotational force applied to the equipment, measured in Newton meters (Nm).
Tool wear:
- The amount of time (in minutes) that the tool has been in use, indicating its wear level.
Target:
- A binary indicator showing whether a failure has occurred (1) or not (0).
Failure Type:
- A categorical variable describing the type of failure that occurred, if any. This could include various failure modes such as mechanical failure, electrical failure, etc.
In predictive maintenance project, we trained various machine learning models to predict equipment failures based on historical data. The models used include Random Forest, Support Vector Machine (SVM), K-Nearest Neighbors (KNN), Logistic Regression, and XGBoost.
XGBoost was selected as the primary model for predictive maintenance project due to several compelling reasons:
-
Performance:
-
Robustness:
-
Flexibility:
-
Scalability:
-
Interpretability:
Model Placement: Pre-trained machine learning model (xgb_model.pkl) is placed in the same directory as the Flask application script (app.py).
-
Dependency Installation: Flask and other required dependencies need to be installed.
-
Running the Application: Execute the Flask application script (app.py). This will start the Flask web server locally.
-
Accessing the Web Interface: Once the Flask application is running, can access the web interface by navigating to http://localhost:5000 in your web browser.
Containerization with Docker allows us to package our predictive maintenance application along with its dependencies into a standardized unit called a container. This enables us to run the application seamlessly across different environments without worrying about compatibility issues.
-
Amazon EC2 Setup:
- Sign in to the AWS Management Console
- Launch a new EC2 instance with Ubuntu Server
-
Connect to the EC2 Instance:
- Use SSH to connect to your EC2 instance from local machine.
- Can find the public IP address of instance in the EC2 dashboard.
-
Transfer Files:
- Transfer project files, including the Flask application script (app.py), the pre-trained model file (xgb_model.pkl),requirement file, frontend file (index.html), to the EC2 instance using SCP or SFTP.
-
Install Docker:
- Install Docker on your EC2 instance to containerize application and manage dependencies efficiently.
-
Containerize with Docker:
- Create a Dockerfile in the project directory to define application's environment and dependencies.
- Build a Docker image and run a Docker container on EC2 instance using the same steps as described earlier.
-
Access the Application:
- Once the Docker container is running on your EC2 instance, access Flask application through the public IP address or domain name of the instance.