Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could I establish my PNN on simulation platform such as PSCAD/EMTDC rather than a real circuit? #5

Open
Jianhong-Gao opened this issue Nov 19, 2022 · 2 comments

Comments

@Jianhong-Gao
Copy link

Hello!
Thank you for your contributions in PNN.
I am very excited to read this paper, which may be applied in my subject for fault diagnosis in power system.
I want to establish a similar PNN on the simulation software like PSCAD/EMTDC first, or have ever implement PNN in some simulation software before?

@ms3452
Copy link
Collaborator

ms3452 commented Nov 22, 2022

Hi Jianhong-Gao,
if the simulation software has a Python API, you can use our code to test the performance of PNNs using the simulation software. However, you always additionally need an auto-differentiable model of your simulation written in pytorch to use our code.

from pat import make_pat_func

def f_forward(inputs, parameters):
    # use API to simulation software
    # return outputs from simulation software

def f_backward(inputs, parameters):
    # pytorch (!) code with differential model of f
    # return outputs from differentiable model

pat_func = make_pat_func(f_forward, f_backward)

You cannot use other simulation software than pytorch in f_backward. During the work on our paper, we used non-pytorch simulation software in f_forward and built a blacbox differentiable model of these simulations using deep neural networks for f_backward. These models were conceptially much simpler than the full forward simulation. Please see the section on 'Differentiable digital models' in the 'Methods' section of our paper.

Let me know if you have further questions on this.

@Jianhong-Gao
Copy link
Author

Jianhong-Gao commented Nov 23, 2022 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants