PID3Axis:

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

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

   -----
   Input
   -----
   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 
                                                     d.body_vector
                                           Mode 2 = quaternion
                                           -requires d.q_desired_state
                                                     d.body_vector
                                           Mode 3 = quaternion
                                           -requires d.eci_vector 
                                                     d.angle
                                                     d.body_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

   ------
   Output
   ------

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

Children:

AerospaceUtils: Coord/QIToBDot
Common: Control/PIDMIMO
Common: Graphics/Plot2D
Common: Graphics/TimeLabl
Common: Quaternion/AU2Q
Common: Quaternion/Q2AU
Common: Quaternion/QMult
Common: Quaternion/QPose
Common: Quaternion/QTForm
Common: Quaternion/U2Q
Math: Integration/RK4
Math: Linear/Dot

Back to the SCPro Module page