Next Article in Journal
Monitoring of Ammonia in Biomass Combustion Flue Gas Using a Zeolite-Based Capacitive Sensor
Previous Article in Journal
Are There Sex Differences in Wrist Velocity and Forearm Muscle Activity When Performing Identical Hand-Intensive Work Tasks?
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Load-Swing Attenuation in a Quadcopter–Payload System Through Trajectory Optimisation

School of Electrical Engineering and Telecommunications, UNSW Sydney, Sydney 2052, Australia
*
Author to whom correspondence should be addressed.
Sensors 2025, 25(17), 5518; https://doi.org/10.3390/s25175518
Submission received: 3 July 2025 / Revised: 25 August 2025 / Accepted: 2 September 2025 / Published: 4 September 2025
(This article belongs to the Section Physical Sensors)

Abstract

Advancements in multi-rotor quadcopter technology and sensing capabilities have led to their increased utilisation for last-mile delivery. However, battery capacity constraints limit their use in extended-distance delivery scenarios. A visual servoing implementation is first proposed that leverages a CUDA-accelerated tag detection algorithm for real-time pose estimation of the target. A new approach is then developed to enhance quadcopter package collection by implementing a control scheme to attenuate aggressive load-swing in a payload arm that shifts from horizontal to vertical after obtaining a vertically mounted payload. The motion of the payload arm imposes a shift in the system’s centre of mass, leading to a possible instability. A non-linear control scheme is then introduced to address this problem through attenuation of the residual energy from payload oscillation. The performance of the visual servoing approach is validated through both numerical simulations and a physical quadcopter implementation, along with the performance of the load-swing attenuation through numerical simulations.

1. Introduction

The advent of unmanned aerial vehicles (UAVs) has opened up substantial possibilities for payload delivery applications [1]. Nonetheless, the maximum operational range of payload delivery drones is limited to the flight-time endurance of a single multirotor. Moreover, the endurance per unit payload of a single multirotor can be decomposed into a function of the multirotor’s mass and electrical power requirements. This implies that an increase in the endurance per unit payload inherently leads to an increase in drone mass and power requirements [2]. Traditional package delivery networks have been under pressure due to recent surges in e-commerce usage, with specific congestion points appearing at the last-mile stage. A method to minimise this congestion in urban environments is the transfer of payloads from buildings to multirotors. To avoid landing structures outside the buildings, this payload transfer process would necessarily require the multirotor to retrieve the payload away from its centre of mass through an extension arm. This induces significant shifts in the centre of mass following payload retrieval and applies unwanted forces on the multirotor, potentially leading to flight instability. This article proposes a transformation in multirotor dynamics by allowing the payload arm to swing down from the initial horizontal position. To minimise the impact of the load swing during this transformation, a set of control laws is introduced to attenuate the swing motion. Although substantial research has been conducted on controlling slung payload systems in trajectory tracking applications [3,4,5], this article emphasises attenuating the load swing from the worst-case horizontal initial condition.

1.1. Related Work

The analysis of the rigid-body dynamics of slung-load systems originated from their application in multi-lift helicopters, where multiple helicopters were arranged to transport a single payload suspended by cables between them [6]. Although these derivations do not directly translate to the conditions encountered in quadcopter situations, as the relative motion between each helicopter is constrained in a fixed quadcopter structure, the study showcased the viability of payload conveyance by multi-lift configurations. Bisgaard et al. extended this study by presenting generic equations of motion for slung-payload systems with any number of carrier aircraft, taking into account the impacts of wire tension and quadratic aerodynamic drag [7]. Ref. [8] extended this by deriving a similar model through the Euler–Lagrange method.
The process of quadcopters approaching visual targets has been explored extensively in various contexts, including quadcopter docking and autonomous landing. Shankar et al. presented a pose-based visual servoing approach using monocular vision to establish the pose of an approaching drone relative to the extended arm of a hovering drone [9]. In combination with the PBVS implementation, Shanker et al. [9] used active, illuminated markers to speed up target identification by reducing camera exposure. Keipour et al. presented an image-based visual servoing approach to demonstrate tracking a landing target, where the pixel difference between the extracted target features in the quadcopter’s real-time view and a pre-defined view of the target was used as the error signal [10]. While image-based visual servoing is more insensitive to calibration errors, Keshmiri [11] reveals that IBVS schemes may not always guarantee completion due to the existence of singularities in the interaction matrix.
The process of load-swing attenuation while transporting multirotor-carried payloads has been widely researched in the literature. However, a number of these approaches cater to small-scale load-swing angles [5,12,13] where the multirotor dynamics can largely be linearised. In practice, this approach is infeasible for attenuation of the initial response of a payload transfer system. Classical control methods such as proportional–integral–derivative (PID) and its variants treat the payload as a disturbance [14] and aim to minimise the swing angle. Us et al. [13] extended this through optimal control by designing an LQR controller for trajectory tracking with a slung load using Jacobian linearisation around the pendulum’s downward position. While this approach reduced overshoot compared to PD control, it suffered from a loss of accuracy at large swing angles due to linearisation. Alothman et al. [15] then extended this with an iterative LQR (iLQR) scheme to allow for the controller to respond to changes in operating point induced by the slung payload. Bangura et al. [16] demonstrated a linear constrained MPC scheme where linearised quadcopter dynamics were optimised through a quadratic programming problem, allowing flight tests to show minor tracking errors at low velocities and a 50% reduction in swing angle. To improve the controller’s response to model uncertainty, Yuan et al. [17] presented an H-∞ controller that was optimised using linear matrix inequalities to achieve stable outputs for various disturbances.
In order to improve controller response to the non-linearities of the quadcopter–payload system, Guerrero-Sanchez et al. [18] proposed both a PD controller with a nonlinear coupling term and a fully nonlinear control law derived via Lyapunov stability analysis. Other nonlinear techniques, such as nonlinear MPC [19] and partial feedback linearisation [20], have also been explored for the swung-load problem. Model-free approaches, such as reinforcement learning methods, have also been presented to bypass the difficulties in system identification and nonlinear analysis. Faust et al. [21] and Panetsos et al. [22], overcame model inaccuracies by learning system parameters iteratively to improve swing attenuation for large angles.

1.2. Contributions

The state of the art is extended by presenting a feasible control solution for quadcopter flight while carrying a swung payload from an initially horizontal position. This extensively differs from existing literature by presenting a feasible and optimal solution to generate the shortest path from a worst-case initial swing-angle to the downward equilibrium condition. In existing literature, the techniques that employ a single linearisation in the downward payload position no longer produce accurate approximations when the payload begins in a horizontal position. In addition, they do not offer solutions with notions of optimality in terms of the shortest attenuation path. In this article, an application of pose-based visual servoing is then presented using time-invariant LQR (TILQR) feedback and a custom CUDA [23] port of the AprilTag detection library [24] to enable the quadcopter to approach the payload. The CUDA implementation replaces the thresholding, segmentation and clustering steps to yield an image-to-pose latency improvement by more than three times compared to public CPU implementations on similar grade hardware. An application of constrained trajectory optimisation is then used to generate a feasible swing-attenuating path for the quadcopter after obtaining the slung payload. The stability of this flight path is improved under local feedback through a time-varying linear quadratic regulator (TVLQR), augmented with an inverse-dynamics feedforward control strategy. The feasibility, controllability and observability of the time-varying closed-loop system are then evaluated to ensure the trajectory-tracking action is able to be implemented. Numerical simulations are first presented to demonstrate the effectiveness of visual servoing, followed by flight tests with an Alien 450 quadcopter. The effectiveness of the swing-attenuating trajectory and feedback controller is demonstrated through numerical simulations in the presence of model uncertainties up to ± 20 % variations in payload and quadcopter mass, as well as the incorporation of wind disturbances that are modelled as force vectors with a Gaussian distributed magnitude.

2. System Model

2.1. Model Assumptions

The quadcopter–payload dynamic model can be derived using the assumptions made in [8], while the model is constrained such that the quadcopter structure abides by rigid body dynamics. The quadcopter is considered symmetric across the x and y axes if all joints are allowed to settle to a steady state condition. This enables the centre of gravity of the quadcopter to be placed at the origin of the body-fixed frame of the quadcopter and the quadcopter rotors to behave as ideal actuator disks. The effect of the payload on the quadcopter’s dynamics is modelled under the assumption that the load behaves as a point mass on the end of a spherical pendulum. The spherical pendulum is then assumed to be mechanically connected to the centre of mass of the quadcopter structure. In addition, the mass of the pendulum arm is considered negligible while the pendulum arm is infinitely stiff, and the suspension point is assumed frictionless, allowing the pendulum arm motion to behave as an ideal spherical pendulum.

2.2. Swung Payload Equations of Motion

The dynamic model of the quadcopter with an attached slung payload is described by Equations (1)–(8). The reference frame in which the model was derived is shown by Frame W in Figure 1. The end of the pendulum is represented by a point P of length l. Full details of the use of the remaining reference frames in the model derivation are provided in Appendix A.1.
F x q = ( m l + m q ) x q ¨ + l m l cos ( ϕ l ) cos ( θ l ) θ l ¨ l m l sin ( ϕ l ) sin ( θ l ) ϕ l ¨ l m l cos ( ϕ l ) sin ( θ l ) ϕ l ˙ 2 l m l cos ( ϕ l ) sin ( θ l ) θ l ˙ 2 2 l m l cos ( θ l ) sin ( ϕ l ) θ l ˙ ϕ l ˙ + k q , d , x x q ˙ ,
F y q = ( m l + m q ) y q ¨ l m l sin ( ϕ l ) ϕ l ˙ 2 + l m l cos ( ϕ l ) ϕ l ¨ + k q , d , y y q ˙ ,
F z q = ( m l + m q ) z q ¨ + g ( m l + m q ) + l m l cos ( θ l ) sin ( ϕ l ) ϕ l ¨ + k q , d , z z q ˙ + l m l cos ( ϕ l ) sin ( θ l ) θ l ¨ + l m l cos ( ϕ l ) cos ( θ l ) ϕ l ˙ 2 + l m l cos ( ϕ l ) cos ( θ l ) θ l ˙ 2 2 l m l sin ( ϕ l ) sin ( θ l ) θ l ˙ ϕ l ˙ ,
τ ϕ q = I xx ϕ q ¨ ,
τ θ q = I yy θ q ¨ ,
τ ψ q = I zz ψ q ¨ ,
0 = l 2 m l ϕ l ¨ + l m l cos ( ϕ l ) y q ¨ + l m l cos ( θ l ) sin ( ϕ l ) z q ¨ l m l sin ( ϕ l ) sin ( θ l ) x q ¨ g l m l cos ( θ l ) sin ( ϕ l ) + l 2 m l cos ( ϕ l ) sin ( ϕ l ) θ l ˙ 2 + k l , d l 3 ϕ l ˙ 2 ϕ l ˙ | ϕ l ˙ | ,
0 = l m l cos ( ϕ l ) ( g sin ( θ l ) + cos ( θ l ) x q ¨ + sin ( θ l ) z q ¨ + l cos ( ϕ l ) θ l ¨ ) 2 l 2 m l sin ( ϕ l ) cos ( ϕ l ) θ l ˙ ϕ l ˙ + k l , d l 3 θ l ˙ 2 θ l ˙ | θ l ˙ | ,
where F x q , F y q , and F z q represent the driving forces on the quadcopter in the x, y, and z directions within frame W, respectively. τ ϕ q , τ θ q , and τ ψ q represent the torque applied to the quadcopter roll, pitch, and yaw orientations, respectively. Equations (7) and (8) represent the swing dynamics of the system and are seen to have no external force. This reveals the under-actuated behaviour of the swung load. The equations of motion can then be simplified to matrix form for entry into numerical solvers:
M ( q ) q ¨ + C ( q ˙ , q ) q ˙ + G ( q ) + D ( q ˙ ) = Q ,
where M R 8 × 8 represents the symmetric mass matrix, C R 8 × 8 represents the Coriolis matrix, G R 8 represents the gravity matrix, and Q R 8 contains the external driving forces on the system for all q. The generalised coordinate q and its time-derivative q ˙ are defined as follows:
q = x q y q z q ϕ q θ q ψ q ϕ l θ l T ,
q ˙ = x q ˙ y q ˙ z q ˙ ϕ q ˙ θ q ˙ ψ q ˙ ϕ l ˙ θ l ˙ T .
A detailed derivation of the equations of motion is included in Appendix A.1, and the complete matrices M , C , G , D , Q are included in Appendix A.2.

2.3. Fixed-Arm Equations of Motion

For the rendezvous case, the equations of motion can be simplified by substituting ϕ l , ϕ ˙ l , ϕ ¨ l = 0 and θ l = π 2 , θ ˙ l , θ ¨ l = 0 to indicate the payload arm in a fixed position. This yields
F x q = ( m l + m q ) x q ¨ + k q , d , x x q ˙ ,
F y q = ( m l + m q ) y q ¨ + k q , d , y y q ˙ ,
F z q = ( m l + m q ) z q ¨ + g ( m l + m q ) + k q , d , z z q ˙ ,
τ ϕ q = I xx ϕ q ¨ ,
τ θ q = I yy θ q ¨ ,
τ ψ q = I zz ψ q ¨ ,
τ ϕ l = 0 ,
τ θ l = 0 .
In state-space representation, this becomes
x ˙ = A x + B u + f
where,
x = [ x q , y q , z q , ϕ q , θ q , ψ q , ϕ l , θ l , x ˙ q , y ˙ q , z ˙ q , ϕ q ˙ , θ q ˙ , ψ q ˙ , ϕ l ˙ , θ l ˙ ] T u = [ F x q , F y q , F z q , τ ϕ q , τ θ l , τ ψ l , 0 , 0 ] T f = [ 0 1 × 8 , g , 0 1 × 5 ] T A = 0 6 × 6 diag 1 1 × 6 0 6 × 6 diag k q , d , x m l + m q , k q , d , y m l + m q , k q , d , z m l + m q , 0 1 × 3 , B = 0 8 × 8 diag 1 m l + m q , 1 m l + m q , 1 m l + m q , 1 i x x , 1 i y y , 1 i z z , 0 , 0 .

2.4. Trajectory Optimisation Scheme

In order to constrain the flight path of the quadcopter during the swing attenuation process, an open-loop trajectory is computed through direct collocation. This trajectory optimisation process creates a trajectory that theoretically enables the system to reach the control objective through the state space [25]. While it is also known that this technique suffers from returning suboptimal solutions due to convergence to local minima, convergence to the same solution across a range of problem initialisations can still be obtained. Furthermore, the reference frame for the trajectory is always considered to be referenced to the parcel itself. Therefore, the initial pose of the system is always taken as (0, 0, 0) m.
While the search for a policy that allows an optimal trajectory to be generated from any location in the state space of a closed-loop solution is desirable, the computation of optimal solutions for all points in the state space has exponential time complexity and thus becomes intractable for higher-dimensional problems such as the swung-payload system. As such, an open-loop solution is generated using trajectory optimisation to create a trajectory that allows the system to reach stability through the state space [25]. However, the definition of a single trajectory means that stability is undefined outside the bounds of the trajectory and, thus, a trajectory-tracking controller must also be implemented to ensure the system follows the optimal trajectory [26]. For this article, the continuous-time problem in Equation (21) is formulated as a discrete nonlinear programming (NLP) problem in Equation (22), now subject to constraints expressed in terms of the polynomial interpolation of the states and control variables:
min u ( t ) , x ( t ) 0 T u 2 ( τ ) d τ s . t . x ˙ = f ( t , x ( t ) , u ( t ) ) x min x x max u min u u max
min u 0 u N x 0 x N k = 0 N 1 t k + 1 t k 2 u k 2 + u k + 1 2 s . t . x k + 1 x k = t k + 1 t k 2 f k 2 + f k + 1 2 x min x k x max u min u k u max ,
where u represents the quadcopter control forces, f represents the non-linear system dynamics, k represents the discrete timestep, and x represents the system state. The constrained NLP problem is then iteratively minimised using the PSOPT library [27]. The optimisation approach generates an optimal trajectory given a bounded initial state x i , path x n , and final state x f . The selected trajectory input constraints are listed in Table 1, and the trajectory state constraints are listed in Table 2. The bounds placed on the quadcopter displacement states x q , y q , z q are selected considering the maximum flyable area within the testing environment. By extension, the bounds placed on the angular velocity of the quadcopter are selected using the maximum possible angular velocity obtained during manual flight. As the load is unactuated and the swing behaviour of the load is directly related to the quadcopter body acceleration, the minimum and maximum allowable angular velocities of the load’s angular velocity are left unconstrained:
The optimised trajectory in Figure 2 is then produced following the optimisation process. For conciseness, only the relevant position and derivative states are shown. To determine the discretisation error in the trajectory, the error between the optimised trajectory and system dynamics within the collocation points is explored using a method adopted from [25]. The unknown true trajectory solution, x ^ , u ^ , satisfies the system dynamics x ˙ ^ ( t ) = f ( t , x ^ , u ^ ) . The error between the optimised trajectory solution x , u , and the behaviour modelled by the true system dynamics can then be expressed as follows:
ϵ ( t ) = x ˙ ( t ) f ( t , x , u ) .
The error term e ( t ) is expected to equal zero at each collocation point and deviate elsewhere. Therefore, increasing collocation points or using a higher-order polynomial interpolation yields discretised system dynamics that better resemble the true system dynamics. The relative error between each set of collocation points is then determined by defining the normalised absolute local error:
ϵ k = max i t k t k + 1 | ϵ i ( t ) | d t w i + 1 , w i = max | x | .
The optimised trajectory shown in Figure 2 with 64 knot points yields sufficiently small collocation errors to proceed to controller design.

