Hello,
I am implementing a dynamical model that transitions from state to state using a transition matrix F. So the transition model would look like x_t = F* x_(t-1).
One of my state variables is an angle that is defined as \theta = arctan2(y,x). This angle is discontinuous, so it jumps from pi to -pi at y=0, x<0. I am wondering if it is possible to estimate this discontinuous angle in Pyro?
Right now my model in Pyro looks like this:
def model(prior, cov0, data, F):
for t in range(len(data)):
# Transition model formula
state = pyro.sample("state_{}".format(t), dist.MultivariateNormal(prior,cov0))
# Nonlinearity function h(x_t)
c_state = rod_observer_1(state)
# Observation model formula
pyro.sample("measurement_{}".format(t), dist.MultivariateNormal(c_state, cov1), obs = data[t])
prior = F@state.T
My transition model looks like this
Pyro is able to estimate the position and their velocity state parameters well, but is not able to estimate the jump from pi to - pi , when crossing the y axis. So the real angle (theta) goes from roughly pi to -pi in a single time step, but the estimated pyro parameter angle goes gradually from pi to -pi in several time steps.
Is it possible to estimate this discontinuous angle as a parameter in Pyro?
And if so, how?