Physically-informed model discovery of systems with nonlinear, rational terms using the SINDy-PI method. Contains functionality for spectral filtering/differentiation.
In this model, u specifies the force on the cart. The equations dx3/dt and dx4/dt in this case are rational. Equations dx1/dt and dx2/dt are equal to x3 and x4 respectively.
The equations are then rewritten into an implicit form and each equation is identified separately.
I constructed the function library to contain the relevant functions from the implicit dynamics. Of course, in practice, the actual implicit dynamics would be unknown, I'm doing this merely for testing purposes. The correlation matrix of the full library:
Note that while there are some perfect correlations, the full library is reduced for each equation identification. For example, if our goal was to identify the equation dx_3 / dt, we'd remove all the terms from the library that contain any other dx_i / dt. This way, the annoyance of poorly conditioned regression is partly omitted.
Solutions as implicit models for each equation dx_i / dt. The columns are the regressor parameters and the rows are the identified equations, with description of the LHS guess, the equation's fit to training data and the model's index:
Decomposing the implicit equation for dx3 / dt into terms:
Some of the terms have relatively very little energy. This might mean that some terms are dominant, and some are less pronounced or only pronounced in specific conditions - gathering testing data in those conditions would be beneficial for more accurate model. For example, if the forcing is too weak, the pendulum never gets to the upper position and therefore there's no information about the dynamics around the unstable singularity state-space point, which is very important in the actual dynamics.
In this model, u specifies the force on the cart. The equations dx3/dt and dx4/dt in this case are rational. Equations dx1/dt and dx2/dt are equal to x3 and x4 respectively. The equations are then rewritten into an implicit form and each equation is identified separately.
I constructed the function library to contain the relevant functions from the implicit dynamics. Of course, in practice, the actual implicit dynamics would be unknown, I'm doing this merely for testing purposes. The correlation matrix of the full library: Note that while there are some perfect correlations, the full library is reduced for each equation identification. For example, if our goal was to identify the equation dx_3 / dt, we'd remove all the terms from the library that contain any other dx_i / dt. This way, the annoyance of poorly conditioned regression is partly omitted.
Solutions as implicit models for each equation dx_i / dt. The columns are the regressor parameters and the rows are the identified equations, with description of the LHS guess, the equation's fit to training data and the model's index:
Simulation of the identified model next to the analytical model used for training data generation. When constructing the full model from the identified equation, the equations with the best fits were picked: https://user-images.githubusercontent.com/55796835/113409524-c21b5e00-93b1-11eb-8a7f-8f266dc609fd.mp4
Decomposing the implicit equation for dx3 / dt into terms:
Some of the terms have relatively very little energy. This might mean that some terms are dominant, and some are less pronounced or only pronounced in specific conditions - gathering testing data in those conditions would be beneficial for more accurate model. For example, if the forcing is too weak, the pendulum never gets to the upper position and therefore there's no information about the dynamics around the unstable singularity state-space point, which is very important in the actual dynamics.