Random features approximation for control-affine systems

Kimia Kazemian, Yahya Sattar, Sarah Dean

Abstract: Modern data-driven control applications call for flexible nonlinear models that are amenable to principled controller synthesis and realtime feedback. Many nonlinear dynamical systems of interest are control affine. We propose two novel classes of nonlinear feature representations which capture control affine structure while allowing for arbitrary complexity in the state dependence. Our methods make use of random features (RF) approximations, inheriting the expressiveness of kernel methods at a lower computational cost. We formalize the representational capabilities of our methods by showing their relationship to the Affine Dot Product (ADP) kernel proposed by Castaneda et al. (2021) and a novel Affine Dense (AD) kernel that we introduce. We further illustrate the utility by presenting a case study of data-driven optimization-based control using control certificate functions (CCF). Simulation experiments on a double pendulum empirically demonstrate the advantages of our methods.

Introduction

Modern robotics and automation demand models that balance high flexibility with extreme computational efficiency. While nonlinear dynamics are inherent to physical systems, many of these systems exhibit a specific structure: they are control-affine, meaning the control input enters the dynamics linearly ($\dot{x} = f(x) + g(x)u$).

Kernel methods, such as Gaussian Processes, are frequently employed to model these nonlinearities due to their universal approximation properties. However, standard kernel methods suffer from significant scaling issues—training time typically scales cubically ($O(N^3)$) with the number of data points. Furthermore, generic kernels often fail to respect the control-affine structure. Without this structural prior, the downstream task of finding optimal control inputs becomes a non-convex optimization problem, which is often too slow for real-time feedback loops. This paper proposes a bridge using Random Features (RF) to approximate kernels while strictly enforcing control-affine structure.

Methodology

We introduce two novel random feature representations designed to capture nonlinear state dependencies while remaining affine in control. Both methods utilize Random Fourier Features (RFF)—sinusoidal functions with random weights—to approximate the underlying kernel space.

  1. Affine Dot Product (ADP) Bases: This representation expands the feature dimension proportionally to the number of control inputs. It is designed to approximate the ADP kernel, providing a high-fidelity representation of the system dynamics at a reduced computational cost compared to full kernel methods.
  2. Affine Dense (AD) Bases: We introduce a more compact representation based on a novel "Affine Dense" kernel. Unlike ADP, which scales its feature dimension by the number of control inputs ($m+1$), the AD representation maintains a constant feature dimension. This makes it particularly attractive for high-dimensional systems with numerous actuators.

By embedding the control-affine structure directly into the basis functions, the resulting model is linear in its parameters. This ensures that controller synthesis can be formulated as a Quadratic Program (QP), which can be solved in milliseconds on modern hardware.

Experimental Evaluation

The proposed methods were evaluated using a simulated double pendulum system (4 states, 2 control inputs). Data was collected from 226 trajectories, resulting in a training set of approximately 8,800 points. The primary task was predicting the time derivative of a scalar "certificate" function used for safety and stability, followed by a swing-up and balance control task.

Accuracy and Convergence

A key requirement for RF methods is that they must converge to the performance of their "infinite-dimensional" kernel counterparts as the number of features increases. As shown in the figure below, both AD-RF and ADP-RF achieve Root Mean Square Error (RMSE) levels nearly identical to the computationally expensive kernel methods (AD-K and ADP-K) once the feature dimension exceeds approximately 2,000.

Figure 1: RMSE vs. feature dimension of state-dependent basis. RF methods converge to kernel baselines as dimension increases.

Computational Efficiency

The primary advantage of the RF approach is speed. While kernel methods have a constant (and high) training cost regardless of the "dimension" (as they depend on the number of data points), RF methods scale with the number of features.

Figure 2: Average train time vs. feature dimension. AD-RF remains significantly more efficient than both kernel methods and the ADP-RF variant at high dimensions.

As illustrated in the training time analysis, the AD-RF method is exceptionally efficient. While the ADP-RF method's training time increases significantly with feature dimension (eventually exceeding the kernel baseline), the AD-RF method remains well below the kernel training time even at 8,000 features. This suggests that for a fixed computational budget, one can afford a much higher feature dimension with AD-RF, potentially leading to better overall accuracy.

Conclusion

This work demonstrates that embedding structural priors—specifically control-affine dynamics—into random feature representations allows for highly expressive nonlinear modeling without sacrificing real-time performance. In the double pendulum swing-up task, data-driven controllers using these features successfully stabilized the system where nominal physics-based models failed.

Future work will focus on integrating principled active learning to improve data acquisition efficiency and extending these representations to broader control architectures like Model Predictive Control (MPC) and robust control frameworks that require formal uncertainty quantification.

Summary updated

BibTeX
@inproceedings{kazemian2024random,
  author = {Kimia Kazemian and Yahya Sattar and Sarah Dean},
  title = {{Random features approximation for control-affine systems}},
  booktitle = {L4DC},
  year = {2024},
  url = {https://openreview.net/forum?id=HnBPGbgiZu},
}
Figure