## 4 Results
### Systematic Verification of the ADCS
#### 4.2.1 Source Code Verification and Performance Simulation  
To verify the preliminary design of the controller algorithm, Software-in-the-Loop (SIL) results are presented in Figure 12. Monte Carlo simulations were conducted, where the control gains \(K_{d}\) and \(K_{p}\) were varied within a random uniform distribution, with a variation of 5.8% from their original values. This approach allowed for a comprehensive sensitivity analysis, evaluating the standard deviation, mean, and weighted sum of the pointing error. The results of this analysis are plotted in the subsequent graphs, with the z-axis representing the standard deviation, mean, and weighted sum of the pointing error, respectively. This detailed examination provides crucial insights into the performance and robustness of the controller algorithm under varying conditions. Figure 11: Proposed Model-based Verification and Validation framework for space project life cycle. Each project phase is tagged in yellow. The deliverables associated with each phase are sequentially referenced using acronyms: MDR (Mission Definition Review), PPR (Preliminary Project Review), SDR (System Definition Review), PDR (Preliminary Design Review), CDR (Critical Design Review), ORR (Operational Readiness Review), and ELR (End of Life Review). The V-model framework spans from project definition and decomposition to integration and testing. Furthermore, a cyclical and iterative process is described that emphasizes continuous improvements incorporated throughout the project life cycle. As described in previous sections, the congruence of the code generation embedded in the Simulink model was verified using the Simulink C Caller function. The generated code was debugged to ensure that the simulation results of the simulated controller and the implemented controller were identical. In Table 4, the data introduced into Simulink/Sensitivity Analysis for developing the Monte Carlo study for angular velocity and inertia matrix are shown. For this purpose, it is necessary to input an initial value and the mean for the normal uniform distribution. The Monte Carlo method will generate random values within the range of the initial and final values. The initial values for angular velocity and inertia matrix introduced are stable values during the Simulink simulation for the required orbit. The data introduced for sensitivity analysis for Euler angles and initial CubeSat orbit condition are shown in Table 5.  
In Figure 13, the mean pointing accuracy from Monte Carlo simulations is shown, accounting for variations in angular velocity, initial orbit conditions, and initial rotation Euler angles. This illustrates the controller's average performance across different scenarios. On the other hand, Figure 14 presents the standard deviation of pointing accuracy, highlighting the variability and robustness of the system. It demonstrates how consistently the controller maintains performance given the same variations in initial conditions. These  
Figure 12: Monte Carlo, control gain variation results. **(a)** Pointing accuracy standard deviation, control gain variation; **(b)** pointing accuracy mean, control gain variation; **(c)** weighted pointing accuracy, control gain variation. results provide a comprehensive evaluation of the controller's reliability and effectiveness under diverse operational scenarios. The response of the pointing error to different initial angular velocities is depicted in Figure 15; during the Monte Carlo simulation the initial angular velocity \({}^{B}\omega_{BN}(0)\) along the x, y, and z axes was taken as \(\left[-0.001\quad 0.003\quad 0.002\right]\) radians, respectively; then, it was varied by adding an offset. Therefore, the range of angular velocity variation is \(\left[-0.001\quad 0.003\quad 0.002\right]\) to \(\left[0.004\quad 0.008\quad 0.007\right]\); the data depicted on the x-axis are the normal resultant of the initial angular velocity range.