Skip to content

chipher-zero/CBRAM_PINN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CBRAM PINN: Physics-Informed Neural Network for Resistive RAM Device Modeling

This repository contains the implementation of a Physics-Informed Neural Network (PINN) model for predicting the behavior of Conductive Bridge Random Access Memory (CBRAM) devices. The model captures both the I-V characteristics and dynamic responses of the memristive devices, leveraging both experimental data and physical principles to improve accuracy and reliability.

Table of Contents

Introduction

This project provides a PINN framework tailored to model the switching dynamics of RRAM devices. It combines the benefits of physics-driven modeling and data-driven learning, enabling the model to generalize across different memristive devices and operational conditions.

Features:

  • Physics-Informed Neural Network (PINN) implementation for RRAM devices.
  • Predicts both static and dynamic behavior of CBRAM devices.
  • Incorporates physical principles such as drift-diffusion and thermally-assisted ion migration.
  • Scalable to various RRAM device configurations with different materials and structures.

Project Structure

The repository is structured as follows:

|-- Data_MoS2/                   # Directory containing the data files
|-- pinn_rram_model.py            # Main script containing the PINN model implementation
|-- pinn_rram_training.py         # Script for training the PINN model
|-- visualization.py              # Script for plotting and visualization of results
|-- utils.py                      # Utility functions for data preprocessing and scaling
|-- README.md                     # This README file

Installation

Prerequisites

  • Python 3.7+
  • PyTorch: Install via pip install torch
  • NumPy: Install via pip install numpy
  • Matplotlib: Install via pip install matplotlib
  • SciPy: Install via pip install scipy
  • scikit-learn: Install via pip install scikit-learn
  • Pandas: Install via pip install pandas

Clone the repository

git clone https://github.com/chipher-zero/CBRAM_PINN.git
cd pinn-rram-model

Install the dependencies

pip install -r requirements.txt

Usage

Data Preparation

Place your dataset files (in .txt or .xls format) in the Data_~Memory_Type~/ directory. Each data file should contain the following columns:

  • Time: Time of the measurement
  • AI: Current values
  • AV: Voltage values
  • Res: Resistance values (optional)

(Amend code if necessary)

Running the model

To run the model and train the PINN on the provided dataset, execute the following command:

python Memristor12_final.py

This script will train the model, track the loss, and display the I-V characteristics and other relevant metrics.

Alternatively, use the available jupyter notebook

Visualizing the Results

Visualisation is currently handled inside the main code

Dataset

The dataset files are expected to be in the Data_MoS2/ directory. Each dataset corresponds to the I-V measurements from CBRAM devices. The dataset is read using the ReadData function, which processes the data for use in the PINN model.

Training

The training script iterates through the dataset using PyTorch's DataLoader. Key features of the training loop include:

  • Combined Loss Function: Logarithmic loss for small values and MSE for large values.
  • Physics Loss: Enforces consistency with physical principles like the time evolution of the gap and filament radius.
  • Adaptive Learning Rate: Utilizes torch.optim.lr_scheduler.ReduceLROnPlateau for adaptive learning rate adjustment.

To modify the hyperparameters, edit the Memristor12_final.py or memristor12_MoS2 copy 2.ipynb script.

Model Parameters

The PINN model is defined in Memristor12_final.py. It includes key physical parameters such as:

  • Activation Energy (Ea)
  • Initial Gap Distance (gap_ini)
  • Thermal Resistance (Rth)

The forward pass of the model calculates the predicted current, temperature, and gap dynamics, while the loss function balances data-driven error and physical consistency.

Visualization

The processing_MoS2.ipynb notebook provides plots plots of:

  • I-V Characteristics: Comparison between the model’s predicted I-V curve and the experimental data.
  • Dynamic Performance Simulation: Projection of the device's operation under application of a paired-pulse bias
  • data4.txt: Contains measured pulsed data

You can adjust the plotting configurations in both .py script and notebook.

References

  1. Kleitsiotis, G., et al. "A Physics-Informed Neural Network for CBRAM Device Modelling." (2024).
  2. Kitsios, S., et al. "MoS2 Enhanced CBRAMs." (2022).
  3. Bousoulas, P., et al. "Volatile CBRAMs for Neuromorphic Computing." (2022).
  4. Jiang, Z., et al. "A Compact Model for Metal-Oxide Resistive Random Access Memory with Experiment Verification" (2016)
  5. Reuben, J., et al. "A modeling Methodology for Resistive RAM Based on Stanford-PKU Model with Extended Multilevel Capability" (2019)
  6. Li, H., et al. "Variation-Aware, Reliability-Emphasized Design and Optimization of RRAM Using SPICE Model" (2015)

About

Physics Informed Neural Network model, for CBRAM quasi-static behaviour description

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors