## 4 Spacecraft Attitude Maneuvers
\right] \tag{26}\]  
Therefore, a rotation of the same angle of the two control vanes generates a pure windmill torque around the \(z\)-axis (orthogonal to the plane of the SFGIS) given by  
\[M\triangleq\mathbf{M}\cdot\mathbf{\hat{k}}=-2\,P_{\oplus}\left(\frac{r_{\oplus}}{r} \right)^{2}b\,l^{2}\,\gamma\,(1-\gamma)\,\cos^{2}\beta\,\sin\beta \tag{27}\]  
where \(\beta\in[-\beta_{\text{max}},\,\beta_{\text{max}}]\) is the vane control angle. It is assumed that \(\beta_{\text{max}}\) coincides with the value of \(\beta\) that maximizes the torque magnitude, viz.,  
\[\beta_{\text{max}}\triangleq\text{arcsin}\Bigg{(}\frac{\sqrt{3}}{3}\Bigg{)} \simeq 35.26^{\circ} \tag{28}\]  
Equivalently, Equation (27) may be rewritten by introducing the dimensionless control variable \(u\in[-1,\,1]\), defined as  
\[u\triangleq\frac{\cos^{2}\beta\,\sin\beta}{\text{max}(\cos^{2}\beta\,\sin \beta)} \tag{29}\]  
from which  
\[M=\frac{4}{3\,\sqrt{3}}\,P_{\oplus}\left(\frac{r_{\oplus}}{r}\right)^{2}b\,l ^{2}\,\gamma\,(1-\gamma)\,u \tag{30}\]  
With reference to the simplified model discussed by [PERSON] et al. [6], to estimate the time required for an SFGIS to perform a reorientation maneuver around the \(z\)-axis, it is sufficient to describe the attitude dynamics in the form  
\[I\,\ddot{\delta}=M \tag{31}\]  
where \(I\triangleq m_{\text{sail}}\,l^{2}/6\) is the moment of inertia of the SFGIS around \(z\). Substituting Equation (30) into Equation (31) gives  
\[\ddot{\delta}=k\,u\quad,\quad\text{with}\quad k\triangleq\frac{8\,P_{\oplus} \left(\frac{r_{\oplus}}{r}\right)^{2}b\,\gamma\,(1-\gamma)}{\sqrt{3}\,m_{\text {sail}}} \tag{32}\]  
where \(k\) is a design parameter that encompasses information about the geometry of the control surfaces, the mass of the sail, and the distance from the Sun. The problem is to determine a control law \(u=u(t)\) (with \(|u|\leq 1\)) capable of tracking a generic (constant) reference value of \(\delta\), i.e., \(\delta_{\text{ref}}\). To this end, consider the block diagram shown in Figure 16, where \(G_{\rm c}\) represents the controller, \(G_{\rm s}\) represents the system (i.e., the SFGIS attitude dynamics), \(e\triangleq\delta_{\rm ref}-\delta\) is the error signal, and \(\overline{u}\) is the (unsaturated) input to the system. Using Equation (32), the transfer function that describes the dynamics of the system is  
\[G_{\rm s}=\frac{k}{s^{2}} \tag{33}\]  
where \(s\) is the complex variable, while the assumption is made that \(G_{\rm c}\) has the form of a proportional-derivative controller with a first-order filter on the derivative term (PDF), viz.,  
\[G_{\rm c}=K_{p}+\frac{K_{d}\,s}{T_{f}\,s+1} \tag{34}\]  
The choice of control law parameters (\(K_{p}\), \(K_{d}\) and \(T_{f}\)) was achieved through a numerical optimization procedure, in which the objective function to be minimized was the settling time of the response of the closed-loop system in Figure 16. More precisely, the value of the gain crossover frequency (\(\omega_{c}\)) of the open-loop system was varied iteratively, and for each value of \(\omega_{c}\), the calculation of \(K_{p}\), \(K_{d}\), and \(T_{f}\) was performed with the help of MATLAB R2024a's built-in function pidtune, which automatically adjusts the controller parameters to balance performance (i.e., response time) against robustness (i.e., stability margins) [36]. The optimization problem was solved by using MATLAB's built-in function fminsearch.