MomentumUnloading:

Path: CubeSat/AttitudeControl

% Compute the torque from a magnetic momentum unloading system.
 Uses a pseudo-inverse control law. If the magnetic field is
 aligned the the momentum no control is possible and you will
 see a spike in the response.

 The dipole commands can be implemented by a linear control of the
 dipole current or by pulsewidth modulation.

 tMM = - gain*h

 But the torque is t = m x b
 where m is the dipole vector

 so m (u x b)m = - gain*h

 [uxb]m = -gain*h

 so

 m      = -gain pinv([uxb]) h

 tol prevents a dipole from being used that is too closely aligned
 with the magnetic field. 

 Since version 8.
--------------------------------------------------------------------------
   Form:
   [tMM, m, angle] = MomentumUnloading( u, b, gain, h, tol )
--------------------------------------------------------------------------

   ------
   Inputs
   ------
   u            (3,:)     Dipole unit vectors
   b            (3,1)     B-Field (T)
   gain         (3,1)     Proportional gain (N/Nms)
   h            (3,1)     Momentum (Nms)
   tol          (1,1)     Tolerance for using a dipole (default 0.2)

   -------
   Outputs
   -------
   tMM          (3,1)     Total torque
   m            (:,1)     Dipole commands
   angle        (1,1)     b dot h

--------------------------------------------------------------------------

Children:

Math: Linear/Cross
Math: Linear/Dot
Math: Linear/Mag
Math: Linear/Unit

Back to the CubeSat Module page