How to use bilinear interpolation to interpolate a new optimized trajectory?

50 Views Asked by At

Sorry if this does not quite make sense as I am still wrapping my head around it as well. Currently, I have a vehicle with some initial position $x_0$. From this position, four optimal trajectories were found using a Legendre pseudo-spectral method. Each path is based on solving for the state $x(t) \in R^n$ and control $u(t) \in R^p$ trajectories 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, transforming the range of initial and final times into one that goes from [-1, 1] and these new times are discretized into a set of collocation points. From there, the state and control trajectories are approximated from Lagrange polynomials which are X(t) and U(t) respectively s.t. at the collocation points, $X(t_i) = x(t_i), U(t_i) = u(t_i)$. Gauss-Legendre quadrature is used to integrate over the objective function.

Now for my question: I have done the above process 4 times already and gotten four distinct state and control trajectories, all starting from the same $x_0$ position but ending at different locations. However, the locations they end at form a rectangular grid. What I am interested in is using the previously calculated state and control trajectories to interpolate a new x and u trajectory. This new path starts in the same $x_0$ location but ends at a point inside the grid created by the four other trajectories' end location. I was thinking I could maybe use bilinear interpolation but am not sure how to proceed. Or, I could use some weighted combination of each trajectory s.t. $x_{new} = \sum_i^4 w(x_i(t_{f_i}))x_i(t)$ but then I am unsure what the weights should be?