3. Controller Design

3.1. Visual Servoing Controller

A pose-based visual servoing scheme is developed to accomplish the target-approaching task. The pose estimation is achieved using a CUDA-accelerated AprilTag [24] detection implementation, which utilises an onboard GPU to accelerate AprilTag marker detection. The GPU processes grey-scale images through an adaptive thresholding scheme and identifies potential tag regions through connected component analysis. By then grouping components through connected-component labelling and applying quadrilateral fitting to the clusters, the algorithm confirms the presence and image coordinates of AprilTags. A more detailed explanation of the CUDA implementation is provided in Appendix B.1. The publicly available CPU-based AprilTag implementation is then leveraged to apply tag decoding and homography-based pose estimation to identify the 3D pose of the payload relative to the quadcopter. A GPU-based detection scheme is chosen to minimise the latency between the quadcopter motion and the vision pose estimate.

3.1.1. AprilTag Detection Performance

Table 3 provides a comparison between the performance of the CPU-based AprilTag3 v3.4.4 versus AprilTag CUDA v1.0. The CPU-based AprilTag3 v3.4.4 is profiled on both the Intel NUC and Jetson Orin Nano platforms using four threads with no decimation and a maximum Hamming bit error of two. AprilTag CUDA v1.0 is profiled with identical decimation and error parameters. For the CPU-based quadrilateral decoding and pose estimation stages following CUDA parsing, single-threaded operation is used to optimise performance as the low quadrilateral count makes multi-threading unnecessary. The executable is run with 10,000 iterations at each resolution to determine the execution time average ( μ ) and standard deviation ( σ ) over detections.
It can be seen from the results in Table 3 that at low resolutions (640 × 480) there is a small improvement in using AprilTag CUDA v1.0 compared to AprilTag3 v3.4.4. However, at the desired (1280 × 720) resolution, an astounding 322 % improvement in the GPU implementation via AprilTag CUDA v1.0 can be observed. These results are similarly observed at the 1600 × 900 resolution ( 264 % improvement). Furthermore, offloading the detection task to the GPU minimises the effects of the OS scheduler, as seen by the large standard deviation values when executing on the CPU.

3.1.2. Control Strategy

To maintain the AprilTag within the field-of-view of the camera at all times and to prevent loss of localisation, a piecewise linear trajectory between the current pose and the target pose to be followed by the tracking controller is generated. This yields a two-step trajectory generated by Algorithm 1 to approach the target. The trajectory achieves the objective of maintaining the AprilTag within the camera field of view by first centring the target in the image frame, servoing along the y and z axes in the quadcopter body frame B in Figure 1. Upon centring the tag within axial bounds set by ϵ yz , the quadcopter approaches the tag at a constant velocity until a final distance to the tag is reached. A linear quadratic regulator (LQR) is then used to track the piecewise linear trajectory. The overall structure of the controller combined with the reference trajectory generator is illustrated in Figure 3, where q m and q ¨ IMU are defined as the pose estimate and acceleration states from the quadcopter system, and q est and q ˙ est represent the filtered position and velocity. The tracking error between the reference state and the current state is defined as x ¯ = x 0 x .
Algorithm 1 Approach Trajectory. x 0 , y 0 and z 0 represent the initial position of the quadcopter relative to the target, and t f represents the trajectory length in seconds.
 1: procedure GenerateTrajectory( x 0 , y 0 , z 0 , t f )
 2:     t h o l d 5.0   s ; T x _ s t a r t 15.0   s ; T x _ e n d 30.0   s ; z t a r g e t 0.6   m ; f s 100 Hz
 3:     ϵ y z 0.03   m ▹ Maximum ϵ y z chosen to be smaller than tag size
 4:     T m a x max ( t f , T x _ e n d )
 5:     N T m a x · f s
 6:     t [ 0 , 1 / f s , 2 / f s , , T m a x ] ▹ Time vector with N samples
 7:     N h o l d f s · T h o l d ; N x _ s t a r t f s · T x _ s t a r t ; N x _ e n d f s · T x _ e n d
 8:
 9:    Forward Trajectory:▹ Approach target in x-axis at t = T x _ s t a r t if target centred
10:     x [ i ] x 0 i < N x _ s t a r t x 0 + α ( i ) · i N x _ s t a r t N x _ e n d N x _ s t a r t ( x t a r g e t z 0 ) N x _ s t a r t i < N x _ e n d x t a r g e t i N x _ e n d
11:    where α ( i ) = 1 if y e s t [ i ] < ϵ y z and z e s t [ i ] < ϵ y z 0 otherwise
12:
13:    Lateral and Vertical Trajectory:▹ Track target in y-axis and z-axis at t = T h o l d
14:     y [ i ] y 0 i < N h o l d 0 i N h o l d for i = 0 , , N 1
15:     z [ i ] z 0 i < N h o l d 0 i N h o l d for i = 0 , , N 1
16:    return  { t , x , y , z }
17: end procedure
To guarantee the stability of the resultant LQR controller, a positive definite input cost matrix R and state cost matrix Q are used to ensure the closed-loop system A B K remains asymptotically stable, where K represents the stabilising gain. This condition can be summarised through Equation (25) [28]:
rank ( obsv ( Q 1 2 , A ) ) = min ( m , n ) , rank ( ctrb ( A , B ) ) = min ( m , n ) ,
where m , n represent the dimensions of the resultant observability and controllability matrices. Given the state-space representation of the quadcopter in Equation (20) and the infinite-horizon cost function,
J = 0 x ¯ ( t ) T Q x ¯ ( t ) + u ( t ) T R u ( t ) d t ,
the quadcopter plant is confirmed to be completely controllable and ( Q 1 2 , A ) is confirmed to be completely observable. By then solving the continuous-time algebraic Riccati equation (CARE) to obtain a positive solution S , the optimal cost-to-go function J * = x ¯ S x ¯ is obtained. The visual servoing controller is then implemented through the control law,
u = K x ¯ ,
where the stabilising gain K = R 1 B T S . The cost matrices are then determined through Bryson’s rule [29], with the maximum acceptable state errors and control inputs selected as follows:
max ( x ¯ ) = 1.0 1.0 1.0 0.2 0.2 0.1 1.0 1.0 1.0 1.0 1.0 1.0 max ( u ) = 1.0 1.0 1.0 1.0 1.0 1.0 .
The maximum allowable state errors are determined based on the physical constraints of the laboratory environment. Therefore, a maximum trajectory deviation of 1.0   m is established, complemented by more restrictive bounds on the quadcopter’s attitude to ensure stable flight characteristics. Although this configuration may yield suboptimal tracking performance without additional parameter tuning, the resulting control authority is deemed adequate for the approach manoeuvre under investigation. The constraints for the control input, u , are similarly established by imposing limits of 1.0   N and 1.0   N   m on the translational and rotational control forces, respectively, during the approach phase.

3.2. Load Swing Attenuation Controller

A combined feedforward control–feedback control scheme is proposed to both track the optimised trajectory and provide local feedback. The feedforward control input u 0 ( t ) is generated through an inverse-dynamics approach from the optimised trajectory states, x 0 ( t ) . A time-varying linear–quadratic regulator (TVLQR) is then designed to provide the feedback control input u ( t ) . Given the nonlinear nature of quadcopter dynamics, the TVLQR allows linearisation of the quadcopter dynamics at each interpolated trajectory step. This yields a set of dynamic models that are valid for all states at all trajectory timesteps [26]. When combined with the inverse dynamics feedforward path, the control structure shown in Figure 4 is proposed. A set of one-dimensional Kalman filters is designed for velocity estimation from position and acceleration sources for each state. This design is chosen to permit both the individual tuning of noise characteristics for each axis and to reduce the computational cost from requiring 8 × 8 matrix operations to scalar operations.

3.2.1. Feedforward Controller

The optimised trajectory obtained through minimising the constrained NLP problem in Equation (22) yields a set of reference states, q ref , q ˙ ref , and q ¨ ref . Inverse dynamics is then used to compute the feedforward control input u 0 using the quadcopter–payload model:
u 0 = M ( q ref ) q ¨ ref + C ( q ˙ ref , q ref ) q ˙ ref + G ( q ref ) + D ( q ˙ ref ) .
In the absence of parametric and structural uncertainty, as well as collocation error, the feedforward input force u 0 is sufficient to follow the optimised trajectory. However, given the non-zero collocation error and expected non-zero uncertainty in real systems, a tracking feedback controller is designed in the following section.

3.2.2. Feedback Controller

The feedback controller serves to close the control loop and to minimise the effect of model uncertainties on the response of the feedforward controller. To track the optimised trajectory, TVLQR theory is leveraged to design the outer loop feedback controller. The forward dynamics of the quadcopter–payload system can be expressed as follows:
x ˙ = f ( x , u ) , where , x = q q ˙ , x ˙ = q ˙ q ¨ .
where x and u represent the state and control input vectors of the system. The optimised trajectory is then defined as x 0 ( t ) , u 0 ( t ) t [ t 1 , t 2 ) . The tracking error between the optimised trajectory and current state is defined as x ¯ ( t ) = x ( t ) x 0 ( t ) and the input error between the feedforward input and feedback input as u ¯ ( t ) = u ( t ) u 0 ( t ) . The linearised state-space representation of the error dynamics is then obtained via a first-order Taylor expansion:
x ˙ ¯ ( t ) = f ( x , u ) f ( x 0 , u 0 ) f x ( x 0 , u 0 ) x ¯ ( t ) + f u ( x 0 , u 0 ) u ¯ ( t ) = A x ¯ ( t ) + B u ¯ ( t ) .
To compute A ( t ) and B ( t ) , the quadcopter equations of motion in Equation (9) are expressed in terms of x ˙ ( t ) ,
x ˙ = q ˙ M 1 ( q ) Q C ( q ˙ , q ) q ˙ G ( q ) D ( q ˙ ) .
Thus, the Jacobians are defined as follows:
A ( t ) = 0 I M 1 q N + M 1 G q D q C q q ˙ M 1 C q ˙ q ˙ C ,
B ( t ) = 0 M 1 B ,
where N = Q C ( q ˙ , q ) q ˙ G ( q ) D ( q ˙ ) . To determine the feedback gain at a timestep k, a discrete-time cost-to-go function is defined as follows:
J = Σ k = 0 N x ¯ k T Q x ¯ k + u ¯ k T R u ¯ k ,
where x ¯ k = x ¯ ( t = k T s ) , u ¯ k = u ¯ ( t = k T s ) , and T s represents the timestep between successive points on the optimised trajectory following interpolation. The optimal cost-to-go function J * , which satisfies the Hamilton–Jacobi–Bellman equation, is determined as follows:
J * = x ¯ k T S k x ¯ k
where S k is the unique, positive-definite solution to the discrete-time differential Riccati equation calculated using A k = A ( t = k T s ) and B k = B ( t = k T s ) :
S k 1 = A k T S k A k A k T S k B k R + B k T S k B k 1 B k T S k A k + Q , where S N = Q N .
Q 0 and R > 0 are defined as constant state and control cost matrices, respectively. These are kept unchanged at all timesteps to prioritise a uniform trade-off between tracking accuracy and control input across all timesteps. The control law is then introduced as follows:
u k = u 0 k K x ¯ k , where K k = R 1 B k T S k .
In the following sections, the reachability, controllability, and observability of the proposed closed-loop system are examined.

3.3. Trajectory Verification

The feasibility of the optimised trajectory is verified by applying a finite-time feasibility analysis to compute a set of initial conditions that ensures the model stays within a specified goal state. This set is computed by leveraging methods found in [30] to first compute the stability of the goal state and then perform a simulation-based verification [31] to approximate the funnel where intermediate states both stay within state constraints and reach the goal state. For notation, this set is referred to as the invariant funnel.

3.3.1. Goal State Stability

The approximated region of attraction is first derived around the goal state under TVLQR feedback. It can be demonstrated that there exists a Lyapunov function V ( x ) over a goal region B ( ρ G ) ,
B ( ρ G ) : = { 0 V ( x ) ρ G }
where asymptotic stability is guaranteed if V ( x ) is positive definite, ρ G is a positive scalar, and V ˙ ( x ) < 0 in B ( ρ G ) . Following [30], the cost-to-go function is selected from Equation (36) at the goal sample k = G as the Lyapunov function, such that V ( x ¯ ) = x ¯ G T S G x ¯ G . To confirm that V ˙ ( x ¯ ) < 0 holds for a given ρ G , it is confirmed that a feasible h ( x ¯ G ) can be found for the sum-of-squares (SOS) program [31] in Equation (40). A binary search for the largest ρ G is then performed such that V ˙ ( x ¯ ) < 0 is maintained by the following:
find h ( x ¯ G ) subject to V ˙ ( x ¯ ) + h ( x ¯ G ) ρ G V ( x ¯ ) < ϵ , h ( x ¯ k ) 0 ,
where ϵ > 0 and h ( x ¯ k ) is a second-order polynomial. In addition, to leverage SOS, a cubic polynomial interpolation of our time-varying dynamics around the goal state ( x G , u G ) is chosen.

3.3.2. Funnel Simulation

To approximate the invariant funnel through simulation, a funnel parameter ϕ k is found such that the quadcopter state at k lies within the hyper-ellipse bounded by the following:
x ¯ k T S k x ¯ k < ϕ k , k = 0 N 1
where N represents the last timestep in the optimised trajectory. To initialise this simulation and provide sufficient coverage across the initial conditions bounded by Table 2, random initial states x s are considered within the initial bounds defined in Table 2. Then, forward time simulation is performed using the method in Section 4.1 under the control law in Equation (38). Upon completion of the simulation, if any of the state constraints in Table 2 are violated, or the final state does not lie in the goal region, the invariant funnel is shrunk based on the cost-to-go of the trajectory starting from k = 0 ,
ϕ k , new = min ϕ k , x ¯ k T S k x ¯ k , k = 0 N 1
The approximated invariant funnel in Figure 5 is generated from 10,000 simulations with random initial states and takes ρ G = 0.5746 from the formal verification of the goal region of attraction. The pseudo-random initial states are generated on a uniform distribution with the mt19937 Mersenne Twister generator found in the C++ STL [32].

3.4. Controllability and Observability

The controllability of the linearised system is then investigated by computing the rank of the controllability Gramian. It is noted that the controllability Gramian satisfies the linear matrix differential equation,
W c ˙ ( t , t 0 ) = A ( t ) W c ( t , t 0 ) + W c ( t , t 0 ) A ( t ) T + B ( t ) B ( t ) T , W c ( t 0 , t 0 ) = 0 ,
where W c ( t , t 0 ) is the controllability Gramian over the interval [ t 0 , t ] [28]. The system is controllable over the interval [ t 0 , t f ] if the Gramian W c ( t f , t 0 ) is positive definite, or being full rank. It is then integrated through time, noting that the state transition matrix W c ( t f , t 0 ) limits to the zero matrix as it approaches the boundary time. The numerical integration is performed using a timestep of Δ t = 0.001 seconds over a finite interval [ t 0 , t f ] through the forward Euler integration,
W ˙ c , k + 1 = W ˙ c , k + Δ t A k W ˙ c , k + W ˙ c , k A k T + B k B k T ,
for k = 0 , 1 , , N 1 , where W ˙ c , 0 = 0 , W ˙ c , N W c ( t f , t 0 ) , t k = t 0 + k Δ t , Δ t = 0.001 , t 0 = 0 , t f = 5 , and N = 5000 . The rank of the resultant controllability Gramian is then computed through singular value decomposition (SVD), such that
rank ( W c , N ) = rank ( W Σ V T ) = rank ( Σ ) .
Likewise, the observability Gramian, M, is computed over the interval [ t 0 , t ] . In reference to [28], it is noted that the observability Gramian satisfies the linear matrix differential equation,
M ˙ ( t , t 1 ) = A ( t ) M ( t , t 0 ) M ( t , t 0 ) A ( t ) T C ( t ) C ( t ) T , M ( t 1 , t 1 ) = 0 ,
where C represents the output matrix C = I 8 × 8 0 8 × 8 . A backward Euler integration is then performed with a timestep of Δ t = 0.001 seconds to obtain M ( t , t 1 ) . Similar to the controllability Gramian, SVD is used to determine the rank of the observability Gramian. The full rank W c and M indicate the controllability and observability of the LTV system across the entire trajectory with unbounded control actions.

