MatthewPeterKelly/OptimTraj
View on GitHubGPOPS-II Interpolation Function Handle returned by OptimTraj
Open
#20 opened on Sep 9, 2016
enhancementhelp wantedquestion
Description
In gpopsWrapper.m, OptimTraj provides an interpolation function handle for the GPOPS-II solution using pchip, as per the code below. Is pchip the most accurate way to interpolate the GPOPS-II solution?
soln.interp.state = @(t)( interp1(tSoln',xSoln',t','pchip',nan)' ); soln.interp.control = @(t)( interp1(tSoln',uSoln',t','pchip',nan)' );
The formula for the GPOPS-II state is given in equation (25) of the GPOPS-II paper:
Patterson, Michael A., and Anil V. Rao. "GPOPS-II: A MATLAB software for solving multiple-phase optimal control problems using hp-adaptive Gaussian quadrature collocation methods and sparse nonlinear programming." ACM Transactions on Mathematical Software (TOMS) 41.1 (2014): 1.