## 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.

*s*∈ ℝ

^{n}where

*n*= 12. The state variables have four groups, each with three components: position vector in meters (m), velocity vector in meters per second (m/s), quaternions, and angular velocity in radians per second (rad/s):

*p*denotes the position in the right-handed East North Up (

*ENU*) coordinate system,

*v*denotes the translational velocity,

*q*denotes the quaternions using the vector first formalism, and Ω denotes the angular velocity in the body frame. The computations of the quaternions must satisfy the quaternion identity [17]:

### 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.

*W*=

*Mg*such that

*M*is the mass and

*g*is the acceleration due to gravity. The total thrust in the body frame’s

*Z*axis is defined as $\u2211i=14(Tmi)$ such that [16]

*k*is the motor thrust coefficient in kg m, and $\omega i2$ is the motor spin rate of the

*i*th motor in (rad/s)

^{2}. This thrust model is also seen in another quadcopter model [18]. A friction drag vector for quadcopters can be defined as [16]

*k*

_{dx},

*k*

_{dy}, and

*k*

_{dz}are constant drag coefficients to be determined or estimated. Considering separate coefficients on each axis is an extension of Gibiansky’s formulation for drag. Overall, this drag model resembles a friction drag model or viscous damper [19]. This simplified drag model is used for simulation purposes by acting in the inertial system. A more accurate model may include components given in the body frame with velocity squared instead of linear velocity [20].

### 2.4 Torques.

*z*-axis assumes constant velocity and negligible angular acceleration:

^{i+1}positive for clockwise propellers and negative for counterclockwise propellers. Thus, the total torque about the

*z*axis from all four propellers of a quadcopter is

*x*,

*y*,

*z*axes from the motors are defined as

### 2.5 Dynamical Model Equations.

*ϕ*,

*θ*,

*ψ*) in rad, and the time derivatives of the Euler angles are related to the angular velocity vector [16]:

*s*denotes sin,

*c*denotes cos, and the quaternion identity solves

*q*

_{4}[17]. Alternatively, one can use the (3-2-1) sequence given the time derivatives of the quaternions as

*q*

_{4}, can be found using the quaternion identity from Eq. (2) after integrating [17]. Solving Eq. (7) for the angular acceleration yields:

## 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.

*m*, the second function has constraints on the velocity in m/s, the third function places constraints on the Euler angles in rad, and the fourth function constrains the angular velocities in rad/s. The third function constrains the Euler angles instead of the quaternions because the Euler angles have a clearer visual representation than the quaternions. The quadcopter must adhere to the Federal Aviation Administration (FAA) regulations by never exceeding 400 ft [21] and the initial constraints begin when the quadcopter is hovering after taking off. There are four initial constraint equations,

*E*, denoted by 0:

*f*:

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).

*η*

_{i}, are defined such that [22]

*i*= 1, 2, 3, 4. The control vector $u~\u2208R8$ can be augmented to include the slack variables,

*η*

_{i}:

### 3.3 Functional.

*f*denote initial and final instances of time,

*s*

_{0}and

*s*

_{f}have

*r*

_{1}+ 1 and

*r*

_{2}+ 1 to

*n*components,

*r*

_{1}and

*r*

_{2}are the numbers of the initial and final state constraint equations, respectively, and

*g*(

*s*,

*u*,

*t*) is the Lagrangian. It is required to find state and control functions that satisfy Eqs. (1), (19)–(23). The extended functional,

*K*, is given by

*H*(

*s*,

*u*,

*t*,

*λ*,

*η*,

*γ*) is the Pontryagin function and

*G*(

*s*

_{0},

*t*

_{0},

*s*

_{f},

*t*

_{f},

*ɛ*,

*μ*,

*ν*) contains the non-integral terminal and boundary constraints:

*μ*,

*ν*,

*γ*considered as vectors of multipliers to be determined and

*ɛ*is an arbitrary small parameter.

### 3.4 First Differential of Extended Functional.

*dK*= 0, and the general (extended) differential of the functional

*K*is derived in Ref. [22]:

*f*denote initial and final, respectively. The

*G*terms are defined as

*μ*and

*ν*are Lagrange multipliers,

*ɛ*∈ ℝ, $E\xaf$ contains the initial state constraint equations from Eq. (19), and $F\xaf$ contains the final state constraint equations from Eq. (20):

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.

_{0}and Ω

_{1}on p. 39 of Ref. [22]

*g*(

*s*,

*u*,

*t*) is the Lagrangian, Φ is defined in Eq. (23) and is the intermediate constraint variables set equal to zero,