4. Results

4.1. Model Simulation

The performance of the proposed LQR and inverse dynamic control strategies is first examined using the non-linear derived models of a quadcopter and a quadcopter–payload system, respectively. This allows for faster initial tuning of each controller without fully implementing the controllers on the off-board computer. A Runge–Kutta method iterative simulation is first performed on the derived models to evaluate the unforced response of the quadcopter–payload system. To permit this, the dynamics in Equation (9) are arranged as a differential-algebraic equation of index one.
x = q q ˙ , x ˙ = q ˙ q ¨
where q R 8 × 1 , q ˙ R 8 × 1 , x R 16 × 1 , and x ˙ R 16 × 1 . This allows the state dynamics to be arranged in the following form:
E ( x ) x ˙ = f ( x )
where
E ( x ) = I 0 0 M ( q ) , f ( x ) = q ˙ C ( q , q ˙ ) q ˙ G ( q ) D ( q , q ˙ ) .
The system dynamics are then numerically integrated. For the following simulations and flight tests, Table 4 lists the parameters used (referenced from an Alien 450 quadcopter).

4.2. Approach Task

This section discusses the performance of the approach task, which is characterised through two testing methodologies—a simulation of the LQR controller tracking an AprilTag target imaged by a virtual camera stream within the Gazebo simulation environment, and a physical flight test conducted within the autonomous systems laboratory. For all tests, the reference trajectory is generated through Algorithm 1 along with the AprilTag CUDA v1.0 implementation detailed in Section 3.1. The camera intrinsics are obtained through a checkerboard pattern calibration.

4.2.1. Gazebo Simulation Environment

To minimise the risk of hardware damage during in-flight testing, the dimensions of the UNSW Autonomous Systems Laboratory are replicated in a Gazebo environment shown in Figure 6. A single AprilTag is then placed at the expected real-world coordinates, and a modelled quadcopter is inserted at the expected take-off point. A detailed comparison between the CAD model used in Gazebo and the actual quadcopter hardware is provided in Appendix B.2. To minimise software variation between simulation and real-world environments, the PX4 Autopilot framework [33] is utilised in both simulation and real-world environments. Virtual and physical sensors are selected when switching between the environments.

4.2.2. Real-World Flight Test Configuration

The physical validation is performed using a quadcopter based on the Alien 450 (HJ, Shenzhen, China) platform equipped with a RealSense D400 camera (Intel Corporation, Santa Clara, CA, USA) operating without depth information. The camera is rigidly mounted to the quadcopter frame above the propellers to maintain target visibility during approach manoeuvres. The test environment consists of a 5   m × 5   m × 2.4   m flight volume within the Autonomous Systems Laboratory, as illustrated in Figure 7. A single 36h11 AprilTag with a width of 0.25   m is mounted on a rigid stand at a height of 1.5   m . As AprilTags allows six-degree-of-freedom pose estimation without stereo camera requirements through known physical tag dimensions and camera intrinsics, it only requires a single AprilTag to determine the quadcopter pose relative to the tag.

4.3. Approach Test Results

This section verifies the regulating performance of the LQR controller used for trajectory tracking. An initial position error of
x error ( 0 ) = 1.82   m , y error ( 0 ) = 0.065   m , z error ( 0 ) = 0.33   m
is considered to test both the Gazebo simulation and the real-world test. This initial position error is obtained through the relative distance between the take-off point in the middle of the laboratory and the placement of the AprilTag.
The validation results shown in Figure 8 demonstrate strong agreement between the simulation and real-world implementation across all three axes. For the y-axis, both the simulation and real-world responses maintain reference tracking with minimal deviation, exhibiting peak errors below 0.05   m throughout the test duration, with well-bounded oscillations indicating stable lateral control. For the z-axis, while both the simulation and real-world tests successfully converge from their initial offsets to the reference trajectory within 10   s , the real-world system demonstrates notably faster initial response and reaches steady-state earlier than the simulation. This is largely due to parametric and structured uncertainties between the CAD model and the real-world quadcopter. The x-axis yields successful tracking performance during the approach task, with both simulation and real-world systems closely following the reference trajectory from 1.82   m to 0.60   m , achieving a steady-state response at the 30   s mark.

4.4. Load Swing Attenuation

The stabilisation algorithm aims to satisfy the problem statement of ensuring flight stability after the release of the extension arm. Furthermore, the control objective necessitates attenuating the load-swing motion faster than the natural damping when no controller is applied.

Model Simulation

Due to the low velocity of the optimised trajectory, the linear drag that affects the quadcopter’s translation is zeroed for these simulations. The response of the TVLQR controller is first examined, which provides local feedback to the optimised trajectory with nominal parameters.
As expected, by tracking the optimised trajectory in Figure 9, the proposed controller successfully attenuates the load-swing motion of the pendulum. As the simulated behaviour does not introduce uncertainties, the optimal acceleration input is expected to track the trajectory perfectly. However, minor tracking errors are expected due to the effects of the collocation error between collocation points, where the optimised trajectory does not entirely satisfy the system dynamics between the collocation points. Furthermore, it is expected that numerical errors introduce discrepancies between the optimiser dynamics and the RK4 simulation. This indicates that using an inverse dynamics-based control strategy with a TVLQR feedback controller can successfully track the optimal reference trajectory for load-swing attenuation. Compared to the unforced response of the payload swing, the load-swing motion is successfully forced to zero before the simulation ended. Some model uncertainties are then introduced to the simulation. By increasing the quadcopter and load masses by a factor of 0.8 and 1.2 , it is shown in Figure 10 that the feedback controller is still able to successfully complete the attenuation task.
Despite the large parametric uncertainty, it is demonstrated that the TVLQR feedback is able to successfully attenuate the load swing. However, it is noted that large parameter uncertainties can cause the feedback controller to be incapable of fully tracking the z-position state during the trajectory. This is due to the large variation in mass of the system (≈0.4 kg), leading to a large residual force between the trajectory-determined force and required force in the z direction. Finally, a wind disturbance is modelled as a Gaussian distributed force with a mean and standard deviation of x ¯ = 5 N , σ = 1.0 . It can be seen from Figure 11 that the load-swing objective is successfully executed, while abiding by the optimised trajectory.

5. Discussion

This study has demonstrated the effectiveness of the proposed AprilTag-based pose estimation and time-invariant LQR feedback for achieving visual servoing in approaching the payload. Furthermore, it has been shown that trajectory optimisation, combined with TVLQR local feedback, permits load-swing attenuation in quadcopter–payload systems under a variety of disturbances and model uncertainties.
The effectiveness of the visual servoing controller has been confirmed through numerical simulations, Gazebo-based software-in-the-loop simulations, and real-world experiments. The quadcopter–payload system has been successfully stabilised following the release of the payload arm via the proposed feedforward and feedback control scheme, outperforming natural damping. The simulations with nominal parameters have shown near-perfect trajectory tracking, with minor errors attributed to collocation and numerical discrepancies. The TVLQR controller combined with an optimised trajectory has been able to attenuate the load swing under significant parametric uncertainty (e.g., a 20% increase in quadcopter and load masses). These results have validated the robustness of the proposed control framework and its applicability to real-world scenarios involving model uncertainties.

Author Contributions

Writing and draft preparation, B.F.; review and editing, A.K.; formal analysis and validation, B.F. and A.K.; supervision, A.K. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors upon request.

Conflicts of Interest

The authors declare no conflicts of interest.

Appendix A

Appendix A.1. Equations of Motion Derivation

