Skip to content

Motix AI – Smart Fault Diagnosis for Electric Drives Motix AI is an ML-powered system for real-time fault detection in electric drives. It analyzes sensor data, predicts failures, and provides smart alerts to prevent downtime. Featuring AI-driven insights, a web dashboard, and automated maintenance recommendations.

Notifications You must be signed in to change notification settings

yashodipmore/Motix-AI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔌 Motix-AI

Motix-AI Banner Python React TypeScript License

An intelligent VFD (Variable Frequency Drive) Fault Detection & Monitoring System powered by Machine Learning

FeaturesArchitectureInstallationUsageDocumentation


📋 Table of Contents


🌟 Overview

Motix-AI is a comprehensive IoT and AI-powered solution designed for real-time monitoring and fault diagnosis of Variable Frequency Drives (VFD) in industrial motor systems. The project combines machine learning algorithms, MATLAB simulations, and a modern web dashboard to provide predictive maintenance capabilities and enhance operational safety.

Key Highlights

  • 🎯 93% Accuracy in fault detection using K-Nearest Neighbors (KNN)
  • Real-time Monitoring of motor parameters (current, voltage, speed)
  • 🤖 AI-Powered Chatbot (MOTOBOT) for instant assistance
  • 📊 6 Fault Types classification (NOM, UVF, OVF, PTPF, PTGF, OLF)
  • 🔄 ESP32 Integration for IoT sensor data collection
  • 📈 Historical Analytics with export capabilities
  • 🎨 Modern UI/UX with dark mode support
  • 🚨 Emergency Controls for immediate safety response

✨ Features

🔍 Real-Time Monitoring

  • Live sensor data visualization (3-phase currents, voltage, motor speed)
  • Interactive gauges and charts using Recharts
  • System uptime and connection status tracking
  • Responsive alerts for critical conditions

🧠 AI-Based Fault Diagnosis

  • Machine learning model trained on comprehensive motor fault dataset
  • Confidence score for each prediction
  • Real-time waveform analysis
  • Fault signature visualization

📊 Advanced Analytics

  • Historical data trends and patterns
  • Customizable date range filters
  • System event logs with searchable interface
  • Multi-format export (CSV, PDF, Image)

🎮 System Controls

  • Manual motor start/stop functionality
  • Emergency stop mechanism
  • Fault simulation for testing purposes
  • Remote control capabilities

💬 Intelligent Chatbot

  • Natural language query processing
  • Fault explanation and troubleshooting
  • System status information
  • Voice interaction support

🏗️ Architecture

graph TB
    A[ESP32 IoT Device] --> B[Sensor Data Collection]
    B --> C[Data Processing]
    C --> D[ML Model - KNN 93%]
    D --> E[Fault Classification]
    E --> F[React Dashboard]
    F --> G[User Interface]
    
    H[MATLAB Simulation] --> C
    I[Historical Database] --> F
    
    style D fill:#4CAF50
    style F fill:#2196F3
    style A fill:#FF9800
Loading

Components

  1. IoT Layer: ESP32 microcontroller with sensor interfaces
  2. Data Processing: Real-time data normalization and feature extraction
  3. ML Engine: KNN-based classification model (93% accuracy)
  4. Backend: Python-based model serving
  5. Frontend: React TypeScript dashboard with real-time updates
  6. Simulation: MATLAB Simulink for motor behavior modeling

⚠️ Fault Classification

Motix-AI detects and classifies 6 types of motor faults:

Fault Code Fault Type Description Severity
NOM Normal Operation System functioning within normal parameters ✅ Info
UVF Under Voltage Fault Supply voltage below acceptable threshold (<380V) ⚡ Warning
OVF Over Voltage Fault Voltage exceeds safe operating limits (>450V) 🔺 Critical
PTPF Phase-to-Phase Fault Short circuit between motor phases ⚠️ Critical
PTGF Phase-to-Ground Fault Phase conductor connected to ground 🔌 Critical
OLF Overload Fault Current exceeds motor rated capacity 🔥 Warning

🤖 Machine Learning Model

Model Performance Comparison

Algorithm Accuracy Training Time Inference Speed Status
K-Nearest Neighbors (KNN) 93.0% Fast Real-time Deployed
Random Forest (RF) 87.5% Medium Fast ⚠️ Backup
Support Vector Machine (SVM) 85.2% Slow Medium ❌ Not Used

KNN Model Specifications

  • Optimal Parameters (via GridSearchCV):
    • n_neighbors: 23
    • weights: 'uniform'
    • distance_metric (p): 1 (Manhattan)
    • Cross-validation: 10-fold KFold

Features Used

Feature Description Unit Range
Ia Phase A Current Amperes 0-20A
Ib Phase B Current Amperes 0-20A
Ic Phase C Current Amperes 0-20A
Vab Line-to-Line Voltage Volts 380-450V
Speed Motor Rotational Speed rad/s 0-2000
k Proportionality Constant - Variable

Data Preprocessing Pipeline

Pipeline:
  1. Load Data2. Handle Missing Values (SimpleImputer)
  3. Label Encoding4. Feature Scaling (MinMaxScaler)
  5. Train-Test Split (80-20) → 6. Model Training
  7. Hyperparameter Tuning8. Evaluation

🛠️ Technology Stack

Frontend

  • Framework: React 18.3.1
  • Language: TypeScript 5.5.3
  • Build Tool: Vite 5.4.2
  • Styling: TailwindCSS 3.4.1
  • Routing: React Router DOM 7.7.0
  • Charts: Recharts 3.1.0
  • Icons: Lucide React 0.344.0
  • UI Components: Headless UI 2.2.4

Backend & ML

  • Language: Python 3.8+
  • ML Libraries: scikit-learn, pandas, numpy
  • Visualization: matplotlib, seaborn
  • Model: KNN Classifier (93% accuracy)

Simulation

  • Tool: MATLAB/Simulink
  • Model: VFD2.slx

IoT

  • Hardware: ESP32 Microcontroller
  • Communication: WiFi/Serial
  • Sensors: Current sensors, Voltage sensors, Speed encoders

📦 Installation

Prerequisites

  • Node.js 18+ and npm/yarn
  • Python 3.8+
  • MATLAB R2020a+ (for simulation)
  • ESP32 Development Board

Frontend Setup

# Clone the repository
git clone https://github.com/yashodipmore/Motix-AI.git
cd Motix-AI

# Navigate to Frontend directory
cd Frontend

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

The frontend will be available at http://localhost:5173

Machine Learning Model Setup

# Navigate to project root
cd Motix-AI

# Install Python dependencies
pip install pandas numpy scikit-learn matplotlib seaborn

# Open Jupyter Notebook
jupyter notebook "ML Model.ipynb"

# Run all cells to train the model

MATLAB Simulation

% Open MATLAB
% Navigate to MATLAB directory
cd MATLAB

% Open Simulink model
open VFD2.slx

% Run simulation
sim('VFD2')

🚀 Usage

Starting the Dashboard

  1. Start the Frontend:

    cd Frontend
    npm run dev
  2. Access Dashboard: Open http://localhost:5173 in your browser

  3. Navigate Pages:

    • Dashboard: Real-time monitoring
    • Fault Diagnosis: AI-based fault classification
    • Analytics: Historical data analysis
    • Controls: Manual system control
    • Admin: Settings and configuration

Using the ML Model

# Load trained model
import pickle
model = pickle.load(open('model_v3.pkl', 'rb'))

# Prepare input features
features = [[Ia, Ib, Ic, Vab, Speed, k]]

# Predict fault type
prediction = model.predict(features)
confidence = model.predict_proba(features).max()

print(f"Predicted Fault: {prediction[0]}")
print(f"Confidence: {confidence * 100:.2f}%")

Chatbot Commands

  • "What is the current fault?"
  • "Show motor status"
  • "Explain UVF fault"
  • "Show last 5 alerts"
  • "What is the ML model?"

📁 Project Structure

Motix-AI/
├── Frontend/                 # React TypeScript Dashboard
│   ├── src/
│   │   ├── components/      # Reusable UI components
│   │   │   ├── Badge.tsx
│   │   │   ├── Card.tsx
│   │   │   ├── ChatBot.tsx
│   │   │   ├── Gauge.tsx
│   │   │   └── Layout.tsx
│   │   ├── contexts/        # React context providers
│   │   │   └── ThemeContext.tsx
│   │   ├── pages/           # Main application pages
│   │   │   ├── Dashboard.tsx
│   │   │   ├── FaultDiagnosis.tsx
│   │   │   ├── Analytics.tsx
│   │   │   ├── Controls.tsx
│   │   │   └── Admin.tsx
│   │   ├── App.tsx          # Main app component
│   │   └── main.tsx         # Entry point
│   ├── package.json         # Dependencies
│   └── vite.config.ts       # Vite configuration
├── MATLAB/                   # Simulation files
│   ├── VFD2.slx             # Simulink model
│   └── vfd.pdf              # Documentation
├── Models/                   # ML models and notebooks
│   └── FYP - Code.ipynb     # Training notebook
├── data/                     # Dataset
│   └── All Data.xlsx        # Motor fault dataset
├── ML Model.ipynb           # Main ML notebook
└── README.md                # Project documentation

📸 Screenshots

Dashboard - Real-Time Monitoring

Dashboard

Fault Diagnosis - AI Classification

Fault Diagnosis

Analytics - Historical Data

Analytics

Chatbot - MOTOBOT Assistant

Chatbot


📚 API Documentation

Model Prediction Endpoint

POST /api/predict
Content-Type: application/json

Request Body:
{
  "ia": 12.5,
  "ib": 12.3,
  "ic": 12.7,
  "vab": 415.2,
  "speed": 1450,
  "k": 0.85
}

Response:
{
  "fault_type": "PTPF",
  "confidence": 93.21,
  "description": "Phase-to-Phase Short Circuit detected",
  "severity": "Critical",
  "timestamp": "2025-10-19T10:30:00Z"
}

🤝 Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Development Guidelines

  • Follow TypeScript/React best practices
  • Write meaningful commit messages
  • Add comments for complex logic
  • Test thoroughly before submitting PR
  • Update documentation as needed

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


👨‍💻 Contact

Yashodip More


🙏 Acknowledgments

  • Dataset contributors and industrial motor research community
  • Open-source libraries: scikit-learn, React, TailwindCSS
  • MATLAB Simulink for motor modeling capabilities
  • ESP32 community for IoT support

📊 Project Statistics

GitHub stars GitHub forks GitHub watchers


Made with ❤️ for Industrial Automation & Predictive Maintenance

⭐ Star this repo if you find it helpful!

About

Motix AI – Smart Fault Diagnosis for Electric Drives Motix AI is an ML-powered system for real-time fault detection in electric drives. It analyzes sensor data, predicts failures, and provides smart alerts to prevent downtime. Featuring AI-driven insights, a web dashboard, and automated maintenance recommendations.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published