Skip to content
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

9D Von Karman trapping SINDy model #561

Closed
Blagneaux opened this issue Sep 20, 2024 · 5 comments
Closed

9D Von Karman trapping SINDy model #561

Blagneaux opened this issue Sep 20, 2024 · 5 comments

Comments

@Blagneaux
Copy link

Hi all! When reading the example.ipynb notebook for Trapping SINDy (8_trapping_sindy_examples), I came across some comments in the Von Karman section talking about applying the method in the case of a 9D model, but it seems like the code itself only focus on the 5D model.

From my understanding of the related paper and the video on youtube, the 5D is the best fitting model that can be proven to be stable, but the 9D model, though it can't mathematically be proven to be stable, is still fine and an even better fit. I thus wanted to try and change the code by myself to compute the 9D model from the 5D example, and changed r (line 4 in section 12 of code) and _n_tgts (line 28 in section 12 of the code) to be both equal to 9 as it seemed to be the only parts that mattered for the number of dimensions (from what I can see when comparing with other example not related to the Von Karman example). Nevertheless, I guess there must be something I didn't understand correctly as I end up with a worst model, not capturing the timing of the transient as shown in the paper, but more importantly, not even being able to stabelise at the right value after the transient. (cf image below)

9D

I was therefore hoping that you could add the 9D part in the example.ipynb file so that I can understand where my mistake is.

Thanks for all the work you have done on this github, this is really helpful.

Bastien

@Jacob-Stevens-Haas
Copy link
Member

Jacob-Stevens-Haas commented Sep 23, 2024

@Blagneaux , very happy that you're interested in this new work. The reality is that trapping SINDy is tricky and gets trickier in hirgher dimensions: It's nonconvex because of the need to find the location of the trap center. In the notebook, there's a bit of early work in trying to discover the trap center using simulated annealing.

That said, in your example, your plot looks like the model does catch the timing of the transient much better, it just settles on the wrong stable value.

If you could find the correct trap center, then I believe the optimization would be convex. In practice, it requires a lot of tuning, reviewing the diagnostic print information during optimization, and checking the output eigenvalues, re-tuning the hyperparameters, etc.

@MPeng5 @akaptano

@Blagneaux
Copy link
Author

Thank you for your answer.

That said, in your example, your plot looks like the model does catch the timing of the transient much better, it just settles on the wrong stable value.

You are right, it catch the timing way better than the POD one, but I am actually trying to replicate the result from the article, and more precisely, the figure 7b with it perfect fit in the 9th mode SINDy, thus I was disapointed by getting neither the timing nor the stable value.

If you could find the correct trap center, then I believe the optimization would be convex. In practice, it requires a lot of tuning, reviewing the diagnostic print information during optimization, and checking the output eigenvalues, re-tuning the hyperparameters, etc.

I understand, and as much as I was hoping for a simple fix, I was afraid this would be your answer. I am giving a look at this on my own and trying tuning the model to match your results, but if the hyperparameters that have been used on your implementation are not private, I would be very interested if you could share them.

If you want any info on why I am trying to recreate your results, I would be more than happy to share, I just don't know how much I should talk about this here, as this post is just an "Issue".

Once again, thanks for your time.

Bastien

@Jacob-Stevens-Haas
Copy link
Member

If you go back in the git history to when that file was added (try the 1.x branch), you should be able to rerun it with the same parameters (they're definitely not private 😅. We've recently revised that example to only use 5 modes instead of 9 in the current iteration, as well as having fixed some bugs.

I'm sorry there's not a better answer, but I am definitely interested in hearing more about your "why"!

@Jacob-Stevens-Haas
Copy link
Member

You also may be interested in #558

@Blagneaux
Copy link
Author

Thank you very much, this is what I was looking for. I'll send you a direct message concerning the why as to not pollute this thread.

Once again, thank you for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants