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

Question : Is it possible to use control commands u in PX? #84

Open
OriginalPou opened this issue Apr 25, 2024 · 2 comments
Open

Question : Is it possible to use control commands u in PX? #84

OriginalPou opened this issue Apr 25, 2024 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@OriginalPou
Copy link

Hello,

I am working on a robotics application where I am interested in learning the motion and measurement model parameters of a ground robot, and wanted to know if the the Bayesian inference methods for ssm such as the $SMC^2$ algorithm and the Particle marginal Metropolis-Hastings algorithm could be used for exploring parameter distributions when state transition is not only conditional on the previous state but also a control input (odometry for example).
The state transition becomes :
$$X_t | (X_{t-1}=x_{t-1} , U_t = u_t) = f(x_{t-1}, u_t) + \omega_t ~~~~~~~~~~~~~~~~~ \omega \sim N(0,\sigma_x^2)$$
While I know that the library can be easily modified to support my study case, I just wanted to know if I am missing something in the theory because (if I am not mistaken) all the examples in the book, papers and documentation consider only HMMs without control inputs.

Thank you very much for the work you've done creating and maintaining this library 💯

@nchopin nchopin self-assigned this Apr 26, 2024
@nchopin nchopin added the enhancement New feature or request label Apr 26, 2024
@nchopin
Copy link
Owner

nchopin commented Apr 26, 2024

Hi, yes, you're right, all the HMMs considered in the book etc are without control inputs. One quick and dirty way to deal with your issue is to define the $u_t$ as global variables, but that's not very elegant, of course.

As I often say, if your state-space model is complicated (in some way), and if you just want to implement the bootstrap filter, you might be better off defining directly the Feynman-Kac model that corresponds to the bootstrap filter. So a better way might be to implement directly a FeynmanKac class, where the sequence of $u_t$ is simply an attribute of the class.
More details in this notebook tutorial.

BTW, am I assuming correctly that the sequence of $u_t$ is known in advance? Otherwise, if you acquire the $u_t$ sequentially (i.e. you know the value of $u_t$ only at time $t$, but not before), then things get a bit more complicated I guess.

I am going to mark this as "feature request" and keep it open, so that I can think a bit more about it.

Thank you very much for the work you've done creating and maintaining this library 💯

Thanks, I appreciate it!

@OriginalPou
Copy link
Author

Thank you very much for your quick reply. Yes I do know the sequence of $u_t$ in advance.

I am very interested in hearing your future thoughts about this study case 🙌

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

No branches or pull requests

2 participants