In the following section, we include a brief derivation of the quadcopter–payload system model. We adapt the derivation found in [34] with changes to include the Rayleigh dissipation function. The position of the payload is characterised through the pendulum arm length, l, and the suspension angles ϕ l and θ l . We express the position of the payload relative to the quadcopter as r S = 0 0 l T in a downward-pointing frame S . We then perform three rotations to express the position of the payload in the world reference frame B , where the quadcopter position is defined:
r l W = R x ( π ) R y ( θ ) R x ( ϕ ) r S + r q = cos θ l sin ϕ l sin θ l cos ϕ l sin θ l 0 cos ϕ l sin ϕ l sin θ l sin ϕ l cos θ l cos ϕ l cos θ l 0 0 l + x q y q z q = x q + l cos ( ϕ l ) sin ( θ l ) y q + l sin ( ϕ l ) z q l cos ( ϕ l ) cos ( θ l ) .
We apply the Euler–Lagrange method to obtain the equations of motion of the system. The kinetic and potential energies of the payload are obtained to determine the Lagrangian of the system,
T sys = T q , trans + T q , rot + T l , trans ,
such that
T q , trans = 1 2 m q x ˙ q 2 + 1 2 m q y ˙ q 2 + 1 2 m q z ˙ q 2 = 1 2 r q ˙ T m q r q ˙ ,
T l , trans = 1 2 m l x ˙ l 2 + 1 2 m l y ˙ l 2 + 1 2 m l z ˙ l 2 = 1 2 r l ˙ T m l r l ˙ ,
T q , rot = 1 2 I x x ω x 2 + 1 2 I y y ω y 2 + 1 2 I z z ω z 2 = 1 2 ω T I ω .
where x l , y l , and z l represent the Cartesian coordinates of the payload in frame W. The potential energy of the system can be defined as the sum of potential energies of the quadcopter and payload:
V sys = V q + V l = m q g z q + m l g ( z q l cos ( ϕ l ) cos ( θ l ) ) .
The equations of motion for the payload can then be derived using the Euler–Lagrange formulation:
d d t δ L δ q ˙ k δ L δ q k + δ P δ q k ˙ = f k k { 1 8 } ,
where,
L = T s y s V s y s = 1 2 m q r q ˙ T r q ˙ + 1 2 m q r l ˙ T r l ˙ + 1 2 I ω T ω m q g z q m l g ( z q l cos ( ϕ l ) cos ( θ l ) ) .
where P represents a dissipation function. The Rayleigh dissipation function P has been included in Equation (A7) to capture the linear drag effects of quadcopter translation and is defined as follows:
P = 1 2 k q , d , x x q ˙ 2 + k q , d , y y q ˙ 2 + k q , d , z z q ˙ 2 ,
where k q , d , x , k q , d , y , and k q , d , z represent the drag coefficients of the quadcopter in the x, y, and z axes.

Effect of Aerodynamic Drag on Payload Motion

The effect of aerodynamic drag always acts opposite to the velocity of the payload. The non-trivial velocity of the payload during the load-swing motion due to the combination of quadcopter translation and payload swing results in a non-trivial maximum payload velocity. This produces a non-trivial drag force. Hence, the drag force acting on the payload is approximated using the quadratic drag equation,
F l , d = 1 2 ρ v 2 C D A ,
where v represents the tangential velocity of the payload, C D represents the drag coefficient of the payload, A represents the cross-sectional area of the payload, and ρ represents the density of air. The quadratic drag equation is simplified by converting the linear quantities to their angular counterparts, where ω represents the angular velocity and r represents the radius from the point of rotation. This yields
F l , d = k l , d ( ω r ) 2 ,
where k l , d represents the aggregated load drag constant (combining ρ , C D , and A). The effect of the drag force on the payload swing angle is best characterised as a torque on each of the swing angles ϕ l and θ l . After substituting r = l , we obtain an expression for the drag torque in ω :
τ l , d = k l , d l 3 ω 2 ω ˙ | ω ˙ | .

Appendix A.2. Equations of Motion Matrices

M = m l + m q 0 0 0 0 0 l m l sin ϕ l sin θ l l m l cos ϕ l cos θ l 0 m l + m q 0 0 0 0 l m l cos ϕ l 0 0 0 m l + m q 0 0 0 l m l cos θ l sin ϕ l l m l cos ϕ l sin θ l 0 0 0 i xx 0 0 0 0 0 0 0 0 i yy 0 0 0 0 0 0 0 0 i zz 0 0 l m l sin ϕ l sin θ l l m l cos ϕ l l m l cos θ l sin ϕ l 0 0 0 l 2 m l 0 l m l cos ϕ l cos θ l 0 l m l cos ϕ l sin θ l 0 0 0 0 l 2 m l cos ϕ l 2 C = 0 0 0 0 0 0 l m l cos ϕ l sin θ l ϕ l ˙ + cos θ l sin ϕ l θ l ˙ l m l cos θ l sin ϕ l ϕ l ˙ + cos ϕ l sin θ l θ l ˙ 0 0 0 0 0 0 l m l sin ϕ l ϕ l ˙ 0 0 0 0 0 0 0 l m l cos ϕ l cos θ l ϕ l ˙ sin ϕ l sin θ l θ l ˙ l m l cos ϕ l cos θ l θ l ˙ sin ϕ l sin θ l ϕ l ˙ 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 l 2 m l cos ϕ l sin ϕ l θ l ˙ 0 0 0 0 0 0 l 2 m l cos ϕ l sin ϕ l θ l ˙ l 2 m l cos ϕ l sin ϕ l ϕ l ˙ G = 0 0 g m l + m q 0 0 0 g l m l cos θ l sin ϕ l g l m l cos ϕ l sin θ l T D = k q , d , x x q ˙ k q , d , y y q ˙ k q , d , z z q ˙ 0 0 0 k ql l 3 ϕ l ˙ 2 ϕ l ˙ ϕ l ˙ k ql l 3 θ l ˙ 2 θ l ˙ θ l ˙ T Q = F x q F y q F z q τ ϕ q τ θ q τ ψ q 0 0 T

Appendix B

Appendix B.1. Cuda-Accelerated AprilTag Detection

Appendix B.1.1. Acceleration Opportunities

The CPU-based AprilTag3 primarily suffered in areas of thresholding, connected component labelling, clustering of connected components, calculating cluster bounds and point slopes. To an extent, a majority of these are embarrassingly parallel problems that could be accelerated through the use of a graphics processing unit (GPU). In the following sections, we refer to the CPU-based approach as AprilTag3, and the GPU-accelerated approach as AprilTag CUDA.

Appendix B.1.2. Decimation and Thresholding

The decimation stage reduced computational complexity by downsampling the input image by a configurable factor. A kernel performed this operation by sampling every n-th pixel ( x · n , y · n ) , in both spatial dimensions, to an output pixel ( x , y ) , where n represented the decimation factor.
The thresholding stage employs a direct port of the adaptive local thresholding approach used in AprilTag3 [24] to convert the decimated grey-scale image into a binary representation suitable for connected component analysis. Instead of the sequential CPU execution, we employed the four following CUDA kernels executed in sequence. We began by computing the minimum and maximum pixel intensities for tiles of image pixels. This tile-based approach enabled locally adaptive thresholding that accommodated non-uniform illumination. We then computed a per-tile threshold value as the midpoint between the smoothed minimum and maximum intensity values – t = min + ( max min ) / 2 . Tiles exhibiting insufficient contrast are marked with an intermediate grey value to indicate ambiguous regions. For tiles with sufficient contrast, pixels exceeding the threshold are set to white, while those below are set to black. A final kernel processed pixels at image boundaries that do not align with complete tiles. These edge pixels inherit the threshold value from the nearest complete tile, ensuring comprehensive coverage of the entire image.

Appendix B.1.3. Connected Component Labelling

The connected component labelling (CCL) step was achieved through an implementation of the direct CCL approach explored by Playne et al. in [35]. An initial kernel assigns provisional labels based on previously processed neighbours (north, west, north-west, north-east) in raster-scan order. A flattening operation then collapses the union-find trees by finding root parents, and a label reduction handles diagonal configurations requiring component merging through atomic operations. The algorithm processes pixels in parallel using 32 × 32 thread blocks and maintains label equivalences through the union-find parent array to ensure globally consistent component labelling.

Appendix B.1.4. Clustering

The CUDA implementation of the gradient clustering algorithm restructures the AprilTag3 approach to exploit GPU parallelism through a multi-kernel pipeline. Fundamentally, the CPU-based implementation stored cluster points within a dynamic array, with unique cluster identifiers stored in a hash map with linked-list collision resolution. To parallelise, we first decomposed the algorithm to compute root pixels and diagonal connectivity for all image pixels. This eliminates the sequential dependency of checking for diagonal connectivity; an arbitrary diagonal connection could be added twice, first from pixel ( x , y ) checking its diagonal ( x + 1 , y + 1 ) , second from pixel ( x + 1 , y ) checking its diagonal ( x , y + 1 ) . We then compute unique integer cluster identifiers for all pixels and leverage parallel sort and reduction to obtain a sorted and de-duplicated list of cluster identifiers. A similar strategy was used to then determine the size of, and starting location of each cluster in linear device memory. We finally obtain gradient information for each point and save sequentially from the starting location of each cluster through atomic operations. In addition, we then compute geometric statistics for each cluster to pre-filter excessively small clusters to reduce the number of clusters that the existing sequential quadrilateral fitting and decoding algorithms need to process.

Appendix B.1.5. Integration with AprilTag3

