PINNs-based-MPC icon indicating copy to clipboard operation
PINNs-based-MPC copied to clipboard

About the data.npz file (resources)

Open bao666liang opened this issue 1 year ago • 2 comments

Your code is really well written!! At the same time, I would like to ask about how the X and Y parameters (i.e. X_star and Y_star) in the data.npz file are generated? data.npz: ['X ','Y','U ','T','X0 ','X_test','Y_test ','ub','lb '] Are they using parameters obtained from real robotic arm operation or dynamic equations? If possible, could you please provide the code to generate the data.npz file? Also, according to the paper, I believe that x_ data=x_ k and y_ data=x_ k+1, but based on this code, y_ data is x_ k. Am I a bit confused? y_ data shouldn't be the predicted state for the next moment? image 2 There are a lot of questions, and if you could answer them, I would really, really, really appreciate it!!

bao666liang avatar Nov 18 '23 15:11 bao666liang

Hi,

  • the data is generated from dynamic equations, but this equations are identified from a real robotic arm.
  • unfortunately, I can't provide you the code to generate the data.npz, since I do not work on this project anymore.
  • the function you quoted is only used to generate initial conditions, i.e., data points for which the time $t = 0$. We do not need any other data obtained by solving the system dynamics for the training (the data.npz is just used for evaluation of the trained model)! The model learns the dynamics via the PINN approach. That is why Y_data is a part of X_data in this case, in this way we tell the model that it should map any input where $t=0$ to just the state $x_0$ (which is contained in [1:5] entry).

I hope this clarifies everything for you.

Jonas-Nicodemus avatar Nov 22 '23 12:11 Jonas-Nicodemus

Thank you so much for your detailed answer!! Therefore, what you mean is that this function is only used to generate initial conditions (because the dynamic equations are accurate enough), so in other words, when my dynamic equation is not accurate, the y_data of this function needs to be x_ k+1 (i.e. the true value of the next moment) instead of x_ k/x0. I don't know if my understanding is accurate?

bao666liang avatar Nov 22 '23 12:11 bao666liang