RW Control
Description

An attitude maneuver via momentum transfer based on the conservation of
angular momentum was simulated. In this project, 4 reaction wheels in
a pyramid configuration was used; this configuration provides redundancy
such that if one wheels become unable to operate for some reason,
the other three reaction wheels can provide control torque in all three direction.

Four Reaction wheels in a pyramid configuration

Inputs

Ixx, Iyy, Izz             Moments of inertia
J                             Reaction wheel inertia
RW angle             Tilt angle of reaction wheel axis
psi                         Commanded Euler angle
phi                          Commanded Euler angle
theta                     Commanded Euler angle

Initial Condition
w1, w2, w3:                 Spacecraft angular velocities
q1, q2, q3, q4:             Quaternions
Omega1                      Angular velocity of RW 1
Omega2                     Angular velocity of RW 2
Omega3                      Angular velocity of RW 3
Omega4                     Angular velocity of RW 4