Geometric control using the state-dependent Riccati equation: application to aerial-acrobatic maneuvers

Acrobatic flip is one of the most challenging representatives of aggressive maneuvers to test the performance of an aerial system’s capability or a controller. A variable-pitch rotor quadcopter generates thrust in both vertical directions for the special design of the rotor’s actuation mechanism. This research proposes two possible solutions for the flip: a regulation solution based on the geometric control approach; and tracking a predefined optimal smooth trajectory covering a turnover. The first solution uses a geometric control approach that is immune to singular points since the rotation matrix is integrated on the manifold on . The second solution proposes an optimal trajectory generation for flip maneuver using open-loop optimal control, two-point boundary value problem (TPBVP) approach. Since generated open-loop state information is not applicable without a controller, the state-dependent differential Riccati equation (SDDRE) is chosen for trajectory tracking.


Introduction
Inspection and maintenance is the key point for the safety of industrial plants and refineries. The size of the refineries forces the designers to keep the infrastructure outdoor exposed to sun and rain, or in other words, degradation and corrosion. HYbrid FLying-rollIng with-snakE-aRm robot for contact inSpection (HYFLIERS) is an innovation and research action of EU Horizon 2020 programme to inspect and perform maintenance via advanced robot capabilities (https://www.oulu.fi/hyfliers/). One branch of the research is devoted to an inspection task of the pipes by rotating around it with a multi-rotor drone. The drone keeps the inspection device near the pipe during the rotary motion. The common multi-rotor drones are working in hovering conditions due to the singularity of the rotation matrix for a large role angle. This current research presents a geometric design to control the system in an aggressive role angle, without the problem of singularity. The representative of this aggressive motion is a flip maneuver. So, the elementary step for solving the singularity problem for rotating around the pipe is followed in this current research. This work contributes to (1) setting up and formalising the state-dependent Riccati equation equipped by geometric control; (2) presenting a TPBVP for quadrotor path-planning including flip maneuver. A comparative study analyses the proposed methods in this aggressive flight.
The use of variable-pitch quadrotors has been increased in the research due to their capability in flight such as agile and aggressive maneuver, flip, and inverted flight (Pretorius & Boje, 2014). Agile and aggressive maneuvers always enforce the quadrotor to undergo sudden motions and excessive energy consumption; moreover, such maneuvers are not usually optimised with smooth and practical trajectory. Constrained input path generation and control for variable-pitch UAVs were presented (Cutler & How, 2012). An algorithm was designed to assign the flip in minimum time when the time was not mentioned in the acrobatic motion, and polynomials were designed to perform the flip in predefined trajectories. The flip maneuver was simulated for attitude control (Pretorius & Boje, 2014). Adaptive control was investigated based on quaternion design for package delivery by a variable-pitch unmanned system (Shastry et al., 2018). A nonlinear adaptive controller was used to control the load uncertainty and agile flight. During the trajectory tracking in a circular motion, a flip was performed to illustrate the performance of the variable-pitch rotors. The flip was done fast to reduce the unstable situation during the acrobatic motion. The sudden flip during the flight highlights the potential of the variable-pitch rotor unmanned aerial vehicle (UAV); however, unstable situations, power consumption, and possible actuator saturation are the disadvantages of the fast acrobatic maneuver which is not optimised. Moreover, the trajectory during the flip is unpredictable. This current research proposes two methods to solve this issue: a regulation method based on a geometric control approach and trajectory tracking of an optimal predefined path for the flip.
The first approach avoids singularity via geometric control, moving to another manifold in a special group in SO(3). Although the geometric control was used for different cases such as airplane flight dynamics (Hassan & Taha, 2017), tiltedrotor UAV (Invernizzi & Lovera, 2017), haptic-virtual control (Hernández-Díez et al., 2018), UAV trajectory tracking (Shi et al., 2015), and control of a UAV transporting a payload (Goodarzi et al., 2015); the power of the method is more visible in performing acrobatic motions (Goodarzi et al., 2013;Loianno et al., 2016;Raj et al., 2017). The common form of the controller for the geometric approach is PD/PID plus a nonlinear part for compensating the rotational dynamics (Fernando et al., 2011;Lee, 2012). An attitude tracking control was presented with the exponential stability on SO(3) for largescale rotational movements (Lee, 2012). The robustness and adaptive characteristics were mainly involved in the controllers though the dominating parts were the PD or PID terms (Gamagedara et al., 2019). Here we introduce the state-dependent Riccati equation equipped with the geometric control to achieve a singularity-free nonlinear optimal controller for aggressive maneuvers.
For the second solution, open-loop optimal control is expressed for trajectory generation for a six-DoF fully coupled quadrotor considering flip maneuver. The flip time, initial, and desired position of the UAV are adjustable. The generated motion is smooth and admissible; also better to emphasise that the trajectory is optimal, a consequence of a quadratic performance criterion. The solution is found by solving a twopoint boundary value problem. The trajectory generation, in the optimal domain, was investigated in different fields such as under-actuated pendulum (Boscariol & Richiedei, 2018), robotic manipulators for load-carrying (Korayem & Nikoobin, 2008), and hovercraft motion planning (Seguchi & Ohtsuka, 2003); although, for the best knowledge of authors, optimal trajectory generation by TPBVP for flip maneuver of a quadrotor has not been studied.
Finding the optimal trajectory for the flip is half of the design and trajectory tracking by a closed-loop controller is essential to complete the task. The tracking controller must be effective to reduce the error for both the orientation and position of the system. The position and attitude of the system are coupled and this specific design removes the cascade control in closed-loop tracking. So, the incompatibility or lack of precision in one part (attitude or position) imposes a large error on the output. The state-dependent differential Riccati equation has been selected to track the trajectory. There are several methods to solve the SDDRE tracking problem though backward integration is the most precise method among them (Korayem & Nekoo, 2015a, 2015b. Backward integration provides a two-round solution; in the first round, the system sweeps the trajectory backward to generate the gains, and in the forward one, the system tracks the system with the obtained gain, forward in time (Beeler et al., 2003;Nekoo, 2020). Approximate SDRE tracking control was presented considering the feed-forward tracking vector (Cimen, 2007). The design of a suboptimal tracking controller was studied for a class of nonlinear systems (Batmani et al., 2016). Backward integration might seem impractical because of the two-round solution; however, the different applications showed otherwise such as satellite control (Abdelrahman & Park, 2013), robotics (Korayem et al., 2019), multi-motor driving unit (Wang et al., 2020), and hardware-in-the-loop satellite control (Jung et al., 2013).
The main contributions: (a) introducing the geometric control embedded within the nonlinear optimal control problem, the SDRE, to release a singularity-free method for acrobatic and aggressive maneuver (including flip) for variable-pitch quadcopters. (b) Proposing an open-loop optimal control approach for path planning of a quadrotor in six-DoF considering flip maneuver with adjustable maneuver time. Then tracking the optimal trajectory with the SDDRE controller using the backward integration solution. The sudden flip (in regulation) for a quadrotor using SDRE was reported (Nekoo, Acosta, Gomez-Tamm, et al., 2019), though the novelty of this current work is highlighted by the smoothness of the optimal trajectory for the flip, defining the desired time of the flip, and the differential form of the tracking controller.
Section 2 expresses the dynamics of a variable-pitch rotor quadcopter. Section 3 presents the geometric approach for the flip maneuver using the SDRE design. Section 4 presents the open-loop optimal control trajectory generation by TPBVP. Section 5 is dedicated to the SDDRE tracking control design. Section 6 illustrates the simulations and Section 7 states the conclusion.

Variable-pitch quadrotor dynamics
The fixed (inertial or Earth) frame is the first reference frame. The Z axis points from the centre of Earth towards the surface, Y pointing to North and X pointing to East, see Figure 1. The body frame is set on to the center-of-mass (CoM) of a UAV, presented in Figure 2; the position variables are ξ 1 = [x c , y c , z c ] T (m), and Euler angles in the inertial frame, roll-pitch-yaw, are ξ 2 = [φ, θ, ψ] T (rad). The derivatives of generalised coordinates ξ 1 and ξ 2 are named as linear velocity vector in the inertial framė ξ 1 = [ẋ c ,ẏ c ,ż c ] T (m/s), and angular velocity vector in the inertial frameξ 2 = [φ,θ ,ψ] T (rad/s).
The total thrust T B (N) is aligned with z c on the CoM of the UAV. The input torque vector is τ B = τ φ τ θ τ ψ T , (Nm); its direction is against Euler angles {φ, θ , ψ}. T B is set on body frame, and τ B acts on the inertial frame. To make the coordinates identical, the input force is transformed from the body coordinate to the inertial one:  where The purpose of using two rotational matrices in this work is to compare the geometric control with conventional methods for aggressive maneuvers. It should be noted that R ZYX (ξ 2 (t)) : (1) is only used for TPBVP (Sections 4 and 5). For the geometric control (Section 3), a new numerical R(t) ∈ SO(3) is used: where [hat] map (·) : R 3 → so(3) changes any vector to a skewsymmetric matrix: (1), is the common form of a rotation matrix used in kinematics and dynamics of the flying systems, found by three consecutive rotations on an orthogonal coordinate. To avoid the singularities in R ZYX (ξ 2 (t)), a new rotation matrix is used R(t), with specifications in Equation (2), which results in geometric control. Using the Euler-Lagrange equation, the dynamics equation of the system is found, which the translation section provides: where m(kg) represents the total mass of the system and g(m/s 2 ) indicates gravity acceleration. The orientation dynamic results in: Generalised coordinates and their velocities are set in the state vector (5) Considering state-vector (5), and equation of motion (3) and (4), the state-space equation of the UAV is found: in which e 3 = [0, 0, 1] T , R ZYX,3 (ξ 2 ) represents the last column of R ZYX (ξ 2 ), and details of C(ξ 2 ,ξ 2 ) could be found in Ref. (Nekoo, Acosta, Gomez-Tamm, et al., 2019).
The aerodynamics effect is regarded in UAV dynamics (6) by definition of D = diag(D x , D y , D z ) (kg/s) (Luukkonen, 2011). The corresponding state-space system for geometric control is also presented with a different rotation matrix: (7) in which R 3 (t) presents the last column of R(t).
The dynamics of the quadrotor is balanced by generalised force including total thrust T B and moments τ B . The statespace representation of the system is nonlinear (either of Equations (6) or (7)), coupled and under-actuated. The computation of dynamics and control is done by the generalised forcemoments. The blade angle and angular velocity of four rotors of the quadcopter are related to the generalised force-moment through a kinematic relation. Following definitions are considered to find the thrust factors C T (t): (1) Thrust T B (t): If all the blades have the same angle, the force T B (t) (in body frame) is generated. An increase in blade angle (positive direction) moves the quadrotor up and a decrease towards down. If the blade angle sets in the negative direction, the negative thrust is generated. A specific constant blade angle holds the quadrotor steady in the air.
(2) Roll τ φ (t): If the blade angles of rotor 2 and 4 differ, a rotation around x c coupled with lateral motion occurs, represented by the reactive moment τ φ (t).
(3) Pitch τ θ (t): If the blade angles of rotor 1 and 3 differ, a rotation around y c coupled with lateral motion occurs, represented by the reactive moment τ θ (t). (4) Yaw τ ψ (t): If a differential blade angle sets between rotors (1,3) and (2,4), a rotation around z c happens, represented by the reactive moment τ ψ (t). The pair of blade angles (1,3) changes with the same angle and the pair of blade angles (2,4) changes with the same one in the opposite direction. The difference between the two pairs provides yaw.
The total thrust is (Bhargavapuri et al., 2019): where K = ρπR 4 ω 2 ss , ρ(kg/m 3 ) is the air density, R(m) is the tip radius of the blade, ω ss (rad/s) is the steady-state angular velocity of the blades, and C T i (t) indicates a coefficient of the thrust of i-th variable-pitch blade. ω ss can be defined more than the minimum angular velocity of the quadcopter; the minimum value for flying is ω min = mg/(4k)(rad/s), in which k(Ns 2 /rad 2 ) is the lift constant for a special steady-state blade angle. Roll and pitch moments are where L is the distance between a rotor and CoM of the quadrotor. Yaw moment is (11) Equations (8)-(11) form a nonlinear relation between input force/moments and thrust coefficients: Several methods were presented to solve this nonlinear equation such as using first-order dynamics (Bhargavapuri et al., 2019), Mean Value Theorem, Pseudo, augmented Pseudo inverse approach, and null-space of Pseudo inverse approach (Nekoo, Acosta, Gomez-Tamm, et al., 2019). In this work, to solve the nonlinear relation in thrust allocation which leads to a system with control nonlinearity, the augmented Pseudo inverse approach is used (Section VII-C, Ref. (Nekoo, Acosta, Gomez-Tamm, et al., 2019)). First, the linear and nonlinear parts of (12) are separated: Next, the optimisation problem is defined by: where is a mild constraint in the optimisation, W is a weighting matrix, W Yaw is a weighting parameter for highlighting/weakening the effect of nonlinearity in the optimisation process, and the aim is to find the best value of C T . Since all the elements of C T have the same importance, W is set as an identity matrix. W Yaw is also set 1 to share the same weight for linear and nonlinear parts Equations (13) and (14). The time derivative of the cost function (15) with respect to C T and equating that with zero, result in We rewrite the term in which Substituting (17) into (16) and extracting C T , result in Substituting (18) into (13) also provides where (19), into (18) results in: In simulation or experiment, each time step is represented by Concerning the time steps and applying Mean Value Theorem, the thrust coefficients are (Nekoo, Acosta, Gomez-Tamm, et al., 2019): So, the thrust coefficients are updated based on the previous loop in the implementation process. The blade angles in terms of thrust coefficients are defined (Bhargavapuri et al., 2019): where (for each rotor and its blade) is the inflow ratio and v 0 (m/s) is airflow velocity. Substituting (12) in (21) and discretization result in: which is limited by the input constraints α min ≤ α i (t) ≤ α max for i = 1, . . . , 4 where α min and α max are the minimum and maximum blade angles. In practical implementation, α i (t) will be commanded to the servomotors for changing the blade angles. In simulation, α i (t) will reconstruct C T (i) = σ C lα 2 α(i) 3 − λ 2 , then it will be substituted into (12) for rebuilding the input force/moment vector for solving the state-space model (6) or (7), at time-step i.

Geometric control approach: a regulation problem for flip
The geometric control is applied for a nonlinear system (7), divided into two translation and orientation parts: in which control laws are defined The feedback vector of the geometric control approach in Equation (25) is e R e , different from conventional form ξ 2 ξ 2 . e R is derived from geometric control that includes ξ 2 within rotation matrix R(t). In other words, the new feedback is forcing the generalised coordinates of orientation ξ 2 to desired values in another geometry or manifold. The new concept prefers to regulate the total matrix to the desired matrix rather than the regulation of ξ 2 directly. e also compares the angular velocityξ 2 with desired ones in another geometry. We are using the geometric control in the feedback part and the SDRE for finding the gain in the standard coordinates. The detail is presented in this section. ξ 1,des andξ 1,des , in Equation (24), are the desired linear position and velocity of the quadcopter. The weighting matrices are set in the cost functional integrals where weighting matrices for states Q o (x o ) : R 6 → R 6×6 and Q t ∈ R 6×6 are symmetric positive semi-definite and R o (x o ) : R 3 → R 3×3 and R t ∈ R 3×3 are the ones for inputs, symmetric positive definite. The suboptimal gains K t ∈ R 6×6 and K o (x o ): R 6 → R 6×6 are solutions to the linear quadratic regulator and the state-dependent Riccati equation Since the translation and orientation dynamics are controlled separately (in a cascade design) two Riccati equations must be solved. All the matrices of the first one, Equation (26), are constant which leads to a linear quadratic regulator with constant gain K t . The second part includes nonlinear matrices that result in the SDRE (27) and the nonlinear gain K o (x o ).
Since the state-dependent coefficient (SDC) system design is a linear parameterisation in translation dynamics (22), the SDRE is turned into a linear quadratic regulator design, see Equation (26). Nonlinear matrices in (23) preserve the nonlinear shape of the SDRE (27) and provide a nonlinear optimal gain K o (x o ). Control law (24) builds the total thrust for system Equation (7) (Nekoo, Acosta, Gomez-Tamm, et al., 2019): To define the error vector for rotational dynamics in (25), an error function is chosen (Lee, 2012): where tr[·] is trace operator, R(t) is the rotation matrix, which has been defined in Equation (2), to be computed by numerical integration, and the desired one is R d (t). Variation of error function (28) is: where δR(t) =Ṙ(t) = R(t)ˆ (t) holds, that provides the derivative of the error function Considering that tr[Ax] = −(A − A T ) ∨ x holds (Zhu et al., 2017); for arbitrary A and x where vee map is defined as (·) ∨ : so(3) → R 3 , Equation (29) is rewritten as: Consequently, the orientation error vector is selected as The error vector has a second part, e (t). To find that part, the time derivative of the rotation matrix R(t) should be compared with the desired rotation matrix R d (t), though they should be lying in the same tangent space (Lee, 2012): The velocity section of error of the orientation dynamics in geometric form is also selected as: The desired rotation matrix is where φ des and θ des are as follows and ψ des could be set independently (Nekoo, Acosta, and Ollero, 2019): θ des (t) = tan −1 u t,1 cosψ des + u t,2 sinψ des u t,3 + g , where u t,i is found from Equation (24). For performing the flip maneuver at the time 0 < t 1 < t f with the desired time-span of the flip t flip = t 2 − t 1 , for example in φ direction, the following condition must be applied: in which flip value coupled be chosen π for flip and 2π for a complete rotation. Integration scheme in geometric control: we are using numerical integration with correction for ensuring that we are not deviating from the manifold.

Consider a nonlinear time-invariant affine-in-control systeṁ x(t) = f(x(t)) + g(x(t), u(t)),
where u(t) ∈ R m is an input vector and x(t) ∈ R n is a state vector. g(x(t), u(t)) : R n × R m → R n and f(x(t)) : R n → R n are smooth vector-valued functions; they satisfy the Lipschitz condition. An equilibrium point of the system (31) sets on f(0) = 0. The goal is to find a set of admissible trajectories, assembled in the vector x * (t) ∈ R n , and a set of admissible inputs u * (t) ∈ R m , to satisfy the optimal quadratic cost functional integral (Kirk, 2012): where weighting matrices for states are Q ∈ R n×n and F ∈ R n×n in t ∈ [0, t f ) and at t f . Both are symmetric positive semi-definite; the weighting matrix for inputs is R ∈ R m×m , symmetric positive definite.
The system and objective function construct the Hamiltonian where the co-state vector is λ(t). The conditions for optimality are expressed as: and since the final state and time are fixed, the boundary condition (Kirk, 2012): As a result, the final weighting matrix F is not used in tuning the optimal trajectory. In other words, error at the final time is zero in open-loop trajectory generation; therefore, the weighting matrix at the final time is not playing a role in tuning. Equation (32) results in the system: and stationary condition (33) generateṡ The necessary condition for optimality (34) presents the control law, an algebraic equation: . Solving Equations (35)-(37) numerically and simultaneously, provides the admissible control and trajectories for the optimal control problem. Setting the final (x * (t f ) = λ * (t f ) = x t f ) and initial one (x * (0) = λ * (0) = x 0 ) boundary conditions for (35) and (36), results in a two-point boundary value problem.
The presented model of the quadrotor defines a statevector x(t) ∈ R 12 and a co-state vector λ(t) ∈ R 12 ; consequently, the system to be solved is a set of differential equation . Point-to-point motion is the goal of this study, so the initial and final velocities of states are set zeros , 0, 0] T . ξ 1 and ξ 2 define the translation and rotation states of the quadrotor with respect. The orientation dynamics (4) is fully actuated and controllable; however, the translation dynamics (3) is under-actuated and common designs will not result in an admissible solution.
Suppose U 3×1 is a stable control law. Replacingξ 1 from (3) with U results in (Zuo, 2010): Changing (38) From the last row of (39), the final form of thrust is found (Zuo, 2010): For generating the co-state dynamics and control law in off-line (parametric) form, the control law U and T B must be considered in the Hamiltonian before derivation of (36) and (37). Equation (36) generates 12 co-state equation and Equation (37) results in 6 control signals, U and τ B , off-line and symbolic. Then, the main system of differential equations χ(t) = [x T (t), λ T (t)] T 24×1 , is solvable with cascaded control law (40) and input moments,

The SDDRE tracking controller: backward integration solution
Consider nonlinear system (31) in SDC parameterisation form with output vectoṙ where output vector is y(t) ∈ R p ; and C(x(t)) : R n → R p×n , B(x(t)) : R n → R n×m and A(x(t)) : R n → R n×n are held. For second-order Lagrangian systems, n is usually an even number greater than 1 and n/2 ≤ p ≤ n. The {A(x(t)), B(x(t))} pair is a completely controllable SDC design and the {A(x(t)), C(x(t))} pair is a completely observable design of the system (41) and output (42). The cost function of the SDDRE tracking is in the form of where the error vector is e(t) = y(t) − r(t), r(t) ∈ R p is desired trajectory, the weighting matrix for the error vector is Q(x(t)) : R n → R p×p , and a weighting matrix for inputs is R(x(t)) : R n → R m×m ; both of them symmetric positive definite. The weighting matrix for states is F ∈ R p×p imposing penalty at the final time.
The Hamiltonian is specified as

t)Q(x(t))e(t)} + λ T (t)[A(x(t))x(t) + B(x(t))u(t)].
Using the optimality condition (34) for H s results in control law in which λ(t) = K(x(t))x(t) + s(x(t)) is the co-state equation where K(x(t)) : R n → R n×n is optimal gain and the feedforward vector is s(x(t)) : R n → R n . Importing co-state in (43) provides:

x(t)){K(x(t))x(t) + s(x(t))}. (44)
Computing derivative of co-state vector,λ(t), and using condition (33), input (44), and mathematical operation, a system of differential equations is found (Korayem & Nekoo, 2015a): (45) The final boundary condition Excluding the derivative terms from (45)-(47), the SDDRE and feed-forward equation along with final boundary condition are found:K where Equation (50) is a boundary condition for the SDDRE (48) and Equation (51) is the one for feed-forward Equation (49). In the first round, Equations (48) and (49) are solved backward from t f → t 0 and after storing feedforward vector s(x(t)) and optimal gain K(x(t)), the forward solution begins. Further details on stability and solution to tracking case of SDDRE are referred to (Korayem & Nekoo, 2015b).
To implement the closed-loop tracking, the translational dynamic is controlled separately although the interaction with the rotational dynamic is preserved; assuming three virtual inputs for translation control. Then, the three virtual controls are set into one total thrust, such as (40). The rotational dynamic has already fully actuated with three inputs; so, overall control is a vector The summary of the tracking solution for the flip is as follows. First, design the open-loop optimal trajectory based on the TPBVP in Section 4, then track the trajectory with the SDDRE nonlinear optimal controller, Section 5. So for the second solution for acrobatic flip maneuver, tracking an optimal smooth trajectory has been employed.

Acrobatic flip with optimal trajectory tracking
The two-point boundary value problem is intended to perform a flip maneuver in the desired period. The time of simulation is set 3 s, and weighting matrices for TPBVP are Q = diag[1 1×9 , 10 1×3 ] and R = diag[1 1×3 , 0.1 1×3 ]. The model details are presented in Tables 1 and 2. The initial position is set on the equilibrium point and the desired position is (−3, 2, 1) m. The initial orientation of the quadrotor is zero for three angles and the final orientation is (π , 0, 0) rad representing flip in φ direction.
The SDDRE tracking parameters were also chosen as follows. The weighting matrices were selected as The translation and orientation states of the system are presented in Figures 3 and 4. The UAV's linear and angular velocities are illustrated in Figures 5 and 6. The optimal trajectory and configuration of the variable-pitch quadrotor are presented in Figure 7. The thrust of the system and input moments of the quadrotor are illustrated in Figures 8 and 9. The error of SDDRE tracking is shown in Figure 10. The angles of the blades are illustrated in Figure 11.

Acrobatic flip with geometric control: regulation
This section shows the acrobatic flip maneuver by a regulation approach based on geometric control, presented in Section 3. The first difference between the regulation and tracking    approach is the time of the flip. In the tracking problem, the time of the flip and motion between the initial and final conditions was set 3 s. For this regulation, almost 6 s is necessary    to complete the point-to-point motion. So, the time of simulation is defined as 6 s. Regulation embeds the flip inside the task, between t 1 = 1s and t 2 = 2s, therefore the time for the flip is 1 s. The initial and final conditions are similar to Section 6.1. The weighting matrices were selected as R o = I 3×3 , R t = I 3×3 , Q o = diag[1 1×3 , 0 1×3 ], and Q t = diag[5 1×3 , 2.5 1×3 ]. The initial condition for the rotation matrix is R(0) = I 3×3 . The position variables of the UAV are presented in Figure 12. The results are also compared with the proposed approach for a sudden flip in Ref. (Nekoo, Acosta, Gomez-Tamm, et al., 2019), known as GPGV (global position global velocity). The orientation of the quadcopter is presented in Figure 13, by rotational generalised coordinates in the global frame. The generated trajectories and configuration of the UAVs are presented in Figure 14 controlled by geometric control and GPGV. Total thrusts of the UAVs are illustrated in Figure 15. The input moments of geometric control are demonstrated in Figure 16. The blade angles are shown in Figure 17. Checking the determinant of the rotation matrix during numerical integration is important, presented in Figure 18 to emphasise correct integration. The error function is also presented in Figure 19.

Discussions and comparisons
One of the advantages of the tracking scenario in Section 6.1 is that the initial and final velocity of the UAV is zero and causes stable tracking of the optimal trajectory for the flip. The timespan of the flip is 3 s and the flip maneuver is very smoothly done in the entire time-span, Figure 7. The angle of the blade started  from the positive side and went to the negative side at 2.3 s to finish the flip, Figure 11. The error of the motion tracking was found 45 mm at the end of the motion and increased gradually over time. The error of the regulation approach by geometric control was found 14.4 mm and the GPGV was obtained 4.4 mm. The focus of the work in this research is the flip action, not the error, though the reason for the larger error for SDDRE tracking is the nature of path following. The error was zero at the beginning since the initial condition was set perfectly and going towards the final time, the error was increased to follow the trajectory. Comparing geometric control and GPGV, the smoother flip of the geometric control dedicated more time for the flip and less time for the rest of the regulation, therefore obtained more error. The commanded flip value was set π(rad), though the geometric control flipped -π(rad), Figure 13. It should be noted that in the conventional GPGV approach, the desired orientation could be commanded directly; however, in the geometric approach, the desired rotation matrix is commanded. The desired rotation matrix could possess several possible solutions for orientation angles. Observing Figure 13, flip started at 1 s and finished at 2 s. Then the transient response appeared to regulate the system to new desired angles based on Equation (30). Geometric control is smoother and GPGV is faster. This was the motivation to use a geometric approach to avoid input saturation and sudden motions, presented in Figure 17. Geometric error function perfectly reduced to zero; however, the desired orientation was set arbitrary at the end. The cause is to command directly the desired rotation matrix instead of desired orientation angles.

