This project implements a digital twin for a Lithium-ion battery system using AWS cloud services. It simulates IoT device data, processes it in real-time, applies machine learning for predictive analytics, and visualizes the results. The system demonstrates proficiency in cloud architecture, real-time data processing, IoT systems, and machine learning integration.
Key features:
- Real-time IoT data simulation and ingestion
- Scalable data processing pipeline
- Machine learning integration for battery life prediction
- Interactive data visualizations
- Infrastructure as Code (IaC) using Terraform
- Monitoring and logging with Amazon CloudWatch
The project utilizes a serverless architecture on AWS, leveraging the following services:
- AWS IoT Core
- Terraform for IaC
- Amazon CloudWatch
- Amazon QuickSight
- Amazon SageMaker
- Amazon Redshift
- Amazon S3
- Amazon EC2
code used to create this architecture diagram
Component | Purpose | Data Sources | Data Sent |
---|---|---|---|
IoT Devices / Data Simulator | Simulate real-time battery data | Battery sensors/ scripts to simulate sensor data | Raw battery data (voltage, current, temperature, etc.) via MQTT |
AWS IoT Core | Manage IoT device connections and data ingestion | IoT Devices/ scripts simulating IoT devices | Raw battery data to EC2 |
EC2 - Data Processor | Process and transform raw data | AWS IoT Core | Processed data to Redshift |
Amazon Redshift | Store processed data | EC2 | Processed data to QuickSight |
Amazon SageMaker | Train and host ML models | S3 (training data) | ML model predictions to EC2 |
Amazon QuickSight | Create and host data visualizations | Redshift | Visualizations to users |
Terraform | Manage infrastructure as code | N/A | Resource definitions to AWS |
Amazon CloudWatch | Monitor and log system performance | All AWS services | Alerts, logs to administrators |
in case you want to use the model directly within the EC2 instance, you can move the model.tar.gz file to your EC2 instance from the corresponding output folder of the sagemaker instance and unzip it to obtain the model.pth file
Connect the Redshift table to Quicksight to generate Real Time Visualization for Analysis and Monitoring
- Real-time data ingestion from simulated IoT devices
- Machine learning model trained on SageMaker for battery life prediction
- Data processing on EC2 instance
QuickSight dashboards provide the following visualizations:
- Real-time battery voltage, current, and temperature
- Battery capacity over time and cycle number
- Predicted vs actual capacity degradation
- Temperature distribution across battery cycles
The project uses Terraform for infrastructure as code:
- Infrastructure defined in Terraform configuration files
- Terraform provisions and manages AWS resources
- Changes to infrastructure managed through version control
- CloudWatch is used for monitoring all AWS services
- CloudWatch Alarms are set up for critical metrics (e.g., battery temperature exceeding thresholds)
- CloudWatch Logs collect logs from all services for troubleshooting
- Implement anomaly detection using Amazon SageMaker
- Add support for multiple battery types
- Implement a web-based dashboard for real-time monitoring
- Integrate with a physical battery testing setup for real-world data
- Implement containerization using Docker and container orchestration with Kubernetes
- Develop a CI/CD pipeline for automated testing and deployment
- Explore cloud-agnostic solutions for portability across different cloud providers