This study aims to Solve a real African problem unstable rural microgrids with embedded AI for real-time control.
# TinyML Microgrid Simulation
## Overview
This MATLAB script implements a comprehensive simulation of a TinyML-enabled decentralized residential microgrid. The system models household energy consumption, solar PV generation, and uses lightweight machine learning for short-term load forecasting to optimize energy balancing.
## Quick Start
1. Run `tinyml_microgrid_simulation.m` in MATLAB
2. The script will automatically generate synthetic data and train the TinyML model
3. Results will be displayed through multiple professional graphs showing:
- System behavior (load, generation, net demand)
- Prediction performance metrics
- Error analysis and correlation coefficients
## Documentation
For complete technical details, mathematical modeling, and in-depth result interpretation, please refer to the **project report PDF** available in this repository.
## Key Features
- Realistic household load modeling with daily patterns
- Solar PV generation with irradiance profiles
- TinyML-based load forecasting (6-hour horizon)
- Professional visualization and performance metrics
- Optimized for efficient execution
## Requirements
- MATLAB R2020a or later
- No additional toolboxes required
**Run the script and explore the results! The PDF report provides comprehensive analysis and context.**