# Tutorial Review on Space Manipulators for Space Debris Mitigation
## 8 Spacecraft Attitude Stabilisation
Null motion may be added into the steering law to avoid singularities--null motion produces no net control torque. The null vector is given by:  
\[\dot{\gamma}=J^{+}\tau+\rho n \tag{73}\]  
\[\text{where }n=(I-J^{+}J)d\ =\ \text{projection matrix onto arbitrary nonzero vector d} \tag{74}\]  
\[\rho=\left\{ \begin{array}{c}\sigma^{6}\text{ \it for }\sigma\geq 1\\ \sigma^{-6}\text{ \it for }\sigma\leq 1\\ \end{array} \right. \tag{75}\]  
\[\sigma=\sqrt{det(JJ^{T})}=\ \text{singularity measure} \tag{76}\]  
The nonzero vector may be chosen to impose constraints such as a gradient-based vector that points toward the singular points:  
\[\text{d}=\left(\frac{\partial f(\gamma)}{\partial\gamma_{1}},\dots,\frac{ \partial f(\gamma)}{\partial\gamma_{4}}\right) \tag{77}\]  
where \(f(\gamma)=\frac{1}{det(JJ^{T})}\). This does not always work, so null motion may be forced to steer towards the desired gimbal angles \(\gamma^{d}\):  
\[\dot{\gamma}=J^{+}\tau+\rho(I-J^{+}J)(\gamma^{d}-\gamma) \tag{78}\]  
The singularity robust inverse is the generalised version of the pseudoinverse [166]:  
\[\dot{\gamma}=J^{T}P(J^{T}PJ+Q)^{-1}\tau=J^{+}\tau \tag{79}\]  
Assuming \(P=J_{3}\) and \(Q=\lambda I_{4}\):  
\[\dot{\gamma}=J^{T}(JJ^{T}+\lambda I_{3})^{-1}\tau \tag{80}\]  
where \(\lambda=\lambda_{0}e^{-(\mu det(J^{T}))}=\) singularity distance weighting parameter. This is not guaranteed to avoid singularities, but the generalised singularity robust inverse ensures that it approaches and rapidly transits singularities [167]:  
\[\dot{\gamma}=J^{T}(JJ^{T}+\lambda E)^{-1}\tau \tag{81}\]  
\[\text{where }E=P^{-1}=\left( \begin{array}{ccc}1&e_{3}&e_{2}\\ e_{3}&1&e_{1}\\ e_{2}&e_{1}&1\\ \end{array} \right)>0 \tag{82}\]A significantly more complex singularity, predictive singularity inverse using a cost function based on a one-step predicted singularity measure, has been proposed [168]. A further method to avoid singularities is to introduce more controllable degrees of freedom to the CMG. One option is to introduce adjustable skew angles to the CMG [169]. Another option is to introduce variable speed to the rotor of the CMG--this is the variable speed CMG (VSCMG). A single gimbal CMG with variable flywheel speed provides the function of both CMG and reaction wheel [170]. They can avoid singularities due to the extra degree of freedom in the angular wheel speed. The VSCMG is nominally operated as a CMG away from singularities to take advantage of its energy efficient torque amplification. As it approaches a singularity, it acts more like a reaction wheel. This is enabled through a weighted pseudoinverse of the form:  
\[\left( \begin{array}{c}\dot{\theta}\\ \dot{\gamma}\end{array} \right)=WQ^{T}(QWQ^{T})^{-1}\tau \tag{83}\]  
where \(Q=(\text{I}_{\text{RW}}\text{:I}_{\text{CMG}})=\) composite inertia dyadic, \(diag(W_{rui},W_{cmgj})\), \(W_{rui}=W_{0i}e^{-\mu[dat|I^{T})]}\), \(W_{CMGj}=const\). W and \(\mu\) are design parameters. Suppression of vibration of large structures can be implemented through distributed sets of collocated pairs of CMGs with rate gyroscopes acting as distributed actuators/sensors to active control attitude and vibration simultaneously [171; 172]. Viscoelastic damping in CMGs may be implemented using silicone-based rubber mountings [173]. Variable-speed CMGs may be mounted into the links of a space manipulator for simultaneous attitude control and vibration suppression [174; 175]. Indeed, such CMGs can significantly reduce reaction torques exerted by the manipulator on the spacecraft base [176]. This is rather a cumbersome solution with a significant hardware cost, particularly if CMGs are paired for CMG singularity avoidance. A more conventional means of vibration isolation is to use active feedback control with LQR and a Kalman state observer [177]. The Kalman filter comprises a model system that acts as a predictor and a measurement system that corrects the prediction. Variable-speed CMGs are also the flywheel of choice for IPACS (integrated power attitude control system) [178].