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:

  1. incorporating the transversality condition for the roll maneuver

  2. satisfying the Jacobi condition

  3. satisfying the first-order necessary conditions of optimality to demonstrate extremality

  4. considering the second-order conditions of optimality such as the Legendre–Clebsch condition

  5. considering the second differential of the extended functional

  6. considering the Weierstrass condition

2 Quadcopter Dynamical Model

This section follows the quadcopter dynamical model in Refs. [12,13,15,16] and neglects complexities such as rotational drag forces, propeller deformation caused by high velocities or flexible propeller material, and strong winds.

2.1 State Vector.

Let the general state vector for a quadcopter be 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):
(1)
where 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.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.

Fig. 1
Body and inertial frames of a quadcopter
Fig. 1
Body and inertial frames of a quadcopter
Close modal

2.3 Forces.

The three main forces are weight, thrust, and drag. The weight force is defined as 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 i=14(Tmi) such that [16]
(3)
where k is the motor thrust coefficient in kg m, and ωi2 is the motor spin rate of the ith 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]
(4)
where kdx, kdy, and kdz 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.

Summation of torques gives the typical equation:
(5)
where the moment of inertia matrix, I, is assumed to be diagonal such that the body axes align with the principal axes:
(6)
Expanding Eq. (5) with the inertia matrix components gives
(7)
where α=ω˙ is the angular acceleration. A simple torque model about the z-axis assumes constant velocity and negligible angular acceleration:
(8)
with (−1)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
where bτ is the torque drag coefficient. Thus, the torques in the body frame about the x, y, z axes from the motors are defined as
(9)
where ℓ is the distance from the center of mass of the quadcopter to the center of a propeller, and bτ is the torque drag coefficient. The roll axis uses the even numbered motors, and the pitch axis uses the odd numbered motors. Gibiansky’s torque model resembles another quadcopter torque model [18]. The torque model neglects rotational drag forces since the quadcopter rotates at low speeds.

2.5 Dynamical Model Equations.

The velocity and acceleration vectors of the translational motion are
(10)
(11)
where the rotation matrix, R, uses the (3-2-1) sequence to rotate the body frame to the inertial frame [17]:
(12)
Expanding the thrust vector in the body frame from Eq. (3) and the drag force FD from Eq. (4) turns Eq. (11) into
(13)
where Γ is
(14)
Let Θ denote the Euler angles (ϕ, θ, ψ) in rad, and the time derivatives of the Euler angles are related to the angular velocity vector [16]:
(15)
The Euler angles and quaternions are related by the (3-2-1) direction cosine matrix sequence and the quaternion identity from Eq. (2):
(16)
where s denotes sin, c denotes cos, and the quaternion identity solves q4 [17]. Alternatively, one can use the (3-2-1) sequence given the time derivatives of the quaternions as
(17)
and the scalar part of the quaternions, q4, can be found using the quaternion identity from Eq. (2) after integrating [17]. Solving Eq. (7) for the angular acceleration yields:
(18)

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.

Let the control vector u ∈ ℝ4 have the motor angular rates such that u=[u1u2u3u4], where ui = ωi and i = 1, 2, 3, 4 based on thrust from Eq. (3) [15].

3.2 State Constraint Equations.

This subsection modifies an earlier study [15] for describing the initial and final state constraint equations. The previous study includes an intermediate state constraint, which is neglected in this paper such that this paper only considers initial and final constraints, each with four functions. The first function contains position constraints in 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:
(19)
Once the quadcopter reaches some prescribed altitude below 400 ft, it performs a 360 deg roll maneuver. The attitude at the intermediate and final states will be identical because the quadcopter resets back to neutral attitude. The final state constraints, F¯, are denoted by f:
(20)

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

The angular rates of the motors are constrained by their maximum and minimum angular rates throughout the flight, i.e., after takeoff and before landing at the final destination:
(21)
The auxiliary control variables (slack variables), ηi, are defined such that [22]
(22)
Using these slack variables converts the inequality constraint in Eq. (21) into the equality constraints:
(23)
where i = 1, 2, 3, 4. The control vector u~R8 can be augmented to include the slack variables, ηi:
(24)

The controls are admissible if they are defined and piece-wise continuous on some time interval [t0, tf] and satisfy Eqs. (10), (11), and (23) [22].

3.3 Functional.

