Path: Orbit/Optimization
% Cost function of Zermelo's differential equations. Models a constant velocity field. This integrates the equations over the time interval 0 to d.tEnd and finds the minimum distance. The cost is just the magnitude of this minimum distance. Returns a datastructure if no arguments are passed. This is a test case for TrajectoryOptimization. -------------------------------------------------------------------------- Form: [errMag, err, x, t] = ZermeloCost( lambda, d ) -------------------------------------------------------------------------- ------ Inputs ------ lambda (2,1) Costates [x;y] d (.) Data structure .rhsFun (1,:) RHS Function .h (1,1) Characteristic dimension .v (1,1) Velocity .x0 (2,1) Initial position .xF (2,1) Desired final position .tEnd (1,1) Final time from the optimizer .data (1,1) Integration tolerances .relTol (1,1) ode113 relative tol .absTol (1,1) ode113 absolute tol .maxStep (1,1) ode113 max step size ------- Outputs ------- errMag (1,:) Magnitude of the error err (4,1) [costates;transversality condition] x (4,:) [x;y;;u;v] t (1,:) Time -------------------------------------------------------------------------- Reference: Bryson, Ho, "Applied Optimal Control", Hemisphere Publishing. --------------------------------------------------------------------------
Math: Linear/DupVect Math: Linear/Mag
Back to the Orbit Module page