mcmahon-lab / Physics-Aware-Training

Instructional implementation of Physics-Aware Training (PAT) with demonstrations on simulated experiments.
Creative Commons Attribution 4.0 International
283 stars 48 forks source link

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

Open Jianhong-Gao opened 1 year ago

Jianhong-Gao commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

Dear Authors:      Thank you for your response.       I am the PHD student in Fuzhou University, China.      We want to apply your work on the fault diagnosis in real-time to detect the wave-head of traveling wave in power system to change the current paradigms of fault diagnosis.      The further work would be shared with you.       By the way, if possible, I wonder if there is any chance to cooperate in writing papers after we applied your work in my research successfully? :)      

With Best Regards

Jian-Hong Gao (高健鸿) College of Electrical Engineering and Automation, Fuzhou University Address: 2, Xue-Yuan Rd., Minhou, Fuzhou, China  Mobile: +86-13685012269 WeChat: 13685012269 E-mail: @.***