## 3 Results and Discussion
### Experiments in Flight Conditions
#### 3.2.4 Flights and Auto-Tuning in UAV Mass Change Conditions  
The last interesting aspect of the conducted research was to provide knowledge about the quality of the obtained gains in the context of transport tasks and the use of the GLD method to tune the gains of the altitude controller after changing the total takeoff weight of the UAV. A series of experimental studies was conducted for this purpose. In the simulation experiments, the efficiency of tuning of the UAV altitude controller using the GLD method was verified in conditions of lifting of the additional payload (jar on the gripper and tool accessories attached to the UAV). The gains of the other controllers (for X and Y axes, and for _yaw_ angle control), were adopted from Table 4. In subsequent simulations, the values \(\alpha\) and \(\beta\) of the \(J\) function were changed. The results are presented in Table 6, and the search process for the controller's gains is illustrated in the attached video material. Based on the obtained results, it can be noticed that in the case of both payloads tested, the values of \(k_{P}\) were smaller than in the nominal case (flight without payload), and \(k_{D}\) values were larger. Increased starting mass of the UAV forces the use of more thrust to lift the UAV and at the same time--to provide its effective balance, so as not to cause any overshoots (exceeding the given/reference altitude). In the qualitative evaluation of the results of the auto-tuning procedure, the obtained controller using a similar gain value of the proportional part, compensates with a larger gain of \(k_{D}\) the nervous behavior of the UAV (which for particular \(J\) function tries to match the dynamics to higher UAV inertia). In the first real-world experiment (Figure 17), the task of the UAV was to start the autonomous flight from a platform with a plastic bottle attached; then, to fly to the point where the GLD auto-tuning  
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline  & **GRIP** & **TOOL** & **GRIP** & **TOOL** & **GRIP** & **TOOL** \\ \hline \(\alpha\) & 1.0 & 1.0 & 0.9 & 0.9 & 0.8 & 0.8 \\ \(\beta\) & 0.0 & 0.0 & 0.1 & 0.1 & 0.2 & 0.2 \\ \(k_{Dinit}\) & 10.0 & 10.0 & 10.0 & 10.0 & 10.0 & 10.0  
procedure begins; finally, to perform 56 iterations of the algorithm in the presence of wind gusts. The drone, using its on-board avionics (including the optical-flow and ultrasonic sensors) moved vertically after stabilizing the position of the gripper, since it recognized its position as altitude equal to 0, and in effect moved upwards, which created a danger. The same behavior was observed in the second experiment, where the UAV task was to compensate its position in the X, Y, and Z axis (refer to supplementary video material). A decision was made to change the type and manner of payload attachment as shown in Figure 18, which played its role, both in the GLD auto-tuning experiments with additional mass, as well as in transportation tasks at designated nominal gains (see Figure 19). In every conducted trial (Table 7), for subsequent \(J\) functions, similar behavior was observed as in the case of simulation tests. For example, let us consider the results obtained for \(\alpha=1.0\) (Figure 20). It can be noticed that the time courses with large overshoots (when the controller forces too hard the UAV, wanting to overcome its increased inertia), result in an increase in the value of \(J\) and are effectively rejected in the procedure of seeking the smallest value of this performance index. In addition, by analyzing the subsequent values of this index (Figure 21), it can be seen that the selection of the gain value \(k_{D}\) directly implies the UAV vertical flight dynamics profile. This is particularly seen in the first bootstrap (marked in Figure 20).