Abstract
This study aims to develop and integrate guidance and control functions for applications such as rendezvous and docking, trajectory planning, entry descent and landing, executing maneuvers, and minimum fuel consumption. The utility of integrated nonlinear optimal control and explicit guidance functions replaces linear proportional-integral-derivative (PID) control laws. This approach leverages unmanned aerial vehicle (UAV) flight autonomy, thereby paving the way for creating an autonomous control technology with real-time target-relative guidance and re-targeting capabilities. A 360 deg roll maneuver combines extremal control and modified explicit guidance in which “explicit” means the acceleration commands are functions of time. The roll maneuver accurately reaches the desired position and velocity vectors through the proposed integration. Satisfying the first-order necessary optimality conditions demonstrates that the roll maneuver has extremal trajectories. To the best of the authors’ knowledge, this is the first time analyzing and testing the Weierstrass condition and the first- and second-order conditions of optimality for UAVs. Second-order conditions show that the 360 deg roll maneuver with explicit rotational attitude guidance does not have an optimal trajectory but yields an extremal trajectory.
1 Introduction
This study aims to develop a framework for integrating targeting, guidance, navigation, and control (TGNC) functions for applications. Integrating control and guidance is a first step towards completing the integration of TGNC functions. In particular, many research studies have focused on developing control technology of unmanned aerial vehicles (UAVs), where only a small number of works deal with or address questions related to optimality. One example includes using the Hamilton–Jacobi–Bellman equation based on a Dubin’s vehicle model [1]. Another study used the Hamiltonian formalism using an ad hoc intuitive approach to break the optimal trajectory into seven sections, simplifying the optimal trajectory and control [2]. Another work showed that Legendre polynomials allow for the determination of the optimal trajectories and controls. However, the analysis does not involve the Hamiltonian and the Euler–Lagrangian equations to determine extremals or satisfy the necessary and sufficient conditions of optimality [3]. Another approach utilized the Hamilton–Jacobi–Isaacs equation with a state-feedback Taylor series expansion determining optimal control [4]. Another work used the Pontryagin minimum principle and the generalized vector explicit guidance law to find the optimal control to guide a missile to intercept a target in the air and an air-to-surface munition [5]. It has been shown that many nonlinear models of flight vehicles, including quadcopters, can be linearized and consequently used linear controllers such as proportional-integral-derivative (PID) controllers [6].
Another group of studies deals with guidance problems. In particular, Lee et al. designed a nonlinear guidance and control system based on a sliding-mode control scheme for UAVs to land automatically on carriers out at sea [7]. Park et al. demonstrated that their nonlinear guidance logic guides UAVs very accurately on curvilinear trajectories. Their guidance logic succeeded in three cases: following a straight line, following a non-straight line with a perturbation from a straight line, and following a circular path [8]. Closed-form and analytical solutions of UAV non-steady flight in a vertical plane have complete and explicit solutions, which lead to targeting and guidance solutions [9]. Another study revealed that computing instantaneous screw motion invariants could allow for the computation of guidance commands [10]. George Cherry derived a general explicit, optimizing guidance law for rocket-propelled spacecraft for translational motion. According to explicit guidance laws, the steering commands can directly be expressed in terms of the current and desired values of the position and velocity vectors’ components [11].
Despite the successful implementation of PID controllers, a significant drawback of these controllers is that tuning is subjective and catered to a particular system and its parameters. Another disadvantage of linearizing nonlinear systems is that large perturbations can decrease accuracy, especially when the solution is not near equilibrium. Linearizing nonlinear systems simplifies the problem but can lead to errors, so developing nonlinear controllers yields higher accuracy. Integrating guidance with control provides commands to stay on a desired or reference trajectory by steering a vehicle to the desired position and velocity. Guidance laws are explicit only when derived as direct solutions to the equations of motion. Sometimes explicit guidance laws cannot be exact, so the explicit equations become more accurate as the gap closes between current and desired boundary conditions [11].
Analysis of existing literature shows that no other works with explicit guidance for attitude motion in the context of optimal control for rotational motion exist. However, there were studies that utilized explicit guidance for translational motion with extremal control [12,13]. Modifying Cherry’s original explicit guidance with attitude guidance formulates UAV explicit guidance, in particular, for the quadcopter roll maneuver. This paper uses the nontrivial variable motor thrust case presented in Refs. [12,13] but with a slightly modified Pontraygin function and for rotational motion instead of translational motion. The extremal control solutions are such that they satisfy the dynamical model equations, constraints on the state and controls, and terminal conditions, but do not necessarily provide minimum to the functional [14]. Admissible control solutions are those that satisfy only the dynamical model equations and constraints on the state and controls. Thus, the field of the corresponding admissible solutions contains and is larger than the field of the extremal solutions.
Reference [15] was first presented and published at the 29th AAS/AIAA Space Flight Mechanics Meeting, Ka’anapali, HI, and the main scope of this paper extends the previous work by:
incorporating the transversality condition for the roll maneuver
satisfying the Jacobi condition
satisfying the first-order necessary conditions of optimality to demonstrate extremality
considering the second-order conditions of optimality such as the Legendre–Clebsch condition
considering the second differential of the extended functional
considering the Weierstrass condition
2 Quadcopter Dynamical Model
2.1 State Vector.
2.2 Coordinate Systems.
Figure 1 shows the inertial North, East, Up frame axes denoted by N, E, U and the body frame axes denoted by X, Y, Z. The fixed inertial frame on the ground has gravity pointing in the negative U-direction. The body frame is fixed at the center of mass of the quadcopter such that the X and Y axes point in the direction of the arms with the assumption that the frame is symmetrical, and the Z-axis points up in the same direction as the motor axes.
2.3 Forces.
2.4 Torques.
2.5 Dynamical Model Equations.
3 Optimal Control Problem
This paper applies optimal control theory to the quadcopter 360 deg roll maneuver with state and control constraints. This maneuver demonstrates the utility of extremal control with the modified explicit guidance for rotational motion in which the original explicit guidance formulation was for only translational motion [11].
3.1 Control Vector.
3.2 State Constraint Equations.
Note that the yaw angle (heading), ψ, is not constrained because the quadcopter can perform the roll maneuver at any arbitrary heading. However, ψ plays a role when computing quaternions, as shown in Eq. (16).
3.3 Functional.
3.4 First Differential of Extended Functional.
A similar representation exists from the intermediate state equations to the final state constraint equations. All the terms outside of the integral in Eq. (28) are zero by the transversality conditions, where the first two terms in the integral are also zero from the canonical equations in Eq. (37). The last two terms in the integral are also zero by the local optimality condition in Eq. (37). Overall, when all the terms in Eq. (28) are zero, the necessary conditions of optimality are satisfied.
3.5 Second Differential of Extended Functional.
Thus, taking the first differential of the extended functional for the roll maneuver and satisfying dK = 0 demonstrates extremality (first derivative test). Then, taking the second differential of the extended functional and satisfying d2K > 0 yields a minimum (second derivative test). Overall, if d2K > 0 for the extended functional of the roll maneuver, then the roll maneuver is optimal. However, if (no minimum) but dK = 0 (stationary point), then the roll maneuver is only extremal.
4 Hamiltonian Formalism
The authors use the indirect method and canonical equations to analytically solve a system of ordinary differential equations, which avoids numerical methods for solving partial differential equations such as the Hamilton–Jacobi–Bellmann equation. The functional based on the Mayer problem with a terminal cost for finite time is minimized (Lawden [23]): min J = min (tf − t0).
4.1 Pontryagin Function.
4.2 Canonical Equations and Local Optimality Conditions.
4.3 Analytical Solutions for the Lagrange Multipliers—Nontrivial Motor Thrust.
4.4 Weierstrass Condition.
4.5 Legendre–Clebsch Condition.
The strengthened version of Legendre–Clebsch condition is positive definite and is necessary for determining optimal control. If d2K > 0, then the second-order conditions must be satisfied, i.e., all the second partial derivative submatrices must be positive definite [22].
4.6 Jacobi Condition (Conjugate Points).
It is important to note that if the canonical equations, local optimality equation, Legendre–Clebsch condition, Weierstrass condition, and Jacobi condition are satisfied, then these necessary conditions lead to optimality for variational problems. If strict inequalities signs exist, then the necessary conditions are strengthened into sufficient conditions from weak minimum to strong minimum [24]. Therefore, satisfying these conditions and equations for the roll maneuver demonstrates optimality. However, if the Legendre–Clebsch condition or Weierstrass condition are not satisfied for the roll maneuver, then the roll maneuver is extremal instead of optimal.
5 Explicit Guidance
Cherry’s explicit guidance (E Guidance) was derived for rocket-propelled spacecraft and begins with the rendezvous two-point boundary-value problem, and the goal is to find a thrust acceleration vector from a vehicle’s current position and velocity to a specified position and velocity at some terminal time [11]. His E Guidance formulation would become the fundamentals for Apollo lunar descent-guidance [25]. Even though E Guidance was originally for rockets, this paper demonstrates its utility for UAVs through translational and rotational guidance. In this work, modifying Cherry’s original E Guidance for translational acceleration results in attitude guidance for UAVs.
5.1 Explicit Guidance Computations.
Note that c1 and c2 are the largest because they are the coefficients for ϕ. Therefore, they play the biggest role in the roll maneuver. On the other hand, θ, ψ do not have a significant impact, so c3, c4, c5, and c6 have small values. The angular acceleration commands can be computed using these six coefficients, which lead to the torque commands and motor spin rate commands. Finally, integrating these angular accelerations twice yield the Euler angles.
5.2 Discussion of Quadcopter Guidance Problem.
The quadcopter problem considered in this paper with nonlinear dynamics, explicit guidance, and extremal control differs from other approaches. One work showed only translational guidance for quadcopters but not attitude guidance [12]. Translational guidance with a gradient vector field demonstrates autonomous path following and circular obstacle avoidance [26]. Integrating a closing velocity controller with a pursuit guidance law yields accurate landing for quadcopters compared to typical vertical descent methods [27]. Another work combines feedback control and guidance to send quadcopters to desired waypoints with a desired attitude trajectory [28]. This paper focuses on both translational and rotational guidance problems via the takeoff maneuver and roll maneuver by integrating extremal control and explicit guidance.
6 Simulation Results
The simulated roll maneuver uses physical parameters from the FliteTest 270 Chase Quad flight test and the nontrivial variable (intermediate) motor thrust case with explicit guidance.
6.1 Simulation Setup.
Simulating a FliteTest 270 Chase Quad demonstrates the roll maneuver with these physical parameters: ℓ = 0.136 m (arm length), , , and M = 1 kg. For the roll maneuver, the position and velocity constraints are approximately constant during the short maneuver, and the initial constraints obtained from the Blackbox telemetry data are (recall Eq. (51) was for initial state constraints)
Figure 2 shows the E Guidance Euler angles compared with the Euler angles from the Blackbox flight data. The original Blackbox Euler angle data has the roll angle switch from −180 deg to 180 deg because Blackbox constrains the Euler angles from −π to π. To help see this clearer, roll values beyond −π decrease by 2π, which allows the roll angle profile to transition smoothly and eliminates a vertical spike at the transition from −180 deg to 180 deg. The roll angle in E Guidance is smoother and less steep than the flight data roll angle. Even though it is harder to determine in the E Guidance roll angle, both seem to have inflection points at around 0.5 s.
For the E Guidance motor spin rates, there are small initial torques that generate a smooth roll maneuver. Then, the motor spin rates switch to negative thrust to decelerate and then switch to stabilize to neutral attitude. This switch occurs from the roll maneuver quaternions, which leads to a sinusoidal response with respect to time. For the manual PID flight data motor spin rates, the pilot makes numerous throttle fluctuations to generate the roll maneuver. The PID controller stabilizes the quadcopter’s attitude, and the setpoints are the rotation rates in all three body axes to match the stick input rates commanded by the pilot [29]. Even though the simulated guided roll maneuver is smoother, the pilot has faster reflexes, which causes bigger spikes. However, larger initial motor spin rates force him to aggressively maintain stabilization after performing the roll and cause the smaller spikes and fluctuations from 0.6 s to the end of the maneuver. Consequently, the manual PID control flight data have several fluctuations due to manual attitude stabilization, which contributes to the spikes. However, the E Guidance motor spin rates resemble bang-bang arcs, are very smooth, and reach neutral attitude at around 1 s.
6.2 Integration of State Equations.
This subsection integrates the right-hand side of the dynamical model equations in Eqs. (10), (11), (17), and (18). Figure 4 shows the integration of the state equations.
The rotational equations of motion of the angular acceleration and time derivatives of the quaternions contain several trigonometric functions due to the (3-2-1) direction cosine matrix and explicit guidance rotational commands. Curve fitting them into higher order polynomials with respect to time works well due to the smooth rotational explicit guidance commands. Having polynomials as functions of time significantly simplifies the integration since integrating trigonometric functions with polynomials is difficult to integrate. Utilizing the Runge–Kutta 8(7) pair with a seventh-order continuous extension solves the ordinary differential equations for the position and velocity state equations [30]. The relative tolerance was set to 0.001, and the absolute tolerance was set to 1 · 10−6.
6.3 Jacobi Condition (Conjugate Points).
Since there are non-zero elements in [∂s/∂C]T and [∂λ/∂C]T, δs and δλ will also have non-zero elements. Therefore, conjugate points do not exist, which satisfies the Jacobi condition.
6.4 Transversality Conditions.
The vectors, μT and νT, contain zeros because the roll maneuver utilizes the intermediate thrust case due to λ7 = λ8 = λ9 = 0.
6.5 Satisfying the First-Order Necessary Conditions of Optimality.
The last four terms of Eq. (28) are zero by the canonical equations and local optimality conditions. Thus, dJ = 0, so the roll maneuver yields an extremal trajectory.
6.6 Legendre–Clebsch Condition.
Since the roll maneuver utilizes the variable motor thrust case, λ10 = λ11 = λ12 = 0. Also, solving for one of the Lagrange multipliers associated with the primer vector in terms of the other two ensures that L = 0 to satisfy the local optimality condition from Eq. (37) [13]. Consequently, contains all zeros, so this satisfies the necessary Legendre–Clebsch condition but is not sufficient because is non-negative instead of positive definite. Having with all zeros confirms the mathematical theory of second-order conditions for intermediate thrust arcs [14].
6.7 Second-Order Conditions of Optimality.
6.8 Weierstrass Condition.
To the best of the authors’ knowledge, this is the first time that the Weierstrass condition has been considered for UAVs. Selecting a small control perturbation, δu = 0.01(rad/s), yields an admissible control in the neighborhood of the extremal control, i.e., adding the small control perturbation, δu, to the extremal control, δu, generates the admissible control, . Playing with larger values for δu generates the same overall shape of the profile but with taller spikes. Figure 5 shows that δH (unitless) is not semi-positive definite. Consequently, the Weierstrass condition is not satisfied. However, this checks out because the second-order conditions of optimality are not satisfied, i.e., .
Figure 6 compares the Pontryagin function based on admissible control, , and extremal control, uo. The overall trend is that the Pontryagin function with extremal control decreases monotonically, while the Pontryagin function with admissible control follows the same trend but with several fluctuations. Note that both demonstrate negative values throughout the entire roll maneuver. From a thermodynamics perspective, negative values indicate that work is done by the system [31]. The quadcopter consumes battery life to perform the roll maneuver such that energy has left the system, which yields negative values for the Pontryagin function.
This guidance and control solution leverages autonomous UAV applications for real-time targeting and re-targeting capabilities. The proposed integrated control and E Guidance solutions allow us to develop algorithms that execute onboard independently of human controllers without losing the accuracy of maneuver trajectories and performance time, thereby leveraging autonomy.
7 Conclusion
This study has demonstrated the implementation of the integrated extremal control and explicit guidance of a quadcopter for a roll maneuver through novel explicit guidance commands for rotational motion to satisfy the terminal boundary conditions of −2π and 0 rad/s for the desired roll angle and roll angular velocity, respectively. The smooth, integrated extremal control and E Guidance performs well against the manual roll maneuver with PID control. This paper has applied the optimal control formalism with explicit guidance for UAVs to generate a field of extremals for quadcopter takeoff and roll maneuvers. Through UAV optimal control analysis by considering the Weierstrass condition, the Jacobi condition, and the second-order conditions of optimality, the roll maneuver is extremal and/or admissible but not optimal. Future work may include conducting flight tests to obtain experimental results to verify the simulation results. Ultimately, the proposed extremal control and explicit guidance integration can leverage the autonomous capabilities of UAVs and be adjusted and extended to spacecraft and other airspace flight vehicles.
Acknowledgment
The research presented in this paper has been supported, in part, by the NASA-funded EPSCoR—Autonomous Control Technologies Unmanned Aerial Systems (ACTUAS) project.
Conflict of Interest
There are no conflicts of interest.
Data Availability Statement
The datasets generated and supporting the findings of this article are obtainable from the corresponding author upon reasonable request.