Optimal Path-Following Guidance with Generalized Weighting Functions Based on Indirect Gauss Pseudospectral Method

An indirect Gauss pseudospectral method based path-following guidance law is presented in this paper. A virtual target moving along the desired path with explicitly specified speed is introduced to formulate the guidance problem. By establishing a virtual target-fixed coordinate system, the path-following guidance is transformed into a terminal guidance with impact angle constraints, which is then solved by using indirect Gauss pseudospectral method. Meanwhile, the acceleration dynamics are modeled as the first-order lag to the command. Using the receding horizon technique a closed-loop guidance law, which considers generalized weighting functions (even discontinuous) of both the states and the control cost, is derived. The accuracy and effectiveness of the proposed guidance law are validated by numerical comparisons. A STM32 Nucleo board based on the ARM Cortex-M7 processor is used to evaluate the real-time computational performance of the proposed indirect Gauss pseudospectral method. Simulations for various types of desired paths are presented to show that the proposed guidance law has better performance when compared with the existing results for pure pursuit, a nonlinear guidance law, and trajectory shaping path-following guidance and provides more degrees of freedom in path-following guidance design applications.


Introduction
During the last decade, there is a growing interest in unmanned aerial vehicles (UAVs) in both civilian and military applications like geological surveys, power line patrol, reconnaissance, etc.In most of these applications, the UAVs are usually required to follow a desired path accurately.The desired paths are commonly planned as straight lines or circular lines with specified constraints.To obtain a satisfactory path-following performance, a robust and efficient pathfollowing guidance law is needed.
In recent years, a variety of path-following guidance laws have been developed for UAVs.Nelson et al. [1] and Lawrence et al. [2] proposed approaches based on a notion of vector field.The vector field-based path-following approach uses vector fields to represent the desired headings to drive the UAV onto the defined path.This approach has high robustness but is complicated in construction of the vector fields and also difficult in implementation.A waypoint-based path-following law was developed by Tsourdos et al. [3], in which a number of waypoints are selected on the desired path for the vehicle to pass through.However, the results based on this approach usually have low accuracy, and, specifically, a large path-following error may occur when the path is highly curved.Another waypoint-based guidance law was proposed by Liang et al. [4] for entry vehicle.In this study, the prescribed waypoints and the expected heading angle are imposed on the vehicle as additional constraints.The proposed guidance can successfully generate a lateral trajectory that satisfies the waypoint constraint and thus guarantee that the vehicle is able to reach all the waypoints.Yang et al. [5] studied the path tracking problem for a fixed-wing unmanned aircraft using the error-regulation philosophy, in which an adaptive nonlinear model predictive controller is designed to minimize both the mean and the maximum error between the reference trajectory and the UAV, and thus provides accurate tracking performance.
Virtual target-based approaches lead to another class of path-following guidance laws.The main objective of these approaches is to chase a virtual target point moving along the desired path, which is ahead of the UAV.The virtual target is initially placed at the beginning of the desired path.Once the vehicle starts to track the desired path, a virtual speed related to the vehicle's speed and the separation between the vehicle and the virtual target is generated and imposed on the virtual target.By using the virtual speed and the curvature of the desired path, the states of the virtual target can be explicitly propagated along the desired path till the end of the engagement [6][7][8].As a consequence, the position of the virtual target is always available during the entire guidance process.The line-of-sight guidance [9] and proportional navigation guidance [10] were used to drive the vehicle to chase the virtual target, which eventually drives the vehicle onto the path, and the same problem has been considered by Medagoda and Gibbens [11] using pure pursuit guidance.However, a heading error will be caused for curved paths because pure pursuit guidance consistently compels the vehicle to head toward the target.Therefore, a pathfollowing error will occur.Further improvement to pure pursuit guidance was proposed by Cho et al. [12], in which differential geometry of space curves is used to extend the pure pursuit method for 3D path following.A nonlinear path-following guidance law adapted from pure pursuit based methods was proposed by Park et al. [13,14].This method is prominent due to its robustness of convergence for all initial geometries, the simple guidance command, and the so-called "look-ahead effect" which guarantees accurate following of curved paths.However, the lateral acceleration is undefined when the initial position of the vehicle is outside of the specified look-ahead distance from the desired path.Moreover, an overshoot response in the initial phase is another issue.Exploiting the concept of terminal missile guidance law with impact angle constraint, Ratnoo et al. [15] proposed a new path-following law based on trajectory shaping guidance.The advantages of this method are the fast rate of convergence, the negligible path-following error, and the strong robustness with respect to the minimum distance.
However, the research works mentioned above have not considered the autopilot delay, which cannot be ignored in practice, especially for the UAVs with low control authority.Most of the existing works assume that the actual lateral acceleration is the same as the command, which means that the acceleration response is instantaneous.However, this is not practical as it always takes some time to achieve the desired guidance command in practical system.This delay may degrade the overall path-following performance and even cause instability.To obtain satisfactory path-following performance, it is of necessity to take the autopilot delay into account.In addition, previous works mentioned above generally utilize simple guidance laws to chase the virtual target and do not take the weighting functions into account to improve the path-following guidance performance.As can be shown that through appropriate selections of the weighting functions, the vehicle's trajectory and acceleration profile can be shaped as desired for achieving different pathfollowing objectives.Furthermore, if the weighting functions can be chosen arbitrarily, then the flexibility of the pathfollowing guidance design could be largely enhanced.Various weighting functions, such as constant function [16], Gaussian function [17], time-to-go function [18], exponential function [19], hyperbolic tangent function [20], and sinusoidal function [21], have been used to devise terminal guidance laws for different guidance objectives.These weighting functions have their corresponding advantages, for example, reducing sensitivity with respect to initial heading error, extending the operational margin to cope with the external disturbances in the terminal phase, or alleviating the acceleration command at the initial phase.Discontinuous functions that consist of the combination of the above-mentioned weighting functions give rise to attractive and prominent types of the weighting functions, in which different weighting factors are applied to weigh the states and/or controls in different guidance phases.Consequently, discontinuous weighting functions can take advantages of several weighting functions during the entire guidance process and thus significantly enhance the guidance performance.But, meanwhile, these discontinuous weighting functions are usually intractable for most of the guidance laws in existing literatures.However, the method proposed in this paper can easily cope with these discontinuous weighting functions.The results presented in this paper are the first attempts in the literature to derive the optimal path-following guidance with generalized weighting functions using the indirect Gauss pseudospectral method.This novel approach can handle complex weighting functions (even though they are discontinuous) which are intractable for most of the guidance laws in previous studies and thus provides more degrees of freedom in path-following guidance design applications.Similar to the use of terminal missile guidance law for path following in [15], a novel guidance logic with impact angle constraint considering generalized weighting functions as well as the autopilot delay is proposed in this paper to follow the virtual target on a planar path.Detailed numerical comparisons are presented to demonstrate the high path-following performance of the proposed guidance.
This paper is organized as follows.In Section 2, the path-following problem based on virtual target pursuit is formulated.In Section 3, an indirect Gauss pseudospectral method based approach is derived, and then a closed-loop path-following guidance law is proposed.The validation of the Gauss pseudospectral method based approach and the performance of the proposed guidance law are presented by numerical simulations in Section 4. Conclusions are given in Section 5.