The general functional is defined as [22]
(25)
where 0 and f denote initial and final instances of time, s0 and sf have r1 + 1 and r2 + 1 to n components, r1 and r2 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
(26)
such that H(s, u, t, λ, η, γ) is the Pontryagin function and G(s0, t0, sf, tf, ɛ, μ, ν) contains the non-integral terminal and boundary constraints:
(27)
with μ, ν, γ considered as vectors of multipliers to be determined and ɛ is an arbitrary small parameter.

3.4 First Differential of Extended Functional.

Satisfying the first-order necessary conditions of optimality means dK = 0, and the general (extended) differential of the functional K is derived in Ref. [22]:
(28)
such that 0 and f denote initial and final, respectively. The G terms are defined as
(29)
where μ and ν are Lagrange multipliers, ɛ ∈ ℝ, E¯ contains the initial state constraint equations from Eq. (19), and F¯ contains the final state constraint equations from Eq. (20):
(30)

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.

The second differential of the functional is defined as
(31)
The Ω′ terms are defined as
(32)
The terms for Ωt0 and Ωtf are assumed to be Ω0 and Ω1 on p. 39 of Ref. [22]
(33)
where 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.
The first two terms of Eq. (31) are defined as
(34)
The second partial derivatives of Gs0s0 and Gsfsf are defined by partial differentiation:
(35)

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 d2K0 (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 (tft0).

4.1 Pontryagin Function.

Forming the Pontryagin function for the Mayer problem with time optimization using the motor constraints from Eq. (23) with ηi as the slack variables and its associated Lagrange multipliers, γi, yields:
(36)
where γ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.

The canonical equations and the local optimality condition must be satisfied to find extremals of the problem [22]
(37)
where 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:
(38)
where η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.

This subsection summarizes the analytical solutions of the nontrivial variable motor thrust case’s Lagrange multipliers based on previous work and presents the main results here for the reader’s convenience [12,13,15]:
(39)
in which this change of variables makes the notation more compact:
(40)

4.4 Weierstrass Condition.

Satisfying the Weierstrass condition for all points, including corner points, on the trajectory satisfies one of the necessary conditions for optimality of variational problems [24]:
(41)
such that the superscript, o, in uo indicates optimal control. An alternate way to express the Weierstrass condition is given by [22]
(42)

4.5 Legendre–Clebsch Condition.

The Legendre–Clebsch condition determines whether the control is extremal or optimal. If Huu contains all zeros, singular control and extremality exist instead of optimality. The necessary condition of Legendre–Clebsch for a weak minimum is [22]
(43)
Taking second partial derivatives of H from Eq. (36) with respect to the control variables yields
(44)

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 (Huu,Hsu,Hus,Hss) must be positive definite [22].

4.6 Jacobi Condition (Conjugate Points).

Showing the absence of conjugate points satisfies the Jacobi condition. If R¯, the solution of the accessory Riccati equation, is finite over (t0, tf), then δs ≠ 0. For arbitrary variations δλ [22]:
(45)
If analytical solutions exist for the canonical equations and local optimality condition in Eq. (37), it is possible to find conjugate points without the condition, Huu, which appears in the accessory Riccati equation. Thus, it is desired to find analytical solutions for the canonical equations and local optimality condition such that the presence of conjugate points on an extremal can be computed like a Jacobian:
(46)
in which S and V are matrices of constants and 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.

The first step in E Guidance sets the boundary conditions of the (1) initial position and velocity at an initial time, t0 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: Tgo = Tt0. Second, once the boundary conditions and terminal time are set, one must choose linearly independent functions, pi(t), pj(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
(47)
where c1, c2 ∈ ℝ and p1(t), p2(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, ck, k = 1,…, 6. Third, integrating the linearly independent functions yields F=[fij] and E=[eij] as the inverse of the F matrix:
(48)
For the x-direction, the coefficients are determined by the E matrix components and the boundary conditions:
(49)
where “0” denotes initial, and “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.
For angular acceleration, the cross product between angular velocity and angular momentum replaces the gravity vector, i.e., ω × . Choosing p1,3,5 = (Tt)2 and p2,4,6 = (Tt)3, where T is the terminal time, and expanding the cross product yields
(50)
Choosing higher order polynomials yielded larger roll torques but did not satisfy the boundary conditions. The initial Euler angles (rad) and Euler angle velocities (rad/s) from the gyroscope measurements are (last six components of Eq. (19)):
(51)
The desired Euler angles and Euler angular velocities are
(52)
Angular acceleration commands will be determined for 1.626 s, which is how long it took for the Flite Test 270 Chase Quad to perform one complete 360deg roll maneuver. Therefore, the terminal time T = 1.626 s where the initial time is t0 = 0 and the time-to-go is Tgo = Tt0 = 1.626 s. Then, c1 and c2 are determined by
(53)
and this equation for the coefficients of the rotational guidance simply comes from replacing x with ϕ from Eq. (49). The ci can be computed using Eqs. (48), (50)(53):
(54)

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 360deg roll maneuver with these physical parameters: ℓ = 0.136 m (arm length), k=3106kgm,bτ=1107kgm2, 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)

(55)
The final constraints from the Blackbox data are (recall the desired terminal boundary conditions from Eq. (52))
(56)

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.

Fig. 2
Roll maneuver: Euler angles comparison with roll, pitch, and yaw as ϕ, θ, ψ, respectively
Fig. 2
Roll maneuver: Euler angles comparison with roll, pitch, and yaw as ϕ, θ, ψ, respectively
Close modal
The motor spin rates in Fig. 3 mainly depend on the torques and quaternions, which come from the angular acceleration and Euler angles from E Guidance:
(57)
Fig. 3
Roll maneuver: motor spin rates
Fig. 3
Roll maneuver: motor spin rates
Close modal

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.

Fig. 4
Integration of state equations: (a) Position, (b) Velocity, (c) Quaternions, and (d) Angular velocity
Fig. 4
Integration of state equations: (a) Position, (b) Velocity, (c) Quaternions, and (d) Angular velocity
Close modal

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

Having closed-form analytical solutions for the state equations and Lagrange multipliers allows one to determine the presence of conjugate points. Since the roll maneuver utilizes the nontrivial intermediate motor thrust case, the last six Lagrange multipliers vanish. Thus, there are 18 integration constants since there are 12 states and six Lagrange multipliers in the intermediate motor thrust case. Let V and S be the identity matrices, i.e., S=I12×12,V=I6×6, to ensure that S and V do not yield any undesired zeros after multiplying with [∂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
(58)
Using the analytical solutions for the states and costates and taking partial derivatives with respect to the integration constants leads to simple and quick computations. None of the state equations depend on λ and do not depend on other initial state and costate variables. The closed-form solutions for the Lagrange multipliers show that the primer vector depends on the first three Lagrange multipliers and its own initial integration constants, i.e., λ4,0, λ5,0, λ6,0. Consolidating all this together yields
(59)

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.

Only ψ is free, and the roll maneuver utilizes only the intermediate thrust case, so λ7 = λ8 = λ9 = 0. Since J depends on t0 and tf, F¯ and G¯ do not depend on t0 and tf, and the terms in Eq. (29) reduce to
(60)

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.

Using the transversality conditions from Eq. (60), zero velocity at the end of the roll maneuver, and returning to neutral attitude solves the first four terms in Eq. (28) as
(61)

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.

Computing the second partial derivatives in Huu in Eq. (44) yields zeros on the off diagonal elements:
(62)
with L defined in Refs. [12,13] as
(63)

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.

The previous subsection shows that the Legendre–Clebsch condition satisfies only the necessary condition. Therefore, it does not matter if any of Hss,Hus,Hsu are positive definite because all of the submatrices must be positive definite to have a strong minimum. Even though the roll maneuver has an extremal and not an optimal trajectory, this subsection discusses the other second partial derivative submatrices for completeness. There are numerous zeros in the Hss matrix with non-zero elements for partials with respect to quaternions and angular velocity. Since the roll maneuver utilizes the intermediate thrust case, this narrows it down further to only six non-zero elements without λ7,…, λ12:
(64)
There are also numerous zeros in Hus and Hsu with only 12 non-zero elements:
(65)

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., d2K0.

Fig. 5
Weierstrass condition test
Fig. 5
Weierstrass condition test
Close modal

Figure 6 compares the Pontryagin function based on admissible control, u~, 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.

Fig. 6
Comparison of the Pontryagin function with admissible control and extremal control (top figure is zoomed in)
Fig. 6
Comparison of the Pontryagin function with admissible control and extremal control (top figure is zoomed in)
Close modal

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.

References

1.
Munishkin
,
A. A.
,
Milutinović
,
D.
, and
Casbeer
,
D. W.
,
2016
, “
Stochastic Optimal Control Navigation With the Avoidance of Unsafe Configurations
,”
The 2016 International Conference on Unmanned Aircraft Systems
,
Arlington, VA
,
June 7–10
, IEEE, pp.
211
218
.
2.
Beul
,
M.
, and
Behnke
,
S.
,
2016
, “
Analytical Time-Optimal Trajectory Generation and Control for Multirotors
,”
The 2016 International Conference on Unmanned Aircraft Systems
,
Arlington, VA
,
June 7–10
, IEEE, pp.
87
96
.
3.
Blouin
,
C.
,
Lanteigne
,
E.
, and
Gueaieb
,
W.
,
2017
, “
Optimal Control for the Trajectory Planning of Micro Airships
,”
The 2017 International Conference on Unmanned Aircraft Systems
,
Miami, FL
,
June 13–16
, IEEE, pp.
885
892
.
4.
Garcia
,
G. A.
,
Kashmiri
,
S.
, and
Shukla
,
D.
,
2017
, “
Nonlinear Control Based on h-Infinity Theory for Autonomous Aerial Vehicle
,”
The 2017 International Conference on Unmanned Aircraft Systems
,
Miami, FL
,
June 13–16
, IEEE, pp.
336
345
.
5.
Ohlmeyer
,
E. J.
, and
Phillips
,
C. A.
,
2006
, “
Generalized Vector Explicit Guidance
,”
J. Guid. Control Dyn.
,
29
(
2
), pp.
261
268
.
6.
Kuantama
,
E.
,
Vesselenyi
,
T.
,
Dzitac
,
S.
, and
Tarca
,
R.
,
2017
, “
PID and Fuzzy-PID Control Model for Quadcopter Attitude With Disturbance Parameter
,”
Int. J. Comput. Commun. Control
,
12
(
4
), pp.
519
532
.
7.
Lee
,
S.
,
Lee
,
J.
,
Lee
,
S.
,
Choi
,
H.
,
Kim
,
Y.
,
Kim
,
S.
, and
Suk
,
J.
,
2018
, “
Sliding Mode Guidance and Control for UAV Carrier Landing
,”
IEEE Trans. Aerosp. Electron. Syst.
,
55
(
2
), pp.
951
966
.
8.
Park
,
S.
,
Deyst
,
J.
, and
How
,
J.
,
2004
, “
A New Nonlinear Guidance Logic for Trajectory Tracking
,”
AIAA Guidance, Navigation, and Control Conference and Exhibit
,
Providence, RI
,
Aug. 16–19
, p.
4900
.
9.
Azimov
,
D.
, and
Allen
,
J.
,
2018
, “
Analytical Model and Control Solutions for Unmanned Aerial Vehicle Maneuvers in a Vertical Plane
,”
J. Intell. Rob. Syst.
,
91
(
3–4
), pp.
725
733
.
10.
Azimov
,
D.
, and
Kawamura
,
E.
,
2018
, “
Real-Time Guidance, Navigation and Control Framework for Fixed-Wing Aircraft Maneuvers in a Vertical Plane
,”
2018 International Conference on Unmanned Aircraft Systems (ICUAS)
,
Dallas, TX
,
June 12–15
, IEEE, pp.
621
630
.
11.
Cherry
,
G.
,
1964
, “
A General, Explicit, Optimizing Guidance Law for Rocket-Propelled Spaceflight
,”
Astrodynamics Guidance and Control Conference
,
Los Angeles, CA
,
Aug. 24–26
, p.
638
.
12.
Kawamura
,
E.
, and
Azimov
,
D.
,
2019
, “
Integrated Optimal Control and Explicit Guidance for Quadcopters
,”
2019 International Conference on Unmanned Aircraft Systems (ICUAS)
,
Atlanta, GA
,
June 11–14
, IEEE, pp.
513
522
.
13.
Kawamura
,
E.
, and
Azimov
,
D.
,
2020
, “
Integrated Extremal Control and Explicit Guidance for Quadcopters
,”
J. Intell. Rob. Syst.
,
100
(
3
), pp.
1583
1613
.
14.
Kelley
,
H. J.
,
Kopp
,
R. E.
, and
Moyer
,
H.
,
1967
, “Singular Extremals,”
Topics in Optimization
,
G.
Leitmann
, ed.,
Academic Press, Inc.
,
London
, pp.
63
101
.
15.
Kawamura
,
E.
, and
Azimov
,
D.
,
2019
, “
Integrated Targeting, Guidance, Navigation, and Control for Unmanned Aerial Vehicles
,”
29th AAS/AIAA Space Flight Mechanics Meeting
,
Ka’anapali, HI
,
Jan. 13–17
.
16.
Gibiansky
,
A.
,
2012
, “
Quadcopter Dynamics, Simulation, and Control
,”
Github
, pp.
1
24
. https://github.com/gibiansky/experiments/blob/master/quadcopter/project.pdf
17.
Schaub
,
H.
, and
Junkins
,
J. L.
,
2018
,
Analytical Mechanics of Space Systems
, 4th ed.,
AIAA
,
Reston, VA
.
18.
Luukkonen
,
T.
,
2011
, “
Modelling and Control of Quadcopter
,” Independent Research Project in Applied Mathematics, Espoo, 22, p.
22
.
19.
Palm
,
W. J.
,
2010
,
System Dynamics
, Vol. 2,
McGraw-Hill
,
New York
.
20.
Çengel
,
Y. C.
, and
Cimbala
,
J.
,
2014
,
Fluid Mechanics: Fundamentals and Applications
, 3th ed.,
McGraw-Hill Higher Education
,
Boston, MA
.
21.
Federal Aviation Administration Press Office
,
2020
, “
Fact Sheet—Small Unmanned Aircraft Regulations (Part 107)
,”
Federal Aviation Administration
. https://www.faa.gov/newsroom/small-unmanned-aircraft-systems-uas-regulations-part-107?newsId=22615
22.
Azimov
,
D. M.
,
2017
,
Analytical Solutions for Extremal Space Trajectories
,
Butterworth-Heinemann
,
Cambridge, MA
, pp.
1
317
.
23.
Lawden
,
D. F.
,
1963
,
Optimal Trajectories for Space Navigation
, Vol. 3,
Butterworths
,
London
, p.
126
.
24.
Bryson
,
A. E.
, and
Ho
,
Y.-C.
,
2018
,
Applied Optimal Control: Optimization, Estimation, and Control
,
Routledge
,
Boca Raton, FL
.
25.
Klumpp
,
A.
,
1974
, “
Apollo Lunar-Descent Guidance
,”
Automatica
,
10
(
2
), pp.
133
146
.
26.
Wilhelm
,
J. P.
, and
Clem
,
G.
,
2019
, “
Vector Field UAV Guidance for Path Following and Obstacle Avoidance With Minimal Deviation
,”
J. Guid. Control Dyn.
,
42
(
8
), pp.
1848
1856
.
27.
Gautam
,
A.
,
Sujit
,
P.
, and
Saripalli
,
S.
,
2017
, “
Autonomous Quadrotor Landing Using Vision and Pursuit Guidance
,”
IFACPapersOnLine
,
50
(
1
), pp.
10501
10506
.
28.
Viswanathan
,
S. P.
,
Sanyal
,
A. K.
, and
Izadi
,
M.
,
2017
, “
Integrated Guidance and Nonlinear Feedback Control of Underactuated Unmanned Aerial Vehicles in SE(3)
,”
AIAA Guidance, Navigation, and Control Conference
,
Grapevine, TX
,
Jan. 9–13
, p.
1044
.
29.
Clifton
,
D.
,
2015
, “
PID Tuning. Github—Martinbudden/Betaflight/Docs/PID Tuning.md
,”
Github
. https://github.com/martinbudden/betaflight/blob/master/docs/PID
30.
Verner
,
J. H.
,
2010
, “
Numerically Optimal Runge–Kutta Pairs With Interpolants
,”
Numer. Algorithms
,
53
(
2
), pp.
383
396
.
31.
Moran
,
M. J.
,
Shapiro
,
H. N.
,
Boettner
,
D. D.
, and
Bailey
,
M. B.
,
2014
,
Fundamentals of Engineering Thermodynamics
, 8th ed.,
John Wiley & Sons
,
Hoboken, NJ
.