## 3 Simulation and Experimental Validation
### Numerical Validation on a Robotic System
#### 3.1.2 Example 2: Discontinuously Changing Setpoint  
In this example, the setpoints for each of the links are defined as step functions with an amplitude of \(\frac{\pi}{9}rad\) and a frequency of \(\frac{\pi}{4}\frac{rad}{s}\). Thus, \(t_{r1}=0\), \(t_{r2}=4\) s, \(t_{r3}=8\) s, and \(t_{r4}=12\) s. For the reset conditions of the hybrid systems, as mentioned above, it is sufficient to set them as \(\|\dot{x}_{sp1}\|\
eq 0\) and \(\|\dot{x}_{sp2}\|\
eq 0\) since the setpoints change in a discontinuous way. The PID gains and the decay rates for the exponential functions are the same as those used in the previous example. With this in mind, as before, the classical scheme shown in Figure 1 and the proposed scheme depicted in Figure 2 are applied, with the results presented in Figures 8-13. Again, based on the hybrid system and the exponential functions considered, the proposed control scheme provides smooth trajectories to the setpoints and reduces the amplitudes of the control signals. Figure 6: Behavior of the outer link: red indicates the control scheme shown in Figure 1, and black represents the control scheme shown in Figure 2.  
Figure 7: Control signal of the outer link: red indicates the control scheme shown in Figure 1, and black represents the control scheme shown in Figure 2.  
Figure 8: Behavior of the inner link: red indicates the control scheme shown in Figure 1, and black represents the control scheme shown in Figure 2.  
Figure 10: Behavior of the outer link: red indicates the control scheme shown in Figure 1, and black represents the control scheme shown in Figure 2.  
Figure 9: Control signal of the inner link: red indicates the control scheme shown in Figure 1, and black represents the control scheme shown in Figure 2.  
Experimental Validation on an Aeronautical System: Hybrid PID Control for Quadcopter Takeoff and Landing  
Commercial quadcopters typically use separate control sequences for takeoff and landing, requiring the user or an automated system to select the appropriate sequence for proper execution. To overcome this limitation, the proposed hybrid PID control scheme was applied to manage both takeoff and landing using the default gains of the quadcopter's hover PID controller. Specifically, the PID controllers that regulate lateral, longitudinal, and angular displacements remained unchanged. Figure 2.0 Control signal of the outer link: red indicates the control scheme shown in Figure 1, and black represents the control scheme shown in Figure 2.1  
Figure 2.2 Behavior of the hybrid system included in the hybrid PID scheme for the inner link. Figure 2.3 Behavior of the hybrid system included in the hybrid PID scheme for the outer link. Although the mathematical model of a quadcopter (or quadrotor), such as the one shown in Figure 14, is discussed in detail in [24; 25], this section focuses on directly applying the proposed approach to the quadrotor depicted in Figure 15 using the Simulink Support Package for Parrot Minidrones. This MATLAB toolbox allows users to connect to the quadrotor via Bluetooth, providing access to its sensors and actuators. This package includes a controller project template designed as a framework for developing a custom controller or adapting it to specific requirements. The template integrates a comprehensive simulation of the plant model for the Parrot Rolling Spider and Parrot Mambo drones, allowing users to evaluate the performance of the model prior to deployment. This enables a thorough analysis and refinement of controller designs prior to implementation on physical hardware. Additionally, the template supports six-degree-of-freedom (6-DOF) motion equation modeling, enabling the simulation of aircraft behavior under various flight and environmental conditions. Figure 15 illustrates the Virtual Reality Modeling Language (VRML) environment used by the Simulink package for Parrot Minidrones [26; 27]. **Remark 5**.