Following clustering, a small number of candidate clusters exist to be processed by the AprilTag3 library’s quadrilateral fit and decoding functions. To minimise copy overhead, we only copy the starting memory locations, capacities, and cluster points from the device to pre-allocated host memory (of image size). The existing dynamic array implementation from AprilTag3 was then created with data buffers pointing to the linear memory segment containing cluster points.

Appendix B.2. Gazebo Model and Physical Hardware

The CAD model and physical quadcopter exhibited several key differences, as shown in Figure A1. In the Gazebo simulation environment, we primarily relied on the open-source NXP HoverGames drone platform [36] as a basis. This resulted in a difference between the skid-type versus leg-type landing gear configuration on the simulation platform and the real world, respectively. Additionally, we modelled the extension arm as a simple rod on a cylindrical joint for computational efficiency, whereas the physical implementation features a more robust assembly. While the physical system includes additional hardware without high-fidelity models in the simulation CAD model, including the battery, Intel NUC (or Jetson Orin Nano, depending on quadcopter configuration), payload encoder, and associated wire harnesses, we ensured that the simulation mass and moment of inertia were updated in the simulation to closely resemble the real-world counterpart. Despite these simplifications, we maintained consistency in the core structural elements, including frame geometry, rotor placement, and horizontal arm configuration between our simulation model and physical prototype, ensuring the validity of our dynamic analysis while optimising computational performance in the Gazebo environment.
Figure A1. CAD model (left) and physical quadcopter (right). Note that the physical quadcopter had the extension arm in a reverse, stowed position in the image.
Figure A1. CAD model (left) and physical quadcopter (right). Note that the physical quadcopter had the extension arm in a reverse, stowed position in the image.
Sensors 25 05518 g0a1

References

  1. Carter, S.; Johnson, T.; Lidel, S.; Riedel, R.; Tusch, L. Drone Delivery: More Lift than You Think; McKinsey & Company: New York, NY, USA, 2022. [Google Scholar]
  2. Bauersfeld, L.; Scaramuzza, D. Range, Endurance, and Optimal Speed Estimates for Multicopters. arXiv 2021, arXiv:2109.04741. [Google Scholar] [CrossRef]
  3. Sadr, S.; Moosavian, S.; Zarafshan, P. Dynamics Modeling and Control of a Quadrotor with Swing Load. J. Robot. 2014, 2014, 265897. [Google Scholar] [CrossRef]
  4. Weijers, M. Minimum Swing Control of a UAV with a Cable Suspended Load. Master’s Thesis, University of Twente, Enschede, The Netherlands, 2015. [Google Scholar]
  5. Urbina-Brito, N.; Guerrero-Sánchez, M.; Valencia-Palomo, G.; Hernández-González, O.; López-Estrada, F.; Hoyo-Montaño, J. A Predictive Control Strategy for Aerial Payload Transportation with an Unmanned Aerial Vehicle. Mathematics 2021, 9, 1822. [Google Scholar] [CrossRef]
  6. Cicolani, L.; Kanning, G. Equations of Motion of Slung-Load Systems, Including Multilift Systems; Technical Paper; NASA Ames Research Center: Mountain View, CA, USA, 1992. [Google Scholar]
  7. Bisgaard, M.; Bendtsen, J.; la Cour-Harbo, A. Modeling of Generic Slung Load System. J. Guid. Control Dyn. 2009, 32, 573–585. [Google Scholar] [CrossRef]
  8. Jain, R.P.K. Transportation of Cable Suspended Load Using Unmanned Aerial Vehicles: A Real-Time Model Predictive Control Approach. Master’s Thesis, TU Delft, Delft, The Netherlands, 2015. [Google Scholar]
  9. Shankar, A.; Elbaum, S.; Detweiler, C. Towards In-Flight Transfer of Payloads Between Multirotors. IEEE Robot. Autom. Lett. 2020, 5, 6201–6208. [Google Scholar] [CrossRef]
  10. Keipour, A.; Pereira, G.; Bonatti, R.; Garg, R.; Rastogi, P.; Dubey, G.; Scherer, S. Visual Servoing Approach to Autonomous UAV Landing on a Moving Vehicle. Sensors 2022, 22, 6549. [Google Scholar] [CrossRef] [PubMed]
  11. Keshmiri, M. Image Based Visual Servoing Using Trajectory Planning and Augmented Visual Servoing Controller. Ph.D. Thesis, Concordia University, Montreal, QC, Canada, 2014. [Google Scholar]
  12. De Crousaz, C.; Farshidian, F.; Buchli, J. Aggressive Optimal Control for Agile Flight with a Slung Load; Technical Report; ETH Zurich, Agile and Dexterous Robotics Lab: Zürich, Switzerland, 2014. [Google Scholar]
  13. Us, K.; Cevher, A.; Sever, M.; Kirli, A. On the Effect of Slung Load on Quadrotor Performance. Procedia Comput. Sci. 2019, 158, 346–354. [Google Scholar] [CrossRef]
  14. Pratama, G.; Masngut, I.; Cahyadi, A.; Herdjunanto, S. Robustness of PD control for transporting quadrotor with payload uncertainties. In Proceedings of the 2017 3rd International Conference on Science and Technology—Computer (ICST), Yogyakarta, Indonesia, 11–12 July 2017; Volume 7, pp. 11–15. [Google Scholar] [CrossRef]
  15. Alothman, Y.; Gu, D. Quadrotor transporting cable-suspended load using iterative Linear Quadratic regulator (iLQR) optimal control. In Proceedings of the 2016 8th Computer Science and Electronic Engineering (CEEC), Colchester, UK, 28–30 September 2016; Volume 9, pp. 168–173. [Google Scholar] [CrossRef]
  16. Bangura, M.; Mahony, R. Real-time Model Predictive Control for Quadrotors. IFAC Proc. Vol. 2014, 47, 11773–11780. [Google Scholar] [CrossRef]
  17. Yuan, X.; Ren, X.; Zhu, B.; Zheng, Z.; Zuo, Z. Robust H Control for Hovering of a Quadrotor UAV with Slung Load. In Proceedings of the 2019 12th Asian Control Conference (ASCC), Kitakyushu, Japan, 9–12 June 2019; pp. 114–119. [Google Scholar]
  18. Guerrero-Sánchez, M.; Lozano, R.; Castillo, P.; Hernández-González, O.; García-Beltrán, C.; Valencia-Palomo, G. Nonlinear Control Strategies for a UAV Carrying a Load with Swing Attenuation. Appl. Math. Model. 2021, 91, 709–722. [Google Scholar] [CrossRef]
  19. Potdar, N. Online Trajectory Planning and Control of a MAV Payload System in Dynamic Environments: A Non-Linear Model Predictive Control Approach. Master’s Thesis, TU Delft, Delft, The Netherlands, 2020. [Google Scholar]
  20. de Almeida, M.; Raffo, G. Nonlinear Control of a TiltRotor UAV for Load Transportation. IFAC-PapersOnLine 2015, 48, 232–237. [Google Scholar] [CrossRef]
  21. Faust, A.; Palunko, I.; Cruz, P.; Fierro, R.; Tapia, L. Learning swing-free trajectories for UAVs with a suspended load. In Proceedings of the 2013 IEEE International Conference on Robotics and Automation, Karlsruhe, Germany, 6–10 May 2013; Volume 5, pp. 4902–4909. [Google Scholar] [CrossRef]
  22. Panetsos, F.; Karras, G.; Kyriakopoulos, K. A Deep Reinforcement Learning Motion Control Strategy of a Multi-rotor UAV for Payload Transportation with Minimum Swing. In Proceedings of the 2022 30th Mediterranean Conference on Control and Automation (MED), Vouliagmeni, Greece, 28 June–1 July 2022; Volume 6, pp. 368–374. [Google Scholar] [CrossRef]
  23. NVIDIA Corporation. CUDA Toolkit; NVIDIA Corporation: Santa Clara, CA, USA, 2024. [Google Scholar]
  24. Olson, E. AprilTag 3. 2023. Available online: https://github.com/AprilRobotics/apriltag (accessed on 15 June 2025).
  25. Kelly, M. An Introduction to Trajectory Optimization: How to Do Your Own Direct Collocation. SIAM Rev. 2017, 59, 849–904. [Google Scholar] [CrossRef]
  26. Tedrake, R. Underactuated Robotics. 2024. Available online: https://underactuated.mit.edu/ (accessed on 11 June 2025).
  27. Becerra, V. Solving complex optimal control problems at no cost with PSOPT. In Proceedings of the 2010 IEEE International Symposium on Computer-Aided Control System Design, Yokohama, Japan, 8–10 September 2010; pp. 1391–1396. [Google Scholar] [CrossRef]
  28. Chen, C. Linear System Theory and Design, 3rd ed.; Oxford University Press, Inc.: New York, NY, USA, 1998. [Google Scholar]
  29. Bryson, A.; Ho, Y. Applied Optimal Control; Blaisdell: New York, NY, USA, 1969. [Google Scholar]
  30. Tobenkin, M.; Manchester, I.; Tedrake, R. Invariant Funnels around Trajectories using Sum-of-Squares Programming. arXiv 2010, arXiv:1010.3013. [Google Scholar] [CrossRef]
  31. Reist, P.; Tedrake, R. Simulation-based LQR-trees with input and state constraints. In Proceedings of the 2010 IEEE International Conference on Robotics and Automation, Anchorage, AK, USA, 3–7 May 2010; pp. 5504–5510. [Google Scholar] [CrossRef]
  32. ISO/IEC 14882:2011; Information Technology—Programming Languages—C++. International Organization for Standardization: Geneva, Switzerland, 2011.
  33. PX4 Development Team. PX4 Autopilot Software. 2025. Available online: http://px4.io (accessed on 15 June 2025).
  34. Klausen, K.; Fossen, T.; Johansen, T. Nonlinear control of a multirotor UAV with suspended load. In Proceedings of the 2015 International Conference on Unmanned Aircraft Systems (ICUAS), Denver, CO, USA, 9–12 June 2015; Volume 6, pp. 176–184. [Google Scholar] [CrossRef]
  35. Playne, D.P.; Hawick, K. A New Algorithm for Parallel Connected-Component Labelling on GPUs. IEEE Trans. Parallel Distrib. Syst. 2018, 29, 1217–1230. [Google Scholar] [CrossRef]
  36. NXP Semiconductors. NXP HoverGames Drone Kit Including Flight Controller and Peripherals; NXP Semiconductors: Eindhoven, The Netherlands, 2024. [Google Scholar]
