Path: FormationFlying/LP
% Computes the thrust trajectory to go from an initial state x0 to a final state xF (relative states defined as element differences). Simplex is used to optimize the thrust. This algorithm is valid for circular or eccentric reference orbits. It does not however account for disturbances or gravity perturbations. A control system can be expressed in its discrete state-space form as: X(k+1) = A(k)X(k) + B(k)U(k) Y(k) = C(k)X(k) where X is state , U is control, Y is output For the nth timestep, this can be rewritten as: X(n) = A(n-1)*A(n-2)...A(n-n)*X(0) + [A(n-1)*A(n-2)...A(n-(n-1))*B A(n-1)*A(n-2)...A(n-(n-2))*B ..... B]u where u = [ U(0)' U(1)' ..... U(n-1)']' For a fully controllable and observable system, Y(n) = X(n) = A(n-1)*A(n-2)...A(n-n)*X(0) + pu where p = [A(n-1)*A(n-2)...A(n-(n-1))*B A(n-1)*A(n-2)...A(n-(n-2))*B ..... B] error >= |Y(n) - Y(desired)| = A(n-1)*A(n-2)...A(n-n)*X(0) + pu - Y(desired) The Simplex problem (minimise cu(cost) such that au <= b) and u >= 0 can now be posed as [-p; p]u <= [error + A(n-1)*A(n-2)...A(n-n)*X(0) - Y(desired); error - A(n-1)*A(n-2)...A(n-n)*X(0) + Y(desired)] In case of an Equality Constraint with 0 error, this reduces to [-p]u = A(n-1)*A(n-2)...A(n-n)*X(0) - Y(desired) Note: The constraintType determines whether it is an equality technological constraint( au = b, flag: 0) or an inequality technological constraint( au <= b, flag: 1) u are called 'decision variables', in this case thrust vector Since u is unrestricted in sign (u can be positive and negative), we split u into two parts: u=up-um, where up>=0 and um>=0. Since version 7. -------------------------------------------------------------------------- Form: [aC,t,exitFlag] = LPEccentricGVE( el0, x0, xF, MF, nS, cW, cType, maxC); -------------------------------------------------------------------------- ------ Inputs ------ el0 (1,6) Initial orbital elements [a,i,W,w,e,M] x0 (6,1) Initial relative state, as element differences xF (6,1) Final relative state, as element differences MF (1) Final mean anomaly (rad) nS (1) Number of samples to use for control vector cW (:) Cost weighting vector (optional) cType (1) Flag with value 0 or 1 (optional, default: 0) 0 : Equality Constraint on the Linear program formulation 1 : Inequality Constraint on the Linear program formulation maxC (1) Maximum constraint on u (optional, default: 1e25) ------- Outputs ------- aC (3,nS) Commanded acceleration in Hill's frame t (1,nS+1) Time vector (sec) exitFlag (1) Feasible solution = 1, No feasible solution = 0 --------------------------------------------------------------------------
Orbit: OrbitMechanics/GVEDynamics SC: BasicOrbit/E2M SC: BasicOrbit/E2Nu SC: BasicOrbit/M2E SC: BasicOrbit/M2EApp SC: BasicOrbit/M2EEl SC: BasicOrbit/M2EHy SC: BasicOrbit/M2Nu SC: BasicOrbit/M2NuAbs SC: BasicOrbit/M2NuPb SC: BasicOrbit/Nu2E SC: BasicOrbit/Nu2M SC: BasicOrbit/OrbRate Common: CommonData/SwooshWatermark Common: Control/C2DZOH Common: General/CellToMat Common: General/DispWithTitle Common: General/MatToCell Common: General/Watermark Common: Graphics/NewFig Common: Graphics/Plot2D Common: Graphics/PltStyle Math: Analysis/Simplex Math: Analysis/Simplex2 Math: Linear/DupVect Math: Linear/InvP Math: Linear/Mag Math: Trigonometry/UnwrapPhase
Back to the FormationFlying Module page