An open API service indexing awesome lists of open source software.

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.

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