Figure 1. Reference frames.
Figure 1. Reference frames.
Sensors 25 05518 g001
Figure 2. Optimised trajectory.
Figure 2. Optimised trajectory.
Sensors 25 05518 g002
Figure 3. Pose-based visual servoing control block diagram.
Figure 3. Pose-based visual servoing control block diagram.
Sensors 25 05518 g003
Figure 4. Load swing attenuation control block diagram.
Figure 4. Load swing attenuation control block diagram.
Sensors 25 05518 g004
Figure 5. Invariant funnel of the optimised trajectory under TVLQR feedback.
Figure 5. Invariant funnel of the optimised trajectory under TVLQR feedback.
Sensors 25 05518 g005
Figure 6. Simulated environment layout showing the virtual quadcopter initial position and AprilTag target location.
Figure 6. Simulated environment layout showing the virtual quadcopter initial position and AprilTag target location.
Sensors 25 05518 g006
Figure 7. Real-world environment layout showing the quadcopter’s initial position and AprilTag target location.
Figure 7. Real-world environment layout showing the quadcopter’s initial position and AprilTag target location.
Sensors 25 05518 g007
Figure 8. Validation results for the simulated versus real-world visual servoing-based trajectory following.
Figure 8. Validation results for the simulated versus real-world visual servoing-based trajectory following.
Sensors 25 05518 g008
Figure 9. Closed-loop controller response.
Figure 9. Closed-loop controller response.
Sensors 25 05518 g009
Figure 10. Closed loop controller response under parametric uncertainty.
Figure 10. Closed loop controller response under parametric uncertainty.
Sensors 25 05518 g010
Figure 11. Closed-loop controller response under wind disturbance force.
Figure 11. Closed-loop controller response under wind disturbance force.
Sensors 25 05518 g011
Table 1. Trajectory generation input constraints.
Table 1. Trajectory generation input constraints.
Inputu (Min)u (Max)
F x ( N ) −30.030.0
F y ( N ) −30.030.0
F z ( N ) 0.025.0
τ ϕ ( N   m ) −1.01.0
τ θ ( N   m ) −1.01.0
τ ψ ( N   m ) −1.01.0
τ θ l ( N   m ) 0.00.0
τ ψ l ( N   m ) 0.00.0
Table 2. Trajectory generation state constraints.
Table 2. Trajectory generation state constraints.
Statexi (Min)xi (Max)xn (Min)xn (Max)xf (Min)xf (Max)
x q ( m ) 0.00.0−2.02.0−2.02.0
y q ( m ) 0.00.00.00.00.00.0
z q ( m ) 0.00.0−1.02.0−1.02.0
ϕ q ( rad ) 0.00.0 0.5 · π 0.5 · π 0.00.0
θ q ( rad ) 0.00.0 0.5 · π 0.5 · π 0.00.0
ψ q ( rad ) 0.00.0 0.5 · π 0.5 · π 0.00.0
ϕ l ( rad ) 0.00.0 π π 0.00.0
θ l ( rad ) 0.5 · π 0.5 · π 0.5 · π 1.5 · π π π
x ˙ q ( m   s 1 ) 0.00.0−5.05.00.00.0
y ˙ q ( m   s 1 ) 0.00.0−2.02.00.00.0
z ˙ q ( m   s 1 ) 0.00.0−5.05.00.00.0
ϕ ˙ q ( rad   s 1 ) 0.00.0−10.010.00.00.0
θ ˙ q ( rad   s 1 ) 0.00.0−10.010.00.00.0
ψ ˙ q ( rad   s 1 ) 0.00.0−10.010.00.00.0
ϕ ˙ l ( rad   s 1 ) 0.00.0 0.00.0
θ ˙ l ( rad   s 1 ) 0.00.0 0.00.0
Min and Max values for each state at the initial ( x i ), knot ( x n ), and final ( x f ) time points.
Table 3. AprilTag CUDA v1.0 vs AprilTag 3 v3.4.4 performance comparison.
Table 3. AprilTag CUDA v1.0 vs AprilTag 3 v3.4.4 performance comparison.
LibrarySystemTag36h11
640 × 480
Tag36h11
1280 × 720
Tag36h11
1600 × 900
AprilTag CUDA v1.0System: NVIDIA Jetson Orin Nano 8 GB
CPU: 6-core ARM A78AE @ 1.98 GHz
GPU: 1024-core Ampere
μ : 2.242 ms
σ : 0.331 ms
μ : 13.113 ms
σ : 0.383 ms
μ : 17.295 ms
σ : 0.485 ms
AprilTag3 v3.4.4System: NVIDIA Jetson Orin Nano 8 GB
CPU: 6-core ARM A78AE @ 1.98 GHz
GPU: Unused
μ : 5.398 ms
σ : 1.006 ms
μ : 46.839 ms
σ : 7.346 ms
μ : 55.491 ms
σ : 9.585 ms
AprilTag3 v3.4.4System: Intel NUC5i7RYB
CPU: 2-core Intel Core i7-5557U @ 3.10 GHz
GPU: Unused
μ : 2.833 ms
σ : 0.627 ms
μ : 42.172 ms
σ : 2.377 ms
μ : 45.793 ms
σ : 1.953 ms
Table 4. Physical parameters.
Table 4. Physical parameters.
SymbolDefinitionValueUnit
gGravitational acceleration9.810m s −2
m l Load mass0.100kg
m q Quadrotor mass2.064kg
lArm Length0.500m
k q d x , k q d y , k q d z Quadcopter Damping Coefficients0.000N m−1
k q d l Payload Damping Coefficient0.0129N m rad−1
i x x Moment of inertia about x-axis0.00291kg m2
i y y Moment of inertia about y-axis0.00291kg m2
i z z Moment of inertia about z-axis0.00552kg m2
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Feng, B.; Khatamianfar, A. Load-Swing Attenuation in a Quadcopter–Payload System Through Trajectory Optimisation. Sensors 2025, 25, 5518. https://doi.org/10.3390/s25175518

AMA Style

Feng B, Khatamianfar A. Load-Swing Attenuation in a Quadcopter–Payload System Through Trajectory Optimisation. Sensors. 2025; 25(17):5518. https://doi.org/10.3390/s25175518

Chicago/Turabian Style

Feng, Barry, and Arash Khatamianfar. 2025. "Load-Swing Attenuation in a Quadcopter–Payload System Through Trajectory Optimisation" Sensors 25, no. 17: 5518. https://doi.org/10.3390/s25175518

APA Style

Feng, B., & Khatamianfar, A. (2025). Load-Swing Attenuation in a Quadcopter–Payload System Through Trajectory Optimisation. Sensors, 25(17), 5518. https://doi.org/10.3390/s25175518

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop