Coder Social home page Coder Social logo

cwru-sdle / graphfoundationmodels Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 1.0 97 KB

Code and demos for contructing Data-Driven Digital Twins of Photovoltaic & Advanced Manufacturing systems

Home Page: https://mds3-coe.com/

License: BSD 2-Clause "Simplified" License

Python 61.72% Jupyter Notebook 38.28%
advanced-manufacturing data-driven digital-twin foundation-models graphs machine-learning photovoltaics st-gnn

graphfoundationmodels's Introduction

graphfoundationmodels

Data-driven Digital Twins: Generalized Foundation Models for Fleet Level System Performance Prediction, Advanced Manufacturing Tool and Part Qualification, Conformance, and Lifetime

Abstract

Digital twins are comprised of computational models that mimic the 'as built' characteristics of devices, systems, and networks of systems whose performance in the real world warrants quantitative and critical assessment. The literature on constructing digital twins is historically focused around task-specific, physics-based models that seek to understand the device from first principles, thereby constructing an idealized understanding of the system. However, these ``empirical digital twins" (eDT) can be quite difficult to construct, as the level of detail required to accurately model the complex physics of many devices is often missing or expensive to obtain, especially for systems with widespread deployment. Additionally, eDTs generally assume the device is working as intended; in practice, many systems experience some form of derating or degradation that causes them to operate off-specification. As it is often the goal of a digital twin model to quantify these departures from the idealized system, it is quite difficult to separate derated assumptions from the expected model output. In contrast, data-driven digital twins (ddDT) seek to model the system as it actually is based on real observations about the device in question. Additionally, ddDTs generally utilize a flexible model architecture (typically an artificial neural network) to avoid injecting implicit bias into the system. This flexibility also lends itself to another advantage: modularity. Digital twins are often utilized to answer multiple different questions about the system. With a ddDT, it is possible to train the model in a self-supervised manner via a reconstruction objective in order to obtain an encoder module. This module can then be used as a Foundation Model (FM) for different tasks without either constructing a entirely new task-specific eDT or training another ddDT from scratch. This work presents a unified pipeline for constructing data-driven Foundation Models for three exemplifying cases: solar photovoltaic fleets, direct ink write additive manufacturing, and laser powder bed fusion. Although these three systems are conceptually very different, the presented Foundation Model utilizes the flexibility of spatiotemporal graph neural networks (st-GNNs) to apply the same methodology to each case, allowing scientists to focus on their scientific objectives rather than troubleshooting a overwhelmingly detailed modeling pipeline.

Downloading data

You can download the data used in this work from OSF with the util module of this package. For example, to download a PV site:

from graphfoundationmodels.util.io import OSF_download
OSF_download(0, 'downloaded_test.csv', './')

graphfoundationmodels's People

Contributors

bgpierc avatar rxw497 avatar surajkmr4218 avatar weiqiy93 avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

surajkmr4218

graphfoundationmodels's Issues

The DIW dataloader should be more general

Currently, the DIW dataloader is somewhat hard-coded. The PV dataloader is more flexible, and allows you to specify column names at runtime.

For example, the DIW dataloader currently selects columns to be removed and considered:


        target_cols = ['X_Pos_Error', 'Y_Pos_Error', 'Z_Pos_Error']

        all_cols = df.columns.tolist()
        #remove_cols = ['Time', 'node_id', 'delta_X_Pos', 'delta_Y_Pos', 'delta_Z_Pos']
        remove_cols = ['Time', 'node_id', 'delta_X_Pos', 'delta_Y_Pos',
                       'delta_Z_Pos', 'folder.id', 'layer.num', 'shape', 
                       'on.off', 'velocity', 'z_height', 'acceleration']
        predictor_cols = [col for col in all_cols if col not in target_cols + remove_cols]

A good improvement would be to specify these columns as an input to the dataloader in the init function

On newer versions of pandas, the DIW dataloader fails to pivot_table

On older pandas versions, pivot_table would skip non-numeric columns; this behavior was removed in newer versions. Instead, agg functions must be specified manually.

This concerns the DIW dataloader in graphfoundationmodels.dataloaders.dataloader_DIW.DIWDataset

# throws an error on newer pandas versions
df_pivot = df.pivot_table(index='Timestep', columns='node_id', values=all_cols)

A fix will specify a proper aggregation function like so:

agg_funcs = {col: 'mean' for col in all_cols}  # 'mean' can be changed as required

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.