An intelligent VFD (Variable Frequency Drive) Fault Detection & Monitoring System powered by Machine Learning
Features • Architecture • Installation • Usage • Documentation
- Overview
- Features
- Architecture
- Fault Classification
- Machine Learning Model
- Technology Stack
- Installation
- Usage
- Project Structure
- Screenshots
- API Documentation
- Contributing
- License
- Contact
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.
- 🎯 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
- 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
- Machine learning model trained on comprehensive motor fault dataset
- Confidence score for each prediction
- Real-time waveform analysis
- Fault signature visualization
- Historical data trends and patterns
- Customizable date range filters
- System event logs with searchable interface
- Multi-format export (CSV, PDF, Image)
- Manual motor start/stop functionality
- Emergency stop mechanism
- Fault simulation for testing purposes
- Remote control capabilities
- Natural language query processing
- Fault explanation and troubleshooting
- System status information
- Voice interaction support
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
- IoT Layer: ESP32 microcontroller with sensor interfaces
- Data Processing: Real-time data normalization and feature extraction
- ML Engine: KNN-based classification model (93% accuracy)
- Backend: Python-based model serving
- Frontend: React TypeScript dashboard with real-time updates
- Simulation: MATLAB Simulink for motor behavior modeling
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 | |
| PTGF | Phase-to-Ground Fault | Phase conductor connected to ground | 🔌 Critical |
| OLF | Overload Fault | Current exceeds motor rated capacity | 🔥 Warning |
| Algorithm | Accuracy | Training Time | Inference Speed | Status |
|---|---|---|---|---|
| K-Nearest Neighbors (KNN) | 93.0% | Fast | Real-time | ✅ Deployed |
| Random Forest (RF) | 87.5% | Medium | Fast | |
| Support Vector Machine (SVM) | 85.2% | Slow | Medium | ❌ Not Used |
- Optimal Parameters (via GridSearchCV):
n_neighbors: 23weights: 'uniform'distance_metric(p): 1 (Manhattan)- Cross-validation: 10-fold KFold
| 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 |
Pipeline:
1. Load Data → 2. Handle Missing Values (SimpleImputer)
3. Label Encoding → 4. Feature Scaling (MinMaxScaler)
5. Train-Test Split (80-20) → 6. Model Training
7. Hyperparameter Tuning → 8. Evaluation- 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
- Language: Python 3.8+
- ML Libraries: scikit-learn, pandas, numpy
- Visualization: matplotlib, seaborn
- Model: KNN Classifier (93% accuracy)
- Tool: MATLAB/Simulink
- Model: VFD2.slx
- Hardware: ESP32 Microcontroller
- Communication: WiFi/Serial
- Sensors: Current sensors, Voltage sensors, Speed encoders
- Node.js 18+ and npm/yarn
- Python 3.8+
- MATLAB R2020a+ (for simulation)
- ESP32 Development Board
# 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 buildThe frontend will be available at http://localhost:5173
# 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% Open MATLAB
% Navigate to MATLAB directory
cd MATLAB
% Open Simulink model
open VFD2.slx
% Run simulation
sim('VFD2')-
Start the Frontend:
cd Frontend npm run dev -
Access Dashboard: Open
http://localhost:5173in your browser -
Navigate Pages:
- Dashboard: Real-time monitoring
- Fault Diagnosis: AI-based fault classification
- Analytics: Historical data analysis
- Controls: Manual system control
- Admin: Settings and configuration
# 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}%")- "What is the current fault?"
- "Show motor status"
- "Explain UVF fault"
- "Show last 5 alerts"
- "What is the ML model?"
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
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"
}Contributions are welcome! Please follow these steps:
- Fork the repository
- Create a feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow TypeScript/React best practices
- Write meaningful commit messages
- Add comments for complex logic
- Test thoroughly before submitting PR
- Update documentation as needed
This project is licensed under the MIT License - see the LICENSE file for details.
Yashodip More
- GitHub: @yashodipmore
- Project Link: https://github.com/yashodipmore/Motix-AI
- 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
Made with ❤️ for Industrial Automation & Predictive Maintenance
⭐ Star this repo if you find it helpful!