*γ*is the vector of Lagrange multipliers for the intermediate constraints, and $Gt0$ and $Gtf$ are the non-integral boundary conditions.

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 *d*^{2}*K* > 0 yields a minimum (second derivative test). Overall, if *d*^{2}*K* > 0 for the extended functional of the roll maneuver, then the roll maneuver is optimal. However, if $d2K\u22710$ (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 (*t*_{f} − *t*_{0}).

### 4.1 Pontryagin Function.

*η*

_{i}as the slack variables and its associated Lagrange multipliers,

*γ*

_{i}, yields:

*γ*

_{i}and Φ

_{i}are the Lagrange multipliers and motor constraint equations, respectively. Adding

*γ*

^{T}Φ does not change the overall expression because Φ

_{i}= 0 as defined in Eq. (23). In other words, adding zero does not change it, which resembles the additive identity.

### 4.2 Canonical Equations and Local Optimality Conditions.

*s*is the state vector and

*λ*is the vector of Lagrange multipliers. Equation (37) comes from equating each of the terms inside the integral of Eq. (28) to zero [22]. The auxiliary control variables (

*η*

_{i}) can be determined using the local optimality condition:

*η*

_{i}depends on

*ν*

_{i}for

*i*= 1,…, 4. Therefore, there are two main cases from Eq. (38): one case has variable motor thrust when

*η*

_{i}≠ 0,

*ν*

_{i}= 0, and the other case has constant motor thrust when

*η*

_{i}= 0,

*ν*

_{i}≠ 0 [22]. The other cases involve combinations of minimum, intermediate, and maximum motor spin rates. This paper utilizes the first case with variable (intermediate) motor thrust for the $360deg$ roll maneuver [13].

### 4.3 Analytical Solutions for the Lagrange Multipliers—Nontrivial Motor Thrust.

### 4.4 Weierstrass Condition.

*o*, in

*u*

^{o}indicates optimal control. An alternate way to express the Weierstrass condition is given by [22]

### 4.5 Legendre–Clebsch Condition.

*H*

_{uu}contains all zeros, singular control and extremality exist instead of optimality. The necessary condition of Legendre–Clebsch for a weak minimum is [22]

*H*from Eq. (36) with respect to the control variables yields

The strengthened version of Legendre–Clebsch condition is positive definite and is necessary for determining optimal control. If *d*^{2}*K* > 0, then the second-order conditions must be satisfied, i.e., all the second partial derivative submatrices $(Huu,Hsu,Hus,Hss)$ must be positive definite [22].

### 4.6 Jacobi Condition (Conjugate Points).

*t*

_{0},

*t*

_{f}), then

*δs*≠ 0. For arbitrary variations

*δλ*[22]:

*C*is the vector of the integration constants.

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 $360deg$ 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.

*t*

_{0}and (2) the desired position and velocity at some terminal time,

*T*. The time-to-go to reach the desired position and velocity is the difference between the terminal and initial time:

*T*

_{go}=

*T*−

*t*

_{0}. Second, once the boundary conditions and terminal time are set, one must choose linearly independent functions,

*p*

_{i}(

*t*),

*p*

_{j}(

*t*), for

*i*= 1, 3, 5 and

*j*= 2, 4, 6 for three dimensional E Guidance. Cherry’s translational thrust acceleration in the

*x*-direction is

*c*

_{1},

*c*

_{2}∈ ℝ and

*p*

_{1}(

*t*),

*p*

_{2}(

*t*) are linearly independent functions. Numerous trials of exponential, trigonometric, and polynomial functions demonstrated that linearly independent polynomials performed best because they satisfied the boundary conditions unlike the combinations of exponential and trigonometric functions. Having linearly independent polynomials yields an invertible $F$ matrix with full rank, which is required to determine the $E$ matrix and then the coefficients,

*c*

_{k},

*k*= 1,…, 6. Third, integrating the linearly independent functions yields $F=[fij]$ and $E=[eij]$ as the inverse of the $F$ matrix:

*x*-direction, the coefficients are determined by the $E$ matrix components and the boundary conditions:

*D*” denotes desired. Finally, once the coefficients are known, the thrust acceleration profile is known. Integrating the acceleration yields the guided velocity profile, and integrating again generates the guided position profile.

*ω*×

*Iω*. Choosing

*p*

_{1,3,5}= (

*T*−

*t*)

^{2}and

*p*

_{2,4,6}= (

*T*−

*t*)

^{3}, where

*T*is the terminal time, and expanding the cross product yields

*T*= 1.626 s where the initial time is

*t*

_{0}= 0 and the time-to-go is

*T*

_{go}=

*T*−

*t*

_{0}= 1.626 s. Then,

*c*

_{1}and

*c*

_{2}are determined by

*x*with

*ϕ*from Eq. (49). The

*c*

_{i}can be computed using Eqs. (48), (50)–(53):

Note that *c*_{1} and *c*_{2} 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 *c*_{3}, *c*_{4}, *c*_{5}, and *c*_{6} 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 $360deg$ roll maneuver with these physical parameters: ℓ = 0.136 m (arm length), $k=3\u22c510\u22126kgm,b\tau =1\u22c510\u22127kgm2$, $kdx=kdy=kdz=0.25kg/s$, and *M* = 1 kg. For the $360deg$ 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 $360deg$ 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).

*s*/∂

*C*]

^{T}and [∂

*λ*/∂

*C*]

^{T}, respectively. Note that having undesired zeros in the product of the matrices may potentially yield conjugate points, i.e.,

*δs*or

*δλ*may inadvertently have all zeros. The initial values from Eq. (19) at the start of the roll maneuver are the integration constants used in the partial differentiation of the states and costates. Thus, the vector of integration constants,

*C*, is defined as

*λ*

_{4,0},

*λ*

_{5,0},

*λ*

_{6,0}. Consolidating all this together yields

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.

*ψ*is free, and the roll maneuver utilizes only the intermediate thrust case, so

*λ*

_{7}=

*λ*

_{8}=

*λ*

_{9}= 0. Since

*J*depends on

*t*

_{0}and

*t*

_{f}, $F\xaf$ and $G\xaf$ do not depend on

*t*

_{0}and

*t*

_{f}, and the terms in Eq. (29) reduce to

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.

*L*defined in Refs. [12,13] as

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, $Huu$ contains all zeros, so this satisfies the necessary Legendre–Clebsch condition but is not sufficient because $Huu$ is non-negative instead of positive definite. Having $Huu$ with all zeros confirms the mathematical theory of second-order conditions for intermediate thrust arcs [14].

### 6.7 Second-Order Conditions of Optimality.

*λ*

_{7},…,

*λ*

_{12}:

### 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, $u~$. 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., $d2K\u22650$.

Figure 6 compares the Pontryagin function based on admissible control, $u~$, and extremal control, *u*^{o}. 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 $360deg$ 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 $360deg$ 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.