-
Notifications
You must be signed in to change notification settings - Fork 12
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
Framework for Varying Time steps #13
Comments
The simplest way to deal with a varying timestep might be to create a new data array by inserting NaNs in between your unequally spaced observations. For instance, if you've got observations A second method would be to use a time-varying matrix where the velocity is multiplied by the appropriate timestep. For instance, with a state vector that is
Depending on the mechanics of your situation, you might want to make the process-noise matrix time-varying too. For instance, variance is proportional to elapsed time for random-walk processes. |
Hey good deal; I have a followup. I think that inserting NaN won't work because the sample arrival rate is not going to be an integer multiple of any known value beforehand. But it is possible to track the time when the data point is recorded, so approach 2 is possible, however, in the example code is the following
I imagine process_matrix would be replaced by an F(t) analog. Does LinearGaussianCISSM accept functions rather than static matrices as a parameter? Or alternately, does the model need to be recomputed for each sample? |
The model types are actually under development and will be changing soon, and the |
Is this something that will be available, or that is currently available on dev? |
Just merged the dev branch, so time-varying matrices are now available. When you construct your |
Can do! and updating now and reworking. I have a further complication, though, or maybe it makes it more simple? The algorithm is online that is the samples are acquired in real-time, and I'm obtaining a new prediction for each new sample. Does F(t) need to still take a parameter t? How are the functions predict and update affected? |
Just made another change to time-varying matrices (0fee542); they now take a Real value for the parameter If I understand your application, you've got new measurements arriving at irregular intervals, and want to update the state (a position and velocity?) as each one comes in? If that's the case, you can now slightly hack this
Then, as measurements come in, you can keep track of the time between them and pass that to
|
I was using this before the change and it worked, and I'm using it now and it still works. I don't have a lot of time to go into it right now. Previously I used thunks and set some global variable reference in the closure (a giant hack). That did do the trick (and still does apparently). I do want to get to your expected approach if possible. Here's a link to the code for reference. for future, allow a option argument (a tuple) to be supplied as the arguments to the callback. |
This is more of a question than an error. I have an application where I want velocity combined with position similar to you linear example. However, delta t is not a constant. There is some information about what to do in this situation in this SO question and this research paper and a MATLAB inplementation. But it's unclear to me how to apply these things using StateSpace. Can you suggest a path?
The text was updated successfully, but these errors were encountered: