FFMaintenanceSim:

Path: FormationFlying/Analysis

% Formation flying maintenance simulation. 

 *** Notes on Usage ***

   The input data for this function can be created automatically for  
   different test cases, using the "FFMaintenanceTests" function.

   To generate a default data structure:
        >> simOptions = FFMaintenanceTests;

   Once this function has run and the outputs have been created, use the
   "FFMaintenancePlotter" function to plot the data.

 *** Inputs ***
   Supply the initial state of the reference (el0) and the initial relative 
   state (dEl0), define the desired relative motion (goals), the maneuver 
   window (window), maneuver parameters (params), the error deadband (deadband), 
   the noise (noise), how many orbits to simulate (nOrbits), the number of
   simulation points per orbit (nSPO), the disturbance options (distOpt), the 
   cross-sectional area, mass, and the control method to use.

 *** Estimated Absolute and Relative States (ECI) ***
   The estimated absolute and relative ECI position and velocity are provided 
   by adding noise to the true state. This emulates the data provided by a 
   relative navigation unit.

 *** Estimated Relative State (Hills) ***
   The estimated relative position and velocity in the Hill's frame is 
   computed via a transformation from the estimated absolute and relative 
   ECI position and velocity. This computation is performed in the 
   "AbsRelECI2Hills" function.

 *** Estimated Orbital Elements ***
   The estimated mean orbital elements and mean orbital element differences
   are computed from the estimated absolute and relative ECI position and
   velocity. This computation is performed in the "ECI2MeanElements" function.

 *** Desired Orbital Elements ***
   At each step in the simulation, the initial goals are used along with the 
   current estimate of the mean orbital elements to compute the desired 
   orbital element differences. 

 *** Desired Relative State (Hills) ***
   The desired element differences are transformed to the Hill's frame, 
   defining the desired relative position and velocity.

 *** Relative State Error (Hills) ***
   The relative position errors and relative velocity errors are computed by
   comparing the desired and estimated states.

 *** Deadband ***
   A constant position deadband is defined in the relative Hill's frame. It
   is a parallelapiped, for each side may have different lengths. If the
   relative state error exceeds 75%% of the deadband "box" in any axis, a
   maintenance maneuver is planned.

 *** Maneuver Planning ***
   The "ImpulsiveManeuver" function is called when the deadband is exceeded, and 
   when no other maneuver is pending. It is supplied with the current estimate
   of the orbital elements, the formation goals, and a set of parameters. 
   It solves for a burn sequence, consisting of the in-plane and out-of-plane 
   delta-v's required to eliminate the error in the mean element differences, 
   as well as the times at which to apply the delta-v's. 

 *** Delta-V ***
   A delta-v is introduced by applying a constant thrust over a
   finite amount of time. The times at which thrust is applied is determined
   by the burn sequence, which is provided by the ImpulsiveManeuver function.
 
--------------------------------------------------------------------------
   Form:
   simData = FFMaintenanceSim( simOptions );
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   simOptions    (.)   Data structure with the following fields:
     - el0            (1,6)  Initial reference orbital elements  (Alfriend format) [a,theta,i,q1,q2,W]
     - dEl0           (1,6)  Initial orbital element differences (Alfriend format)
     - goals           (.)   Goals data structure defining desired relative motion
     - window          (.)   Data structure defining the desired maneuver window
     - params          (.)   Data structure defining several maneuver parameters
     - deadband       (1,3)  x,y,z dimensions of the position error deadband "box"
     - noise          (1,4)  Standard deviation of noise for the following sources:
                          noise(1) - absolute position [m]
                          noise(2) - absolute velocity [m/s]
                          noise(3) - relative position [m]
                          noise(4) - relative velocity [m/s]
     - nOrbits         (1)   Number of orbits to simulate
     - nSPO            (1)   Number of simulation points per orbit
     - distOpt        (1,3)  Disturbance options (flags)
                          (1) solar:  whether to simulate with solar pressure or not
                          (2) drag:   whether to simulate with drag or not
                          (3) J2:     whether to simulate with J2 or not
     - mass           (1,2)  Mass of reference and relative [kg]
     - aera           (1,2)  Cross-sectional area of reference and relative [m^2]
     - controlMethod   (1)   Which control method to use:
                           - closed form solution (1)
                           - linear programming (2)

   -------
   Outputs
   -------
   simData       (.)   Simulation output data structure with the following fields
     - time          (1,:)   Time vector [orbits] 
     - fH            (3,:)   Applied thrust in Hills frame [kN]
     - rE            (3,:)   True ECI position of reference
     - vE            (3,:)   True ECI velocity of reference
     - rE_est        (3,:)   Estimated ECI position of reference
     - vE_est        (3,:)   Estimated ECI velocity of reference
     - rH            (3,:)   True Hills-frame relative position
     - vH            (3,:)   True Hills-frame relative velocity
     - rH_est        (3,:)   Estimated Hills-frame relative position
     - vH_est        (3,:)   Estimated Hills-frame relative velocity
     - rH_des        (3,:)   Desired Hills-frame relative position
     - vH_des        (3,:)   Desired Hills-frame relative velocity
     - dElMean       (6,:)   True mean element differences
     - dElMean_est   (6,:)   Estimated mean element differences
     - dElMean_des   (6,:)   Desired mean element differences
     - elRefMean_est (6,:)   Estimated mean elements of reference
     - fDiffDragH    (3,:)   Hills-frame differential drag force
     - fDiffDragE    (3,:)   ECI-frame differential drag force
     - fDiffSolarH   (3,:)   Hills-frame differential solar force
     - fDiffSolarE   (3,:)   ECI-frame differential solar force
     - fDiffJ2H      (3,:)   Hills-frame differential J2 force (apparent)
     - fDiffJ2E      (3,:)   ECI-frame differential J2 force (apparent)
     - deadband      (1,3)   Size of the position error deadband "box" (same as input)

Children:

AC: ACData/ACTConstants
AerospaceUtils: AtmosphericCalculations/AtmDens2
AerospaceUtils: Coord/ECIToEF
AerospaceUtils: Coord/QHills
FormationFlying: Analysis/FFMaintenancePlotter
FormationFlying: Analysis/FFMaintenanceTests
FormationFlying: Control/ImpulsiveLPManeuver
FormationFlying: Control/ImpulsiveManeuver
FormationFlying: Control/InPlane
FormationFlying: Control/LinOrbLQG
FormationFlying: Control/OptimalInPlaneDeltaV
FormationFlying: Control/OutOfPlane
FormationFlying: Coord/CirclePhase
FormationFlying: Coord/EllipsePhase
FormationFlying: Coord/GetHillsMats
FormationFlying: Coord/InitializeFormation
FormationFlying: Coord/IsCircGeom
FormationFlying: Coord/IsEccGeom
FormationFlying: Coord/RotateState
FormationFlying: DataStructures/BurnData_Structure
FormationFlying: DataStructures/EccGeometry_Structure
FormationFlying: DataStructures/Geometry_Structure
FormationFlying: DataStructures/Maneuver_Structure
FormationFlying: DataStructures/PlanningParameters_Structure
FormationFlying: DataStructures/Window_Structure
FormationFlying: Dynamics/DiscreteHills
FormationFlying: Dynamics/HillsEqns
FormationFlying: EccDynamics/FFEccDH
FormationFlying: EccDynamics/FFEccDiscreteHills
FormationFlying: EccDynamics/FFEccGoals
FormationFlying: EccDynamics/FFEccIntConst
FormationFlying: EccDynamics/FFEccLawdensEqns
FormationFlying: EccDynamics/FFEccLinOrb
FormationFlying: EccDynamics/FFEccProp
FormationFlying: EccDynamics/FFEccRMat
FormationFlying: EccDynamics/FFEccYExt
EccDynamics: Derivatives/FFEccDDY
EccDynamics: Derivatives/FFEccDY
FormationFlying: Guidance/PCGoals
FormationFlying: LP/LPCircular
FormationFlying: LP/LPCircularTimeWeight
FormationFlying: LP/LPEccentric
FormationFlying: LP/LPEccentricGVE
FormationFlying: LP/LPEccentricTimeWeight
FormationFlying: Transformation/AbsRelECI2Hills
FormationFlying: Transformation/DeltaElem2Hills
FormationFlying: Transformation/ECI2Hills
FormationFlying: Transformation/ECI2MeanElements
FormationFlying: Transformation/FFEccDeltaElem2Hills
FormationFlying: Transformation/FFEccGoals2Hills
FormationFlying: Transformation/FFEccHills2DeltaElem
FormationFlying: Transformation/GeometryCirc2Ecc
FormationFlying: Transformation/GeometryEcc2Circ
FormationFlying: Transformation/Goals2DeltaElem
FormationFlying: Transformation/Goals2Hills
FormationFlying: Transformation/Hills2DeltaElem
FormationFlying: Transformation/Hills2ECI
FormationFlying: Transformation/Osc2Mean
FormationFlying: Utility/AccelVector2ManeuverStruct
FormationFlying: Utility/FFEccTargetTrueAnom
FormationFlying: Utility/ManeuverStruct2AccelVector
FormationFlying: Utility/MeanAnom2TrueLat
FormationFlying: Utility/NOrbVector
FormationFlying: Utility/Nu2TimeDomain
FormationFlying: Utility/NuDot
FormationFlying: Utility/Time2NuDomain
FormationFlying: Utility/TimeUntilTheta
FormationFlying: Visual/CostVis
FormationFlying: Visual/FFEccAnalyzeShape
FormationFlying: Visual/HillsFramePlot
Orbit: GravityModels/LoadGEM
Orbit: GravityModels/LoadGravityModel
Orbit: GravityModels/NormalizationMatrix
Orbit: GravityModels/UnnormalizeGravity
Orbit: OrbitCoord/Alfriend2El
Orbit: OrbitCoord/El2Alfriend
Orbit: OrbitCoord/OrbElemDiff
Orbit: OrbitCoord/SLR
Orbit: OrbitMechanics/AGravity
Orbit: OrbitMechanics/GVEDynamics
Orbit: RHSOrbit/LinOrb
Plotting: GUI/AnimationGUI
Plotting: Help/HelpSystem
Plotting: Utilities/InitializeAxes
SC: BasicOrbit/CP2I
SC: BasicOrbit/E2M
SC: BasicOrbit/E2Nu
SC: BasicOrbit/El2RV
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/Nu2MAbs
SC: BasicOrbit/OrbRate
SC: BasicOrbit/Period
SC: BasicOrbit/RV2El
SC: Disturbances/SolarF
SC: Ephem/EOfE
SC: Ephem/EarthRot
SC: Ephem/Eclipse
SC: Ephem/GMSTime
SC: Ephem/MSidDay
SC: Ephem/NutDelta
SC: Ephem/ObOfE
SC: Ephem/SunV1
SC: SCData/sCTConstants
SC: SCMat/GEMT1
Common: CommonData/Constants
Common: CommonData/SwooshWatermark
Common: CommonData/xSplashSmall
Common: ComponentModels/Box
Common: ComponentModels/Cone
Common: ComponentModels/Frustrum
Common: Control/C2DZOH
Common: Control/QCE
Common: Control/QCR
Common: Control/Riccati
Common: Database/Constant
Common: General/CellToMat
Common: General/CloseFigure
Common: General/DeBlankLT
Common: General/DeleteCell
Common: General/DispWithTitle
Common: General/GetNewTag
Common: General/MatToCell
Common: General/StringMatch
Common: General/Watermark
Common: Graphics/AddView
Common: Graphics/AddZoom
Common: Graphics/Axis3D
Common: Graphics/CameraControls
Common: Graphics/DrawVertices
Common: Graphics/Ellipsd
Common: Graphics/Map
Common: Graphics/Mesh2
Common: Graphics/NPlot
Common: Graphics/NewFig
Common: Graphics/Plot2D
Common: Graphics/PltStyle
Common: Graphics/SliderBar
Common: Graphics/TitleS
Common: Graphics/XLabelS
Common: Graphics/YLabelS
Common: Graphics/ZLabelS
Common: Quaternion/Mat2Q
Common: Quaternion/QForm
Common: Quaternion/QTForm
Common: Quaternion/U2Q
Common: Time/DTSToDTA
Common: Time/Date2JD
Common: Time/JD2000
Common: Time/JD2T
Common: Time/JDToMidnight
Common: Time/T2JD
Common: Transform/Altitude
Common: Transform/RPhiTheta2Cart
Common: Transform/RotMat
Math: Analysis/PDAL
Math: Analysis/SCHarm
Math: Analysis/Simplex
Math: Analysis/Simplex2
Math: Geometry/Perpendicular
Math: Integration/RK4
Math: Integration/RK4TI
Math: Linear/Cross
Math: Linear/Dot
Math: Linear/DupVect
Math: Linear/Factorl
Math: Linear/InvP
Math: Linear/Mag
Math: Linear/Unit
Math: MathUtils/Odd
Math: MathUtils/R2P5
Math: Solvers/NewtRaph
Math: Trigonometry/CosD
Math: Trigonometry/SinD
Math: Trigonometry/UnwrapPhase
Math: Trigonometry/WrapPhase

Back to the FormationFlying Module page