Path: SCPro/ProControl

% A PID Based 3 axis controller for rigid body.
	Use the call with one output to get the default data structure.
 This has 4 modes:
 0 - steady rotation
 1 - align two vectors
 2 - align with a quaternion
 3 - point vector and steady rotation

 Type PID3Axis for a demo

%               PID3Axis;
             d = PID3Axis;
   [torque, d] = PID3Axis( q_ECI_body, d )

   q_ECI_body (4,1) ECI to body quaternion
   d          (1,1) Data structure
                    .a               (2,2) PID A Matrix
                    .b               (2,1) PID B Matrix
                    .c               (1,2) PID C Matrix
                    .d               (1,1) PID D Matrix
                    .x_roll          (2,1) PID roll state
                    .x_yaw           (2,1) PID yaw state
                    .x_pitch         (2,1) PID pitch stage
                    .mode            (1,1) Four options:
                                           Mode 0 = rotate about an axis
                                           -requires d.q_desired_state 
                                                     d.angle / d.axis
                                           Mode 1 = align two vectors
                                           -requires d.eci_vector 
                                           Mode 2 = quaternion
                                           -requires d.q_desired_state
                                           Mode 3 = quaternion
                                           -requires d.eci_vector 
                    .inertia         (3,3) Inertia matrix
                    .l               (2,1) Windup compensation matrix
                    .accel_sat       (1,1) Saturation acceleration
                    .max_angle       (1,1) Maximum incremental angle
                    .axis_command    (3,1) Angle of rotation
                    .body_vector     (3,1) Axis in body frame (mode 1 and 3)
                    .eci_vector      (3,1) Axis in ECI frame
                    .q_desired_state (4,1) Target quaternion
          .         .q_target_last   (4,1) Last target


   torque     (3,1) Control torque
   d          (1,1) Data structure


AerospaceUtils: Coord/QIToBDot
Common: CommonData/SwooshWatermark
Common: Control/C2DZOH
Common: Control/C2DelZOH
Common: Control/FResp
Common: Control/GND
Common: Control/GSS
Common: Control/ND2SS
Common: Control/PIDMIMO
Common: Control/S2Damp
Common: Control/SS2ND
Common: Control/SizeABCD
Common: Control/TrnsZero
Common: Control/WPZ
Common: Control/WReson
Common: Control/ZFresp
Common: General/CellToMat
Common: General/MatToCell
Common: General/Watermark
Common: Graphics/LogLimit
Common: Graphics/NewFig
Common: Graphics/Plot2D
Common: Graphics/PltStyle
Common: Graphics/TextS
Common: Graphics/TimeLabl
Common: Quaternion/AU2Q
Common: Quaternion/Q2AU
Common: Quaternion/QMult
Common: Quaternion/QPose
Common: Quaternion/QTForm
Common: Quaternion/U2Q
Math: Geometry/Perpendicular
Math: Integration/RK4
Math: Linear/ColCompR
Math: Linear/Cross
Math: Linear/DelLZ
Math: Linear/Dot
Math: Linear/DupVect
Math: Linear/IsZero
Math: Linear/Mag
Math: Linear/RowCompU
Math: Linear/SkewSymm
Math: Linear/Unit

Back to the SCPro Module page