Physics informed Neural Network

9 ビュー (過去 30 日間)
Sankarganesh P
Sankarganesh P 2023 年 7 月 11 日
コメント済み: Sankarganesh P 2023 年 7 月 27 日
Dear Matlab Community Members,
i would like to apply my equations in physics-informed neural networks, so i reffered solving Burger's equation L-BFGS method. For example i would like to apply 1D equation
d^u/dt=(d^2g/dx^2)-d^4u/dx^4; where g=2*u*(1-u)*(1-2*u) with
u(x=0,t)=0, u(x=1,t)=0 and
u(t=0,x)=sin(4*pi*x/L)
Model Loss Function
%%%%%%%%%%%%%%%%%%%%%%%%%%%%
U = model(parameters,X,T);
G=2.*U.*(1-U).*(1-2.*U);
gradientsG = dlgradient(sum(G,"all"),{X,T},EnableHigherDerivatives=true);
Gx = gradientsG{1};
Gxx = dlgradient(sum(Gx,"all"),X,EnableHigherDerivatives=true);
gradientsU = dlgradient(sum(U,"all"),{X,T},EnableHigherDerivatives=true);
Ux = gradientsU{1};
Ut = gradientsU{2};
Uxx = dlgradient(sum(Ux,"all"),X,EnableHigherDerivatives=true);
Uxxx = dlgradient(sum(Uxx,"all"),X,EnableHigherDerivatives=true);
Uxxxx = dlgradient(sum(Uxxx,"all"),X,EnableHigherDerivatives=true);
f=Ut-Gxx+2.*Uxxxx;
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
i have made the above changes in the code...but i didnt get any expected results....can u please help me with this...?
  4 件のコメント
Ben
Ben 2023 年 7 月 26 日
@Sankarganesh P I notice that your ODE is
but the model loss function uses 2.*Uxxxx. That seems like an issue at first glance.
Otherwise your model loss function looks as expected to me. Do you get good training losses?
Of course a small training loss only means the network is "nearly" solving the ODE at the training points - for complex ODEs/PDEs this may only give weak approximations to the true solution in general.
Sankarganesh P
Sankarganesh P 2023 年 7 月 27 日
@Ben Thankz for the correction. i will try now... is it possible to use this LBFGS for 2D problems like d^2T/dx^2+d^2T/dy^2=DT/dt..?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeSequence and Numeric Feature Data Workflows についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by