# Automatic Control Optimization for Large-Load Plant-Protection Quadrotor
## 3 Results
### Performance in Simulation  
The RL controller in this article can generate an optimal control law with the MOIs in three axes and the rotor dynamic response constant input. We first test the performance of the plant-protection quadrotor without water in the tank, that is: \(J_{xx}=1.066\), \(J_{yy}=0.961\), \(J_{zz}=1.843\), and \  
The convergence rate of our controller is very high, and nearly no overshoot or steady-state error exists. Next, we test the performance of plant-protection quadrotors with a half-full water tank (\(J_{xx}=1.377\), \(J_{yy}=1.272\), \(J_{zz}=1.908\), and \(T_{m}=0.035\)) and a full water tank (\(J_{xx}=1.540\), \(J_{yy}=1.435\), \(J_{zz}=1.973\), \(T_{m}=0.035\)). The performance along the roll axis is given in Figure 8. We conclude that our controller can adapt to changes in the system parameters and keep the quadrotor flying stably and accurately with any amount of water in the tank.  
We test the robustness for sensor noise of the controller in Figure 9. Noises conforming to uniform distributions between \(\pm 1^{\circ}\) are added to attitude angle data of the three axes, the proposed controller still keeps the attitude of the quadrotor around the desired attitude angle, and the attitude errors are less than \(1^{\circ}\), which is acceptable.  
Traditional PID controllers are designed for comparison, and their performance and the performance of our RL controller are presented below. As show in Figure 10, PID controller 1 performs well for the quadrotor without water in the tank, but when the tank is filled with water, PID controller 1 shows obvious overshoot compared to our RL controller. As show in Figure 11, PID controller 2 performs well for the quadrotor with a full water tank, but when the tank is empty, PID controller 2 shows a notably lower convergence rate than our RL controller. In conclusion, it is difficult to control the quadrotor well with any amount of water using the same PID parameters, and the performance of our RL controller is much more robust than that of traditional PID controllers with system parameter changes.  
Figure 8: Step response performance along the roll axis.  
Figure 7: Performance along the yaw axis.  
In the training process, the states of the quadrotors are initialized randomly, so the quadrotor can recover from any state (even the full turnover state) to zero points. During the training process, the performance of our controller improves gradually. We designed tests to verify these two factors. We test controllers in different episodes (ep = 0, 1000, 5000 and 10,000) on the roll axis of the quadrotor without water in the tank. In Figure 12, the quadrotors recovered to zero point states from random initial states 100 times. We conclude that, after the training process, the controller tends to recover from any state to the zero point and that the performance improves as the training proceeds.  
Figure 11: Step response performance of PID controller 2 along the roll axis.  
Figure 10: Step response performance of PID controller 1 along the roll axis.  
Figure 9: Step response test for controllers with sensor noise.