Conclusions
This work presented two new methods for flip maneuver, a representative of the most difficult acrobatic motion which possesses singularities. Tracking and regulation were proposed to cover the subject. The tracking method consists of point-topoint motion control of a general quadrotor using open-loop optimal control and then following the trajectory by the SDDRE controller. A fully coupled nonlinear six-DoF model of the quadrotor was considered to implement optimal trajectory generation including flip maneuver. A quadratic cost function was presented to provide a trade-off between energy consumption and state trajectories of the system. Three conditions of optimality generated the control law and co-state dynamics in addition to the dynamics of the system. Solving the three sets of equations simultaneously resulted in optimal motion design. Agile and aggressive maneuver such as flip is not possible with conventional fixed pitch propeller, so, the variable pitch concept was regarded in the dynamics of the system to make the operation possible. The regulation approach based on geometric control was also selected since it is immune to singularities. A combination of the SDRE and the geometric control has been done for the first time and applied for variable-pitch rotor quadcopter control. The geometric control generated a smoother trajectory for flip and obtained less variation and saturation for blade angles.

Disclosure statement
No potential conflict of interest was reported by the author(s).

Funding
This work is supported by the HYFLIERS project (HYbrid FLyingrolling with-snakE-aRm robot for contact inspection) funded by the European Commission H2020 Programme under grant agreement ID: 779411 (https://cordis.europa.eu/project/rcn/213049)].