Problem Formulation
Consider the path-following guidance geometry shown in Figure 1.Here, M denotes a vehicle; the curve is the desired path; T is a virtual target moving along the path and governed by the curvature of the desired path.The vehicle pursues the virtual target and reduces the distance R to converge to the desired path.V m ,  m , and  t denote the vehicle velocity, vehicle heading angle, and the virtual target heading angle, respectively.a m is the vehicle acceleration perpendicular to the velocity vector to change the heading angle  m .Motivated by [11,15], the speed of the virtual target is chosen as a function of the vehicle speed v m and the closing distance R as follows: where  * is a design parameter within the guidance algorithm and represents the minimum allowed separation between the vehicle and the virtual target, because the virtual target's speed is inversely proportional to the closing distance.Therefore, the speed of the virtual target increases as the vehicle approaches the virtual target, which makes the vehicle always in pursuit of the virtual vehicle.This constraint links the dynamics of the vehicle and the virtual target and implies that the vehicle can never be closer to the virtual target than the minimum separation  * (e.g.,  ≥  * ).The choice of  * and the guidance law of the vehicle affect the vehicle following performance.In order to achieve better following performance, the vehicle is expected to approach the virtual target in tail chase.To this end, the guidance law of the vehicle had better maintain a capacity of impact angle control (the expected impact angle is the virtual target heading angle  t ).
Trajectory shaping guidance law [16] is analyzed in [15] and is proven to be an effective logic for virtual target following on a planar path.However, when taking the autopilot dynamics into account, this method will have some limitation (for instance, oscillation and instability).Moreover, weighting functions are not considered in the previous studies.
where  and  are the vehicle cross-range and heading angle defined in  d  d , respectively.Under the assumption that   is constant and  is small, (2) can be linearized as Suppose that the vehicle autopilot model is a first-order delay system: where   and   denote the guidance command and autopilot time delay constant, respectively.Equations ( 3) and ( 4) can be rewritten in a compact form as follows: where Note that this linearized kinematics has been widely used to devise optimal guidance laws with diverse constraints from many researchers in [17,18,[21][22][23].It should be pointed out that the existing work among these studies mainly concentrates on various weighting functions only on the control energy cost.To enhance the design flexibility, we consider the generalized weighting functions, even if they are discontinuous, on both the states and control to construct a novel design framework of path-following guidance law.It can be observed from Figure 1 that if the speed vector coincides with the axis Tx d , namely, y = 0 and  = 0, then the impact angle constraint will be satisfied.Therefore, we consider the following finite-time optimal control problem P: find () in the time interval [t 0 , t f ] that minimize the cost function subject to (5).
Here,  0 and   are the initial and final time of flight, respectively.  is used to control the terminal state of the vehicle. and  are used to weight the state variables and the control effort and are considered as the weighting functions.

Design of the Optimal Path-Following
Guidance Law

Optimal Solution Based on Indirect Gauss Pseudospectral
Method.The Hamiltonian function of the problem P is where () is the costate vector that satisfies the dynamics with the transversality condition According to the minimum principle, the necessary optimality condition is which yields the optimal control Substituting ( 12) into ( 5), and combining ( 9), the linear twopoint boundary-value problem can be described by For some complex or discontinuous weighting functions, it is intractable to solve (13a) and (13b) analytically.A conventional method to solve problem ((13a), (13b)) is the backward sweep method.In this method, it is assumed that () = ()(), which is substituted into (12), where () is determined by solving the differential Riccati matrix equation.It is well-known that this method needs iterations and is numerically intensive and potentially unstable.To overcome these disadvantages, a novel approach based on indirect Gauss pseudospectral method that can deal with arbitrary weighting functions is derived to tackle problem ((13a), (13b)).Because the computation interval used in the Gauss pseudospectral method is [-1, 1], it is necessary to transfer the time interval [t 0 , t f ] to [-1, 1] via the following transformation: By applying ( 14), ((13a), (13b)) is transferred to the following form: Next, ((15a), (15b)) is transformed into a set of algebraic equations based on the approximated state variable () and costate variable () using interpolating polynomials.It should be noted that the initial value is known for the state variable () in (15a), whereas the terminal value is known for the costate variable () in (15b).Therefore, there is a slight difference between approaches used to approximate () and ().For (), the boundary point, -1, and the N Gauss points [24],   ,  = 1, . . ., , which are all in the interior of the interval [-1, 1], are used as the interpolation points to form the interpolating polynomials where  i () ( = 0, . . ., ) are  + 1 Lagrange interpolating polynomials and defined as Differentiating ( 16) yields Denote   = L0 (  ) and   = L (  ); (18) can be written as for  = 1, 2, . . ., , where  ∈ R  and  ∈ R × are differential approximation matrices.
As proven in [24], the differential approximation matrices  and , and the adjoint differential approximation matrices  * and  * have the following relationships: It can be seen from (24a), (24b), and (24c) that as long as the matrix  is determined via differentiating the Lagrange interpolating polynomials   (), the other matrices ,  * , and  * can be directly calculated by employing (24a), (24b), and (24c).Furthermore, the matrix  and the Gauss weights   can be computed offline, and thus all the other matrices can be also computed offline.23a) and (23b) can be rearranged as where Mathematical Problems in Engineering In the preceding matrices,   and 0  are the  ×  identity and zero matrices, respectively.Next, we transform (25a) and (25b) into a concise form as By solving (30), the following solution to the two-point boundary-value problem of equations (15a) and (15b) is obtained: It is important to note from (31) that once the initial state value is given, the states and costates at all the Gauss points can be simultaneously calculated without any explicit integration process.However, (31) cannot provide the values of the states and costates at the boundary points because Gauss points do not include the boundary points.Since the initial value of  has been given, its terminal value can be calculated via (21), and the terminal value of  can be calculated via (22).Regarding the initial value of , the following equation can be used: Now, all the costates at the discretization points (Gauss points and the boundary points) have been obtained from ( 21), ( 22), (31), and (32); the optimal control can be thus determined via the following equation: In order to obtain an approximation of   , the following equation is employed: As the proposed guidance with impact angle constraint is derived in the new coordinate  d  d , the vehicle cross-range  and heading angle  in  d  d are computed as where (x m , y m ) and (x t , y t ) are the coordinates of the vehicle and the virtual vehicle in the inertial coordinate  I  I , respectively.
Note that the optimal solution to the problem P described previously is open-loop.To obtain a closed-loop solution, the receding horizon technique is used in this study.Finally, the procedure for implementing the proposed guidance law with impact angle constraint for the path following can be summarized as follows.
(3) Apply the optimal control at the first point,  0 , to the vehicle's dynamics and update the states of the vehicle.
(4) Update the states of the virtual vehicle according to (1) and the curvature of the desired path.

Hardware Experiment and Simulation Results
In this section, a hardware experimental platform based on the ARM Cortex-M7 processor will be addressed to evaluate the real-time computational performance of the proposed method.Simulation will be provided to validate the accuracy and effectiveness of the proposed method for solving problem P via comparing with GPOPS [26] which is an open-source software for solving optimal control problems, and then the performance of the proposed guidance law in a pathfollowing problem, taken from [15], will be investigated.In all of the following simulations, unless stated otherwise, the vehicle considered in this study has a constant velocity   as 50 m/s, a lateral acceleration saturation ±15g, and an autopilot dynamic delay   =0.5s.It should be pointed out that the  2 clearly show that the proposed method is consistent with GPOPS.Specifically, the maximum errors in the three components of the states are less than 3×10 −6 and the maximum errors in the three components of the costates are less than 1×10 −5 .These results demonstrate the high accuracy of the proposed method.Table 1 summarizes the computational time of the two methods performing on a 2.66GHz Core 2 Duo personal computer (PC) with 2 GB RAM running Windows 7. As can be seen, the proposed method is computationally superior to GPOPS.This is mainly because GPOPS must invoke an optimization algorithm (for instance, ipopt or snopt) to iteratively find the optimal solution, which is time consuming and results in a serious computational burden.However, the proposed method obtains the optimal solution by just solving algebraic equations and does not need any iterative optimization process, which makes the proposed method has high computational efficiency.
To further evaluate the real-time computational capacity of the proposed method on a real digital processor, the guidance law is performed on a STM32 Nucleo-F767ZI development board.The hardware experimental platform is shown in Figure 3.The microcontroller (STM32F767ZIT6U) used in the development board is based on the highperformance ARM Cortex-M7 32-bit RISC core operating at up to 216MHz frequency and features a floating-point unit (FPU) which supports ARM double-precision and singleprecision processing instructions.To implement the guidance law on the hardware platform, the STM32Cube MX software is used to generate the HAL-based embedded project of IAR compiler.All the matrix operations needed in the guidance law are carried out using the corresponding C functions provided by CMSIS DSP library, which is built-in suite of common signal processing functions.An oscilloscope is used to measure the computational time in the following procedure: keep the first port of GPIOB at a high level during the whole computation process, while set the port to a low level at other times.Hence the computation time can be captured by measuring the duration time of the high level.The single-precision FPU and the compiler's code optimization are turned on and off, respectively, in the test.Table 2 summarizes the computational time of the proposed guidance law running one loop (e.g., step 2step 5 in the receding horizon procedure).It is seen that the computational time increases as the discretization point increases.When turning on FPU, the computational time is far less than that of the case with FPU OFF.In addition, the compiler optimization for the embedded code is also helpful to reduce the computation time.When we use the compiler optimization and turn on FPU at the same time, the computational time can be reduced to a satisfactory level, which means the proposed method is computationally viable for onboard implementation.

Straight-Line Following.
A straight-line path is considered in this section for path-following performance analysis.The proposed guidance law is compared with trajectory shaping guidance in [15], nonlinear path-following guidance in [13,14], and pure pursuit in [11].The value of the  4. Trajectories for   =0.1s, as shown in Figure 4(a), present good path following for all four guidance laws.However, the proposed guidance converges faster to the desired path than the other work and does not cause drastic control effort against the large initial control requirement of trajectory shaping guidance as shown in Figure 4(b).For   =0.3s, the proposed guidance still obtains good path-following performance as shown in Figure 4(c), whereas pure pursuit has an overshoot; nonlinear guidance and trajectory shaping guidance start to oscillate, which cause path-following errors and slow convergences.Moreover, it is clear in Figure 4(d) that the control effort of trajectory shaping guidance is increased with oscillations until it is increased to the saturation.For an increased   =0.5s as shown in Figures 4(e) and 4(f), the overshoot of pure pursuit and the oscillation of nonlinear guidance start to degenerate, and the corresponding control efforts increase to saturation.However, the proposed guidance still follows the desired path with negligible errors.While increasing the dynamic delay to 0.7s, the path-following performances for trajectory shaping guidance, nonlinear guidance, and pure pursuit deteriorate drastically, as shown in Figure 4(g).Nonlinear guidance and trajectory shaping guidance cannot even converge to the path because of oscillations.Figure 4(h) indicates that the proposed guidance also causes control saturation during the initial phase, but as the vehicle approaches the desired path, the control effort can return to reasonable values.However, the control efforts of nonlinear guidance and trajectory shaping guidance are approximately switching between their upper and lower bounds.
The heading angle of the vehicle could be different for different missions, a robust path-following guidance law should achieve good path following and be unaffected by the value of initial heading angle.Next, we analyze the path-following performance with different initial heading angles.For fair comparison, the autopilot lag of the vehicle is set as   =0.1s and  * is 20m, where trajectory shaping, pure pursuit, and nonlinear guidance law could achieve a satisfactory performance without oscillation as shown in Figure 4(a).Trajectories for  m (t 0 )=-90deg, 0deg, and 180deg, as shown in Figure 5, present good path following for the proposed guidance, trajectory shaping, and nonlinear guidance.However, the proposed guidance converges faster to the desired path with negligible errors, whereas the pure pursuit fails to converge to the desired path.Moreover, it can be clearly seen that the trajectory shaping guidance always drives the vehicle to first move backward and then approach the desired path during the engagement.This is mainly because the trajectory shaping guidance always utilizes a tail-chase approach to chase the virtual target, which degrades the rate of convergence.Results show that the proposed guidance can achieve satisfactory path-following performances under different initial heading angles  m ( 0 ) and is very robust with respect to the value of  m ( 0 ).

Straight-Line Following with Different
Weighting Functions.Since we do not impose any constrained conditions on the weighting functions during the whole derivation of the guidance law, the proposed method can easily and directly tackle different weighting functions without any modifications, which means different weighting functions make no difference to the structure of the proposed method.This property makes the path-following guidance design very flexible to accomplish the specified objective.In this section, we take the straight-line path-following scenario as   an example and utilize different weighting functions of both states and control cost to demonstrate the path-following performance of the proposed guidance law.Three cases with different weighting functions, showed in (36)-(39), are investigated in the simulation.Case 1 considers simple weighting functions, in which both  and  are constants.Note that one special case of case 1,  = 0,  = 1, is frequently used to derive the optimal guidance, as studied in [15,16,27,28].In the second case,  is chosen as an exponential function with respect to the time-to-go, while  is chosen as a Gaussian weighting function.Case 3 presents hybrid weighting functions that are of discontinuous form, and switches between those in Cases 1 and 2 by the path-following error .Note that discontinuous weighting functions are intractable for most of the guidance laws in existing literatures.
As shown in Figure 6, the proposed guidance law can successfully drive the vehicle converge to the desired path for all cases.However, different weighting functions lead to different convergence rate and thus obtain different pathfollowing performance.For case 1, the constants  and  do not make any special considerations on shaping the vehicle's path and acceleration profile during different phases in the transition and result in a moderate path-following performance.Case 2 performs a faster convergence during the forepart of the transition, but a slower convergence when the vehicle is approaching the desired path and an obvious overshoot.It is clearly observed that case 3 possesses both the advantages of Cases 1 and 2 and performs the best pathfollowing performance not only in the convergence rate but also in the accuracy.performance of the proposed method can be flexibly designed by adjusting the weighting functions, which provides more degrees of freedom in designing a path-following guidance law for various guidance objectives.

Composite Path
Following.Next, a composite path consisting of counterclockwise semicircle, clockwise semicircle, and straight line is considered.The radius of both the semicircles is 100m.The performance of composite path following for different guidance laws is shown in Figure 8.For small values of   , all the guidance laws can provide satisfactory pathfollowing performances.However, as the value of   increases, trajectory shaping guidance and nonlinear guidance start to oscillate and have considerable path-following errors.This phenomenon is similar to that of straight-line following.Pure pursuit is not very sensitive to   and performs better than trajectory shaping guidance and nonlinear guidance, but it also has a large path-following error in curve following for large values of   .The proposed guidance law is independent of   and can follow the path with negligible errors all the time.Simulation results show that the proposed guidance law is more effective than the other guidance laws in both straight-line following and curve following.drastic oscillations around the desired path, whereas the proposed guidance and pure pursuit have negligible pathfollowing errors.Figure 9(b) shows that the oscillations of trajectory shaping guidance and nonlinear guidance are alleviated for  * =45m, but the proposed guidance still has the least errors.For  * =75m, as shown in Figure 9(c), trajectory shaping guidance and nonlinear guidance provide slow convergence, and pure pursuit performance starts to deteriorate with obvious path-following errors.However, the proposed guidance still has a satisfactory path-following performance.When further increasing  * to 105m as shown in Figure 9(d), the proposed guidance still follows the desired path with high accuracy, whereas both pure pursuit and nonlinear guidance have considerable path-following errors, and trajectory shaping guidance converges slowly.These results demonstrate that the proposed guidance law is fairly unaffected by the choice of  * .

Convergence Rate Comparison.
To further analyze the path-following performance of the proposed guidance, consider a circular path following and focus on the convergence rate.The radius of the circle is chosen as 100m, and  * =100m.
Trajectories with   =0.5s are plotted in Figure 10(a), and the corresponding position errors are shown in Figure 10(b).As can be seen in Figure 10(a), the proposed guidance presents a very good following performance, whereas trajectory shaping guidance and nonlinear guidance converge to the path slowly.Moreover, pure pursuit has a steady following error because of a higher  * and the curvature of the path.This is the inherent property of pure pursuit as shown in [15].The settling time (1%), as shown in Figure 10(b), for the proposed guidance, trajectory shaping guidance, and nonlinear guidance is 2.68s, 5.12s, and 14.00s, respectively.Thus, the proposed guidance possesses the fastest convergence to the path compared with the other guidance laws.A similar  study is carried out for a larger dynamic delay,   =0.7s.The trajectories and corresponding position errors are presented in Figures 10(c) and 10(d), respectively.The settling time for the proposed guidance, trajectory shaping guidance, and nonlinear guidance is 2.70s, 15.05s, and 16.88s, respectively.As can be seen, an increased   deteriorates the convergence rates for all of the four guidance laws.However, the proposed guidance still provides the fastest convergence to the path and is slightly affected by   .Results further highlight the significant advantage of the proposed guidance law.

Conclusions
In this paper, a novel indirect Gauss pseudospectral method based path-following guidance law with generalized weighting functions by pursuing a virtual target is presented, where the autopilot dynamic delay is considered to compensate for the vehicle's response to the guidance command.The accuracy and effectiveness of the proposed guidance are validated by comparing with GPOPS.The realtime computational performance of the proposed method is validated on a hardware platform based on the ARM Cortex-M7 processor.Simulation results show the oscillations and instability caused by the autopilot delay and demonstrate that the proposed guidance possesses a very robust pathfollowing ability and a fast convergence rate for different autopilot delays.Simulation also shows that the proposed approach has high performance when compared with the trajectory shaping guidance, nonlinear guidance, and pure pursuit.Additionally, according to selections of the weighting functions (even discontinuous), the proposed guidance law can flexibly shape the path-following trajectories and the acceleration commands, providing more degree of freedoms for the whole path-following guidance design process.

) 3 . 2 .
Implementation of Path-Following Guidance.Note that the final time of the flight   is necessary in the computation of matrices D * + , D− , Q, and G.

Figure 2 :
Figure 2: Comparisons of results between the proposed method and GPOPS.
Position errors with   =0.5s Position errors with   =0.7s

The engagement kinematics and proposed guidance are derived in 𝑇𝑥 d 𝑦 d . The equations of motion for the engagement defined in 𝑇𝑥 d 𝑦 d are given by
d is defined in Figure1.The coordinate  d  d is fixed with the virtual target and rotates with the virtual target heading angle   from the inertial reference coordinate  I  I .

Table 1 :
Computational time of the proposed method and GPOPS performing on PC.
4.1.Validation.In this section, the proposed method is compared with GPOPS by assuming that the initial value of the problem P is  0 = [150 50 0]T and the terminal time t f is 10s.Actually, the terminal time and initial value are determined by (34), (35a), and (35b) in the path-following guidance law as stated above.The assumed value of  0 and   is only used for validation in this section.The weighting functions are chosen as  = diag([1 1 1]),  = 1,   =diag([1 × 10 5 1 × 10 5 0]),  * =20m.The number of Gauss points, N, is chosen as 15.The comparison results of the states and costates presented in Figure

Table 2 :
Computational time of the proposed guidance law performing on hardware.  varies as   =0.1s, 0.3s, 0.5s, and 0.7s.Comparisons of trajectories and lateral command acceleration are presented in Figure