# Roto-Translational Control of Spacecraft in Low Earth Orbit Using Environmental Forces and Torques
## 3 Controller Design
### Control Development  
The attitude controller developed in [30] ensures ultimately bounded convergence of \(\|\tilde{\mathbf{\omega}}\|\) and \(\|\mathbf{e}_{\mathbf{v}}\|\), which results in \(\widetilde{R}\to\mathcal{I}_{3}\) as \(t\to\infty\). The controller compensates for uncertainties in \(\rho\), \(C_{D,j}\), \(C_{L,j}\) and \(\mathbf{r_{c}}\), as well as the availability of only an approximation of the inertia matrix, namely \(J_{m}\). The proposed control law (25) computes the torques \(\bar{\mathbf{u}}_{\mathbf{d}}\in\mathbb{R}^{3}\), expressed in the body coordinate system, required for achieving attitude tracking  
\[\bar{\mathbf{u}}_{\mathbf{d}}\triangleq-K_{1}\mathbf{\mu}-\beta_{1}\mathbf{e}_{\mathbf{v}}, \tag{25}\]  
where \(\mathbf{\mu}\triangleq\tilde{\mathbf{\omega}}+\beta\mathbf{e}_{\mathbf{v}}\in\mathbb{R}^{3}\), \(K_{1},\ \beta\in\mathbb{R}^{3\times 3}\) are symmetric, positive-definite control gains, and \(\beta_{1}\in\mathbb{R}_{>0}\) is a control constant. However, the desired control torques are generated by varying the DMD surfaces lengths. The relationship between the DMD lengths and the applied environmental torques can be expressed as  
\[\bar{\mathbf{u}}\triangleq Y_{1}\mathbf{\Theta}_{1}, \tag{26}\]  
where \(Y_{1}\triangleq\left[Y_{AT}\ \frac{3\mathcal{C}M_{0}}{\|\mathbf{r}\|^{3}}r^{ \times}J_{m}\mathbf{r}-\int_{m}\mathbf{\omega}-\omega^{\times}J_{m}\mathbf{\omega}+J_{m} \omega^{\times}\widetilde{R}\mathbf{\omega}_{\mathbf{d}}-J_{m}\widetilde{R}\dot{\mathbf{ \omega}}_{\mathbf{d}}+J_{m}\beta\dot{\mathbf{e}}_{\mathbf{v}}\right]\in\mathbb{R}^{3\times 65}\) is a measurable regression matrix, and the vector \(\mathbf{\hat{\Theta}_{1}}\in\mathbb{R}^{65}\) is the estimate of \(\mathbf{\Theta_{1}}\triangleq\left[\mathbf{\Theta_{AT}}^{T}\,1\right]^{T}\in\mathbb{R} ^{65}\), which contains the uncertain parameters \(C_{D,j}\), \(C_{L,j}\), \(\rho\), and \(\mathbf{r_{c}}\). The measurable regression matrix \(Y_{AT}\in\mathbb{R}^{3\times 64}\) and vector of uncertainties \(\mathbf{\Theta_{AT}}\in\mathbb{R}^{64}\), associated with the aerodynamic torques, are explicitly defined in [30]. The goal is to vary the DMD surfaces lengths such that the difference between (25) and (26) is as small as possible. In order to achieve this objective, and provided the expressions inside the regression matrix \(Y_{1}\), a numerical algorithm is used to minimize \(\mathbf{\chi}\triangleq\bar{\mathbf{u}}-\bar{\mathbf{u}}_{\mathbf{d}}\in\mathbb{R}^{3}\) by modifying the DMD lengths \(L_{1},\ L_{2},\ L_{3}\), and \(L_{4}\). The minimization problem is formulated as  
\[\min_{L_{1},L_{2},L_{3},L_{4}}\|\bar{\mathbf{u}}-\bar{\mathbf{u}}_{\mathbf{d}}\|\ \ \ \text{ subject to}\ \ \Big{\{}0\leq L_{j}\leq 3.7,\ \ j=1,2,3,4, \tag{27}\]  
and the estimates \(\mathbf{\hat{\Theta}_{1}}\) required to compute \(\bar{\mathbf{u}}\) are updated by  
\[\hat{\mathbf{\Theta}_{1}}\triangleq\text{proj}\Big{(}\Gamma_{1}Y_{1}^{T}\mathbf{\mu} \Big{)}, \tag{28}\]  
where \(\Gamma_{1}\in\mathbb{R}^{65\times 65}\) is a constant, positive-definite adaptation matrix, and \(\ \text{proj}(\cdot)\) denotes the continuous projection algorithm presented in [31], which ensures that \(\mathbf{\hat{\Theta}_{1}}\) remains within known bounds. The relative maneuvering controller in [29], guaranteed asymptotic stability of the in-plane relative states between a chaser and the target. However, the control development assumed attitude stabilized spacecraft and the possibility of accurately computing the required DMD lengths for achieving the desired control input (i.e., cross-sectional area of the chaser \(S_{i}\in\mathbb{R}_{>0}\)). In the case of a roto-translational maneuver, the total cross-sectional area is a function of both the attitude states and the DMD lengths. Moreover, the DMD lengths must be computed to satisfy attitude and relative orbit requirements simultaneously.