Skip to content

Repository files navigation

# Power Grid Analysis Dashboard ⚡ An intelligent ML-powered dashboard for power grid analysis, featuring stability prediction, load forecasting, and anomaly detection. ## 🚀 Features - **Grid Stability Classification**: Predict whether the power grid is stable or unstable - **Load Demand Prediction**: Forecast power load based on grid parameters - **Anomaly Detection**: Identify abnormal patterns in grid readings - **Interactive Dashboard**: Real-time visualizations and insights - **Automated Reporting**: Downloadable analysis reports ## 🛠️ Technology Stack - **Backend**: Python, Scikit-learn, XGBoost - **Frontend**: Streamlit - **Visualization**: Plotly, Matplotlib, Seaborn - **Data Processing**: Pandas, NumPy ## 📦 Installation 1. Clone the repository or download the files 2. Install dependencies: ```bash pip install -r requirements.txt ``` ## 🎯 Usage 1. **Start the application**: ```bash python -m streamlit run app.py ``` 2. **Load Data**: - Use the sample data generator, or - Upload your own CSV file with columns: Voltage, Current, Frequency, Power_Factor, Load, Phase_Angle, Stability 3. **Train Models**: - Click "Train ML Models" to process the data - Models are automatically saved for future use 4. **Analyze Results**: - View interactive visualizations - Check performance metrics - Read automated insights - Download analysis report ## 📊 Data Format The system expects CSV data with the following columns: | Column | Description | Unit | |--------|-------------|------| | Voltage | Grid voltage | V | | Current | Grid current | A | | Frequency | Grid frequency | Hz | | Power_Factor | Power factor | 0-1 | | Load | Power load | kW | | Phase_Angle | Phase angle | degrees | | Stability | Stability label | 0/1 | ## 🤖 ML Models 1. **Stability Classification**: RandomForestClassifier 2. **Load Prediction**: RandomForestRegressor 3. **Anomaly Detection**: IsolationForest ## 📈 Metrics - **Classification**: Accuracy, F1-Score, Confusion Matrix - **Regression**: RMSE, MAE, R² Score - **Anomaly Detection**: Anomaly percentage, Detection scores ## 🔧 Project Structure ``` power-grid-analysis/ ├── app.py # Streamlit dashboard ├── ml_engine.py # ML models and training ├── data_generator.py # Synthetic data generation ├── requirements.txt # Dependencies ├── models/ # Saved ML models └── README.md # Documentation ``` ## 🎨 Dashboard Features - **Status Indicators**: Real-time system status - **Data Summary**: Dataset statistics and preview - **Visualizations**: Interactive plots and charts - **Performance Metrics**: Model accuracy and scores - **Automated Insights**: AI-generated analysis - **Report Export**: Downloadable markdown reports ## 🚀 Getting Started The easiest way to start is with sample data: 1. Run `streamlit run app.py` 2. Click "Generate Sample Data" in the sidebar 3. Click "Train ML Models" 4. Explore the analysis results! ## 📝 License This project is open source and available under the MIT License. ## 🤝 Contributing Contributions are welcome! Please feel free to submit issues and enhancement requests.# Power-Grid-Analysis-Using-Machine-Learning # Power-Grid-Analysis-Dashboard-using-TinyML

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages