## 3 Methodology
### Genetic Algorithm
Each of the optimal controllers was tuned using three methods, Manual Tuning, Particle Swarm Optimization and Genetic Algorithm. For those with an observer component (Full State Compensator and LQG) Genetic Algorithm--Hybrid was added as a fourth tuning option, whereby the observer was tuned manually with the feedback gain being tuned using GA. A graphical representation of the simulation environment is shown in Figure 10.

### Tuning Parameters for Each Controller Type

The table in Appendix B shows the parameters used in simulation of the Full State Feedback controller along with the tuning gains and static output feedback gains for the PID benchmark. Initial Conditions are applied to the State matrix to generate an offset in the model, initializing simulation outside the equilibrium condition. Process and measurement noise coefficients are also defined to test noise attenuation for each controller architecture. Appendix B also details the \(Q\) and \(R\) matrices used in manual tuning, along with the hyperparameters used in both the Particle Swarm Optimization and the Genetic Algorithm. Finally, the resulting feedback gains (\(K\)) used in the Full State Feedback controller are defined for each tuning method. The initial conditions and noise parameters remain constant throughout simulation and as such are identical to those defined in Appendices C and D.

Appendix C shows the parameters for tuning the Full State Compensator. The \(Q\) and \(R\) matrices are detailed for both the feedback gain and the Luenberger observer gain. The feedback gain for manually tuned remains the same as manually tuned Full State Feedback gain which are detailed in Appendix B. The table in Appendix D contains the parameters for tuning the Linear Quadratic Gaussian. The \(Q\) and \(R\) matrices are detailed for tuning the feedback gain while the Vd and Vn matrices are defined for tuning the Kalman gains for the manually tuned method. The

Figure 10: Simulation Environment for RUAV control schematic. The functions are as follows: 1: Allows for switching between different tuning methods for the selected controller. 2: Allows for switching between classic PID and PID controller with Static Output Feedback to enhance response. 3: Allows the vehicle model to be configured to each of the controllers where their responses can be analyzed in the scope. hyperparameters for generating controller gains using the Genetic Algorithm and Particle Swarm Optimization are also defined. Each of the controller architectures used in the simulation environment are defined in block diagram form in Appendix E. The feedback gains and Luenberger/Kalman gains are altered depending on the simulation configurations defined by Figure 10. All other gain blocks are used to represent the configuration of the Observer or the RUAVs dynamic model these are to remain the same throughout the simulation process. ## 5 Simulation Results

The findings from the simulation testbed described in the previous section are explained here. The two methods of evaluating the performance of the devised controllers are by using percentage overshoot (%OS) and settling time (Ts). These two criteria are used as the %OS measures how much the vehicle overshoots its hover state, ensuring %OS is as low as possible is key to the success of the selected controller. Additionally, the Ts is key as it ensures that the vehicle is within the equilibrium boundary (hover state) in the quickest time possible. Noise attenuation will be evaluated using the generated plots in Figures 11-14. Each contains the response of controllers' three measured outputs, Pitch displacement (\(\theta\)), Roll displacement (\(\varphi\)) and Yaw rate (r) with an added integral of Yaw rate giving Yaw displacement. ### Full State Feedback vs. Full State Compensator

The responses for Full State Feedback and Full State Compensator are shown in Figures 11 and 12.