-
-
Notifications
You must be signed in to change notification settings - Fork 200
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
Problem in replicating INVERSE PROBELM tutorial on ODE #765
Comments
It should be @named ode_system = NeuralPDE.ODESystem(eqs, t, [T_in(t), T_ext(t), Q_heating(t), Q_cooling(t), Q_sun(t), Q_lights(t), Q_equipment(t)], [R, C, Cs])
|
@sathvikbhagavan That solved only that line of code, the script still not working.
|
Yes, I am not sure what exactly are you trying to solve here. Can you elaborate? One way might be to use |
@sathvikbhagavan I kneed to discover unknown parameter of an ODE, I was thinking to use the
where |
@LorenzoBottaccioli you could set the ODE eqs as a PDEsystem(0 instead of an ODESystem() in your code and have an appropriate additional loss function for parameter estimation in this case, refer Docs. |
@LorenzoBottaccioli, is it necessary for you to use a PINN? Looking at your problem statement, it seems to be a simple optimization problem for finding parameters. Is there a reason you want to train a PINN as well? |
@sathvikbhagavan I need an NN to make predictions, this is way I wanted to use a PINN. But I don't have the parameters of the ODE so I need to find them and I was trying to do the things together.
Here the error:
|
@LorenzoBottaccioli try using this(ive just passed the additional loss funciton in PhysicsInformedNN() and formatted the code), the error is mostly due to some wrong argument being passed |
@AstitvaAggarwal thanks for your help. I dont get how I could solve the error of |
@LorenzoBottaccioli You are mostly defining the additional loss function incorrectly. (something like below from tutorial)
also Q_heating_data etc after T_ext_data are all zero datavectors. |
@AstitvaAggarwal still I'm not understanding the tutorial at least for me it is not very clear and explanatory. The other data are zeros I know. The case study is shoebox building that is running in free-float, hence no heating or cooling so far and no people inside, just solar radiation as gain. What I'm not getting in general is how I pass the data from T_et of any other feature to the PINN problem. |
@AstitvaAggarwal @sathvikbhagavan I have re-arranged the code in a more comprehensive way but I get a new error. Can you help me in solving it?
I get the following error. What I still don't understand is when and how I should use the data I have loaded.
|
hey, sorry got busy with some other work. taking a look at this now. also while your at it why not join our slack? link , make sure to join the sciml-bridged channel. |
hey @LorenzoBottaccioli im confused about your problem formulation, you have mentioned indvars=[t,T_ext,Q_heating,Q_cooling,Q_sun,Q_lights,Q_equipment] |
@LorenzoBottaccioli this works for me, ive also reformulated the code as mentioned above.
|
@AstitvaAggarwal tnx. There are few things I don't get:
|
1> using chains you could train it not only at the timepoints in dataset but also on other timepoints in the domain of t. also you were taking the rest at dependant variables on t so learning that variable made sense to me. |
@AstitvaAggarwal I tried to explain the objective better. The goal is to predict I have tried to review the code you provided to work as I mentioned above but I get an error related to the dimension that is due to the presence of the unknown parameter.
Then I got
|
okay, did some minor changes to your new code and it works but ive made T_in chain input as 1 dim as that only depends on t (time) in your variable definition also in the discretization function used [ ] for parameter estimation to work properly. also why is dt=600? your domain is in minutes anyways, also dataset points is for every 10 minutes , so you would want to break that domain down into a grid spacing of 10 mins and not 600 as 600 would imply 600 minutes here. also the code :
|
@AstitvaAggarwal if I runn your code I get firs an error that pde_ssytem is not defined and after defining it I get:
I use dt=600 because I thought that everything was in seconds so 600s=10min. Can you better explain how dt works? Why did you put Sorry for all of this questions but coming from python those things for me in Julia remain unclear. |
hey @LorenzoBottaccioli, ignore the previous code things got mixed up, check this out, `
` Also dt should be in same units as the timespan interval(in your case minutes), the actual eq you are trying to solve is in the additional_loss function whereas the eq passed into the pde_system is trivial (bc is original). I was thinking of using Interpolations.jl for your discrete data but that just makes things longer |
@LorenzoBottaccioli does this solve your issue? |
Hey @LorenzoBottaccioli, now #795 is merged, you can do parameter estimation with |
Hi I'm trying to replicare the INVERSE PROBLEM for parameter estimation on a simple ODE here the code:
Here the error I get when I run :
@named ode_system = NeuralPDE.ODESystem(eqs, [t], [T_in(t), T_ext(t), Q_heating(t), Q_cooling(t), Q_sun(t), Q_lights(t), Q_equipment(t)], [R, C, Cs])
The text was updated successfully, but these errors were encountered: