https://github.com/pilotaxis/blockchain-based-portable-ev-charging-system
A portable EV charger modeled in MATLAB/Simulink integrates IoT monitoring and blockchain for secure energy transactions. It records charging data like SOC, voltage, current, and cost as tamper-proof blockchain blocks, ensuring transparency. A MATLAB dashboard visualizes live data and validates blockchain integrity for smart EV charging.
https://github.com/pilotaxis/blockchain-based-portable-ev-charging-system
blockchain iot matlab simulink
Last synced: 2 days ago
JSON representation
A portable EV charger modeled in MATLAB/Simulink integrates IoT monitoring and blockchain for secure energy transactions. It records charging data like SOC, voltage, current, and cost as tamper-proof blockchain blocks, ensuring transparency. A MATLAB dashboard visualizes live data and validates blockchain integrity for smart EV charging.
- Host: GitHub
- URL: https://github.com/pilotaxis/blockchain-based-portable-ev-charging-system
- Owner: PilotAxis
- License: mit
- Created: 2025-10-14T14:37:42.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2026-05-25T11:59:54.000Z (about 1 month ago)
- Last Synced: 2026-05-25T13:34:33.090Z (about 1 month ago)
- Topics: blockchain, iot, matlab, simulink
- Language: Python
- Homepage:
- Size: 606 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ Blockchain-Enabled Portable EV Charger
### Real-Time IoT Monitoring | Blockchain Ledger | Streamlit Visualization
---
## ๐ Introduction
This project presents a **Blockchain-Enabled Portable Electric Vehicle (EV) Charger** that ensures **secure, transparent, and real-time monitoring** of the charging process.
The system integrates **MATLAB/Simulink** for charger modeling and control, **Blockchain** for transaction security, and a **Streamlit-based web dashboard** for live visualization.
The goal is to create a **smart, portable, and tamper-proof EV charging system** capable of recording every energy transaction with transparency โ essential for modern e-mobility infrastructure.
---
## โ๏ธ System Overview
The project consists of three integrated layers:
| Layer | Description |
|--------|--------------|
| ๐งฉ **1. MATLAB/Simulink Layer** | Simulates the EV charging operation, logs real-time parameters such as voltage, current, energy, SOC, and cost. |
| ๐ **2. Blockchain Layer** | Converts each charge session into a secure transaction, forming a blockchain ledger (`LiveLedger.csv`) with hash links to prevent tampering. |
| ๐ป **3. Streamlit Dashboard** | Displays live charger metrics, plots, SOC %, energy, cost, and verifies blockchain integrity in real time. |
---
## ๐ง Key Features
- **Portable EV Charger Simulation** using MATLAB/Simulink.
- **Secure Blockchain Ledger** with SHA-256 transaction hashing.
- **Real-Time Dashboard** built with Streamlit for live monitoring.
- **SOC, Energy & Cost Calculation** based on dynamic charge parameters.
- **Cross-Platform**: Works on Windows, macOS, or Linux.
- **Auto-Refresh Visualization** with blockchain integrity validation.
---
## ๐งพ Project Working
1. **Simulation**
- Run the `server_listener.m` and then the Simulink model of the portable EV charger.
- Then, run the `BasicData.m` to log basic parameters in the workspace.
- Key parameters (`Vout`, `Iout`, `SOC`, `Energy`, `Cost`) are logged to the workspace as Timeseries variables.
2. **Transaction Assembly**
- Run `transactions.m` to convert logs into blockchain-formatted data.
- The script generates:
- `Transactions.mat` โ MATLAB structured data.
- Along this, open `addBlock.m` script and then run the file `build_blockchain_ledger.m`.
- `build_blockchain_ledger.m` creates ledger records.
- Finally, run the `create_csv_for_streamlit.m` file to successfully generate csv file containing dashboard parameters.
3. **Visualization**
- Launch the dashboard using:
```bash
python3 -m streamlit run ev_streamlit_dashboard.py
```
- View live metrics (SOC, power, cost) and blockchain status updates in the browser.
4. **Integrity Verification**
- Each ledger entry is validated via hash links (`PrevHash`, `Hash`).
- Any manual modification breaks integrity โ shown as **"Blockchain Integrity FAILED"** on dashboard.
---
## ๐งฐ Tools & Technologies
| Software / Library | Purpose |
|---------------------|----------|
| MATLAB / Simulink | Charger modeling, logging |
| Python | Dashboard backend |
| Streamlit | Live visualization |
| Pandas | Data processing |
| Matplotlib | Plot rendering |
| SHA-256 | Blockchain hashing |
---
## ๐ฅ Authors
**Mohammed Ahmed Majid**
Department of Electrical Engineering
Zakir Husain College of Engineering & Technology
Aligarh Muslim University (AMU)
Project submitted for:
MathWorks MATLAB & Simulink Challenge 2025