Sorry if this does not quite make sense as I am still wrapping my head around it as well. Suppose I have j car models (i.e. different brands, builds etc.) such that $\textbf{m} = {m_1, m_2, . . . , m_j}$. Suppose I get an initial track status of one of these random models that contains estimates of the car's position, velocity, and covariance (represents the uncertainty of these estimates). The track status is updated every 10 seconds until the car reaches it destination at time $t_i$. Define $\textbf{y} = \cup_i y_i$ to be the whole track status history.
The optimal path of this car is based on solving for the state $x(t) \in R^n$ and control $u(t) \in R^p$ from the setup $$\begin{align} min_{u(t),t_f} \hspace{1mm} J(x(t),u(t),t_0,t_f) \newline s.t \hspace{2mm} \dot{x} = f(x(t),u(t),t) \newline \phi(x(t_0),x(t_f),t_0,t_f) \end{align}$$ where J is the objective function and $\phi$ are the constraints due to the starting and ending position. To solve for the above optimal control problem, a Legendre pseudo-spectral method is employed and is a task I have already completed.
Now onto my question at hand. I want to determine the probability that this car is a certain model conditioned on the entire track status $y$ (i.e. I want to solve $P(m_j|\textbf{y})$). My approach is to relate this probability back to the optimal control problem. I can let $$P(m_j|\textbf{y}) = \int_X \int_U P(m,x,u|y) dUdX$$ but since the control determines the state, we can simplify this to $$P(m_j|\textbf{y}) = \int_U P(m,u|\textbf{y}) dU$$. However, I don't want to integrate over all the controls are they are quite large so, using the supremum and using conditional probability properties I get, $$\begin{align} P(m_j|\textbf{y}) &= \int_U P(m,u|\textbf{y})dU \newline &\leq \int_U [sup_{u'} P(m|u',\textbf{y})]P(u|\textbf{y})dU \newline &= sup_{u'} P(m|u',\textbf{y})\int_U P(u|\textbf{y})dU \newline &= sup_{u'} P(m|u',\textbf{y}) \newline &= sup_{u'} \frac{P(\textbf{y}|u',m)P(m|u')}{P(\textbf{y}|u')} \end{align}$$.
What I think I want to find is the $argmax_{u',m} \ell(\textbf{y}|u,m)$ subject to the constraint $\dot{x} = m(x,u,t)$ but I am not quite sure how to do this, especially since I do not know the log likelihood distribution of $\textbf{Y}|U',M$. Any help is appreciated.