Skip to content

Failure prediction for APU’s on a Metro System Research project source code

License

Notifications You must be signed in to change notification settings

aaryadevg/Metro_PdM_Research

Repository files navigation

Failure Prediction for APU's on a Metro System

Abstract

Predictive maintenance is crucial for ensuring the reliable operation of metro transportation systems, enhancing passenger safety, and minimizing service disruptions. This research focuses on the challenging task of predicting failures on the Air Processing Unit (APU) in a metro system at least two hours in advance. The APU is a critical component responsible for compressing and storing air for various metro functions, such as suspension.

The study includes a comprehensive comparison of machine learning and deep learning models, such as Support Vector Machines (SVM), Decision Trees, and Long Short-Term Memory (LSTM) networks. Evaluation is performed on the MetroPT Dataset published by Veloso et al. in 2022 Dataset.

Considering performance metrics like accuracy, precision, recall, and F1-Score for classification. This provides valuable insights into the applicability of these models in predicting impending failures.

In addition, a practical demonstration of a web API is introduced to showcase how the model would be deployed in a real-world scenario. This API serves as evidence of the feasibility of deploying predictive maintenance models in production settings.

It is important to note that while the research offers valuable insights into model performance and deployment readiness, it does not propose a final production model. This limitation is due to the complex domain knowledge required for selecting an optimal model, and to keep the paper more general since the requirements of various transportation companies may differ. Nevertheless, the findings contribute to ongoing efforts to enhance metro system reliability and safety through proactive failure prediction.

Table of Contents

Getting Started

To get started with the research paper repository, follow these steps:

  1. Clone the repository:

    git clone https://github.com/aaryadevg/Metro_PdM_Research.git
    cd Metro_PdM_Research
  2. Launch the application

  python start.py

start.py will launch both microservices, the port that the services are running on will be displayed on the terminal allowing you to launch and interact with these

Directory Structure

  • App Contains the code for the Model deployment and Admin app
  • Data Contains raw and processed data (raw data is in a file dataset_train.csv)
  • Data Cleaning Contains code used to create the optimized versions of dataset and EDA
  • ML Contains implementation and implementation and testing of the ML models
  • ML_Testingv2 Reimplementation of the LSTM Model
  • Model Weights for the trained model and Standard scaler
  • NeuralNet_ft Steps taken to optimize the Neural Network
  • runAdmin and runModel batch sripts to start the app indiviually or you can use start.py to run them all together

Prerequisites

Before running the code or replicating the experiments, make sure you have the following prerequisites installed:

Model Service Dependencies

  • FastAPI
  • PyTorch (already included in the main prerequisites)

Admin Service Dependencies

Frontend Dependencies

Displaying SQL Table Data

  • Grid.js - Used for displaying SQL table data in HTML

Usage

To replicate the results of the research paper, follow these steps:

  1. Run the Jupyter notebook for model training and evaluation:

    cd ML
    jupyter notebook Modeling.ipynb

    Execute all the cells in the Modeling.ipynb notebook to train and evaluate the machine learning models.

  2. Run the Jupyter notebook for testing with resampled data:

    cd ML_Testingv2
    jupyter notebook Resampled.ipynb

    Execute all the cells in the Resampled.ipynb notebook to perform testing with resampled data.

  3. Run the LSTM notebook for additional analysis:

    jupyter notebook LSTM2.ipynb

    Execute all the cells in the LSTM2.ipynb notebook for further analysis using Long Short-Term Memory networks.

You need to download and install Jupyter notebooks or use the Jupyter VS Code extension

Contact

Feel free to reach out to me for any questions or request for collaboration to me via aaryadevg@gmail.com

Timeline

  • Find Papers on LSTM for PdM
  • Finish Review
  • Select algorithms to compare
  • Write about the Dataset and Perform EDA
  • Make Presentation for DOT internal
  • Balance dataset
  • Implement Algorithms (SVM, Decision Tree, Random Forest, Neural Net, LSTM)
  • Test on Dataset (Evaluation)
  • Select an Approach for API (Chose a Micro service architecture)
  • Build API
  • Build Admin app
    • Display data in table
    • Search
    • Sort
    • Form to Mark Failure
    • Docker?
    • Dashboard
  • Try RUL Approach
  • Evaluate RUL
  • Finish Off Paper
  • Finish Log Book