dynamicslab / pysindy

A package for the sparse identification of nonlinear dynamical systems from data
https://pysindy.readthedocs.io/en/latest/
Other
1.42k stars 310 forks source link

SINDy prediction for ME sensor output #355

Closed SM-CAU closed 1 year ago

SM-CAU commented 1 year ago

sindy_sine.txt Hello, I am using PySINDy to predict ME sensors output for a sinusoidal, gaussian, and chirp signal to be modelled with a duffing system. For sinusoidal signal, I hope the model is stable and works fine (code for the model is attached)as it can simulate with good accuracy for any part of the signal. What I did there is: I used a custom library with cosines having the frequencies found from the FFT(w) of our signal which takes 'time (t)' as a variable. This makes my driving force term (F cos wt) of a duffing equation. Another custom library for building the candidate library terms for the rest of the terms of a duffing equation. For gaussian signal, the amplitude of the frquency changes. So the I defined a custom library with gaussian function which can then be the amplitude of the driving force. But, the built SINDy model for gaussian (attached gaussian_sindy.txt ) can't predict the signal. Can anyone give me hint concerning what to do, or what might be wrong the idea or implementation. thanks