A Neural Network Approach towards Real-Time Knot Point Density Estimates for the Nonlinear Quadrotor
Authors: Jasmine Ratchford, Raffaele Romagnoli, Mark H. Klein
Organizations: Software Engineering Institute, Carnegie Mellon University, Pittsburgh, PA 15213, USA · School of Science and Engineering, Duquesne University, Pittsburgh, PA 15213, USA · Software Engineering Institute, Carnegie Mellon University, Pittsburgh, PA 15235, USA
Spline representations provide a compact way to approximate continuous trajectories using a finite number of parameters. When approximating trajectories generated by dynamical systems, the efficiency of a spline representation depends strongly on the placement of knot points. Uniform knot distributions often lead to inefficient representations, requiring either unnecessary control points or producing poor approximations in regions where the trajectory varies rapidly. In this work we propose a learning-based method for adaptive knot placement in B-spline approximations of trajectories generated by ordinary differential equations. A neural network learns a mapping from the initial condition of the system to quantities that characterize the local variation of the resulting trajectory. These estimates are used to construct nonuniform knot distributions that approximately equidistribute a local error indicator, reducing the number of control points needed to meet a prescribed accuracy.
Figures & tables
Parameter
Value
Quadrotor Dynamics
Total system mass
0.600 kg
Quadrotor body mass
0.410 kg
Propeller radius
0.0504 meters
Arm length
0.108 meters
Propeller mass
0.00311 kg
TABLE I: Parameter values used in data generation and processing
Layer Type
Input
Output
Param.
Linear / SiLU
12
64
832
Linear / SiLU
64
64
4160
Linear / SiLU
64
64
4160
Linear / SiLU + Reshape +
64
(6,32)
12492
BatchNorm
Upsample + Conv1d/SiLU
(6,32)
(6,128)
186
TABLE II: The architecture used to predict the jerk activity envelope from initial conditions.
Fig. 1: A scatter plot comparing the true jerk activity (x-axis) to the predicted activity (y-axis) (blue) for every sample location along each trajectory, for every trajectory, (purple) averaged per trajectory. The inset histogram shows the distribution of the per-sample jerk percent relative error. The predicted jerk activity matches the true jerk activity well at a per-sample and per-trajectory level.
Fig. 2: A histogram showing the number of trajectories for which our algorithm prescribed a given number of knots based on a prediction of its jerk throughout the trajectory.
Fig. 3: Top: A single example trajectory in a single dimension. The true trajectory is shown in black, but is mostly overlaid by the spline fits to the trajectory using the predicted (blue) and evenly spaced (orange) knot points. The knot point locations are given by ticks near the x-axis of the plot. The control point Greville abscissa locations are given by the carrots that match the spline fit color. Bottom: residuals between the true trajectory and each of the spline fits.
Fig. 4: Control point distance from the trajectory compared to the jerk activity associated with the nearest sample point. Blue: control points predicted with the jerk activity method. Orange: control points associated with even distribution. Individual control points are shown as a light, semi-transparent scatter of points. Mean values are shown in opaque colors with connecting lines.
Fig. 5: The root mean squared error (RMSE) comparing the spline predicted trajectory with the true trajectory compared the number of knots suggested by the prediction method used for evenly spaced (orange) and jerk-predicted (blue) knot locations. The RMSE for jerk-predicted knots is roughly flat and unaffected by the number of knot points. The evenly spaced knots have a higher RMSE at low number of knot points. This occurs because uniform placement does not adapt to the trajectory’s jerk activity, leading to poorer fits when knots are sparse.
Autonomous systems that navigate their environment need methods to quickly assess the feasibility and safety of desired trajectories. Traditional solutions that rely on numerical integration can be computationally heavy, while fast data-driven surrogates lack the formal guarantees that numerical approaches provide. This work demonstrates a framework that uses (1) a neural network with a spectral backbone to learn trajectories and quantile bands with built-in constraints (initial conditions and stability); (2) a modified conformal quantile regression to provide calibrated, joint trajectory-level coverage; and (3) interval arithmetic to extend noise-free coverage guarantees to control points. After refactoring the network for inference, the trajectory inference time for a quadrotor under a closed-loop linear quadratic regulator is 3.45ms on a Raspberry Pi Zero 2 W. The total pipeline time, including trajectory inference time, is 9.81ms, or approximately 100~Hz, consistent with typical control rates.
Jasmine Ratchford, Raffaele Romagnoli
CMU Software Engineering Institute (former affiliation) · Duquesne University
We present an algorithm for efficient domain-adaptive policy learning via kernel representations. Learning domain-adaptive policies is challenging since it requires an environment representation that is both sufficiently expressive to model complex sim-to-real gaps during offline training, and computationally efficient enough to support rapid online adaptation during deployment. For instance, a quadrotor may encounter time-varying, non-stationary disturbances, such as sudden gusts of wind, payload shifts, or transitions between distinct flight regimes with and without ground effects. To address these challenges, we model unknown disturbances using a differentiable kernel approximation based on random Fourier features. During the offline training phase, we randomly sample kernel coefficients and bandwidth parameters to generate a rich diversity of disturbance profiles. We then optimize the control policy via differentiable simulation with analytical gradients, a process that takes only 50 seconds of training time on an RTX 4090 GPU. During hardware deployment, the policy adapts to non-stationary environments in real time by updating both the kernel coefficients and bandwidth through online least-squares estimation. We evaluate our method on quadrotor trajectory tracking tasks across high-fidelity numerical simulations and hardware experiments using Crazyflie, subjected to various disturbances, including complex aerodynamic effects, wind, ground effects, and payload fluctuations.
Quadrotors flying in tight formations are severely affected by turbulent aerodynamic interactions, such as downwash, that can cause catastrophic collisions if left unmodeled. To compensate for these effects, we propose a physics-informed residual dynamics learning framework that captures complex aerodynamic interactions while ensuring the joint multi-quadrotor system remains differentially flat. We leverage this preserved flatness to design a computationally efficient feedback linearization controller that is easily tunable with linear control techniques and cancels aerodynamic disturbances via feedforward compensation. Hardware experiments demonstrate our framework reduces average tracking errors by 31% compared to nominal baselines. Crucially, our lightweight approach matches the tracking performance of state-of-the-art nonlinear model predictive control (NMPC) while requiring an order of magnitude less computation. We are the first to show that stable, tight formation flight can be achieved with under 30 seconds of training data and a 5ms loop rate, unlocking high-fidelity aerodynamic compensation for compute-constrained flight stacks.
Pei-An Hsieh, Fengjun Yang, Nikolai Matni +1
1GRASP Laboratory, University of Pennsylvania, PA, USA